* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

h2 {
    margin-bottom: 20px;
    color: #555;
}

input, select, button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

button {
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #0056b3;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    gap: 10px;
    align-items: center;
}
.user-info span#userInfo {
    cursor: default;
    line-height: 1;
}
.user-info button {
    width: auto;
    padding: 10px 16px;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-info .profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.user-info .profile-icon:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.nav a {
    text-decoration: none;
    color: #666;
    padding: 8px 15px;
    border-radius: 4px;
}

.nav a.active, .nav a:hover {
    background: #007bff;
    color: white;
}

.nav .info-link {
    margin-left: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #007bff;
    color: #007bff;
    font-weight: 700;
    font-family: Georgia, serif;
    line-height: 1;
}

.nav .info-link.active,
.nav .info-link:hover {
    background: #007bff;
    color: white;
}

.doc-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.doc-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 18px;
}

.doc-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.doc-section h3 {
    color: #333;
    margin-bottom: 10px;
}

.doc-section p,
.doc-section li {
    color: #555;
    line-height: 1.55;
    margin-bottom: 8px;
}

.doc-section ul {
    margin-left: 20px;
}

.note-box {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 12px 14px;
    color: #444;
}

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.search-section input, .search-section select {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.search-section button {
    width: auto;
    padding: 12px 30px;
    margin-bottom: 0;
}

.score-card {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.score-card:hover {
    background: #f9f9f9;
    border-color: #007bff;
}

.score-card h3 {
    color: #007bff;
    margin-bottom: 10px;
}

.score-card p {
    margin: 5px 0;
    color: #666;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content ul {
    list-style: none;
    padding: 0;
}

.modal-content li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.modal-content li:last-child {
    border-bottom: none;
}

.modal-content a {
    color: #007bff;
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: bold;
}

.btn-approve {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-reject {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.upload-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

#message {
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
}
/* Centra il contenitore del logo */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

/* Gestisce le dimensioni del logo */
.main-logo {
    max-width: 200px; /* Regola questa larghezza in base ai tuoi gusti */
    height: auto;     /* Mantiene le proporzioni originali */
    display: inline-block;
}
/* Stile per il bottone di download */
.download-icon-btn {
    background-color: #007bff; /* Il blu che stai usando */
    color: white !important;   /* Forza il colore della freccia in bianco */
    text-decoration: none;     /* Rimuove la sottolineatura del link */
    padding: 5px 10px;         /* Spazio interno per dare forma al tasto */
    border-radius: 4px;        /* Arrotonda gli angoli */
    display: inline-flex;      /* Centra l'icona */
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s; /* Effetto al passaggio del mouse */
}

/* Effetto quando si passa sopra con il mouse */
.download-icon-btn:hover {
    background-color: #0056b3; /* Un blu più scuro */
    color: white !important;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 18px;
    }

    .header {
        gap: 8px;
        align-items: center;
    }

    .header .logo-container {
        flex: 0 1 40%;
        min-width: 0;
        margin-bottom: 0;
    }

    .header .main-logo {
        width: 100%;
        max-width: 120px;
    }

    .user-info {
        flex: 0 1 auto;
        min-width: 0;
        gap: 6px;
    }

    .user-info span#userInfo {
        min-width: 0;
        max-width: clamp(70px, 25vw, 130px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-info .profile-icon {
        flex: 0 0 30px;
    }

    .user-info button {
        padding: 8px 10px;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: center;
    }

    .nav a {
        min-width: 0;
        padding: 8px 6px;
        text-align: center;
    }

    .nav .info-link {
        flex: none;
        width: 36px;
        height: 36px;
        margin-left: 0;
        grid-column: 2;
        justify-self: end;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .filter-section {
        flex-wrap: wrap;
    }

    .filter-section input,
    .filter-section select {
        min-width: 0;
    }

    .score-header {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .file-item {
        flex-wrap: wrap;
    }

    .file-link {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.setup-intro {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
}

#siteIconSetupSection label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

#siteIconCropCanvas {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #eee;
    cursor: grab;
    touch-action: none;
}

#siteIconCropCanvas:active {
    cursor: grabbing;
}

#siteIconSetupSection input[type="range"] {
    padding: 0;
}

.crop-help {
    margin: -5px 0 15px;
    color: #666;
    font-size: 13px;
}

#siteIconMessage {
    min-height: 1.25em;
    margin-top: 12px;
    color: #28652c;
    text-align: center;
}

#siteIconMessage.error {
    color: #b42318;
}

#saveSiteIconButton:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
