/* ========================================
   ACCESSIBILITY STYLES
   ======================================== */

/* Skip link - visible only on keyboard focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2196F3;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
    font-weight: bold;
    font-size: 14px;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced focus visibility for keyboard navigation */
*:focus-visible {
    outline: 3px solid #2196F3;
    outline-offset: 2px;
}

/* Remove outline on mouse click */
*:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible,
a:focus-visible,
.upload-box:focus-visible {
    outline: 3px solid #2196F3;
    outline-offset: 2px;
}

/* ========================================
   EXISTING STYLES BELOW
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1 0 auto;
    min-height: calc(100vh - 100px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 40px;
    line-height: 1;
}

.logo-text-line {
    font-size: 20px;
}

.logo-text-line:first-child {
    font-size: 15px;
    letter-spacing: 3.8px;
}

.logo-text-line:last-child {
    letter-spacing: 5px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.left-group {
    display: flex;
    align-items: center;
    gap: 40px;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

/* Loading state - nasconde auth durante validazione token */
.auth-loading-state .auth-buttons,
.auth-loading-state .user-menu {
    visibility: hidden;
    opacity: 0;
}

/* Auth skeleton - placeholder durante loading */
.auth-skeleton {
    display: none;
    width: 190px;
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.auth-loading-state .auth-skeleton {
    display: block;
}

@keyframes shimmer {
    0% {
background-position: 200% 0;
    }
    100% {
background-position: -200% 0;
    }
}	

.btn-login {
    background: none;
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-signup {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-signup:hover {
    background: #0056b3;
}

.btn-signup {
    font-weight: 700;
}
	
	.btn-login:hover {
    	    color: #0056b3;
	}

/* ===== POLICY POPUP STYLES ===== */
.policy-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.policy-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.policy-modal {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.policy-modal h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
}

.policy-modal p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.policy-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.policy-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.policy-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.policy-btn-accept {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.policy-btn-accept:hover {
    background: #0056b3;
}

.policy-btn-decline {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.policy-btn-decline:hover {
    background: #5a6268;
}

.policy-warning {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
opacity: 0;
    }
    to {
opacity: 1;
    }
}

@media (max-width: 600px) {
    .policy-modal {
padding: 25px 20px;
    }

    .policy-modal h2 {
font-size: 20px;
    }

    .policy-modal p {
font-size: 15px;
    }

    .policy-buttons {
flex-direction: column;
    }

    .policy-btn-accept,
    .policy-btn-decline {
width: 100%;
    }
}
/* ===== END POLICY POPUP STYLES ===== */

/* User Menu (quando autenticato) */
.user-menu {
    position: relative;
    display: none;
}

.user-initials-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.user-initials-icon:hover {
    background: #0056b3;
}

/* User Menu Dropdown - Restyled */
.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #e6f0ff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 12px 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
    color: #002b5c;
    margin-top: 8px;
}

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #e6f0ff;
    border-radius: 3px;
    transform: rotate(45deg);
    z-index: -1;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #002b5c;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(0,123,255,0.1);
}

.user-menu-item:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background: rgba(0,123,255,0.1);
}

.user-menu-item.logout {
    color: #c0392b;
    border-top: 1px solid rgba(0,43,92,0.2);
    margin-top: 8px;
    padding-top: 16px;
}

.user-menu-item.logout:hover {
    background: rgba(192,57,43,0.1);
}

.user-menu-item.logout:focus {
    outline: 2px solid #c0392b;
    outline-offset: -2px;
    background: rgba(192,57,43,0.1);
}

/* Main Content */
.main-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    flex: 1;
    min-height: 500px;
    padding-top: 40px;
}

.subtitle {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

.title {
    font-size: 42px;
    font-weight: bold;
    color: #333;
    margin-bottom: 60px;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-box:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.upload-box.dragover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: #666;
}

.upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #666;
    font-size: 14px;
}

.file-size-limit {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* Mantiene padding consistente per evitare collasso, senza forzare altezza */
.upload-box {
    min-height: auto;
}

.progress-container {
    min-height: auto;
}

.translate-section {
    min-height: auto;
}

/* Progress Bar */
.progress-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 16px;
    color: #333;
}

/* Translate Section */
.translate-section {
    display: none;
    text-align: center;
}

.btn-translate {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    margin: 0 auto 20px auto;
    display: block;
    transition: all 0.3s ease;
}

.btn-translate:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-translate:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.file-info {
    background: white;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.files-info {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.file-list-item:last-child {
    border-bottom: none;
}

.file-name {
    color: #333;
    font-size: 16px;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.btn-remove:hover {
    background: #c82333;
}

/* Download XLSX Link */
.download-xlsx {
    font-style: italic;
    color: #333;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.download-xlsx:hover {
    color: #007bff;
}

/* Loading Animation */
.loading-gears {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.document-analysis {
    position: relative;
    width: 80px;
    height: 100px;
}

.document-icon {
    width: 60px;
    height: 80px;
    background: #f8f9fa;
    border: 2px solid #007bff;
    border-radius: 6px;
    position: relative;
    margin: 0 auto;
    padding: 8px;
}

.document-line {
    position: absolute;
    left: 8px;
    right: 8px;
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

.document-line:nth-child(1) {
    top: 8px;
    height: 2px;
    background: #007bff;
    animation: line-highlight-1 2s ease-in-out infinite;
}

.document-line:nth-child(2) {
    top: 16px;
    height: 2px;
    background: #ccc;
    animation: line-highlight-2 2s ease-in-out infinite;
}

.document-line:nth-child(3) {
    top: 24px;
    height: 2px;
    background: #ccc;
    animation: line-highlight-3 2s ease-in-out infinite;
}

.document-line:nth-child(4) {
    top: 32px;
    height: 2px;
    background: #ccc;
    animation: line-highlight-4 2s ease-in-out infinite;
}

.document-line:nth-child(5) {
    top: 40px;
    height: 2px;
    background: #ccc;
    animation: line-highlight-5 2s ease-in-out infinite;
}

@keyframes line-highlight-1 {
    0%, 25% { background: #007bff; }
    25.1%, 100% { background: #ccc; }
}

@keyframes line-highlight-2 {
    0%, 25% { background: #ccc; }
    25.1%, 50% { background: #007bff; }
    50.1%, 100% { background: #ccc; }
}

@keyframes line-highlight-3 {
    0%, 50% { background: #ccc; }
    50.1%, 75% { background: #007bff; }
    75.1%, 100% { background: #ccc; }
}

@keyframes line-highlight-4 {
    0%, 75% { background: #ccc; }
    75.1%, 87.5% { background: #007bff; }
    87.6%, 100% { background: #ccc; }
}

@keyframes line-highlight-5 {
    0%, 87.5% { background: #ccc; }
    87.6%, 100% { background: #007bff; }
}

/* Results Section */
.results-section {
    display: none;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.result-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.result-table-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.result-table-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* Disclaimer generale sotto bottone carica altri file */
.general-disclaimer {
    font-style: italic;
    color: #333;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.results-table {
    width: 100%;
}

.results-table table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.results-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover {
    background: #f8f9ff;
}

/* Colonna confidence */
.confidence-column {
    text-align: center;
}

/* Expanded Table Modal */
.table-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.table-modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 85%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
opacity: 0;
transform: scale(0.9);
    }
    to {
opacity: 1;
transform: scale(1);
    }
}

.table-modal-header {
    background: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-modal-title {
    font-size: 20px;
    font-weight: 600;
}

.table-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.table-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.table-modal-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.expanded-table {
    width: 100%;
    border-collapse: collapse;
}

.expanded-table th,
.expanded-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.expanded-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.expanded-table tr:last-child td {
    border-bottom: none;
}

.expanded-table tr:hover {
    background: #f8f9ff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
}

.file-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f0f8ff;
}

.file-item.selected {
    background: #e3f2fd;
}

.file-checkbox {
    width: 16px;
    height: 16px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.selected-count {
    color: #666;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.btn-modal {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-modal.primary {
    background: #007bff;
    color: white;
}

.btn-modal.secondary {
    background: #6c757d;
    color: white;
}

.btn-modal:hover {
    opacity: 0.9;
}

.btn-modal:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Auth Modals */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    background-color: white;
    margin: 8% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Fix: ensure consistent rounded corners for Sign Up modal only */
#signupModal .auth-modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.auth-modal-header {
    background: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.auth-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.auth-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.auth-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.auth-form-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.auth-form-input.error {
    border-color: #dc3545;
}

.auth-form-input.success {
    border-color: #28a745;
}

.auth-submit-btn {
    width: 100%;
    padding: 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.auth-submit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.auth-switch-mode {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.auth-switch-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.auth-switch-link:hover {
    text-decoration: underline;
}

.auth-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    display: none;
}

.auth-success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
    display: none;
}

.auth-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.auth-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.password-requirements {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
}

.password-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.requirement-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.requirement-icon.valid {
    background: #28a745;
    color: white;
}

.requirement-icon.invalid {
    background: #dc3545;
    color: white;
}

.security-question-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

/* Hidden input */
.hidden {
    display: none;
}

/* Status indicator - DISABILITATO (UI rimossa, solo logging console) */
/*
.status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
    z-index: 1000;
}

.status-indicator.error {
    background: #dc3545;
}
*/

/* Privacy Policy Modal */
.privacy-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.privacy-modal-content {
    background-color: white;
    margin: 2% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

.privacy-modal-header {
    background: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10001;
}

.privacy-modal-title {
    font-size: 24px;
    font-weight: 600;
}

.privacy-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.privacy-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.privacy-modal-body {
    padding: 30px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    line-height: 1.6;
}

.privacy-modal h2 {
    color: #007bff;
    font-size: 20px;
    margin: 30px 0 15px 0;
    border-left: 4px solid #007bff;
    padding-left: 15px;
}

.privacy-modal h3 {
    color: #333;
    font-size: 16px;
    margin: 20px 0 10px 0;
}

.privacy-modal p {
    margin-bottom: 15px;
    text-align: justify;
}

.privacy-highlight-box {
    background: #f8f9ff;
    border: 1px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.privacy-contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.privacy-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 14px;
}

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

.privacy-data-table th {
    background: #007bff;
    color: white;
    font-weight: 600;
}

.privacy-data-table tr:last-child td {
    border-bottom: none;
}

.privacy-modal ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.privacy-modal li {
    margin-bottom: 5px;
}

/* Responsive Privacy Modal */
@media (max-width: 768px) {
    .privacy-modal-content {
width: 95%;
margin: 5% auto;
max-height: 85vh;
    }
    
    .privacy-modal-body {
padding: 20px;
    }
    
    .privacy-modal-title {
font-size: 20px;
    }
    
    .privacy-modal h2 {
font-size: 18px;
    }
    
    .privacy-data-table {
font-size: 12px;
    }
    
    .privacy-data-table th,
    .privacy-data-table td {
padding: 8px;
    }
}

@media (max-width: 768px) {
    .container {
padding: 15px;
    }
    
    .title {
font-size: 32px;
    }
    
    .upload-box {
padding: 40px 20px;
    }
    
    .modal-content {
width: 95%;
margin: 10% auto;
    }

    .results-grid {
grid-template-columns: 1fr;
    }

    .table-modal-content {
width: 95%;
margin: 10% auto;
    }

    /* Responsive GDPR */
    .gdpr-content {
flex-direction: column;
gap: 15px;
text-align: center;
    }
    
    .gdpr-text {
justify-content: center;
    }
    
    .gdpr-message {
font-size: 13px;
    }
    
    .gdpr-actions {
justify-content: center;
    }

    /* Responsive Auth Modals */
    .auth-modal-content {
width: 95%;
margin: 5% auto;
    }
    
    .auth-modal-body {
padding: 20px;
    }
    
    .auth-modal-title {
font-size: 20px;
    }

    /* Responsive User Menu */
    .user-menu-dropdown {
min-width: 180px;
right: -10px;
    }

    /* Gruppo Logo + Home nella navbar */
    .left-group {
display: flex;
align-items: center;
    }