/* AP/SSC Fit & Study — Main Stylesheet */
/* Font: Plus Jakarta Sans */

:root {
    --primary:      #0A3D55;
    --accent-blue:  #1B8FBF;
    --highlight:    #5EC4EF;
    --teal-dark:    #063D30;
    --teal-accent:  #0F8060;
    --bg:           #EFF7FC;
    --card-bg:      #FFFFFF;
    --border:       #D8EEF7;
    --text-primary: #0A3D55;
    --text-muted:   #5a8fa8;
    --warn-bg:      #FFF8EC;
    --warn-border:  #F5C842;
    --warn-text:    #7A4A00;
    --danger:       #dc3545;
    --success:      #28a745;
    --radius:       16px;
    --nav-height:   64px;
}

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

html, body {
    height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* App Wrapper — 400px centered */
.app-wrapper {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

/* Page content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--nav-height) + 12px);
}
.page-home { padding-bottom: calc(var(--nav-height) + 12px); }

/* ── TOP BAR ── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.top-bar-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}
.back-btn, .notif-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--primary);
    text-decoration: none;
    font-size: 18px;
    cursor: pointer;
    border: 1px solid var(--border);
    font-weight: 700;
    transition: transform 0.15s;
}
.back-btn:active, .notif-btn:active { transform: scale(0.93); }

/* ── BOTTOM NAV ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: var(--nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    z-index: 200;
    box-shadow: 0 -4px 16px rgba(10,61,85,0.08);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    gap: 2px;
    padding: 6px 4px;
    transition: color 0.15s, background 0.15s;
    border-radius: 0;
    position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}
.nav-icon { font-size: 20px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 600; }

/* ── HERO SECTION ── */
.hero-section {
    background: var(--primary);
    color: white;
    padding: 28px 20px 48px;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -5%;
    width: 110%;
    height: 48px;
    background: var(--bg);
    border-radius: 50% 50% 0 0;
}
.hero-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.hero-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.hero-logo-name { font-size: 16px; font-weight: 800; color: white; }
.hero-tag {
    display: inline-block;
    background: rgba(94,196,239,0.2);
    color: var(--highlight);
    border: 1px solid rgba(94,196,239,0.4);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero-headline {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 8px;
    color: white;
}
.hero-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    margin-bottom: 20px;
}
.hero-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
/* ── HERO TOP BUTTONS (Install + WhatsApp) ── */
.hero-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.18);
    color: white;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}
.hero-top-btn:active { transform: scale(0.93); background: rgba(255,255,255,0.28); }

.btn-hero-primary {
    background: linear-gradient(135deg, #5EC4EF, #1B8FBF);
    color: white;
    font-weight: 800;
    padding: 13px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 15px rgba(94,196,239,0.4);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-hero-primary:active { transform: scale(0.95); box-shadow: none; }

.btn-hero-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 700;
    padding: 13px 20px;
    border-radius: 14px;
    border: 1.5px solid rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}
.btn-hero-secondary:active { transform: scale(0.95); background: rgba(255,255,255,0.25); }
.hero-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 16px;
}
.hero-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num { font-size: 20px; font-weight: 800; color: var(--highlight); }
.hero-stat-label { font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 2px; }

/* ── URGENCY BANNER ── */
.urgency-banner {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.urgency-text { font-size: 13px; font-weight: 600; color: var(--warn-text); }
.urgency-seats {
    background: var(--warn-border);
    color: var(--warn-text);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── SECTION HEADER ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin: 20px 0 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.section-link { font-size: 13px; color: var(--accent-blue); text-decoration: none; font-weight: 600; }

/* ── CARD ── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 16px 12px;
}
.card-sm { padding: 12px 14px; }

/* ── QUICK ACCESS GRID ── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 8px;
}
@media (max-width: 360px) {
    .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 10px; }
    .quick-icon { font-size: 20px; }
    .quick-label { font-size: 9px; }
}
.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 4px;
    transition: transform 0.15s;
}
.quick-item:active { transform: scale(0.94); }
.quick-icon { font-size: 24px; }
.quick-label { font-size: 10px; font-weight: 600; color: var(--text-primary); text-align: center; line-height: 1.2; }

/* ── PLAN CARDS ── */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 10px;
}
.plan-card {
    border-radius: var(--radius);
    padding: 16px 14px;
    color: white;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s;
}
.plan-card:active { transform: scale(0.96); }
.plan-card.navy { background: linear-gradient(135deg, #0A3D55, #1B8FBF); }
.plan-card.teal { background: linear-gradient(135deg, #063D30, #0F8060); }
.plan-card-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
}
.plan-card-name { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.plan-card-price { font-size: 18px; font-weight: 800; }
.plan-card-original { font-size: 11px; opacity: 0.7; text-decoration: line-through; }
.plan-card-combo {
    background: linear-gradient(135deg, #4a1060, #7b2fe0);
    border-radius: var(--radius);
    padding: 16px;
    color: white;
    margin: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: transform 0.15s;
    margin-bottom: 10px;
}
.plan-card-combo:active { transform: scale(0.97); }

/* ── LEADERBOARD ── */
.leaderboard-list { padding: 0 16px; }
.lb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.lb-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--primary);
}
.lb-rank.gold { background: #FFD700; color: #7a4a00; }
.lb-rank.silver { background: #C0C0C0; color: #444; }
.lb-rank.bronze { background: #CD7F32; color: white; }
.lb-name { font-weight: 700; font-size: 14px; color: var(--primary); }
.lb-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── SUBJECT / FITNESS CARDS ── */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px;
}
.subject-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: transform 0.15s, border-color 0.15s;
}
.subject-card:active { transform: scale(0.95); border-color: var(--accent-blue); }
.subject-icon { font-size: 36px; margin-bottom: 8px; }
.subject-name { font-size: 14px; font-weight: 700; color: var(--primary); }
.subject-count { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── CHAPTER LIST ── */
.chapter-list { padding: 0 16px; }
.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.chapter-item:active { border-color: var(--accent-blue); }
.chapter-name { font-weight: 600; font-size: 14px; color: var(--primary); }
.chapter-arrow { color: var(--text-muted); font-size: 16px; }

/* ── WORKOUT DAYS ── */
.workout-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 16px 16px 8px;
}
.workout-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--highlight));
    border-radius: 4px;
    transition: width 0.5s ease;
}
.workout-day-list { padding: 0 16px; }
.workout-day-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.workout-day-item.rest { background: var(--warn-bg); border-color: var(--warn-border); }
.workout-day-item.done { border-color: var(--success); }
.day-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
    flex-shrink: 0;
}
.day-num.done { background: #d4edda; color: var(--success); }
.day-num.rest { background: var(--warn-bg); color: var(--warn-text); }
.day-info { flex: 1; }
.day-title { font-weight: 700; font-size: 13px; color: var(--primary); margin-bottom: 4px; }
.day-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.day-action { flex-shrink: 0; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
    font-family: inherit;
}
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--primary); color: white; }
.btn-accent { background: var(--accent-blue); color: white; }
.btn-teal { background: var(--teal-accent); color: white; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-whatsapp { background: #25D366; color: white; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 9px; }
.btn-full { width: 100%; }
.btn-icon-sm {
    width: 32px; height: 32px; padding: 0;
    border-radius: 8px; font-size: 14px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--card-bg);
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus { border-color: var(--accent-blue); }
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a8fa8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 36px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── AUTH PAGES ── */
.auth-wrap { padding: 32px 20px 20px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon { font-size: 48px; }
.auth-logo-name { font-size: 20px; font-weight: 800; color: var(--primary); margin-top: 4px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--accent-blue); font-weight: 600; text-decoration: none; }

/* ── NOTICE ── */
.notice-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 16px 12px;
    cursor: pointer;
}
.notice-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.notice-title { font-size: 14px; font-weight: 700; color: var(--primary); flex: 1; }
.badge-new {
    background: var(--accent-blue);
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.notice-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notice-body { font-size: 13px; color: var(--text-primary); margin-top: 10px; line-height: 1.5; display: none; }
.notice-body.open { display: block; }
.notice-attachment { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--accent-blue); text-decoration: none; font-weight: 600; }

/* ── QUIZ ── */
.quiz-wrap { padding: 0 16px; }
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
}
.question-num { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.question-text { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 14px; line-height: 1.4; }
.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    transition: border-color 0.15s, background 0.15s;
}
.option-label:hover { border-color: var(--accent-blue); background: #f0f8ff; }
.option-label.selected { border-color: var(--accent-blue); background: #e8f4fb; }
.option-label.correct { border-color: var(--success); background: #d4edda; color: var(--success); }
.option-label.wrong { border-color: var(--danger); background: #f8d7da; color: var(--danger); }
.option-radio { width: 18px; height: 18px; accent-color: var(--accent-blue); flex-shrink: 0; }
.explanation-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── PROGRESS BARS ── */
.progress-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--highlight));
    transition: width 0.6s ease;
}

/* ── PROFILE ── */
.profile-header {
    background: var(--primary);
    padding: 28px 20px 60px;
    text-align: center;
    color: white;
    position: relative;
}
.profile-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -5%;
    width: 110%;
    height: 40px;
    background: var(--bg);
    border-radius: 50% 50% 0 0;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    object-fit: cover;
    margin-bottom: 10px;
}
.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 10px;
    border: 3px solid rgba(255,255,255,0.3);
}
.profile-name { font-size: 20px; font-weight: 800; }
.profile-email { font-size: 13px; opacity: 0.75; margin-top: 2px; }

/* ── AI TUTOR CHAT ── */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height) - 56px);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.chat-bubble.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-bubble.typing { opacity: 0.6; }
.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: var(--bg);
    transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--accent-blue); }
.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.chat-send:active { transform: scale(0.9); }
.tutor-select-wrap { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.tutor-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s;
}
.tutor-card:active { transform: scale(0.97); }
.tutor-card.ssc { border-color: var(--accent-blue); }
.tutor-card.ap { border-color: var(--teal-accent); }
.tutor-icon { font-size: 40px; }
.tutor-name { font-size: 16px; font-weight: 700; color: var(--primary); }
.tutor-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── PLANS PAGE ── */
.plan-full-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 16px 14px;
    overflow: hidden;
}
.plan-full-header { padding: 16px; border-bottom: 1px solid var(--border); }
.plan-full-badge {
    display: inline-block;
    background: var(--accent-blue);
    color: white;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}
.plan-full-name { font-size: 17px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.plan-full-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.plan-full-footer { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.plan-price-block { }
.plan-sale { font-size: 22px; font-weight: 800; color: var(--primary); }
.plan-original { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.plan-save { font-size: 11px; color: var(--teal-accent); font-weight: 700; }

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 32px;
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }

/* ── TABS ── */
.tab-bar {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2.5px solid transparent;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── ACCORDION ── */
.accordion-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 0 16px 8px;
    overflow: hidden;
}
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}
.accordion-arrow { transition: transform 0.25s; font-size: 12px; color: var(--text-muted); }
.accordion-arrow.open { transform: rotate(180deg); }
.accordion-body { padding: 0 16px 14px; font-size: 13px; color: var(--text-muted); line-height: 1.5; display: none; }
.accordion-body.open { display: block; }

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
    position: fixed;
    bottom: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    pointer-events: none;
}
.toast {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: toastIn 0.25s ease;
    pointer-events: auto;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: #f59e0b; color: #7A4A00; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }

/* ── LOADING ── */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#loading-overlay.hidden { display: none; }
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ADMIN STYLES ── */
.admin-wrapper { max-width: 100%; background: #f5f7fa; min-height: 100vh; }
.admin-topbar {
    background: var(--primary);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-topbar-title { font-weight: 800; font-size: 16px; }
.admin-sidebar {
    width: 220px;
    background: white;
    border-right: 1px solid var(--border);
    min-height: 100vh;
    padding: 16px 0;
    position: fixed;
    left: 0;
    top: 50px;
}
.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--primary); background: var(--bg); }
.admin-content { margin-left: 220px; padding: 24px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.admin-stat-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.admin-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.admin-table th { background: var(--bg); color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 16px; text-align: left; }
.admin-table td { padding: 12px 16px; font-size: 13px; border-top: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: #f9fbfc; }
.admin-section-title { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.admin-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 20px; }

/* ── MISC ── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.fw-700 { font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.chip {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}
.chip.active { background: #d4edda; border-color: var(--success); color: var(--success); }
.chip.pending { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.chip.expired { background: #f8d7da; border-color: var(--danger); color: var(--danger); }
.chip.ssc { background: #e8f4fb; border-color: var(--accent-blue); color: var(--accent-blue); }
.chip.ap { background: #e8f5f1; border-color: var(--teal-accent); color: var(--teal-accent); }

/* Mobile responsive */
@media (max-width: 420px) {
    .app-wrapper { max-width: 100%; box-shadow: none; }
    .bottom-nav { max-width: 100%; left: 0; transform: none; }
    #toast-container { max-width: calc(100% - 40px); left: 20px; transform: none; }
    #loading-overlay { left: 0; transform: none; }
}

/* Admin mobile */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-content { margin-left: 0; padding: 16px; }
}

/* Score result card */
.score-card {
    background: linear-gradient(135deg, var(--primary), var(--accent-blue));
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: white;
    margin: 0 16px 16px;
}
.score-num { font-size: 48px; font-weight: 800; }
.score-label { font-size: 15px; opacity: 0.85; margin-top: 4px; }
.score-stars { font-size: 28px; margin: 8px 0; }

/* Spotlight */
.spotlight-card {
    background: linear-gradient(135deg, #fffbeb, #fff8ec);
    border: 1px solid var(--warn-border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 0 16px 12px;
}
.spotlight-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.spotlight-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--warn-bg); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.spotlight-name { font-weight: 700; font-size: 14px; color: var(--primary); }
.spotlight-label { font-size: 11px; color: var(--warn-text); }
.spotlight-msg { font-size: 13px; color: var(--text-primary); line-height: 1.5; }

/* Streak badge */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0 16px 12px;
}
.streak-num { font-size: 28px; font-weight: 800; }
.streak-label { font-size: 13px; font-weight: 600; opacity: 0.9; }
