/* BRANDING */
:root {
    --primary-color: #204164;
    --primary-hover: #162e4a;
    --primary-dark: #1a365d;
    --accent-color: #f39c12;
    --accent-hover: #d68910;
    --bg-color: #eef2f6;
    --text-dark: #2d3748;
    /* Layout width — change this one value to resize the whole site */
    --layout-width: 760px;
    /* Z-index scale */
    --z-nav:    1000;
    --z-drawer: 4000;
    --z-modal:  4500;
    --z-toast:  5000;
    --z-top:    5500;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
.top-header {
    background: var(--bg-color); /* transparent to page, no edge-to-edge bleed */
    text-align: center;
    padding: 8px 0 0;
}

.logo-img {
    width: 100%;
    max-width: var(--layout-width);
    height: auto;
    display: block;
    margin: 0 auto;
}

.nav-bar {
    background-color: var(--bg-color); /* full-width but transparent, needed for sticky overlay */
    width: 100%;
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    display: flex;
    justify-content: center;
}
/* Hide scrollbar for Chrome/Safari/Edge */
.nav-bar::-webkit-scrollbar {
    display: none;
}

.nav-scroll-container {
    max-width: var(--layout-width);
    width: 100%;
    box-sizing: border-box; /* padding is INSIDE the max-width, not added on top */
    background: white;
    border-top: 5px solid var(--primary-color); /* brand stripe — contained to column width */
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 10px;
}

/* Hide scrollbar for Chrome/Safari/Edge */
.nav-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-item, .nav-home-link {
    padding: 11px 18px;
    font-size: 0.9em;
    font-weight: 600;
    color: #4a5568;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent; /* Placeholder for active state */
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevents buttons from squishing on mobile */
}

.nav-home-link {
    border-right: 1px solid #edf2f7;
    margin-right: 10px;
}

/* Hover State */
.nav-item:hover {
    color: var(--primary-color);
    background-color: #f7fafc;
}

/* Active Tab (The Blue Underline) */
.nav-item.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: transparent;
}

/* Mobile Tweak: Tighten nav on very small screens */
@media (max-width: 480px) {
    .nav-home-link { padding: 14px 15px; }
    .nav-item { padding: 14px 15px; font-size: 0.9em; }
}

.content-wrapper {
    max-width: var(--layout-width);
    margin: 8px auto 15px auto;
    padding: 0;
    min-height: 400px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Restore breathing room on small screens where flush-to-edge looks cramped */
@media (max-width: 800px) {
    .content-wrapper { padding: 0 10px; }
}

/* TAB SECTIONS (Hidden by default) */
.tab-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-section.active {
    display: block;
}

/* CARDS */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 10px;
}

/* OVERVIEW GRID */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* MATERIALS LAYOUT — stacked sections */
.materials-section {
    margin-bottom: 28px;
}
.materials-section:last-of-type {
    margin-bottom: 0;
}
.materials-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 12px;
}
.materials-section-heading .material-icons-outlined {
    font-size: 1.05em;
    color: var(--accent-color);
}

/* Resources card grid */
.resources-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.resources-doc-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: all 0.15s ease;
    min-width: 0;
}
.rdc-icon  { font-size: 1rem; flex-shrink: 0; }
.rdc-name  { flex: 1; overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.rdc-arrow { font-size: 0.85rem !important; opacity: 0.4; margin-left: auto; flex-shrink: 0; }
.resources-doc-ready {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
}
.resources-doc-ready:hover {
    background: #eef4fb;
    border-color: #c8ddf5;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(32,65,100,0.08);
}
.resources-doc-pending {
    background: #fafafa;
    border: 1px dashed #e2e8f0;
    color: #a0aec0;
    cursor: default;
}
.rdc-pending-chip {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.68em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a0aec0;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 10px;
}
.resources-empty {
    color: #a0aec0;
    font-style: italic;
    font-size: 0.9em;
    padding: 20px 0;
    margin: 0;
}

/* Agenda / schedule "coming soon" placeholder */
.materials-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 0.95em;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.materials-coming-soon .material-icons-outlined { font-size: 2.2rem; opacity: 0.35; }
.materials-mobile-open {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Access footer bar */
.materials-access-bar {
    margin-top: 24px;
    background: linear-gradient(135deg, #fffbea 0%, #fef9e7 100%);
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 10px 10px;
    padding: 14px 20px;
}
.materials-access-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.84em;
    color: #744210;
}
.materials-access-bar-row .material-icons-outlined {
    color: var(--accent-color);
    font-size: 1.2em;
    flex-shrink: 0;
}
.access-bar-text { flex: 1; min-width: 200px; line-height: 1.5; }
.access-bar-link {
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}
.access-bar-link:hover { text-decoration: underline; }

.agenda-fullscreen-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 0.03em;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}
.agenda-fullscreen-btn:hover { opacity: 1; text-decoration: underline; }
.agenda-fullscreen-btn .material-icons-outlined { font-size: 0.95em; }

.form-label {
    display: block;
    font-size: 0.95em;
    font-weight: 700;
    color: #4a5568;
    /* Slate Grey for better readability */
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    /* Larger hit area for touch screens */
    font-size: 16px;
    /* Prevents automatic zoom on iOS */
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    /* Softer corners */
    background-color: #f8fafc;
    /* Very subtle grey background */
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.01);
    box-sizing: border-box;
}

textarea.form-control {
    resize: vertical;
    /* Allows vertical resizing only */
    min-height: 100px;
    /* Optional: Sets a reasonable default height */
}

/* Input Focus State - The "Glow" */
.form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(32, 65, 100, 0.1);
    /* Soft primary glow */
    outline: none;
}

.form-control::placeholder {
    color: #a0aec0;
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: 2px solid transparent;
    box-sizing: border-box;
    padding: 16px;
    font-size: 1em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(32, 65, 100, 0.2);
    margin-top: 20px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    /* Slight lift effect */
    box-shadow: 0 6px 12px rgba(32, 65, 100, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(32, 65, 100, 0.2);
}

.btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* SECONDARY / GO BACK BUTTONS */
.btn-secondary {
    background-color: #ffffff;
    color: #4a5568;
    border: 2px solid #cbd5e0;
    box-sizing: border-box;
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    color: #2d3748;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    background-color: #edf2f7;
}

/* DRAWER CANCEL BUTTON */
.btn-drawer-cancel {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    color: #718096;
    padding: 16px 24px;
    /* Matches the height of the Save button */
    font-size: 1em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    /* Reset any conflicting styles from other buttons */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: auto;
}

.btn-drawer-cancel:hover {
    border-color: #cbd5e0;
    color: #2d3748;
    background-color: #f8fafc;
    transform: translateY(-2px);
}

/* VERIFY BUTTON (Orange) */
.btn-verify {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    font-size: 0.95em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-verify:hover {
    background: var(--accent-hover);
    /* Darker shade of orange */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

/* RESET BUTTON (Small text button if they get it wrong) */
.btn-postal-reset {
    background: none;
    border: none;
    color: #718096;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    width: 100%;
}

.btn-postal-reset:hover {
    color: #2d3748;
}


.btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
/* NEUTRAL / GO BACK BUTTON (For Modals) */
.btn-neutral {
    background-color: #ffffff;
    color: #4a5568;
    /* Slate grey text */
    border: 2px solid #cbd5e0;
    /* Light grey border */
    padding: 16px;
    font-size: 1em;
    font-weight: 700;
    /* Bold like the primary buttons */
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

    /* Ensure it fills its flex container */
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-neutral:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    /* Darker border on hover */
    color: #2d3748;
    transform: translateY(-2px);
}

.btn-neutral:active {
    background-color: #edf2f7;
    transform: translateY(0);
}

/* DANGER / CANCEL BUTTON */
.btn-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 2px solid #fc8181;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

/* HOVER STATE: Turns solid red */
.btn-danger:hover {
    background-color: #c53030;
    color: white;
    border-color: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.2);
}

.btn-danger:active {
    transform: translateY(0);
    background-color: #9b2c2c;
}

/* ACTION BUTTON LAYOUT */
.action-row {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .action-row {
        flex-direction: row;
    }
    .action-row>button {
        flex: 1;
    }
    .hero-actions-section {
        display: flex;
        flex-direction: column;
        min-width: 160px;
        align-self: stretch;
        justify-content: space-between;
        gap: 0;
    }
}

/* "GHOST" EDIT BUTTON */
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    /* Brand Border */
    padding: 16px;
    font-size: 1em;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: #ebf8ff;
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* RADIO BUTTON GROUPS */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
}

.radio-group input[type="radio"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.form-group[data-name="fullName"] {
    margin-bottom: 35px !important;
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.hidden-question {
    opacity: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    pointer-events: none;
}

/* Error/Success Boxes */
.verify-box {
    background: #fffaf0;
    border: 1px solid #ffe0b2;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.verify-box.error-state {
    background: #fff5f5;
    border-color: #fc8181;
    border-left: 5px solid #e53e3e;
}

.postal-error-text {
    color: #c53030;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}

.error-box {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 5px solid #e53e3e;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.success-box {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
    display: none;
}

/* TOAST (Bottom) */
#custom-toast {
    visibility: hidden;
    min-width: 300px;
    background-color: #323232;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px 24px;
    position: fixed;
    z-index: var(--z-toast);
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#custom-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 48, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    animation: mdModalEnter 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    padding: 28px 28px 24px;
    position: relative;
}

@keyframes mdModalEnter {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Coloured top-bar variants */
.modal-card--primary { border-top: 4px solid var(--primary-color); }
.modal-card--accent  { border-top: 4px solid var(--accent-color); }
.modal-card--warning { border-top: 4px solid #e67e22; }
.modal-card--danger  { border-top: 4px solid #c53030; }

/* Icon badge */
.modal-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.55em;
}
.modal-icon .material-icons-outlined { font-size: 26px; }
.modal-icon--primary { background: #e8eff8; color: var(--primary-color); }
.modal-icon--warning { background: #fff3e0; color: #e67e22; }
.modal-icon--danger  { background: #ffebee; color: #c53030; }
.modal-icon--success { background: #e8f5e9; color: #2e7d32; }
.modal-icon--amber   { background: #fffbea; color: #b7791f; }

/* Body text */
.modal-text {
    color: #4a5568;
    line-height: 1.65;
    font-size: 0.95em;
    margin: 0 0 20px;
}

/* Info / highlight box inside a modal */
.modal-info-box {
    background: #f8fafd;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 18px;
    text-align: left;
}
.modal-info-box--blue {
    background: #ebf4ff;
    border-color: #bee3f8;
}
.modal-info-box--amber {
    background: #fffaf0;
    border-color: #fbd38d;
}
.modal-info-box-label {
    font-size: 0.7em; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #718096; margin-bottom: 6px;
}

/* Action rows */
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions button { flex: 1; margin: 0; }
.modal-actions--col { flex-direction: column; }

/* Hairline divider */
.modal-divider { border: none; border-top: 1px solid #edf2f7; margin: 20px -28px; }

/* Top-right close X */
.modal-close-x {
    position: absolute; top: 14px; right: 14px;
    background: transparent; border: none; cursor: pointer;
    color: #a0aec0; padding: 4px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
    width: 32px; height: 32px;
}
.modal-close-x:hover { background: #f0f4f8; color: #4a5568; }
.modal-close-x .material-icons-outlined { font-size: 20px; }

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

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

    .nav-bar {
        justify-content: flex-start;
        padding: 0;
    }

    .nav-item {
        padding: 12px 15px;
        font-size: 14px;
    }

    .nav-home-link {
        padding: 0 15px;
        border-right: 1px solid #eee;
        background: #fcfcfc;
        position: sticky;
        left: 0;
        z-index: 10;
    }

    .edit-drawer-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .edit-drawer {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .drawer-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 80px;
    }

    .drawer-footer {
        padding: 15px;
        background: #fff;
        border-top: 1px solid #eee;
    }

    .drawer-tab {
        padding: 12px 5px;
        font-size: 0.9em;
    }

    .top-header {
        padding: 4px 0 0;
    }

    .row-2,
    .row-3,
    .overview-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

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

    h2.card-title {
        font-size: 1.3em;
    }

    #map-container {
        min-height: 250px;
        width: 100%;
    }

    .profile-value {
        text-align: left;
        margin-top: 4px;
        display: block;
    }

    .profile-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* EXPLAINER ICON (?) */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    background-color: #cbd5e0;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.info-icon:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.close-modal-btn {
    margin-top: 16px;
    background-color: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92em;
    transition: background 0.15s, color 0.15s;
}

.close-modal-btn:hover {
    background-color: #e2e8f0;
    color: #1a202c;
}

/* PROFILE REVIEW CARD */
.profile-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.profile-label {
    font-weight: 600;
    color: #718096;
}

.profile-value {
    font-weight: 700;
    color: #2d3748;
    text-align: right;
}

/* CHIP INPUT STYLES (School Selector) */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    min-height: 45px;
}

.chip-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(32, 65, 100, 0.1);
}

.chip {
    background: #e2e8f0;
    color: #2d3748;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip-remove {
    cursor: pointer;
    font-weight: bold;
    color: #718096;
    font-size: 1.1em;
    line-height: 1;
}

.chip-remove:hover { color: #e53e3e; }

.chip-input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 5px;
    font-size: 1em;
    min-width: 150px;
}

/* AUTOCOMPLETE DROPDOWN */
.autocomplete-list {
    position: absolute;
    z-index: var(--z-nav);
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    display: none;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f7fafc;
}

.autocomplete-item:hover {
    background-color: #ebf8ff;
    color: var(--primary-color);
}

/* CHUNKED REVIEW LAYOUT */
.review-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.review-chunk {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.review-chunk:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chunk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 15px;
    border-bottom: 2px solid #f7fafc;
    padding-bottom: 10px;
}

.chunk-icon {
    background: #ebf8ff;
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
}

.chunk-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 0.95em;
    line-height: 1.4;
}

.chunk-label {
    color: #718096;
    font-weight: 500;
    min-width: 100px;
}

.chunk-value {
    color: #2d3748;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

@media (min-width: 768px) {
    .review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .full-width-chunk {
        grid-column: span 2;
    }
}

/* EDIT MODAL (Centered Floating Window) */
.edit-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-drawer);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.edit-drawer {
    background: #fff;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    height: auto;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease-out;
    overflow: hidden;
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

.drawer-footer button { margin-top: 0 !important; }

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

#btn-add-assignment .material-icons-outlined {
    text-transform: none !important;
    font-size: 22px;
    margin-right: 8px;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 15px 15px 0 0;
}

.drawer-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 100px !important;
}

/* ASSIGNMENT CARD (Inside Edit Mode) */
.assignment-edit-card {
    background: #fff;
    border: 1px solid #cbd5e0;
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assignment-edit-details { font-weight: 600; color: #2d3748; }
.assignment-edit-sub { font-size: 0.85em; color: #718096; }
.remove-icon { color: #e53e3e; cursor: pointer; font-size: 1.2em; padding: 5px; }
.remove-icon:hover { background: #fff5f5; border-radius: 4px; }

.assignment-adder {
    background: #f8fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.assignment-adder:focus-within { border-color: var(--accent-color); }

#btn-add-assignment {
    background-color: #f39c12 !important;
    color: white !important;
    border: none;
    border-radius: 6px;
    height: 50px;
    width: 100%;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0px var(--accent-hover);
    transition: all 0.1s ease;
    margin-top: 10px;
}

#btn-add-assignment:hover {
    background-color: #e67e22 !important;
    transform: translateY(2px);
    box-shadow: 0 2px 0px var(--accent-hover);
}

#btn-add-assignment:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0px var(--accent-hover);
}

/* DRAWER TABS */
.drawer-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    margin: 0;
    padding: 0;
}

.drawer-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-tab:hover { background: #edf2f7; color: var(--primary-color); }
.drawer-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); background: #fff; }

.drawer-panel { display: none; padding: 20px; animation: fadeIn 0.3s; }
.drawer-panel.active { display: block; }

.drawer-panel .form-group { margin-bottom: 15px; }
.drawer-panel .form-label { font-size: 0.85em; margin-bottom: 4px; }
.drawer-panel .form-control { padding: 8px 10px; font-size: 0.95em; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* PACIFIER / LOADING TEXT */
#pacifier-message {
    margin-top: 15px;
    font-size: 0.9em;
    color: #718096;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    min-height: 20px;
    text-align: center;
}
#pacifier-message.visible { opacity: 1; }

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.mini-loader {
    border: 3px solid #e2e8f0;
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: text-bottom;
    margin-right: 8px;
}

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

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

.autocomplete-wrapper { position: relative; }

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #cbd5e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: #fff;
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f7fafc;
    color: #2d3748;
    font-size: 0.9em;
    transition: background 0.1s;
}

.autocomplete-item:hover { background-color: #ebf8ff; color: var(--primary-color); }

.special-option {
    font-size: 0.85em;
    color: #718096;
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
    padding: 12px;
    text-align: center;
}

.special-option:hover { background-color: #e2e8f0; color: #2d3748; }

.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 36.82px;
    padding: 3px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #2d3748;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.tags-input-container:focus-within {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(32, 65, 100, 0.1);
}

.role-tag {
    background-color: #ebf8ff;
    color: #2c5282;
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bee3f8;
}

.role-tag-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    line-height: 1;
    color: #2c5282;
}

.role-tag-remove:hover { color: #c53030; }

#position-input {
    border: none;
    outline: none;
    flex-grow: 1;
    min-width: 120px;
    font-size: 0.95em;
    padding: 4px;
}

.nav-home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    padding: 0 15px;
    margin-right: 10px;
    border-right: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.nav-home-link:hover { background-color: #f8fafc; }
.home-text { margin-left: 5px; }

@media (max-width: 600px) {
    .home-text { display: none; }
    .nav-home-link { padding: 0 10px; margin-right: 5px; }
}

#qr-modal { z-index: var(--z-top) !important; }
#qr-modal .modal-card { max-width: 370px; padding: 0; }

/* QR modal branded header */
.qr-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a8b 100%);
    padding: 20px 24px 18px;
    text-align: center;
}
.qr-modal-header-label {
    font-size: 0.65em; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.65); margin-bottom: 2px;
}
.qr-modal-header-title {
    font-size: 1.15em; font-weight: 800;
    color: #ffffff; line-height: 1.2;
}

/* QR code image frame */
.qr-image-frame {
    background: #fff;
    border: 1px solid #dde8f5;
    border-radius: 12px;
    padding: 10px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin: 20px 0 14px;
}
.qr-image-frame img { display: block; width: 170px; height: 170px; }

/* Code pill */
.qr-code-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: #eef5ff;
    border: 1.5px solid #c3dafe;
    border-radius: 100px;
    padding: 7px 20px;
    margin-bottom: 6px;
}
.qr-code-pill-label {
    font-size: 0.68em; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #718096;
}
.qr-code-pill-value {
    font-size: 1.25em; font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    font-family: 'Courier New', monospace;
}
.qr-hint {
    font-size: 0.78em; color: #a0aec0; margin-bottom: 4px;
}
.qr-modal-body { padding: 0 24px 8px; text-align: center; }
.qr-modal-footer { padding: 12px 24px 22px; }
.qr-modal-footer .btn-primary { width: 100%; margin: 0; }

.modal-title {
    font-size: 1.2em;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
}

.modal-icon-wrapper {
    font-size: 3em;
    margin-bottom: 12px;
    line-height: 1;
}

.modal-theme-warning .modal-title { color: #c05621; }
.modal-theme-warning .modal-icon-wrapper { color: #ed8936; }
.modal-theme-warning .close-modal-btn { background-color: #c05621; }
.modal-theme-warning .close-modal-btn:hover { background-color: #9c4221; }

.day-highlight-flash {
    animation: flashCell 2s ease-out;
    border: 2px solid var(--accent-color) !important;
    background-color: #fffaf0 !important;
    position: relative;
    z-index: 10;
}

@keyframes flashCell {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7); }
    20% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(243, 156, 18, 0); }
    100% { transform: scale(1); }
}

#no-assignments-modal { z-index: var(--z-modal); }
#no-assignments-modal .modal-card {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid var(--primary-color);
    max-width: 500px;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#pending-assignment-modal { z-index: 4600; }
#pending-assignment-modal .modal-card { border-top: 5px solid var(--accent-color); max-width: 500px; }

/* CONTROLS BAR (Search + View Toggles) */
.controls-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.search-wrapper { flex-grow: 1; position: relative; min-width: 300px; }

.view-toggle { display: flex; background: #e2e8f0; border-radius: 8px; padding: 4px; gap: 4px; }
.view-btn { background: transparent; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; color: #64748b; transition: all 0.2s; }
.view-btn.active { background: white; color: var(--primary-color); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }

.event-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.event-list-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: #f8fafc;
}

.event-date-badge {
    background: #ebf8ff;
    color: var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    min-width: 70px;
    margin-right: 20px;
    line-height: 1.2;
}

.event-title { font-size: 1.2em; font-weight: 700; color: #2d3748; margin-bottom: 5px; }
.event-meta { font-size: 0.95em; color: #718096; display: flex; gap: 15px; }

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-weight: 700; font-size: 1.2em; color: var(--primary-color); }
.cal-nav-btn { background: white; border: 1px solid #e2e8f0; padding: 5px 15px; border-radius: 6px; cursor: pointer; }
.cal-nav-btn:hover { background: #f7fafc; border-color: #cbd5e0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #e2e8f0; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.cal-day-header { background: #f8fafc; padding: 10px; text-align: center; font-weight: 700; color: #64748b; font-size: 0.9em; min-width: 0; overflow: hidden; }
.cal-day { background: white; min-height: 100px; padding: 8px; position: relative; transition: background 0.2s; min-width: 0; overflow: hidden; }
.cal-day:hover { background: #fafbfc; }
.cal-day.empty { background: #fcfcfc; }
.cal-day.today { background: #fffaf0; }
.day-number { font-weight: 600; color: #2d3748; margin-bottom: 5px; display: block; }
.cal-event { display: block; background: #ebf8ff; color: var(--primary-color); padding: 4px 6px; border-radius: 4px; font-size: 0.75em; margin-bottom: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--primary-color); font-weight: 600; }
.cal-event:hover { background: var(--primary-color); color: white; }
.day-highlight-active { background-color: #e6fffa !important; border: 2px solid #319795 !important; box-shadow: 0 0 15px rgba(49, 151, 149, 0.3); position: relative; z-index: 10; transition: all 0.5s ease; }

.hidden { display: none !important; }

@media (max-width: 768px) {
    .controls-card { flex-direction: column; align-items: stretch; }
    .calendar-grid { display: flex; flex-direction: column; gap: 10px; background: transparent; border: none; }
    .cal-day-header { display: none; }
    .cal-day { border: 1px solid #e2e8f0; border-radius: 8px; min-height: auto; }
    .cal-day.empty { display: none; }
    .calendar-header { flex-direction: column; gap: 15px; }
    .cal-nav-btn { font-size: 0.9em; padding: 8px 12px; }
}

.pending-compare-box { border-radius: 8px; padding: 15px; text-align: left; margin-bottom: 0; position: relative; }
.warning-box { background-color: #fffaf0; border: 2px dashed #f6ad55; }
.existing-box { background-color: #f7fafc; border: 1px solid #e2e8f0; }

.compare-label { font-size: 0.75em; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.warning-box .compare-label { color: #c05621; }
.existing-box .compare-label { color: #718096; }

.compare-content { font-size: 1em; color: #2d3748; }
.scrollable-list { max-height: 100px; overflow-y: auto; }
.compare-divider { font-size: 0.8em; font-weight: 700; color: #cbd5e0; text-align: center; margin: 5px 0; text-transform: uppercase; }

.modal-action-row { display: flex; gap: 15px; margin-top: 25px; justify-content: stretch; }
.modal-action-row button { flex: 1; margin: 0 !important; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95em; padding: 14px; }
.btn-add-save { background-color: var(--accent-color); border-color: var(--accent-color); }
.btn-add-save:hover { background-color: var(--accent-hover); }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

#info-modal { z-index: 4800 !important; }

.edit-icon { color: var(--primary-color); cursor: pointer; font-size: 1.2em; padding: 5px; margin-right: 5px; }
.edit-icon:hover { background: #ebf8ff; border-radius: 4px; }

.subtle-back-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    color: #718096;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9em;
    padding: 5px 10px 5px 0;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: -20px !important;
}
.subtle-back-link:hover { color: var(--primary-color); transform: translateX(-3px); }

/* PREFERENCE SAVE OPTION BANNER */
.pref-save-option {
    margin-top: 25px;
    margin-bottom: 10px;
    padding: 15px;
    background: #fffaf0;
    border: 1px dashed var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pref-save-option .form-label { display: none; }
.pref-save-option label {
    font-weight: 600;
    font-size: 0.9em;
    color: #c05621;
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
}
.pref-save-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.segmented-control { display: flex; background: #e2e8f0; border-radius: 8px; padding: 4px; width: fit-content; gap: 4px; margin-bottom: 15px; }
.segmented-control input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented-control label { padding: 10px 30px; font-size: 0.95em; font-weight: 700; color: #64748b; cursor: pointer; border-radius: 6px; transition: all 0.2s ease; user-select: none; text-align: center; min-width: 60px; }
.segmented-control label:hover { color: #2d3748; background: rgba(255, 255, 255, 0.5); }
.segmented-control input[type="radio"]:checked+label { background-color: #ffffff; color: var(--primary-color); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); transform: scale(1.02); }

.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 5px; }
.option-chip input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.option-chip { display: flex; align-items: center; justify-content: center; padding: 12px 15px; background: #fff; border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; font-weight: 600; color: #4a5568; text-align: center; user-select: none; }
.option-chip:hover { border-color: #cbd5e0; background: #f8fafc; }
.option-chip:has(input:checked) { border-color: var(--primary-color); background-color: #ebf8ff; color: var(--primary-color); box-shadow: 0 2px 5px rgba(32, 65, 100, 0.1); }

.other-text-input { grid-column: 1 / -1; margin-top: 5px !important; }

.ticket-card { background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); border: 1px solid #e2e8f0; max-width: 450px; margin: 0 auto 30px auto; overflow: hidden; text-align: left; }
.ticket-header { background: #f0fff4; color: #22543d; padding: 20px; text-align: center; border-bottom: 1px solid #c6f6d5; }
.ticket-body { padding: 25px; }
.ticket-row { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; color: #4a5568; font-size: 0.95em; line-height: 1.4; }
.ticket-icon { font-size: 1.2em; width: 24px; text-align: center; flex-shrink: 0; }
.ticket-divider { border-top: 2px dashed #cbd5e0; margin: 20px -25px; position: relative; }
.ticket-divider::before, .ticket-divider::after { content: ''; position: absolute; top: -10px; width: 20px; height: 20px; background: var(--bg-color); border-radius: 50%; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); }
.ticket-divider::before { left: -10px; }
.ticket-divider::after { right: -10px; }
.ticket-footer { text-align: center; padding-bottom: 10px; }
.ticket-code { font-family: 'Courier New', monospace; font-size: 2.2em; font-weight: 800; color: #2d3748; letter-spacing: 3px; background: #edf2f7; display: inline-block; padding: 10px 20px; border-radius: 8px; border: 1px dashed #cbd5e0; }

.cal-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: white; border: 1px solid #cbd5e0; border-radius: 20px; text-decoration: none; color: #4a5568; font-size: 0.85em; font-weight: 600; transition: all 0.2s; }
.cal-pill:hover { border-color: var(--primary-color); color: var(--primary-color); background: #ebf8ff; }

.pref-summary-card { background: #f0fff4; border: 1px solid #c6f6d5; border-radius: 8px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; cursor: pointer; transition: all 0.2s ease; animation: fadeIn 0.3s ease; gap: 20px; }
.pref-summary-card:hover { background: #e6fffa; border-color: #b2f5ea; transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); }
.pref-summary-content { display: flex; align-items: center; gap: 15px; }
.pref-summary-icon { font-size: 1.5em; }
.pref-summary-text { display: flex; flex-direction: column; }
.pref-summary-label { font-size: 0.95em; text-transform: uppercase; color: #2f855a; font-weight: 800; letter-spacing: 0.05em; }
.pref-summary-value { font-weight: 700; color: #2d3748; font-size: 1em; }
.pref-edit-btn { color: #718096; font-size: 0.9em; font-weight: 600; text-decoration: underline; flex-shrink: 0; }
.pref-hidden-state { display: none !important; }

#custom-form .form-group { margin-bottom: 30px; }
.drawer-panel .form-group { margin-bottom: 15px; }

.history-container { padding: 10px; }
.timeline-year-group { margin-bottom: 25px; position: relative; padding-left: 20px; border-left: 3px solid #e2e8f0; }
.timeline-year-label { font-size: 1.2em; font-weight: 800; color: var(--primary-color); background: #fff; padding: 5px 10px; margin-left: -28px; margin-bottom: 10px; display: inline-block; border-radius: 6px; border: 1px solid #e2e8f0; }
.history-card { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02); transition: transform 0.2s; }
.history-card:hover { transform: translateX(5px); border-color: #cbd5e0; }
.history-details { flex-grow: 1; }
.history-school { font-weight: 700; color: #2d3748; font-size: 1.05em; }
.history-pos { color: #718096; font-size: 0.9em; margin-top: 2px; }
.history-delete-btn { color: #e53e3e; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 6px; padding: 6px 12px; font-size: 0.85em; cursor: pointer; font-weight: 600; }
.history-delete-btn:hover { background: #c53030; color: white; border-color: #c53030; }
.history-add-panel { background: #f8fafc; border: 2px dashed #cbd5e0; padding: 20px; border-radius: 10px; margin-bottom: 30px; }

.current-assignments-panel { background: #e6fffa; border: 1px solid #38b2ac; border-radius: 8px; padding: 20px; margin-bottom: 30px; }
.current-assignments-header { color: #234e52; margin: 0 0 10px 0; font-size: 1.1em; display: flex; align-items: center; gap: 8px; }
.current-card { background: white; padding: 15px; border-radius: 6px; border: 1px solid #b2f5ea; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; transition: transform 0.2s; }
.current-card:hover { transform: translateX(3px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); }

#hist-tag-input, #position-input { border: none; outline: none; background: transparent; flex-grow: 1; min-width: 150px; font-size: 16px !important; font-family: inherit; color: #2d3748; padding: 6px 0; margin: 0; line-height: 1.5; }
.tags-input-container { min-height: 48px; display: flex; align-items: center; padding: 4px 10px; }

.profile-avatar-container { position: relative; width: 150px; height: 150px; margin: 0 auto 80px auto !important; }
.profile-avatar { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); background-color: #e2e8f0; z-index: 1; }
.photo-controls-pill { margin-top: 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 30px; padding: 5px 8px; display: flex; gap: 5px; align-items: center; justify-content: center; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #e2e8f0; border-radius: 50%; color: #a0aec0; font-size: 4em; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); }
.avatar-controls { position: absolute; bottom: -65px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; z-index: 10; width: max-content; }
.avatar-btn.edit-mode { background-color: #ffffff; color: var(--primary-color); }
.avatar-btn.edit-mode:hover { background-color: #f7fafc; }

#photo-editor-modal canvas { background-color: #333; border-radius: 8px; cursor: move; touch-action: none; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); max-width: 100%; }
.editor-controls { margin-top: 20px; width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
input[type=range].editor-slider { width: 100%; margin: 10px 0; accent-color: var(--primary-color); }
.editor-instructions { font-size: 0.85em; color: #718096; margin-bottom: 10px; }

.avatar-btn { width: 42px; height: 42px; border-radius: 50%; background: #ffffff; border: 1px solid #e2e8f0; font-size: 1.3em; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: all 0.2s ease; }
.avatar-btn:hover { background: #f7fafc; border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); }

#avatar-upload-input { display: none; }
#camera-modal video { width: 100%; border-radius: 8px; background: #000; }
#camera-modal canvas { display: none; }

.profile-hero { background: white; border-radius: 16px; padding: 30px; margin-bottom: 30px; border: 1px solid #edf2f7; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: 20px; }

@media (min-width: 768px) {
    .profile-hero { flex-direction: row; text-align: left; align-items: flex-start; }
    .hero-identity-section { flex-grow: 1; padding-top: 10px; padding-left: 10px; }
    .hero-actions-section { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
    .action-button-row { flex-direction: row; gap: 15px; align-items: center; }
}

.action-button-row { display: flex; flex-direction: column; gap: 15px; width: 100%; }
.sign-out-link { color: #e53e3e; font-size: 0.9em; font-weight: 600; text-decoration: none; cursor: pointer; padding: 5px 10px; border-radius: 4px; transition: background 0.2s; margin-top: 5px; display: inline-block; }
.sign-out-link:hover { background: #fff5f5; }
.hero-avatar-section { display: flex; flex-direction: column; align-items: center; position: relative; flex-shrink: 0; }

.hero-name { font-size: 2em; font-weight: 800; color: var(--primary-color); margin: 0 0 5px 0; line-height: 1.1; }
.hero-email { color: #718096; font-size: 1.05em; margin-bottom: 15px; font-weight: 500; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

@media (min-width: 768px) { .hero-badges { justify-content: flex-start; } }

.hero-badge { background: #fff; color: #4a5568; border: 1px solid #cbd5e0; padding: 6px 14px; border-radius: 6px; font-size: 0.85em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-badge.highlight { background: #ebf8ff; color: #2c5282; border-color: #bee3f8; }

.profile-data-grid { display: grid; grid-template-columns: 1fr; gap: 30px; row-gap: 30px; margin-bottom: 40px; }

@media (min-width: 900px) {
    .profile-data-grid { grid-template-columns: 1fr 1fr; }
    .full-width-card { grid-column: 1 / -1; }
}

.profile-avatar-container { margin: 0 auto 50px auto !important; }

@media (min-width: 768px) { .profile-avatar-container { margin: 0 !important; margin-bottom: 40px !important; } }

.data-card { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; height: auto; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02); }
.data-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #edf2f7; padding-bottom: 15px; color: var(--primary-color); font-weight: 700; font-size: 1.1em; }

#custom-form>.form-group:not([data-visible-if]):not(:first-of-type) { border-top: 1px solid #e2e8f0; margin-top: 45px; padding-top: 30px; }
#custom-form .form-group[data-visible-if]:not(.pref-save-option) { margin-left: 2px; padding-left: 25px; border-left: 4px solid #e2e8f0; margin-bottom: 25px; }
#custom-form .form-group[data-visible-if]:not(.pref-save-option):focus-within { border-left-color: var(--primary-color); }

.options-grid { margin-top: 15px !important; }

.photo-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: white; color: #4a5568; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1em; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.photo-btn:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
.photo-hover-wrapper { position: relative; display: inline-block; }
.photo-delete-overlay { position: absolute; bottom: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,0.55); color: white; font-size: 0.85em; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.2s ease; padding: 0; }
.photo-hover-wrapper:hover .photo-delete-overlay { opacity: 1; }

.logout-corner-wrapper { position: absolute; bottom: 20px; right: 20px; display: flex; align-items: center; justify-content: center; }
.btn-logout-icon { background: transparent; border: none; color: #a0aec0; cursor: pointer; padding: 8px; border-radius: 50%; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; }
.btn-logout-icon:hover { color: #e53e3e; background-color: #fff5f5; transform: translateX(2px); }

.btn-signout::before { content: "Sign Out"; position: absolute; right: 100%; top: 50%; transform: translateY(-50%) translateX(-10px); background-color: #2d3748; color: white; font-size: 0.75em; font-weight: 600; padding: 5px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; pointer-events: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.btn-signout:hover::before { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.btn-changepwd::before { content: "Change Password"; position: absolute; right: 100%; top: 50%; transform: translateY(-50%) translateX(-10px); background-color: #2d3748; color: white; font-size: 0.75em; font-weight: 600; padding: 5px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; pointer-events: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.btn-changepwd:hover::before { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.btn-googleacct::before { content: "Manage Account"; position: absolute; right: 100%; top: 50%; transform: translateY(-50%) translateX(-10px); background-color: #2d3748; color: white; font-size: 0.75em; font-weight: 600; padding: 5px 10px; border-radius: 4px; white-space: nowrap; opacity: 0; visibility: hidden; transition: all 0.2s ease; pointer-events: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.btn-googleacct:hover::before { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }

.career-year-accordion { background: white; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 15px; overflow: hidden; transition: box-shadow 0.2s; }
.career-year-accordion:hover { box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.career-header { background: #f8fafc; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-bottom: 1px solid transparent; transition: background 0.2s; user-select: none; }
.career-header:hover { background: #f1f5f9; }
.career-year-accordion.open .career-header { border-bottom-color: #e2e8f0; background: #fff; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-year-title { font-size: 1.1em; font-weight: 800; color: var(--primary-color); }
.header-chevron { color: #a0aec0; transition: transform 0.3s ease; font-size: 0.8em; }
.career-year-accordion.open .header-chevron { transform: rotate(90deg); color: var(--primary-color); }
.header-right { text-align: right; }
.credit-badge { background: #ebf8ff; color: #2c5282; padding: 4px 10px; border-radius: 12px; font-size: 0.85em; font-weight: 700; border: 1px solid #bee3f8; }
.disclaimer-text { display: block; font-size: 0.7em; color: #a0aec0; margin-top: 4px; font-style: italic; }
.career-body { display: none; padding: 20px; background: #fff; }
.career-year-accordion.open .career-body { display: block; animation: slideDown 0.3s ease-out; }

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

.history-card-modern { border-left: 4px solid #cbd5e0; padding: 15px; margin-bottom: 15px; background: #fff; border: 1px solid #e2e8f0; border-left-width: 4px; border-radius: 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.history-card-modern:last-child { margin-bottom: 0; }
.type-perm { border-left-color: #2c5282; }
.type-lto { border-left-color: #d69e2e; }
.type-ot { border-left-color: #38a169; }
.job-school { font-size: 1.05em; font-weight: 700; color: #2d3748; margin-bottom: 2px; }
.job-pos { color: #4a5568; font-size: 0.95em; margin-bottom: 6px; }
.job-meta-row { display: flex; gap: 10px; font-size: 0.85em; color: #718096; align-items: center; flex-wrap: wrap; }
.meta-pill { background: #f7fafc; padding: 2px 8px; border-radius: 4px; border: 1px solid #edf2f7; font-weight: 600; }
.history-actions { display: flex; gap: 8px; opacity: 0.6; transition: opacity 0.2s; }
.history-card-modern:hover .history-actions { opacity: 1; }
.action-btn-mini { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; border: 1px solid #e2e8f0; background: white; cursor: pointer; color: #718096; transition: all 0.2s; }
.action-btn-mini:hover { background: #edf2f7; color: var(--primary-color); border-color: #cbd5e0; }
.action-btn-mini.delete:hover { background: #fff5f5; color: #c53030; border-color: #fed7d7; }

.career-total-bar { background-color: var(--primary-color); color: white; padding: 20px; border-radius: 8px; margin-top: 25px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 1px solid var(--primary-dark); }
.total-label { font-size: 1.1em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: flex; flex-direction: column; }
.total-subtext { font-size: 0.7em; font-weight: normal; text-transform: none; opacity: 0.8; margin-top: 4px; font-style: italic; }
.total-value { font-size: 1.8em; font-weight: 800; font-family: 'Segoe UI', sans-serif; background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 6px; line-height: 1; }

.profile-pref-bar { background: white; border: 1px solid #e2e8f0; border-left: 5px solid var(--accent-color); border-radius: 12px; padding: 20px 25px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.pref-bar-header { min-width: 150px; }
.pref-bar-title { font-size: 1.1em; font-weight: 800; color: var(--primary-color); margin: 0; display: flex; align-items: center; gap: 8px; }
.pref-bar-subtitle { font-size: 0.85em; color: #718096; margin-top: 4px; }
.pref-items-container { display: flex; flex-wrap: wrap; gap: 30px; flex-grow: 1; padding-left: 20px; border-left: 1px solid #edf2f7; }
.pref-item { display: flex; align-items: center; gap: 12px; }
.pref-icon-circle { width: 42px; height: 42px; background-color: #fffaf0; color: #d69e2e; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2em; border: 1px solid #fbd38d; flex-shrink: 0; }
.pref-label { font-size: 0.75em; text-transform: uppercase; color: #718096; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 2px; }
.pref-value { font-weight: 700; color: #2d3748; font-size: 1em; line-height: 1.2; }
.btn-pref-edit { background: transparent; border: 1px solid #cbd5e0; color: #4a5568; padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 0.9em; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.btn-pref-edit:hover { background: #f7fafc; border-color: #a0aec0; color: #2d3748; }

@media (max-width: 900px) {
    .profile-pref-bar { flex-direction: column; align-items: flex-start; }
    .pref-items-container { border-left: none; padding-left: 0; width: 100%; flex-direction: column; gap: 15px; border-top: 1px solid #edf2f7; padding-top: 15px; }
    .btn-pref-edit { width: 100%; text-align: center; background-color: #f8fafc; }
}

.profile-pref-bar { border-left: none !important; padding-left: 20px; }

/* Preferences drawer — modifier on .edit-drawer */
.edit-drawer--preferences .drawer-header {
    background: linear-gradient(135deg, #f0f4fa 0%, #e8f0f9 100%);
    border-left: 4px solid var(--accent-color);
    border-bottom: 1px solid #dde8f5;
}
.edit-drawer--preferences .drawer-header h2 {
    display: flex; align-items: center; gap: 6px;
    font-size: 1.05em; font-weight: 700; color: var(--primary-color);
}

.pref-intro-text {
    color: #64748b; font-size: 0.87em; margin: 0 0 18px 0;
    line-height: 1.55; padding: 10px 14px;
    background: #f8fafc; border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.pref-modal-layout { display: flex; flex-direction: column; gap: 16px; }
.pref-section-box { background: #fff; border: 1px solid #dde8f5; border-radius: 10px; padding: 18px 20px; }
.pref-section-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid #e8eff8;
}
.pref-section-icon { font-size: 1.1em; color: var(--accent-color); }
.pref-section-label {
    font-size: 0.72em; font-weight: 800; letter-spacing: 0.08em;
    color: var(--accent-color); text-transform: uppercase;
}
.pref-section-box .other-text-input { background-color: #ffffff !important; border: 1px solid #cbd5e0 !important; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); margin-top: 10px !important; transition: all 0.2s ease; }
.pref-section-box .other-text-input:focus { border-color: var(--primary-color) !important; background-color: #fff !important; box-shadow: 0 0 0 3px rgba(32, 65, 100, 0.1), inset 0 1px 2px rgba(0,0,0,0.05); }

.pref-section-box .segmented-control { width: 100%; background-color: #e8eff8; border: 1px solid #d0ddef; padding: 4px; border-radius: 8px; }
.pref-section-box .segmented-control label { flex: 1; text-align: center; margin: 0; border: 1px solid transparent; color: #64748b; font-size: 0.9em; }
.pref-section-box .segmented-control input[type="radio"]:checked + label { background-color: #ffffff; color: var(--primary-color); border-color: #c3d9f0; box-shadow: 0 2px 4px rgba(0,0,0,0.08); font-weight: 800; }

.role-tag.tag-locked { background-color: #2c5282; color: white; border-color: var(--primary-color); padding-right: 12px; }

.session-bar { display: none !important; max-width: var(--layout-width); margin: 0 auto; padding: 8px 10px 0 10px; justify-content: flex-end; align-items: center; height: auto; visibility: hidden; }

.user-indicator { display: flex; align-items: center; gap: 8px; font-family: 'Inter', sans-serif; font-size: 0.85em; color: #4a5568; font-weight: 700; cursor: pointer; padding: 6px 12px; border-radius: 6px; transition: all 0.2s; }
.user-indicator-group:hover { background-color: #f7fafc; }
.user-indicator-group { display: flex; align-items: center; gap: 8px; padding: 0 15px; height: 100%; cursor: pointer; transition: background-color 0.2s; border-bottom: 3px solid transparent; }
.nav-session-wrapper { display: flex; align-items: center; padding-right: 10px; height: 100%; }

.user-name-pill { font-family: 'Inter', sans-serif; font-size: 0.9em; font-weight: 700; color: #4a5568; cursor: pointer; padding: 6px 12px; border-radius: 6px; transition: background-color 0.2s, color 0.2s; }
.user-name-pill:hover { background-color: #e2e8f0; color: var(--primary-color); }

.user-logout-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: #718096; cursor: pointer; transition: all 0.2s; }
.user-logout-btn:hover { background-color: #fff5f5; color: #c53030; transform: translateX(2px); }

.user-indicator:hover { background-color: #e2e8f0; color: #c53030; }
.user-indicator span:first-child { color: #1a202c; }
.logout-icon { font-size: 20px; color: #718096; }
.user-indicator:hover .logout-icon { color: #c53030; }

.modal-btn-heavy { flex: 1; margin: 0; height: 52px; font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 4px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-btn-heavy.btn-primary { background-color: var(--primary-color); color: white; }
.modal-btn-heavy.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(32, 65, 100, 0.2); }
.modal-btn-heavy.btn-secondary, .modal-btn-heavy.btn-neutral { background-color: #edf2f7; color: #4a5568; }
.modal-btn-heavy.btn-secondary:hover, .modal-btn-heavy.btn-neutral:hover { background-color: #e2e8f0; color: #1a202c; transform: translateY(-1px); }

.icon-edit-trigger { background: none; border: none; cursor: pointer; display: flex; align-items: center; padding: 2px; transition: transform 0.2s ease; }
.icon-edit-trigger .material-icons-outlined { font-size: 18px; color: var(--primary-color); transition: color 0.2s ease; }
.icon-edit-trigger:hover { transform: scale(1.2); }
.icon-edit-trigger:hover .material-icons-outlined { color: var(--accent-color); }

.history-card-modern.type-leave { border-left: 4px solid #e53e3e; background-color: #fffafb; opacity: 0.9; }

.btn-secondary.record-leave-btn { background-color: #fff5f5; border: 1px solid #feb2b2; color: #c53030; transition: all 0.2s ease; }
.btn-secondary.record-leave-btn:hover { background-color: #feb2b2; color: #9b2c2c; transform: translateY(-1px); }


/* ============================================================
MODERNISED EVENT CARDS (UI REWORK)
============================================================ */

.event-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--accent-color);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(32, 65, 100, 0.08);
    border-color: var(--primary-color);
}

.event-card.past {
    background: #f8fafc;
    border-color: #edf2f7;
    border-left-color: #cbd5e0;
    opacity: 0.85;
}

.event-card.past:hover {
    opacity: 1;
    border-color: #cbd5e0;
}

.event-card-left {
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 55%, #e8f0f8 100%);
    color: var(--primary-color);
    border-right: 1px solid #dde8f5;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 64px;
}

.event-card-year {
    font-size: 0.75em;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
}

.event-card.past .event-card-left {
    background: linear-gradient(155deg, #f8fafc 0%, #edf2f7 100%);
    color: #718096;
}

.event-card-month {
    font-size: 0.85em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.event-card-day {
    font-size: 1.4em;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
}

.event-card-body {
    padding: 12px 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.event-card-title {
    font-size: 1.1em;
    font-weight: 800;
    color: var(--primary-color);
}

.event-card.past .event-card-title {
    color: #4a5568;
}

.event-status-badge {
    font-size: 0.75em;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.event-status-badge.open {
    background: #fffaf0;
    color: var(--accent-color);
    border: 1px solid #fbd38d;
}

.event-status-badge.closed {
    background: #edf2f7;
    color: #718096;
    border: 1px solid #e2e8f0;
}

.event-card-meta {
    display: flex;
    gap: 20px;
    margin-top: 6px;
    color: #718096;
    font-size: 0.9em;
    font-weight: 500;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item .material-icons-outlined {
    font-size: 1.2em;
    opacity: 0.7;
}

.event-card-right {
    padding: 0 20px;
    display: flex;
    align-items: center;
    color: #cbd5e0;
    transition: color 0.2s;
}

.event-card:hover .event-card-right {
    color: var(--accent-color);
}

@media (max-width: 600px) {
    .event-card { flex-direction: column; }
    .event-card-left { flex-direction: row; padding: 10px; gap: 10px; }
    .event-card-body { padding: 15px; }
    .event-card-header-row { flex-direction: column; gap: 10px; }
    .event-card-right { display: none; }
    .event-card-meta { flex-direction: column; gap: 8px; }
}

/* ============================================================
OECTA-HW SURVEYJS THEME
============================================================ */

/* 1. Root */
.oecta-survey-wrapper.sd-root-modern {
    --sjs-primary-backcolor: #204164;
    --sjs-primary-forecolor: #ffffff;
    --sjs-base-unit: 5px;
    --sjs-corner-radius: 6px;
    background: transparent !important;
}

/* 2. Container + body — strip all outer padding */
.oecta-survey-wrapper .sd-container-modern {
    padding: 0 !important;
    background: transparent !important;
    max-width: 100% !important;
}
.oecta-survey-wrapper .sd-body,
.oecta-survey-wrapper .sd-body__page {
    padding: 0 !important;
    margin: 0 !important;
}
.oecta-survey-wrapper .sd-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    margin-bottom: 5px !important;
    gap: 5px !important;
}
.oecta-survey-wrapper .sd-row:last-child {
    margin-bottom: 0 !important;
}
/* Any direct child of a row that isn't itself a full-width panel gets flex share */
.oecta-survey-wrapper .sd-row > * {
    flex: 1 1 200px !important;
    min-width: 0 !important;
}
/* Panels that ARE the only item in a row stay full-width */
.oecta-survey-wrapper .sd-row > .sd-panel {
    flex: 1 1 100% !important;
}

/* 3. Question cards */
.oecta-survey-wrapper .sd-question {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 5px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
}
.oecta-survey-wrapper .sd-element__header {
    padding: 7px 12px 4px 12px !important;
}
.oecta-survey-wrapper .sd-question__content {
    padding: 0 12px 8px 12px !important;
}

/* 4. Question titles */
.oecta-survey-wrapper .sd-question__title {
    color: #4a5568 !important;
    font-weight: 700 !important;
    font-size: 0.72em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. Description */
.oecta-survey-wrapper .sd-question__description {
    color: #718096 !important;
    font-size: 0.73em !important;
    font-style: italic;
    margin: 2px 0 4px 0 !important;
    line-height: 1.3;
    padding: 0 !important;
}

/* 6. Boolean toggles — let SurveyJS render naturally, only override colours */
.oecta-survey-wrapper .sd-boolean__label {
    font-size: 0.78em !important;
    font-weight: 600 !important;
}
.oecta-survey-wrapper .sd-boolean--checked .sd-boolean__item--checked .sd-boolean__label {
    color: white !important;
}

/* Panel header suppression — JS stamps data-no-title on panels with no visible title */
.sd-panel[data-no-title] > .sd-panel__header {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    border: none !important;
}
/* Guard: keep header visible when panel is collapsible or currently collapsed */
.sd-panel[data-no-title].sd-panel--expandable > .sd-panel__header,
.sd-panel[data-no-title].sd-panel--collapsed > .sd-panel__header {
    all: revert !important;
}

/* 7. Checkboxes — pill chip buttons for multi-select questions */
.oecta-survey-wrapper .sv-button-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
.oecta-survey-wrapper .sv-button-group__item {
    padding: 5px 13px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    background: #f7fafc !important;
    cursor: pointer !important;
    font-size: 0.84em !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    transition: all 0.15s ease !important;
    line-height: 1.4 !important;
    user-select: none !important;
}
.oecta-survey-wrapper .sv-button-group__item:hover {
    border-color: #204164 !important;
    color: #204164 !important;
    background: #eef4fb !important;
}
.oecta-survey-wrapper .sv-button-group__item--selected {
    background: #204164 !important;
    border-color: #204164 !important;
    color: white !important;
    font-weight: 600 !important;
}
.oecta-survey-wrapper .sv-button-group__item-caption {
    pointer-events: none !important;
}

/* Standard checkbox rows (pref-save-option single-choice items) */
.oecta-survey-wrapper .sd-selectbase {
    gap: 6px !important;
}
.oecta-survey-wrapper .sd-item__control-label {
    font-size: 0.88em !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
}
.oecta-survey-wrapper .sd-item--checked .sd-item__control-label {
    color: #204164 !important;
    font-weight: 600 !important;
}

/* 8. Inputs */
.oecta-survey-wrapper .sd-input,
.oecta-survey-wrapper .sd-comment {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 5px !important;
    padding: 6px 10px !important;
    font-size: 0.88em !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.oecta-survey-wrapper .sd-input:focus {
    border-color: #204164 !important;
    box-shadow: 0 0 0 3px rgba(32,65,100,0.1) !important;
}
.oecta-survey-wrapper input[type="email"].sd-input {
    height: auto !important;
}

/* 9. Complete button */
.oecta-survey-wrapper .sd-navigation__complete-btn {
    background: #204164 !important;
    border-radius: 8px !important;
    padding: 14px 32px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-size: 0.88em !important;
    border: none !important;
}
.oecta-survey-wrapper .sd-navigation__complete-btn:hover {
    background: #162e4a !important;
}

/* 10. Panel */
.sd-panel {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 5px !important;
    padding: 6px 8px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
}
.sd-panel .sd-row {
    margin-bottom: 4px !important;
}
.sd-panel .sd-question {
    background: white !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
}
.sd-panel .sd-element__header {
    padding: 5px 10px 3px 10px !important;
}
.sd-panel .sd-question__content {
    padding: 0 10px 6px 10px !important;
}
.sd-panel .sd-question:last-child {
    margin-bottom: 0 !important;
}

/* 11. Progress counter text */
.oecta-survey-progress { display: none !important; }


/* Password Eye Toggle */
.pwd-wrapper { position: relative; display: flex; align-items: center; }
.eye-toggle { position: absolute; right: 10px; cursor: pointer; color: #a0aec0; user-select: none; }
.eye-toggle:hover { color: var(--primary-color); }

/* Feedback Text */
.feedback-text { font-size: 0.8em; margin-top: 4px; display: block; font-weight: 600; }
.feedback-text.hidden { visibility: hidden; }
.feedback-text.invalid { color: #c53030; }
.feedback-text.valid { color: #2f855a; }





/* ==========================================================================
EVENT PAGE HERO REDESIGN (Material Style)
========================================================================== */
/* 1. The Hero Container */
.event-hero-wrapper {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(32, 65, 100, 0.10),
        0 1px 4px  rgba(32, 65, 100, 0.06);
    margin-bottom: 40px;
}

/* Two-column layout restored inside the main row */
.hero-main-row {
    display: flex;
    flex-direction: row;
    min-height: 300px;
}

/* 2. Left Side — light, on-brand, animated */
.hero-visual-side {
    flex: 1.4;
    /* Page-tinted light background — same palette as the site.
       Continuity without competing with the heavy dark header above. */
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 55%, #e8f0f8 100%);
    border-right: 1px solid #dde8f5;
    position: relative;
    padding: 36px 36px 36px 42px; /* extra 6px left = room for the flowing stripe */
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Animated brand stripe — gold flows into navy and back, continuously.
   The moving colour is the visual entry point; it draws the eye leftward
   then carries the reader naturally into the event title. */
.hero-visual-side::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--accent-color)  0%,
        var(--primary-color) 40%,
        var(--primary-dark)  72%,
        var(--accent-color)  100%
    );
    background-size: 100% 300%;
    animation: stripe-flow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes stripe-flow {
    0%   { background-position: 0%   0%; }
    50%  { background-position: 0% 100%; }
    100% { background-position: 0%   0%; }
}

/* Barely-visible decorative ring — breathes gently in the top-right corner,
   adding spatial depth without any competing darkness or weight. */
.hero-visual-side::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 28px solid rgba(32, 65, 100, 0.05);
    top: -120px;
    right: -100px;
    animation: ring-breathe 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ring-breathe {
    0%, 100% { transform: scale(1);    opacity: 0.6; }
    50%       { transform: scale(1.10); opacity: 1;   }
}

@keyframes date-shine {
    0%       { background-position: 180% center; }
    18%      { background-position: -80% center; }
    18.01%   { background-position: 180% center; }
    100%     { background-position: 180% center; }
}

.hero-type-tag {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    /* Shimmer */
    background: linear-gradient(
        90deg,
        var(--accent-color) 30%,
        #fde68a 50%,
        var(--accent-color) 70%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent-color);
    animation: date-shine 8s linear infinite;
}

.hero-type-tag::before {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background: var(--accent-color);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 14px 0;
    letter-spacing: -0.5px;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.hero-meta-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 20px 30px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.meta-block-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(32, 65, 100, 0.50);
    margin-bottom: 5px;
}

.meta-block-value {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.meta-block-value .material-icons-outlined {
    font-size: 18px;
    color: var(--accent-color);
}

/* 3. Right Side: The Action Panel */
.hero-action-side {
    flex: 1;
    background: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #f1f5f9;
}

/* Status Indicator */
.reg-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fff4;
    color: #15803d;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 30px;
    border: 1px solid #bbf7d0;
}

.reg-status-indicator::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #15803d;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.2);
}

/* The Big Button */
.hero-cta-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 22px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 20px rgba(32, 65, 100, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(32, 65, 100, 0.25);
    background: var(--primary-dark);
}

/* Calendar Links Grid */
.calendar-grid-links {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.cal-link-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    background: #f8fafc;
    cursor: pointer;
}

.cal-link-modern:hover {
    border-color: var(--primary-color);
    background: white;
    color: var(--primary-color);
}

.cal-link-modern span {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

/* 4. Responsive Breakpoint */
@media (max-width: 600px) {
    .hero-main-row {
        flex-direction: column;
    }

    .hero-visual-side {
        padding: 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-action-side {
        padding: 40px;
        border-left: none;
        border-top: 1px solid #f1f5f9;
    }
}

/* Content Grid */
.content-grid-modern {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 0;
}

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

/* ============================================================
   HERO: COMPACT META (time + location inline below title)
   ============================================================ */

.hero-compact-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 18px 0;
    position: relative;
    z-index: 1;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
}

.hero-meta-row .material-icons-outlined {
    font-size: 1rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.hero-meta-dot {
    color: rgba(32, 65, 100, 0.35);
    font-weight: 400;
    margin: 0 2px;
}

/* ============================================================
   HERO: MINI MAP THUMBNAIL
   ============================================================ */

.hero-map-mini {
    position: relative;
    height: 115px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #dde8f5;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    margin-top: 16px;
    background: #e8f0f8;
}

.hero-map-mini:hover {
    height: 200px;
}

.hero-map-mini iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.hero-map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 7px;
    background: linear-gradient(to top, rgba(32, 65, 100, 0.30) 0%, transparent 55%);
    pointer-events: none;
    transition: background 0.2s;
    z-index: 2;
}

.hero-map-mini:hover .hero-map-overlay {
    background: linear-gradient(to top, rgba(32, 65, 100, 0.45) 0%, transparent 60%);
}

.hero-map-overlay .material-icons-outlined {
    color: white;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    padding: 3px;
}

/* ============================================================
   MAP MODAL
   ============================================================ */

#map-modal {
    align-items: center;
    justify-content: center;
}

.map-modal-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    width: 92%;
    max-width: 680px;
    box-shadow: 0 25px 60px rgba(32, 65, 100, 0.22);
    display: flex;
    flex-direction: column;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #dde8f5;
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 100%);
    flex-shrink: 0;
}

.map-modal-venue {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.map-modal-addr {
    font-size: 0.8rem;
    color: #64748b;
}

.map-modal-close {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.map-modal-close:hover {
    background: #f1f5f9;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.map-modal-close .material-icons-outlined {
    font-size: 18px;
}

#map-container {
    background: #f1f5f9;
    width: 100%;
    flex-shrink: 0;
}

.map-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.map-modal-footer a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-modal-footer a:hover {
    color: var(--accent-color);
}

.map-modal-footer .material-icons-outlined {
    font-size: 1rem;
}

/* ── Hero Notes Zone (integrated into hero card) ── */
.hero-notes-zone {
    border-top: 1px solid rgba(221, 232, 245, 0.85);
    background: linear-gradient(180deg, #f8fafd 0%, #ffffff 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.hero-notes-zone:hover {
    background: linear-gradient(180deg, #eef4fb 0%, #f4f8fd 100%);
}
.hero-notes-zone.is-expanded {
    background: white;
}

.hero-notes-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px 11px 28px;
}
.hero-notes-icon {
    color: var(--accent-color);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.hero-notes-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(32, 65, 100, 0.5);
    flex-shrink: 0;
}
/* One-line peek of the note text shown in the header row when collapsed */
.hero-notes-peek {
    font-size: 0.8rem;
    color: rgba(32, 65, 100, 0.35);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    padding-left: 8px;
    border-left: 1px solid rgba(221, 232, 245, 0.9);
    margin-left: 4px;
    transition: opacity 0.3s;
}
.hero-notes-zone.is-expanded .hero-notes-peek {
    opacity: 0;
}
.hero-notes-chevron {
    font-size: 1.1rem;
    color: rgba(32, 65, 100, 0.3);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}
.hero-notes-zone.is-expanded .hero-notes-chevron {
    transform: rotate(180deg);
    color: var(--accent-color);
}

/* Collapsible body */
.hero-notes-body {
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                padding   0.3s ease;
}
.hero-notes-zone.is-expanded .hero-notes-body {
    max-height: 600px;
    padding-bottom: 20px;
}

.hero-notes-content {
    padding: 4px 28px 0;
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.91rem;
}

/* Gradient fade at the bottom of the collapsed peek — not needed since body is max-height:0 collapsed */
.hero-notes-fade {
    display: none;
}

/* Legacy alias — keep #notes-container working */
#notes-container {
    padding: 4px 28px 0;
    color: #4a5568;
    line-height: 1.7;
    font-size: 0.91rem;
}

/* Calendar link icons */
.cal-link-modern img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    object-fit: contain;
}




/* ==========================================================================
MICRO-HERO (Context Header for Sub-Pages)
========================================================================== */

.micro-hero-wrapper {
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 55%, #e8f0f8 100%);
    color: var(--primary-color);
    border-top: 4px solid var(--primary-color);
    border-left: none;
    padding: 16px 24px;
    border-radius: 12px 12px 0 0; /* Rounded top only, attaches to card below */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0; /* Flush with content below */
}

/* Subtle Pattern */
.micro-hero-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 90% 10%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}

.micro-hero-content {
    position: relative;
    z-index: 2;
}

.micro-hero-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.micro-hero-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.micro-hero-date {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 2px;
    font-weight: 500;
}

.micro-hero-location {
    font-size: 0.82rem;
    opacity: 0.75;
    margin-top: 3px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Right Side Context Icon */
.micro-hero-icon {
    font-size: 48px;
    color: rgba(32, 65, 100, 0.12);
    transform: rotate(-10deg);
}

/* Updates to the Container Card to fuse them */
.card-fused {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden; /* Clips the micro-hero corners */
    padding: 0 !important; /* Remove default padding so header hits edges */
}

.card-fused-body {
    padding: 30px; /* Restore padding for content */
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .micro-hero-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .micro-hero-icon {
        position: absolute;
        right: 20px;
        top: 20px;
    }
}



/* ==========================================================================
GLOBAL FOOTER
========================================================================== */

.site-footer {
    background-color: var(--primary-color);
    border-top: 4px solid var(--accent-color);
    color: rgba(255, 255, 255, 0.8);
    margin-top: auto; /* flex-body pushes it to the bottom */
}

.footer-inner {
    max-width: var(--layout-width);
    margin: 0 auto;
    padding: 0 10px;
}

/* Top row: brand block + links */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 0 22px;
    gap: 30px;
}

.footer-org-name {
    font-size: 0.95em;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.footer-org-sub {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Links cluster */
.footer-links-block {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    justify-content: flex-end;
    align-items: center;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.82em;
    font-weight: 600;
    transition: color 0.2s;
    white-space: nowrap;
}

.footer-link .material-icons-outlined {
    font-size: 14px;
    vertical-align: middle;
}

.footer-link:hover {
    color: var(--accent-color);
}

/* Bottom bar: copyright */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 0;
    font-size: 0.73em;
    color: rgba(255, 255, 255, 0.38);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-divider {
    opacity: 0.5;
}

@media (max-width: 600px) {
    .footer-top {
        flex-direction: column;
        gap: 18px;
        padding: 22px 0 18px;
    }
    .footer-links-block {
        justify-content: flex-start;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    .footer-divider { display: none; }
}

/* 3. Login Page Layout Tweaks */
/* Center the login card vertically inside the "Micro Hero" structure if needed,
but since we are using the card-fused style, we just need to ensure the card
isn't too wide. */
#profile-login-container {
    margin: 0 auto 30px auto !important; /* Center horizontally */
    max-width: 500px !important; /* Slightly wider for comfort */
    box-shadow: none !important; /* Remove double shadow */
    border: none !important; /* Remove double border */
    background: transparent !important; /* Let the fused card handle bg */
    padding: 0 !important; /* Remove internal padding */
}


/* ============================================================
   CALENDAR: CHIP HOVER TOOLTIP
   ============================================================ */

#cal-chip-tooltip {
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #dde8f5;
    border-left: 3px solid var(--accent-color);
    border-radius: 8px;
    padding: 10px 13px;
    box-shadow: 0 8px 24px rgba(32, 65, 100, 0.14);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    max-width: 220px;
}
#cal-chip-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.cct-name { font-weight: 700; font-size: 0.88rem; color: var(--primary-color); margin-bottom: 3px; }
.cct-date { color: var(--accent-color); font-weight: 600; font-size: 0.78rem; margin-bottom: 5px; }
.cct-row  { color: #718096; font-size: 0.78rem; margin-top: 2px; display: flex; align-items: center; gap: 3px; }


/* ============================================================
   CALENDAR: CLICK MODAL (hero-style)
   ============================================================ */

.cal-modal-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    width: 92%;
    max-width: 460px;
    box-shadow: 0 25px 60px rgba(32, 65, 100, 0.22);
    position: relative;
    animation: modalFadeIn 0.2s ease;
}
.cal-modal-hero {
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 55%, #e8f0f8 100%);
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #dde8f5;
    border-left: 4px solid var(--accent-color);
}
.cal-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.cal-modal-close:hover { background: #f1f5f9; }
.cal-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 6px 0 14px 0;
    line-height: 1.2;
    padding-right: 36px;
}
.cal-modal-body {
    padding: 14px 24px 4px 24px;
    font-size: 0.92rem;
}
.cal-modal-desc {
    margin: 0 0 10px 0;
    color: #4a5568;
    line-height: 1.65;
}
.cal-modal-type-tag {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: #eef4fb;
    border: 1px solid #c8ddf5;
    border-radius: 20px;
    padding: 3px 10px;
    margin-top: 4px;
}
.cal-modal-footer {
    padding: 12px 24px 20px 24px;
}
.cal-modal-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* ============================================================
   CALENDAR: MATERIAL / GOOGLE CALENDAR STYLE OVERRIDES
   ============================================================ */

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px 14px 4px;
}
.cal-month-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
#cal-month-year {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    letter-spacing: 0 !important;
    min-width: 0 !important;
    text-align: left !important;
    padding: 0 6px;
}
.cal-nav-btn {
    background: none !important;
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #5f6368 !important;
    transition: background 0.15s !important;
}
.cal-nav-btn:hover { background: #f1f3f4 !important; }
.cal-nav-icon .material-icons-outlined { font-size: 1.25rem; }

.cal-event-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cal-event-nav-btn {
    background: none;
    border: 1px solid #dadce0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.cal-event-nav-btn:hover { background: #f0f5fc; border-color: #b0c4de; }
.cal-event-nav-btn .material-icons-outlined { font-size: 0.9rem; }

/* Grid — clean lines instead of gap-based grid */
.calendar-grid {
    background: white !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    gap: 0 !important;
}

/* Day headers */
.cal-day-header {
    background: white !important;
    padding: 8px 0 !important;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    color: #70757a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid #dadce0 !important;
}

/* Day cells */
.cal-day {
    min-height: 110px !important;
    border-right: 1px solid #dadce0 !important;
    border-bottom: 1px solid #dadce0 !important;
    padding: 6px 8px !important;
    background: white !important;
}
.cal-day:hover { background: #fafafa !important; }
.cal-day.empty { background: #fafafa !important; }
/* Remove right border on last column */
.cal-day:nth-child(7n + 8) { border-right: none !important; }

/* Day number — circular pill on today */
.day-number {
    font-size: 0.8rem !important;
    font-weight: 400 !important;
    color: #3c4043 !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    margin-bottom: 4px !important;
}
.cal-day.today { background: white !important; }
.cal-day.today .day-number {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 700 !important;
}

/* Event chips */
.cal-event {
    background: var(--primary-color) !important;
    color: white !important;
    border-left: none !important;
    border-radius: 4px !important;
    font-size: 0.72rem !important;
    padding: 3px 7px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
}
.cal-event:hover {
    background: #1a3552 !important;
    filter: brightness(1.1);
    color: white !important;
}


/* ============================================================
   CALENDAR: VIEW SELECTOR DROPDOWN
   ============================================================ */

.cal-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cal-view-dropdown {
    position: relative;
}
.cal-view-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #dadce0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cal-view-btn:hover { background: #f0f5fc; border-color: #b0c4de; }
.cal-view-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(32, 65, 100, 0.14);
    min-width: 160px;
    z-index: 500;
    overflow: hidden;
    display: none;
}
.cal-view-menu.open { display: block; }
.cal-view-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.88rem;
    color: #3c4043;
    cursor: pointer;
    transition: background 0.1s;
}
.cal-view-option:hover { background: #f1f3f4; }
.cal-view-option.active { color: var(--primary-color); font-weight: 600; background: #f0f5fc; }
.cal-view-option kbd {
    font-family: inherit;
    font-size: 0.75rem;
    color: #70757a;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 1px 6px;
}


/* ============================================================
   CALENDAR: WEEK VIEW
   ============================================================ */

.cal-week-cell {
    min-height: 140px !important;
}
.cal-wh-day {
    font-size: 0.68rem;
    font-weight: 500;
    color: #70757a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cal-wh-num {
    font-size: 1.1rem;
    font-weight: 400;
    color: #3c4043;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 2px auto 0;
}
.cal-wh-num.today {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
}


/* ============================================================
   CALENDAR: SCHEDULE VIEW
   ============================================================ */

#cal-schedule-view {
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}
.cal-sched-month-header {
    padding: 10px 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary-color);
    background: linear-gradient(155deg, #ffffff 0%, #f0f5fc 100%);
    border-bottom: 1px solid #dadce0;
}
.cal-sched-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-sched-row:last-child { border-bottom: none; }
.cal-sched-row:hover { background: #f8fafc; }
.cal-sched-date-col {
    text-align: center;
    min-width: 36px;
    flex-shrink: 0;
}
.cal-sched-day-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: #70757a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cal-sched-day-num {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.1;
}
.cal-sched-chip {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    padding: 10px 14px;
}
.cal-sched-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.cal-sched-metas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cal-sched-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    opacity: 0.85;
}
.cal-sched-meta .material-icons-outlined { font-size: 12px; }
.cal-sched-arrow {
    color: #b0c4de;
    flex-shrink: 0;
}
.cal-sched-empty {
    text-align: center;
    padding: 48px 20px;
    color: #70757a;
}
.cal-sched-empty .material-icons-outlined { font-size: 2.5rem; opacity: 0.4; }
.cal-sched-empty p { margin-top: 8px; font-size: 0.92rem; }

/* ── Manage Registration Dashboard ──────────────────────────────────── */
.manage-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #f8fafd;
    border-bottom: 1px solid #dde8f5;
}
.manage-section-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.manage-section-header-left > .material-icons-outlined {
    font-size: 1.5em;
    color: var(--primary-color);
    opacity: 0.7;
}
.manage-section-label {
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.manage-section-name {
    font-size: 0.82em;
    font-weight: 600;
    color: #64748b;
}
.manage-section-event-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1px;
}
.manage-section-event-info {
    font-size: 0.78em;
    color: #64748b;
    margin-top: 2px;
}
.manage-action-bar {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #dde8f5;
    background: #f8fafd;
    flex-wrap: wrap;
}
.manage-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1.5px solid #cbd5e0;
    background: white;
    color: var(--primary-color);
    transition: all 0.18s ease;
}
.manage-action-btn:hover {
    border-color: var(--primary-color);
    background: #eef4fb;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(32,65,100,0.1);
}
.manage-action-btn .material-icons-outlined { font-size: 1rem; }
.manage-action-danger {
    border-color: #fc8181;
    color: #c53030;
    background: #fff5f5;
}
.manage-action-danger:hover {
    background: #c53030;
    border-color: #c53030;
    color: white;
    box-shadow: 0 3px 8px rgba(197,48,48,0.2);
    transform: translateY(-1px);
}
.reg-section-heading {
    font-size: 0.72em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dde8f5;
}

/* Manage action bar — primary (Show Ticket) */
.manage-action-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.manage-action-primary:hover {
    background: #1a3550;
    border-color: #1a3550;
    color: white;
    box-shadow: 0 3px 8px rgba(32,65,100,0.25);
    transform: translateY(-1px);
}

/* ===== REGISTRATION EDIT MODE ===== */

/* Edit-mode variant of micro-hero — amber top border signals edit state */
.micro-hero-wrapper--edit {
    border-top-color: var(--accent-color);
}

/* Shared base for the edit-hero action button (back / save / saved states) */
.micro-hero-back-btn,
.micro-hero-save-btn,
.micro-hero-saved-msg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px 7px 8px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1.5px solid transparent;
}
.micro-hero-back-btn .material-icons-outlined,
.micro-hero-save-btn .material-icons-outlined,
.micro-hero-saved-msg .material-icons-outlined { font-size: 16px; }

/* State 1 — Back to Summary (default, no changes) */
.micro-hero-back-btn {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.micro-hero-back-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* State 2 — Save Changes (active, has changes) */
.micro-hero-save-btn {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(243,156,18,0.35);
    animation: heroSavePulse 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.micro-hero-save-btn:hover {
    background: #d68910;
    border-color: #d68910;
    box-shadow: 0 3px 10px rgba(243,156,18,0.45);
}
@keyframes heroSavePulse {
    from { transform: scale(0.94); opacity: 0.7; }
    to   { transform: scale(1);    opacity: 1; }
}

/* State 3 — All changes saved (post-save, transitional) */
.micro-hero-saved-msg {
    background: transparent;
    border-color: transparent;
    color: rgba(32,65,100,0.45);
    cursor: default;
    font-style: italic;
    pointer-events: none;
}

/* SurveyJS navigation in edit mode — hide prev/next, keep complete button */
.edit-mode-active .sd-navigation__prev-btn,
.edit-mode-active .sd-navigation__next-btn {
    display: none !important;
}

/* Bottom Save Changes button — greyed out until changes detected */
.edit-mode-active .sd-navigation__complete-btn {
    opacity: 0.35 !important;
    pointer-events: none !important;
    cursor: default !important;
    transition: opacity 0.2s, box-shadow 0.2s;
}
/* Active state — mirrors the hero save button */
.edit-mode-active .sd-navigation__complete-btn.edit-btn-active {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}
/* Saved state — greyed italic text */
.edit-mode-active .sd-navigation__complete-btn.edit-btn-saved {
    opacity: 0.45 !important;
    pointer-events: none !important;
    font-style: italic !important;
}

/* Fix read-only / disabled SurveyJS input and question container appearance */
.sd-root-modern .sd-element--disabled,
.sd-root-modern .sd-question--disabled {
    opacity: 1 !important;
}
.sd-root-modern .sd-input.sd-input--disabled,
.sd-root-modern input:disabled,
.sd-root-modern textarea:disabled {
    background-color: #ffffff !important;
    opacity: 1 !important;
    color: #4a5568 !important;
    cursor: default;
    border-color: rgba(0, 0, 0, 0.16) !important;
    padding: 6px 10px !important;
}

/* Wrap the SurveyJS form in a tidy inner container when editing */
.edit-form-body {
    padding: 20px 0 0;
}

/* Sticky save-hint bar at the bottom of the form */
.edit-save-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 4px 4px;
    border-top: 1px solid #edf2f7;
    margin-top: 16px;
}
.edit-save-hint-text {
    flex: 1;
    font-size: 0.78em;
    color: #a0aec0;
}

/* ===== EMAIL / AUTOFILL FIX ===== */
/* Prevent browser autofill from overriding SurveyJS input styles */
.sd-root-modern input:-webkit-autofill,
.sd-root-modern input:-webkit-autofill:hover,
.sd-root-modern input:-webkit-autofill:focus,
.sd-root-modern input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #2d3748 !important;
    transition: background-color 5000s ease-in-out 0s;
}
/* Normalize email input appearance to match other text inputs */
.sd-root-modern input[type="email"].sd-input {
    -webkit-appearance: none;
    appearance: none;
}

/* SurveyJS read-only display inside manage dashboard */
.reg-survey-readonly { padding: 0 !important; border: none !important; box-shadow: none !important; background: transparent !important; }
.reg-survey-readonly .sd-root-modern,
.reg-survey-readonly .sv_main,
.reg-survey-readonly .sd-root-modern__wrapper { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.reg-survey-readonly .sd-body,
.reg-survey-readonly .sd-page { padding: 0 !important; }
.reg-survey-readonly .sd-element--with-frame { box-shadow: none !important; border: none !important; background: transparent !important; }

/* Two-column layout: contact left, survey right */
.review-grid-wide { grid-template-columns: minmax(220px, 1fr) 2fr; align-items: start; }
@media (max-width: 680px) { .review-grid-wide { grid-template-columns: 1fr; } }

/* Scroll hint indicator */
.scroll-hint-indicator {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.92);
    border: 1px solid #dde8f5;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
    box-shadow: 0 2px 10px rgba(32,65,100,0.12);
    z-index: 900;
}
.scroll-hint-indicator.visible { opacity: 1; pointer-events: auto; }
.scroll-hint-indicator .material-icons-outlined {
    color: var(--primary-color); font-size: 1.3rem;
    animation: scroll-bounce 1.5s ease infinite;
}
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(4px); }
}

/* ── Registration summary — compact review card ─────────────────────── */
.reg-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}
.reg-review-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 9px 16px;
    border-bottom: 1px solid #f0f4f8;
    font-size: 0.9em;
}
.reg-review-row:last-child { border-bottom: none; }
.reg-review-label {
    color: #718096;
    font-weight: 500;
    flex-shrink: 0;
    max-width: 48%;
}
.reg-review-value {
    color: #2d3748;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}
.reg-review-section {
    font-size: 0.7em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color);
    padding: 8px 16px 6px;
    background: #f8fafd;
    border-bottom: 1px solid #dde8f5;
}

/* ── Registration Summary View — Material Design 3 ─────────────────── */

/* Summary header row */
.rsv-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.rsv-summary-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color, #204164);
    margin: 0;
    letter-spacing: -0.01em;
}
.rsv-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    background: transparent;
    border: 1.5px solid #cbd5e0;
    border-radius: 20px;
    color: var(--primary-color, #204164);
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    letter-spacing: 0.01em;
}
.rsv-edit-btn:hover {
    background: #eef2ff;
    border-color: var(--primary-color, #204164);
}
.rsv-edit-btn .material-icons-outlined { font-size: 15px; }

/* Panel stack */
.rsv-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* M3 surface container card */
.rsv-panel {
    background: #f5f7ff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(32,65,100,0.08), 0 1px 2px rgba(32,65,100,0.05);
}

/* Section label — M3 "label small" overline */
.rsv-panel-header {
    font-size: 0.67em;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color, #204164);
    padding: 14px 18px 4px;
    background: transparent;
    border: none;
}

/* Content grid — no internal dividers, space-based layout */
.rsv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 8px 10px 14px;
}

.rsv-item {
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
}
.rsv-item:nth-child(even) { border-right: none; }
.rsv-item--wide           { grid-column: 1 / -1; border-right: none; }
.rsv-item:last-child,
.rsv-item:nth-last-child(2):not(.rsv-item--wide) { border-bottom: none; }

/* M3 "label small" field caption */
.rsv-item-label {
    font-size: 0.67em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
    margin-bottom: 7px;
}

/* Value wrapper */
.rsv-item-value {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

/* M3 "suggestion chip" — filled tonal, rounded rect */
.rsv-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #dde6fb;
    color: #1a3f6f;
    border: 1px solid #b3c8f5;
    border-radius: 8px;
    font-size: 0.79em;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.7;
    letter-spacing: 0.01em;
}
/* "Other" user-entered text — same chip shape, muted neutral tone + italic */
.rsv-chip--other {
    background: #f1f3f5;
    color: #4b5563;
    border-color: #d1d5db;
    font-style: italic;
    font-weight: 400;
}

/* M3 "filled tonal" state badge */
.rsv-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 600;
    white-space: nowrap;
    border: none;
}
.rsv-badge--yes { background: #d2f4e0; color: #14532d; }
.rsv-badge--no  { background: #fce8e8; color: #7f1d1d; }

/* Body text */
.rsv-text-val {
    font-size: 0.9em;
    color: #111827;
    font-weight: 600;
    line-height: 1.5;
}

.rsv-empty {
    padding: 28px 20px;
    color: #9ca3af;
    font-size: 0.88em;
    text-align: center;
    font-style: italic;
}

/* ── Skeleton loader ── */
.rsv-skel {
    background: linear-gradient(90deg, #e8edf3 25%, #f0f4f8 50%, #e8edf3 75%);
    background-size: 200% 100%;
    animation: rsv-shimmer 1.4s infinite;
    border-radius: 4px;
    pointer-events: none;
    color: transparent !important;
}
.rsv-skel--line { min-height: 38px; }

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