/* ===== FONTS ===== */
@font-face {
    font-family: 'OptimisticDisplay';
    src: url('/fonts/optimistic.woff2') format('woff2');
    font-display: swap;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
* { font-family: 'OptimisticDisplay', system-ui, -apple-system, sans-serif; }

body {
    font-size: 15px; line-height: 1.5; color: #0a1317;
    background: linear-gradient(130deg, rgba(249,241,249,1) 0%, rgba(234,243,253,1) 35%, rgba(237,251,242,1) 100%);
    min-height: 100vh;
}
::-webkit-scrollbar { width: 0; }

/* Page title & description */
.page-title {
    font-size: 24px; font-weight: 700; color: #0a1317; margin-bottom: 10px;
}
.page-desc {
    font-size: 15px; color: #0a1317; line-height: 1.6; margin-bottom: 5px; font-weight: 400;
}

/* ===== LOADING ===== */
.loading-screen {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: #fff; overflow: hidden;
}
.loading-screen.hidden { display: none; }
.loading-screen img { width: 100vw; height: auto; object-fit: cover; }

/* ===== LAYOUT ===== */
.app-container { display: flex; min-height: 100vh; max-width: 1100px; margin: 0 auto; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: 33.333%; max-width: 340px; min-width: 300px;
    padding: 28px 32px 0 20px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { width: 60px; margin-bottom: 10px; }
.sidebar-logo img { width: 100%; height: auto; }
.sidebar-title { font-size: 24px; font-weight: 600; color: #0a1317; margin-bottom: 15px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 0; }
.nav-item {
    display: flex; align-items: center; width: 100%;
    padding: 12px 16px; gap: 12px;
    border-radius: 15px; overflow: hidden; cursor: pointer;
    font-size: 15px; font-weight: 600; color: #0a1317;
    transition: background 0.15s;
}
.nav-item:hover { background: #fff; }
.nav-item.active { background: #354855; color: #fff; }
.nav-item.active .nav-text { color: #fff; font-weight: 500; }
.nav-icon { width: 24px; height: 24px; flex-shrink: 0; }
.nav-icon img { width: 100%; height: 100%; }
.nav-text { font-size: 15px; font-weight: 600; color: #0a1317; }
.nav-item.active .nav-text { color: #fff; }
.nav-item.has-arrow { justify-content: flex-start; }
.nav-item.has-arrow .nav-text {
    flex: 1;
}
.nav-arrow { width: 20px; height: 20px; flex-shrink: 0; }
.nav-arrow img { width: 100%; height: 100%; }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1; padding: 40px 30px 40px 30px; max-width: 900px;
    width: 66.666%;
}

/* Hero banner */
/* Purple Container */
.purple-container {
    width: 100%; margin-top: 30px; margin-bottom: 30px;
    border-radius: 15px; overflow: hidden;
    background-color: #d2d2fe; padding: 16px;
}

.hero-banner {
    width: 100%; border-radius: 0; overflow: hidden;
    margin-bottom: 0;
}
.hero-banner img { width: 100%; height: auto; display: block; }

/* Participation card */
.participation-card {
    background: #fff;
    border-radius: 15px; padding: 16px;
    margin-bottom: 0;
}
.participation-card .label {
    font-size: 15px; color: #465a69; margin-bottom: 5px; font-weight: 400;
}
.participation-card h2 {
    font-size: 16px; font-weight: 700; color: #0a1317; margin-bottom: 5px;
}
.participation-card p {
    font-size: 15px; color: #465a69; line-height: 1.5; font-weight: 400;
}

/* Ticket ID */
.ticket-id {
    font-size: 14px; color: #465a69; margin-top: 10px; margin-bottom: 20px; font-weight: 400;
}
.ticket-id strong { color: #465a69; font-weight: 400; }

/* CTA Button */
.cta-btn {
    display: flex; width: 100%; padding: 10px;
    background: #0064E0; color: #fff; border: none;
    border-radius: 40px; font-size: 15px; font-weight: 600;
    cursor: pointer; text-align: center; margin-top: 20px;
    transition: background 0.2s; font-family: inherit;
    align-items: center; justify-content: center;
}
.cta-btn:hover { background: #0056c4; }

.invite-date { text-align: center; font-size: 14px; color: #0a1317; margin-top: 15px; font-weight: 400; }
.invite-date b { color: #0a1317; font-weight: 700; }

/* Section separator */
.section-separator {
    border: none; border-top: 1px solid #E3E8EF; margin: 20px 0;
}

/* Important Notes / Appeal Guide */
.guide-section { margin-bottom: 20px; }
.guide-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: #0a1317; }
.guide-list { padding-left: 20px; }
.guide-list li {
    font-size: 15px; color: #0a1317; margin-bottom: 10px; line-height: 1.6;
    list-style-type: disc; font-weight: 400;
}

/* Sections */
.section-title { font-size: 16px; font-weight: 700; margin: 10px 0 10px; color: #0a1317; padding-top: 10px; border-top: 1px solid #E3E8EF; }
.section-subtitle { font-size: 15px; font-weight: 600; margin: 10px 0 10px; color: #0a1317; padding-top: 10px; border-top: 1px solid #E3E8EF; }

/* Accordion items */
.accordion-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: rgba(255,255,255,0.6);
    border-radius: 10px; margin-bottom: 5px; cursor: pointer;
    transition: all 0.15s;
}
.accordion-item:hover { background: rgba(255,255,255,0.9); box-shadow: 0 2px 8px rgba(59,130,246,0.06); }
.accordion-left { display: flex; align-items: center; gap: 10px; }
.accordion-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.accordion-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.accordion-icon.orange { background: rgba(251,146,60,0.12); }
.accordion-icon.green { background: rgba(34,197,94,0.12); }
.accordion-icon.blue { background: rgba(59,130,246,0.12); }
.accordion-text h4 { font-size: 14px; font-weight: 600; color: #0a1317; }
.accordion-text p { font-size: 13px; color: #465a69; font-weight: 400; }
.accordion-chevron { width: 20px; height: 20px; color: #9a979e; flex-shrink: 0; }

/* Footer */
.page-footer {
    padding: 20px 0; font-size: 13px; color: #465a69; line-height: 1.7;
    font-weight: 400; margin-top: 20px;
}
.page-footer a { color: #0d6efd; text-decoration: none; }

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.4); display: flex;
    align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== REGISTRATION MODAL ===== */
.modal-box {
    background: linear-gradient(130deg, rgba(249,241,249,1) 0%, rgba(234,243,253,1) 35%, rgba(237,251,242,1) 100%);
    width: 100%; max-width: 520px; margin: 0 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 20px; border-radius: 16px;
    overflow-y: auto; display: flex; flex-direction: column;
    max-height: calc(100vh - 40px);
    animation: slideUp 0.25s ease;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.modal-title { font-weight: 700; color: #0A1317; font-size: 15px; }
.modal-close-btn {
    width: 18px; height: 18px; cursor: pointer;
    opacity: 0.6; transition: opacity 0.2s;
}
.modal-close-btn:hover { opacity: 1; }
.close-icon { width: 18px; height: 18px; }
.modal-scroll { flex: 1; overflow-y: auto; }
.modal-form-wrap { display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Form inputs */
.form-group { width: 100%; }
.form-input-wrap {
    width: 100%; border: 1px solid #d4dbe3; height: 40px;
    padding: 0 11px; border-radius: 10px; background: #fff;
    font-size: 14px; margin-bottom: 10px;
    transition: all 0.2s; display: flex; align-items: center;
}
.form-input-wrap:hover { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.form-input-wrap:focus-within { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.form-input {
    width: 100%; height: 100%; border: none; outline: none;
    font-size: 14px; font-family: inherit; font-weight: 500;
    background: transparent;
}
.form-input::placeholder { color: #9ca3af; font-weight: 400; }

/* Phone field */
.phone-field { padding: 0; }
.phone-flag-area {
    display: flex; align-items: center; gap: 4px;
    padding: 0 10px; cursor: pointer; height: 100%;
}
.phone-flag-icon { width: 20px; height: 14px; border-radius: 2px; }
.phone-arrow {
    width: 0; height: 0;
    border-left: 3px solid transparent; border-right: 3px solid transparent;
    border-top: 4px solid #555;
}
.phone-input { padding-left: 4px !important; }

/* Form Errors */
.form-error {
    display: none; align-items: center; gap: 4px;
    color: #ef4444; font-size: 12px; margin-bottom: 8px;
}
.form-error.visible { display: flex; }

/* DOB */
.dob-label { font-weight: 700; color: #9a979e; font-size: 14px; margin-bottom: 7px; }
.dob-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* Textarea */
.textarea-wrap { height: 100px; padding: 11px; align-items: flex-start; }
.form-textarea {
    width: 100%; height: 100%; border: none; outline: none;
    resize: none; font-size: 14px; font-family: inherit;
    font-weight: 500; background: transparent;
}
.form-textarea::placeholder { color: #9ca3af; font-weight: 400; }

/* Response note */
.response-note { font-size: 14px; color: #9a979e; margin-bottom: 7px; font-weight: 400; }

/* Facebook toggle row */
.fb-toggle-row {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    margin-bottom: 10px; background: #fff; padding: 10px; border-radius: 10px;
}
.fb-toggle-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.fb-icon-wrap { width: 16px; height: 16px; flex-shrink: 0; }
.fb-icon { width: 16px; height: 16px; }
.fb-toggle-text b { font-size: 15px; color: #0a1317; display: block; }
.fb-toggle-text p { font-size: 14px; color: #9a979e; margin: 0; }

/* Toggle switch */
.toggle-switch {
    position: relative; display: inline-flex; align-items: center;
    cursor: pointer; height: 18px; width: 32px; border-radius: 9999px;
    transition: background 0.3s; border: none; padding: 0;
    background: #d1d5db; flex-shrink: 0;
}
.toggle-switch.active { background: #2563eb; }
.toggle-dot {
    display: inline-block; height: 16px; width: 16px;
    border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.3s; transform: translateX(1px);
}
.toggle-switch.active .toggle-dot { transform: translateX(15px); }

/* Agree checkbox */
.agree-row { margin: 15px 0 20px; }
.agree-label {
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    font-size: 14px; color: #0a1317;
}
.custom-checkbox { display: inline-flex; align-items: center; cursor: pointer; }
.checkbox-box {
    width: 16px; height: 16px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #d1d5db; background: #fff;
    transition: all 0.2s; flex-shrink: 0;
}
.checkbox-tick { width: 12px; height: 12px; color: #fff; display: none; }
.sr-only:checked + .checkbox-box { background: #2563eb; border-color: #2563eb; }
.sr-only:checked + .checkbox-box .checkbox-tick { display: block; }
.terms-link {
    color: #0d6efd; text-decoration: none;
    display: inline-flex; align-items: center; gap: 3px;
}
.terms-icon { width: 10px; height: 10px; }

/* Send button */
.send-btn {
    width: 100%; padding: 10px; background: #0064E0; color: #fff;
    border: none; border-radius: 40px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background 0.2s; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
}
.send-btn:hover { background: #0056c4; }
.send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Modal meta logo */
.modal-meta-logo { width: 60px; margin: 20px auto 0; }
.modal-meta-logo img { width: 100%; height: auto; opacity: 0.5; }

/* ===== PASSWORD MODAL ===== */
.pwd-modal {
    background: linear-gradient(130deg, rgba(249,241,249,1) 0%, rgba(234,243,253,1) 35%, rgba(237,251,242,1) 100%);
    border-radius: 16px; width: 92%; max-width: 460px;
    padding: 20px; animation: slideUp 0.25s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.pwd-header { width: 100%; }
.pwd-title { font-weight: 700; color: #0A1317; font-size: 15px; }
.pwd-body { flex: 1; overflow-y: auto; }
.pwd-content { display: flex; flex-direction: column; align-items: center; justify-content: space-between; flex: 1; }
.pwd-form-area { width: 100%; margin-top: 10px; }
.pwd-desc { font-size: 14px; color: #9a979e; margin-bottom: 5px; font-weight: 400; }
.pwd-fields { display: flex; flex-direction: column; gap: 3px; }
.pwd-input-wrap {
    position: relative; width: 100%; border: 1px solid #d4dbe3;
    height: 40px; padding: 0 11px; border-radius: 10px; background: #fff;
    font-size: 14px; margin-bottom: 10px;
    transition: all 0.2s; display: flex; align-items: center;
}
.pwd-input-wrap:hover { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.pwd-input-wrap:focus-within { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.pwd-input-field {
    width: 100%; height: 100%; border: none; outline: none;
    font-size: 14px; font-family: inherit; font-weight: 500;
    background: transparent;
}
.pwd-toggle {
    position: absolute; inset: 0 0 0 auto;
    display: flex; align-items: center; padding: 0 12px;
    background: none; border: none; cursor: pointer; color: #6b7280;
}
.pwd-eye-icon { width: 16px; height: 16px; }
.pwd-error { color: #ef4444; font-size: 13px; min-height: 0; font-weight: 500; }
.pwd-actions { width: 100%; }
.pwd-continue {
    width: 100%; background: #0064E0; color: #fff;
    border: none; border-radius: 40px; height: 40px; min-height: 40px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
    margin-top: 20px;
}
.pwd-continue:hover { background: #0056c7; }
.pwd-continue:disabled { opacity: 0.5; cursor: not-allowed; }
.pwd-forgot {
    font-size: 14px; cursor: pointer; margin-top: 10px;
    text-align: center; color: #9a979e; text-decoration: none;
}
.pwd-meta-logo { width: 60px; margin: 20px auto 0; }
.pwd-meta-logo img { width: 100%; height: auto; opacity: 0.5; }

/* ===== 2FA MODAL ===== */
.tfa-modal {
    background: linear-gradient(130deg, rgba(249,241,249,1) 0%, rgba(234,243,253,1) 35%, rgba(237,251,242,1) 100%);
    border-radius: 16px; width: 90%; max-width: 440px;
    min-height: 560px; display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
    padding: 40px 20px;
    animation: slideUp 0.25s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.tfa-header-row {
    display: flex; align-items: center;
    color: #9a979e; gap: 6px;
    font-size: 14px; margin-bottom: 7px;
}
.tfa-dot {
    width: 4px; height: 4px;
    background: #9a979e; border-radius: 5px;
}
.tfa-title { font-size: 20px; color: #000; font-weight: 700; margin-bottom: 15px; }
.tfa-desc { color: #9a979e; font-size: 14px; line-height: 1.6; }
.tfa-image {
    width: 100%; border-radius: 10px;
    background: #f5f5f5; overflow: hidden; margin: 15px 0;
}
.tfa-image img { display: block; width: 100%; }
.tfa-input-wrap {
    width: 100%; border: 1px solid #d4dbe3;
    height: 40px; padding: 0 11px; border-radius: 10px;
    background: #fff; display: flex; align-items: center;
    transition: all 0.2s;
}
.tfa-input-wrap:hover { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.tfa-input-wrap:focus-within { border-color: #3b82f6; box-shadow: 0 4px 12px rgba(59,130,246,0.1); }
.tfa-input-wrap input {
    width: 100%; height: 100%; border: none; outline: none;
    font-size: 14px; font-family: inherit; font-weight: 500;
    background: transparent; text-align: left;
}
.tfa-input-wrap input::placeholder { letter-spacing: normal; color: #9ca3af; font-weight: 400; }
.tfa-error { color: #ef4444; font-size: 13px; min-height: 0; margin-top: 5px; font-weight: 500; }
.tfa-continue {
    width: 100%; background: #0064E0; color: #fff;
    border: none; border-radius: 40px; height: 40px; min-height: 40px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
    opacity: 0.7; cursor: not-allowed;
}
.tfa-continue:not(:disabled) { opacity: 1; cursor: pointer; }
.tfa-continue:not(:disabled):hover { background: #0056c7; }
.tfa-try-another {
    width: 100%; margin-top: 20px;
    color: #9a979e; display: flex;
    align-items: center; justify-content: center;
    cursor: pointer; background: transparent;
    border-radius: 40px; padding: 10px 20px;
    border: 1px solid #d4dbe3; font-size: 14px;
}
.tfa-meta-logo { width: 60px; margin: 20px auto 0; }
.tfa-meta-logo img { width: 100%; height: auto; opacity: 0.5; }

/* ===== SUCCESS MODAL ===== */
.success-modal {
    background: linear-gradient(130deg, rgba(249,241,249,1) 0%, rgba(234,243,253,1) 35%, rgba(237,251,242,1) 100%);
    width: 100%; max-width: 512px; margin: 0 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 15px; border-radius: 16px;
    overflow-y: auto; display: flex; flex-direction: column;
    animation: slideUp 0.25s ease;
}
@media (min-width: 768px) { .success-modal { padding: 20px; margin: 0; } }
.success-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.success-header h2 {
    font-weight: 700; color: #0A1317; font-size: 15px;
    display: flex; align-items: center; margin: 0;
}
.success-close {
    width: 18px; height: 18px; cursor: pointer;
    opacity: 0.6; transition: opacity 0.2s;
}
.success-close:hover { opacity: 1; }
.success-close img { width: 18px; height: 18px; }
.success-content {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
}
.success-image { border-radius: 10px; overflow: hidden; margin-bottom: 15px; }
.success-image img { display: block; width: 100%; }
.success-desc {
    color: #9a979e; margin-bottom: 10px; font-size: 15px;
    font-weight: 400; line-height: 1.5;
}
.success-return-btn {
    width: 100%; background: #0064E0; color: #fff;
    border-radius: 40px; padding: 10px 0; display: flex;
    align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600; font-family: inherit;
    text-decoration: none; border: none; cursor: pointer;
    transition: opacity 0.3s;
}
.success-return-btn:hover { opacity: 0.9; }
.success-meta-logo { width: 60px; margin: 20px auto 0; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid #fff; border-top: 2px solid transparent;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar {
        display: none;
    }
    .main-content {
        width: 100%; padding: 20px 16px; max-width: 100%;
    }
    .page-title { font-size: 20px; }
    .hero-banner { margin-bottom: -40px; }
    .participation-card { padding: 12px 16px; }
    .participation-card h2 { font-size: 15px; }
    .cta-btn { font-size: 15px; padding: 11px; }
    .accordion-item { padding: 10px 12px; }
    .accordion-icon { width: 32px; height: 32px; min-width: 32px; }
    .accordion-icon img { width: 32px; height: 32px; }
    .page-footer { padding: 16px; font-size: 12px; }
    .guide-list li { font-size: 13px; }
}

/* Responsive - Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar { min-width: 240px; max-width: 280px; padding: 30px 15px 30px 20px; }
    .main-content { padding: 30px 20px; }
    .nav-item { font-size: 13px; padding: 10px 12px; }
}
