/* Stile istituzionale CNR ISTC - Professionale e pulito */
:root {
    --cnr-blue: #003d7a;
    --cnr-light-blue: #0066cc;
    --cnr-grey: #f5f5f5;
    --cnr-dark-grey: #333;
    --cnr-border: #ddd;
    --success-green: #28a745;
    --error-red: #dc3545;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 61, 122, 0.75);
    z-index: -1;
}

/* ========================================
   SYSTEM WARNING BANNER
   ======================================== */

.system-warning-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 2px solid #f59e0b;
    padding: 12px 20px;
}

.warning-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.warning-banner-content svg {
    color: #b45309;
    flex-shrink: 0;
}

.warning-banner-text {
    color: #92400e;
    font-size: 14px;
    line-height: 1.5;
}

.warning-banner-text strong {
    color: #78350f;
}

/* ======================================== */
/* LOGIN PAGE - Design Compatto ed Elegante */
/* ======================================== */

.login-page {
    background-image: url('/images/sfondos.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation: backgroundZoomIn 1.2s ease-out;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

@keyframes backgroundZoomIn {
    from {
        background-size: 110%;
        filter: blur(5px);
    }
    to {
        background-size: cover;
        filter: blur(0);
    }
}

.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 61, 122, 0.25) 0%, rgba(0, 102, 204, 0.20) 100%);
    z-index: 0;
    animation: overlayFadeIn 0.8s ease-out;
}

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

.login-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    padding: 30px 25px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: headerGlow 4s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    50% {
        transform: translate(30px, 30px);
        opacity: 0.6;
    }
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.header-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: logoFadeIn 1s ease-out backwards;
}

.cnr-logo {
    animation-delay: 0.3s;
}

.istc-logo {
    animation-delay: 0.5s;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    animation: titleSlide 0.8s ease-out 0.6s backwards;
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 300;
    position: relative;
    z-index: 1;
    animation: titleSlide 0.8s ease-out 0.7s backwards;
}

.login-body {
    padding: 30px 30px 25px;
}

.login-info {
    margin-bottom: 25px;
    animation: fadeIn 0.6s ease-out 0.8s backwards;
}

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

.info-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    padding: 0 10px;
}

.login-form {
    animation: fadeIn 0.6s ease-out 0.9s backwards;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-weight: 600;
    color: var(--cnr-dark-grey);
    margin-bottom: 8px;
    font-size: 14px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.input-field:hover {
    border-color: #bdbdbd;
}

.input-field:focus {
    outline: none;
    border-color: var(--cnr-light-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    background: #fafbff;
}

.submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

.login-footer {
    text-align: center;
    padding: 20px 10px 0;
    margin-top: 25px;
    border-top: 1px solid #e9ecef;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
    animation: fadeIn 0.6s ease-out 1s backwards;
}

.login-footer p {
    margin: 2px 0;
}

/* ======================================== */
/* VERIFY OTP PAGE - Stili Specifici */
/* ======================================== */

.otp-info-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e3e9f7;
    animation: fadeIn 0.6s ease-out 0.8s backwards;
}

.matricola-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e3e9f7;
}

.matricola-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.matricola-value {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

.email-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: #f0f8ff;
    border-left: 3px solid var(--cnr-light-blue);
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
}

.email-info svg {
    color: var(--cnr-light-blue);
    flex-shrink: 0;
}

.email-info strong {
    color: var(--cnr-blue);
    font-weight: 600;
}

.otp-instructions {
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

.validity-notice {
    display: inline-block;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

.validity-notice strong {
    color: var(--cnr-blue);
}

.otp-input {
    text-align: center !important;
    font-size: 28px !important;
    letter-spacing: 8px !important;
    font-weight: 700 !important;
    font-family: 'Courier New', monospace !important;
    padding: 16px !important;
}

.otp-input::placeholder {
    letter-spacing: 8px;
    font-weight: 400;
    opacity: 0.3;
}

.otp-input:focus {
    border-color: var(--cnr-light-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15);
    background: #fafbff;
}

.back-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    animation: fadeIn 0.6s ease-out 1s backwards;
}

.back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cnr-light-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.back-link a:hover {
    color: var(--cnr-blue);
    background: rgba(0, 102, 204, 0.05);
    text-decoration: none;
}

.back-link a svg {
    transition: transform 0.3s ease;
}

.back-link a:hover svg {
    transform: translateX(-4px);
}

/* ======================================== */
/* QUESTIONNAIRE PAGE - Institutional Design */
/* ======================================== */

.questionnaire-page {
    background: linear-gradient(135deg, #003d7a 0%, #0066cc 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.questionnaire-wrapper {
    min-height: 100vh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px 20px !important;
}

.questionnaire-container {
    max-width: 960px;
    width: 100%;
}

.questionnaire-card {
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden !important;
}

/* Header Section */
.quest-header {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.quest-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.quest-header-top {
    background: rgba(0, 0, 0, 0.08);
    padding: 15px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Back to Home Button */
.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-3px);
}

.back-home-btn svg {
    transition: transform 0.3s ease;
}

.back-home-btn:hover svg {
    transform: translateX(-3px);
}

.quest-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.quest-logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.quest-logo:hover {
    transform: scale(1.05);
}

.quest-logo-divider {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.quest-header-content {
    padding: 35px 40px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Target Widget (STRUTTURATI / NON STRUTTURATI) */
.quest-target-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 18px;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.quest-target-widget svg {
    opacity: 0.9;
}

.quest-target-widget.target-non-strutturati {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.2) 100%);
    border-color: rgba(245, 158, 11, 0.5);
}

.quest-main-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quest-event-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 6px;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

.quest-event-location {
    font-size: 14px;
    margin: 0;
    opacity: 0.85;
    font-weight: 300;
}

.quest-user-info {
    padding: 0 40px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.quest-user-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quest-user-icon {
    opacity: 0.9;
}

.quest-user-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.admin-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    backdrop-filter: blur(10px);
    border: 2px solid #fbbf24;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.admin-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
    border-color: #fcd34d;
}

.admin-btn svg {
    flex-shrink: 0;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Body Section */
.quest-body {
    padding: 40px 50px 50px;
    background: #fafbfc;
}

/* Alert Styles */
.quest-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    animation: slideIn 0.4s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quest-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.quest-alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #dc3545;
}

.quest-alert-info {
    background: #e7f3ff;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.quest-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.quest-alert-warning svg {
    color: #ff9800;
}

.quest-alert strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.quest-alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Info Card */
.quest-info-card {
    background: white;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 61, 122, 0.06);
    overflow: hidden;
}

.quest-info-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 18px 24px;
    border-bottom: 1px solid #e3e8ef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quest-info-icon {
    color: var(--cnr-blue);
}

.quest-info-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--cnr-blue);
    letter-spacing: -0.2px;
}

.quest-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    padding: 24px;
}

.quest-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.quest-info-item:hover {
    background: #f8fafc;
}

.quest-info-icon-wrapper {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cnr-blue);
}

.quest-info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.quest-info-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.quest-info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.4;
}

/* Form Styles */
.quest-form {
    margin-top: 30px;
}

.quest-section {
    background: white;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 61, 122, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.quest-section:hover {
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.08);
    transform: translateY(-2px);
}

.quest-readonly-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e3e8ef;
}

.quest-readonly-section:hover {
    transform: none;
}

.quest-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
    flex-wrap: wrap;
}

.quest-section-icon {
    color: var(--cnr-blue);
    flex-shrink: 0;
}

.quest-section-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--cnr-dark-grey);
    letter-spacing: -0.3px;
    flex: 1;
}

.quest-readonly-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    color: var(--cnr-blue);
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Data Display (Read Only) */
.quest-data-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.quest-data-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: white;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

.quest-data-item-full {
    grid-column: 1 / -1;
}

.quest-data-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.quest-data-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.quest-data-warning {
    color: #f59e0b;
    font-style: italic;
}

/* Servizi Banner - Widget Speciale Full Width */
.quest-servizi-banner {
    margin-top: 24px;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    transition: all 0.3s ease;
}

.quest-servizi-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.quest-servizi-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.35);
}

.quest-servizi-badge {
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.quest-servizi-badge svg {
    color: white;
    flex-shrink: 0;
}

.quest-servizi-badge span {
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quest-servizi-content {
    padding: 20px 24px;
    position: relative;
    z-index: 1;
}

.quest-servizio-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quest-servizio-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quest-servizio-details {
    flex: 1;
    color: white;
}

.quest-servizio-details h4 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

.quest-servizio-details p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-servizio-details p::before {
    content: '→';
    font-size: 18px;
    font-weight: 700;
}

/* Sede Widget */
.quest-sede-widget {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e3e8ef;
}

.quest-sede-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: white;
    border: 2px solid var(--cnr-light-blue);
    border-radius: 10px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
}

.quest-sede-card:hover {
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
}

.quest-sede-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.quest-sede-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.quest-sede-acronym {
    font-size: 18px;
    font-weight: 800;
    color: var(--cnr-blue);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.quest-sede-address {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.quest-sede-address::before {
    content: '📍';
    font-size: 12px;
    margin-top: 1px;
    flex-shrink: 0;
}

.quest-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.quest-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-form-field-full {
    grid-column: 1 / -1;
}

.quest-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.1px;
}

.quest-label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: 700;
}

.quest-input,
.quest-select,
.quest-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: #1e293b;
    transition: all 0.3s ease;
}

.quest-input:hover,
.quest-select:hover,
.quest-textarea:hover {
    border-color: #cbd5e1;
}

.quest-input:focus,
.quest-select:focus,
.quest-textarea:focus {
    outline: none;
    border-color: var(--cnr-light-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08);
    background: #fafbff;
}

.quest-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.quest-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.quest-field-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.5;
}

.quest-field-note svg {
    flex-shrink: 0;
}

/* Radio Group */
.quest-radio-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.quest-radio-card {
    position: relative;
    cursor: pointer;
}

.quest-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.quest-radio-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.quest-radio-card:hover .quest-radio-content {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.quest-radio-card input[type="radio"]:checked ~ .quest-radio-content {
    border-color: var(--cnr-blue);
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.quest-radio-icon {
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.quest-radio-card input[type="radio"]:checked ~ .quest-radio-content .quest-radio-icon {
    color: var(--cnr-blue);
}

.quest-radio-label {
    font-size: 15px;
    font-weight: 500;
    color: #475569;
    transition: all 0.3s ease;
}

.quest-radio-card input[type="radio"]:checked ~ .quest-radio-content .quest-radio-label {
    color: var(--cnr-blue);
    font-weight: 700;
}

/* Conditional Section */
.quest-conditional {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Actions */
.quest-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e3e8ef;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.quest-submit-btn {
    width: 100%;
    max-width: 450px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.quest-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.quest-submit-btn:hover::before {
    left: 100%;
}

.quest-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4);
}

.quest-submit-btn:active {
    transform: translateY(0);
}

.quest-btn-icon {
    flex-shrink: 0;
}

.quest-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.quest-logout-link:hover {
    color: var(--cnr-blue);
    background: rgba(0, 102, 204, 0.06);
    text-decoration: none;
}

.quest-logout-link svg {
    transition: transform 0.3s ease;
}

.quest-logout-link:hover svg {
    transform: translateX(3px);
}

/* ======================================== */
/* ALTRE PAGINE - Stili Generali */
/* ======================================== */

/* Wrapper per pagine generiche che necessitano di centratura */
body:not(.login-page):not(.questionnaire-page) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.logo {
    max-height: 70px;
    height: auto;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.card-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 15px 0 10px;
    letter-spacing: -0.5px;
}

.card-header p {
    font-size: 16px;
    opacity: 0.95;
    margin-top: 8px;
    font-weight: 300;
}

.card-body {
    padding: 45px 40px;
}

.info-box {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    border-left: 5px solid var(--success-green);
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.08);
}

.info-box h3 {
    color: var(--cnr-blue);
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.info-box p {
    color: var(--cnr-dark-grey);
    line-height: 1.6;
    margin: 8px 0;
}

.info-box ul {
    margin-left: 20px;
    line-height: 1.9;
    color: var(--cnr-dark-grey);
}

.info-box ul li {
    margin: 8px 0;
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--cnr-dark-grey);
    margin-bottom: 10px;
    font-size: 15px;
}

.required::after {
    content: ' *';
    color: var(--error-red);
    font-weight: bold;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

input[type="text"]:hover,
input[type="email"]:hover,
select:hover,
textarea:hover {
    border-color: #bdbdbd;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--cnr-light-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    background: #fafbff;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.btn {
    padding: 16px 35px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.alert {
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.4s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid var(--success-green);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid var(--error-red);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.radio-group {
    display: flex;
    gap: 25px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.radio-option:hover {
    border-color: var(--cnr-light-blue);
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--cnr-blue);
}

.radio-option input[type="radio"]:checked + label {
    color: var(--cnr-blue);
    font-weight: 600;
}

.radio-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: var(--cnr-dark-grey);
}

.conditional-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 15px;
    margin-top: 25px;
    border: 2px solid #e9ecef;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.conditional-section h3 {
    color: var(--cnr-blue);
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.footer-text {
    text-align: center;
    padding: 25px 20px 5px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid var(--cnr-border);
    margin-top: 30px;
}

.footer-text strong {
    color: var(--cnr-blue);
}

.success-icon {
    text-align: center;
    font-size: 100px;
    color: var(--success-green);
    margin: 30px 0;
    animation: scaleIn 0.5s ease-out;
}

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

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 25px;
}

.mb-3 {
    margin-bottom: 25px;
}

/* Link styling */
a {
    color: var(--cnr-light-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: var(--cnr-blue);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
    }

    .login-header {
        padding: 25px 20px 20px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .header-logo {
        height: 40px;
    }

    .login-body {
        padding: 25px 20px 20px;
    }

    .card-header h1 {
        font-size: 26px;
    }

    .card-body {
        padding: 30px 25px;
    }

    .logo-container {
        gap: 20px;
    }

    .radio-group {
        flex-direction: column;
        gap: 15px;
    }

    .radio-option {
        width: 100%;
    }

    .conditional-section {
        padding: 20px;
    }

    /* Questionnaire Responsive */
    .questionnaire-wrapper {
        padding: 20px 15px;
    }

    .questionnaire-container {
        margin: 0 auto;
    }

    .quest-header-top {
        padding: 16px 20px;
    }

    .quest-logo {
        height: 40px;
    }

    .quest-logo-divider {
        height: 30px;
    }

    .quest-header-content {
        padding: 25px 25px 20px;
    }

    .quest-main-title {
        font-size: 24px;
    }

    .quest-event-name {
        font-size: 15px;
    }

    .quest-event-location {
        font-size: 13px;
    }

    .quest-user-info {
        padding: 0 25px 20px;
    }

    .quest-body {
        padding: 30px 25px 35px;
    }

    .quest-info-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 20px;
    }

    .quest-section {
        padding: 22px 24px;
    }

    .quest-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .quest-data-display {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .quest-radio-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quest-submit-btn {
        max-width: 100%;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .card-header h1 {
        font-size: 22px;
    }

    .card-body {
        padding: 25px 20px;
    }

    input[type="text"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px; /* Previene zoom su iOS */
    }

    /* Questionnaire Mobile */
    .questionnaire-wrapper {
        padding: 15px 10px;
    }

    .quest-header-top {
        padding: 14px 16px;
    }

    .quest-logos {
        gap: 15px;
    }

    .quest-logo {
        height: 35px;
    }

    .quest-logo-divider {
        display: none;
    }

    .quest-header-content {
        padding: 20px 20px 16px;
    }

    .quest-main-title {
        font-size: 20px;
    }

    .quest-event-name {
        font-size: 14px;
    }

    .quest-event-location {
        font-size: 12px;
    }

    .quest-user-card {
        padding: 10px 18px;
    }

    .quest-body {
        padding: 25px 20px 30px;
    }

    .quest-info-header {
        padding: 14px 18px;
    }

    .quest-info-title {
        font-size: 16px;
    }

    .quest-info-grid {
        padding: 16px;
    }

    .quest-section {
        padding: 20px 18px;
    }

    .quest-section-title {
        font-size: 17px;
    }

    .quest-input,
    .quest-select,
    .quest-textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }

    .quest-sede-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }

    .quest-sede-content {
        align-items: center;
    }

    .quest-sede-acronym {
        font-size: 16px;
    }

    .quest-sede-address {
        font-size: 12px;
        justify-content: center;
    }

    .quest-servizio-item {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .quest-servizio-details h4 {
        font-size: 16px;
    }

    .quest-servizio-details p {
        font-size: 14px;
        justify-content: center;
    }
}

/* Loading animation */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success Page Styles */
.success-confirmation {
    text-align: center;
    padding: 32px 20px;
    margin-bottom: 32px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.success-confirmation h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.success-confirmation p {
    color: #64748b;
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

.summary-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-title {
    color: #003d7a;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #0066cc;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.summary-item-full {
    grid-column: 1 / -1;
}

.summary-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

.success-text {
    color: #10b981;
    font-weight: 600;
}

.error-text {
    color: #ef4444;
    font-weight: 600;
}

.event-details-summary {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.event-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.event-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-info-label {
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-info-value {
    color: #0c4a6e;
    font-size: 14px;
    font-weight: 600;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.btn-primary-action,
.btn-secondary-action {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-action {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.btn-secondary-action {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-secondary-action:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
}

.success-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
}

.success-footer p {
    margin: 6px 0;
}

.success-footer strong {
    color: #1e293b;
}

.footer-note {
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
    margin-top: 12px !important;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .event-info-grid {
        grid-template-columns: 1fr;
    }

    .success-actions {
        flex-direction: column;
    }

    .btn-primary-action,
    .btn-secondary-action {
        width: 100%;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
    }

    .btn {
        display: none;
    }
}

/* Accessibility improvements */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid var(--cnr-light-blue);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--cnr-light-blue);
    color: white;
}

::-moz-selection {
    background: var(--cnr-light-blue);
    color: white;
}

/* ======================================== */
/* HOME PAGE - Institutional Landing Page */
/* ======================================== */

.home-page {
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 50%, #0066cc 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    round-border: 0 0 8px 8px;
}

.home-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 102, 204, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 61, 122, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.home-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main White Background */
.main-white-background {
    background: white;
    min-height: calc(100vh - 180px);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* Home Header */
.home-header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.home-header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* User Status Container */
.user-status-container {
    display: flex;
    align-items: center;
}

.user-logged-in {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
}

.user-logged-in svg {
    opacity: 0.9;
}

.user-name {
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-type-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-type-strutturato {
    background: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.user-type-non-strutturato {
    background: rgba(251, 146, 60, 0.3);
    color: #fed7aa;
    border: 1px solid rgba(251, 146, 60, 0.4);
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(220, 53, 69, 0.8);
    border: 1px solid rgba(220, 53, 69, 0.9);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.user-not-logged {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-style: italic;
}

.user-not-logged svg {
    opacity: 0.7;
}

/* Golden Admin Button */
.admin-gold-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 25%, #d4af37 50%, #c5a028 100%);
    background-size: 200% 200%;
    animation: goldShimmer 3s ease-in-out infinite;
    border: 2px solid #e8c547;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

@keyframes goldShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.admin-gold-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #e8c547 0%, #f9e076 25%, #e8c547 50%, #d4af37 100%);
}

.admin-gold-btn svg {
    color: #1a1a1a;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.3));
}

.home-header-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 30px 20px;
}

.home-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.home-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.home-logo:hover {
    transform: scale(1.05);
}

.home-logo-divider {
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.home-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.home-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

/* Home Main Content */
.home-main {
    flex: 1;
    padding: 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.home-section-header {
    text-align: center;
    margin-bottom: 20px;
}

.home-section-title {
    color: var(--cnr-blue);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.home-section-title svg {
    color: var(--cnr-light-blue);
}

.home-section-desc {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* Cards Container */
.cards-container {
    background: transparent;
    padding: 10px 40px 40px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-container {
        padding: 20px;
        border-radius: 16px;
    }
}

/* Quest Card */
.quest-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.quest-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Special style for Open Questionnaires */
.quest-card-aperto {
    border: 3px solid #28a745;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.quest-card-aperto:hover {
    box-shadow: 0 20px 60px rgba(40, 167, 69, 0.4);
    border-color: #218838;
}

.quest-card-aperto .quest-card-header {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-bottom: 2px solid #10b981;
}

.quest-card-aperto .quest-card-footer {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-top: 2px solid #bbf7d0;
}

/* Card Header */
.quest-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

/* Type Badge */
.quest-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quest-type-badge.type-questionario {
    background: linear-gradient(135deg, #e7f3ff 0%, #dbeafe 100%);
    color: var(--cnr-blue);
    border: 1px solid #bfdbfe;
}

.quest-type-badge.type-ricognizione {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Status Badge */
.quest-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.quest-status-badge.status-open {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.quest-status-badge.status-open .status-dot {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.quest-status-badge.status-closed {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.quest-status-badge.status-closed .status-dot {
    background: #ef4444;
    animation: none;
}

.quest-status-badge.status-preparation {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.quest-status-badge.status-preparation .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

/* Card Body */
.quest-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quest-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cnr-dark-grey);
    margin: 0 0 12px;
    line-height: 1.3;
}

.quest-target-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    width: fit-content;
}

.quest-target-badge svg {
    opacity: 0.9;
}

.quest-card-desc {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 10px;
}

.quest-card-details {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 20px;
    font-style: italic;
}

/* Date Info */
.quest-card-date {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.date-info svg {
    flex-shrink: 0;
}

.date-info strong {
    font-weight: 700;
}

.date-closed {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.date-open {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.date-preparation {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Card Footer */
.quest-card-footer {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.quest-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-access {
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    border: none;
}

.btn-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    color: white !important;
    text-decoration: none !important;
}

.btn-access svg {
    transition: transform 0.3s ease;
}

.btn-access:hover svg {
    transform: translateX(4px);
}

.btn-disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border: 1px solid #e2e8f0;
}

.btn-coming {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
    cursor: default;
}

/* Home Footer */
.home-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 25px 20px;
    text-align: center;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.home-footer-info {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.home-footer-info p {
    margin: 4px 0;
}

.home-footer-version {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.home-footer-version span {
    display: inline-block;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* Responsive Design for Home Page */
@media (max-width: 768px) {
    .home-title {
        font-size: 22px;
    }
    
    .home-section-title {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .quest-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .home-logos {
        gap: 15px;
    }
    
    .home-logo {
        height: 45px;
    }
}

/* ========================================
   ADMIN LOGIN OVERLAY
   ======================================== */
.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.admin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-overlay-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    padding: 0;
}

.admin-overlay.active .admin-overlay-content {
    transform: scale(1) translateY(0);
}

.overlay-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.overlay-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.overlay-header {
    text-align: center;
    margin-bottom: 24px;
}

.overlay-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

.overlay-logo {
    height: 45px;
    width: auto;
}

.overlay-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.overlay-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.overlay-input-group {
    margin-bottom: 20px;
}

.overlay-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.overlay-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.overlay-input:focus {
    outline: none;
    border-color: var(--cnr-blue, #003d7a);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

.overlay-otp-input {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.overlay-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--cnr-blue, #003d7a) 0%, #0066cc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.overlay-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 61, 122, 0.3);
}

.overlay-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.overlay-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.overlay-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.overlay-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.overlay-otp-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.overlay-matricola-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.overlay-matricola-label {
    font-size: 13px;
    color: #64748b;
}

.overlay-matricola-value {
    font-weight: 700;
    color: #1e293b;
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.overlay-email-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.overlay-email-info svg {
    color: var(--cnr-blue, #003d7a);
}

.overlay-otp-instructions {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    text-align: center;
}

.overlay-back-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.overlay-back-btn:hover {
    color: var(--cnr-blue, #003d7a);
}

/* Admin Gold Button as actual button */
button.admin-gold-btn {
    cursor: pointer;
}

/* ========================================
   NEW BADGE (Ribbon style)
   ======================================== */
.new-badge {
    position: absolute;
    top: 140px;
    right: -12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 14px 8px 12px;
    border-radius: 4px 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.4),
        -2px 0 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.new-badge::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    border-width: 6px;
    border-style: solid;
    border-color: #991b1b transparent transparent #991b1b;
}

/* Card Wrapper - permette overflow per badge senza rompere bordi card */
.quest-card-wrapper {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.quest-card-wrapper > .quest-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========================================
   ADMIN BUTTONS (GOLD)
   ======================================== */
.admin-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-admin-gold {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 25%, #d4af37 50%, #c5a028 100%);
    background-size: 200% 200%;
    animation: goldShimmer 3s ease-in-out infinite;
    border: 2px solid #e8c547;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-admin-gold:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #e8c547 0%, #f9e076 25%, #e8c547 50%, #d4af37 100%);
}

.btn-admin-gold svg {
    color: #1a1a1a;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.3));
}

/* ========================================
   ADMIN BUTTONS (PURPLE) - NON STRUTTURATI
   ======================================== */
.btn-admin-purple {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 25%, #7c3aed 50%, #6d28d9 100%);
    background-size: 200% 200%;
    animation: purpleShimmer 3s ease-in-out infinite;
    border: 2px solid #a78bfa;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow:
        0 4px 15px rgba(124, 58, 237, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-admin-purple:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(124, 58, 237, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 25%, #8b5cf6 50%, #7c3aed 100%);
}

.btn-admin-purple svg {
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@keyframes purpleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   NON STRUTTURATI OVERLAY STYLES
   ======================================== */

/* Target badge nell'overlay */
.overlay-target-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--cnr-blue) 0%, var(--cnr-light-blue) 100%);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 12px;
}

.overlay-target-badge.ns-badge {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

/* Submit button per NS (arancione) */
.overlay-submit-btn-ns {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
}

.overlay-submit-btn-ns:hover {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
}

/* User found message */
.overlay-user-found {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 15px;
    color: #065f46;
    font-size: 14px;
}

.overlay-user-found svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Form grid per richiesta accesso - base styles */
.overlay-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 500px) {
    .overlay-form-grid {
        grid-template-columns: 1fr;
    }
}

.overlay-request-form .overlay-input-group {
    margin-bottom: 15px;
}

.overlay-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

