﻿@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */

:root {
    /* Colors */
    --indigo: #3D52A0;
    --indigo-dark: #2d3f7a;
    --indigo-light: #EEF2FF;
    --violet: #7091E6;
    --violet-light: #EDE9FE;
    --amber: #F59E0B;
    --amber-light: #FEF3C7;
    --amber-dark: #D97706;
    --emerald: #10B981;
    --emerald-light: #D1FAE5;
    --rose: #F43F5E;
    --rose-light: #FFE4E6;
    /* Neutrals */
    --bg: #F8F9FF;
    --surface: #ffffff;
    --border: #E2E8F0;
    --text: #0F172A;
    --text-2: #64748B;
    /* Layout */
    --radius: 12px;
    --sidebar-w: 240px;
    --navbar-h: 64px;
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --shadow-md: 0 6px 24px rgba(61, 82, 160, .10);
    --shadow-lg: 0 12px 40px rgba(61, 82, 160, .16);
}


/* ── Auth page orb keyframes ── */
@keyframes orbFloat1 {
  0%,100% { transform:translate(0,0) scale(1); }
  50%     { transform:translate(30px,-20px) scale(1.08); }
}
@keyframes orbFloat2 {
  0%,100% { transform:translate(0,0) scale(1); }
  50%     { transform:translate(-20px,25px) scale(1.06); }
}
@keyframes orbFloat3 {
  0%,100% { transform:translate(0,0) scale(1); }
  50%     { transform:translate(15px,-15px) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  [style*="orbFloat1"], [style*="orbFloat2"], [style*="orbFloat3"] { animation: none !important; }
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

input, select, textarea {
    font-family: inherit;
}


/* ============================================================
   UTILITIES
   ============================================================ */

.hidden {
    display: none !important;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fade-in {
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    transition: all .2s ease;
    min-height: 42px;
    white-space: nowrap;
    line-height: 1;
    cursor: pointer;
}

.btn-primary {
    background: var(--indigo);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--indigo-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(61, 82, 160, .35);
    }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1.5px solid var(--border);
}

    .btn-ghost:hover {
        background: var(--indigo-light);
        color: var(--indigo);
        border-color: var(--indigo);
    }

.btn-emerald {
    background: var(--emerald);
    color: #fff;
}

    .btn-emerald:hover {
        background: #059669;
        transform: translateY(-1px);
    }

.btn-amber {
    background: var(--amber);
    color: #fff;
}

    .btn-amber:hover {
        background: var(--amber-dark);
        transform: translateY(-1px);
    }

.btn-rose {
    background: var(--rose);
    color: #fff;
}

    .btn-rose:hover {
        background: #e11d48;
        transform: translateY(-1px);
    }

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    min-height: 34px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    min-height: 50px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}


/* ============================================================
   CHIPS
   ============================================================ */

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

.chip-indigo {
    background: var(--indigo-light);
    color: var(--indigo);
}

.chip-violet {
    background: var(--violet-light);
    color: #5B21B6;
}

.chip-amber {
    background: var(--amber-light);
    color: #92400E;
}

.chip-emerald {
    background: var(--emerald-light);
    color: #065F46;
}

.chip-rose {
    background: var(--rose-light);
    color: #9F1239;
}

.chip-gray {
    background: #F1F5F9;
    color: var(--text-2);
}


/* ============================================================
   CARD
   ============================================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: box-shadow .2s, transform .2s;
}

.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}


/* ============================================================
   AVATARS
   ============================================================ */

.av {
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--indigo-light);
    display: block;
}

    .av img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.av-xs {
    width: 28px;
    height: 28px;
}

.av-sm {
    width: 36px;
    height: 36px;
}

.av-md {
    width: 44px;
    height: 44px;
}

.av-lg {
    width: 60px;
    height: 60px;
}

.av-xl {
    width: 80px;
    height: 80px;
}

.av-2xl {
    width: 92px;
    height: 92px;
}


/* ============================================================
   FORMS
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-hint {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 4px;
}

.form-req {
    color: var(--rose);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

    .form-input:focus {
        border-color: var(--indigo);
        box-shadow: 0 0 0 3px rgba(61, 82, 160, .10);
    }

    .form-input::placeholder {
        color: #94A3B8;
    }

    .form-input:disabled {
        background: var(--bg);
        cursor: not-allowed;
        opacity: .6;
    }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.65;
}


/* ============================================================
   NAVBAR
   ============================================================ */


.navbar {
    position: sticky;
    top: 0;
    z-index: 400;
    height: var(--navbar-h);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--indigo);
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--indigo);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
}

.nav-search {
    flex: 1;
    max-width: 440px;
    margin: 0 14px;
}

    .nav-search .form-input {
        min-height: 38px;
        font-size: 14px;
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-bell {
    position: relative;
    font-size: 21px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.nav-bell-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    background: var(--rose);
    color: #fff;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    background: transparent;
    border: none;
}

    .nav-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all .25s ease;
    }

    .nav-hamburger.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-hamburger.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-hamburger.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

.nav-user-menu {
    position: relative;
}

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    overflow: hidden;
    z-index: 999;
    display: none;
}

    .nav-user-dropdown.open {
        display: block;
    }

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

    .nav-dropdown-item:hover {
        background: var(--bg);
    }

    .nav-dropdown-item.logout {
        color: var(--rose);
    }

.nav-dropdown-sep {
    height: 1px;
    background: var(--border);
}


/* ============================================================
   LAYOUT
   ============================================================ */

.app-wrap {
    display: flex;
    min-height: calc(100vh - var(--navbar-h));
}

.main {
    flex: 1;
    padding: 24px 28px;
    min-width: 0;
    overflow: hidden;
}

.right-col {
    width: 258px;
    flex-shrink: 0;
    padding: 24px 20px 24px 0;
}




/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
    transition: transform .3s ease;
    z-index: 200;
}

    .sidebar::-webkit-scrollbar {
        width: 0;
    }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}

    .sidebar-user:hover {
        background: var(--indigo-light);
    }

.sidebar-user-name {
    font-weight: 700;
    font-size: 14px;
}

.sidebar-user-pts {
    font-size: 11px;
    color: var(--amber);
    font-weight: 600;
    margin-top: 1px;
}

.sidebar-nav {
    padding: 8px 0;
    flex: 1;
}

.nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #94A3B8;
    padding: 13px 18px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
    border-right: 3px solid transparent;
    user-select: none;
}

    .nav-item:hover {
        background: var(--indigo-light);
        color: var(--indigo);
    }

    .nav-item.active {
        background: var(--indigo-light);
        color: var(--indigo);
        font-weight: 700;
        border-right-color: var(--indigo);
    }

    .nav-item .ni {
        font-size: 16px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

.nav-badge {
    margin-left: auto;
    background: var(--rose);
    color: #fff;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
}

.nav-count {
    margin-left: auto;
    background: var(--indigo-light);
    color: var(--indigo);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
}

.pts-widget {
    margin: 10px 14px 14px;
    background: linear-gradient(135deg, #F59E0B, #F97316);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    flex-shrink: 0;
}

.pts-widget-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.pts-widget-label {
    font-size: 11px;
    opacity: .85;
    margin-top: 2px;
}

.pts-widget-bar {
    background: rgba(255,255,255,.3);
    border-radius: 99px;
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.pts-widget-fill {
    height: 100%;
    background: #fff;
    border-radius: 99px;
}

.pts-widget-sub {
    font-size: 11px;
    margin-top: 5px;
    opacity: .85;
}

.pts-widget-cta {
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    opacity: .95;
    cursor: pointer;
    display: inline-block;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 199;
    backdrop-filter: blur(2px);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rose);
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: background .15s;
}

    .sidebar-logout:hover {
        background: var(--rose-light);
    }


/* ============================================================
   TABS
   ============================================================ */

.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

    .tabs::-webkit-scrollbar {
        height: 0;
    }

.tab {
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .tab:hover {
        color: var(--indigo);
        background: var(--indigo-light);
    }

    .tab.active {
        color: var(--indigo);
        border-bottom-color: var(--indigo);
    }


/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--indigo), var(--violet));
    transition: width .8s ease;
}


/* ============================================================
   TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    background: var(--emerald);
    color: #fff;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    animation: toastIn .3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
}

.toast-error {
    background: var(--rose);
}

.toast-warn {
    background: var(--amber);
}


/* ============================================================
   QUESTION CARDS
   ============================================================ */

.q-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
    margin-bottom: 10px;
    display: block;
}

    .q-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.q-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.q-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.q-card-body {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 12px;
}

.q-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-2);
    flex-wrap: wrap;
}


/* ============================================================
   CHAT
   ============================================================ */

.chat-wrap {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    height: calc(100vh - 210px);
    min-height: 460px;
}

.chat-sidebar-panel {
    width: 270px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 14px;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

    .chat-item:hover {
        background: var(--indigo-light);
    }

    .chat-item.active {
        background: var(--indigo-light);
        border-left: 3px solid var(--indigo);
    }

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-topbar {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    background: var(--bg);
}

.msg {
    max-width: 68%;
    padding: 11px 15px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.msg-them {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px 14px 14px 14px;
    align-self: flex-start;
}

.msg-me {
    background: var(--indigo);
    color: #fff;
    border-radius: 14px 4px 14px 14px;
    align-self: flex-end;
}

.msg-time {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
}

.chat-input-bar {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
}

    .chat-input-bar input {
        flex: 1;
        padding: 9px 14px;
        border: 1.5px solid var(--border);
        border-radius: 9px;
        font-size: 14px;
        outline: none;
        font-family: inherit;
        transition: border-color .2s;
    }

        .chat-input-bar input:focus {
            border-color: var(--indigo);
        }


/* ============================================================
   ADMIN SIDEBAR
   ============================================================ */

.admin-sidebar {
    width: 230px;
    background: #1E293B;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
    transition: transform .3s ease;
    z-index: 200;
}

    .admin-sidebar::-webkit-scrollbar {
        width: 0;
    }

.admin-nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #475569;
    padding: 14px 18px 4px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8;
    cursor: pointer;
    transition: all .15s;
    border-right: 3px solid transparent;
}

    .admin-nav-item:hover {
        background: rgba(255,255,255,.07);
        color: #fff;
    }

    .admin-nav-item.active {
        background: rgba(255,255,255,.09);
        color: #fff;
        border-right-color: var(--rose);
    }

    .admin-nav-item .ni {
        font-size: 15px;
        width: 18px;
        text-align: center;
        flex-shrink: 0;
    }

.admin-nav-badge {
    margin-left: auto;
    background: var(--rose);
    color: #fff;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
}


/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform .2s, box-shadow .2s;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    margin-bottom: 12px;
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 4px;
}

.stat-delta {
    font-size: 12px;
    margin-top: 4px;
}

    .stat-delta.up {
        color: var(--emerald);
    }

    .stat-delta.down {
        color: var(--rose);
    }


/* ============================================================
   TABLE
   ============================================================ */

.table-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .04em;
}


/* ============================================================
   AUTH BRAND LAYER — login / register premium polish
   ============================================================ */

/* Auth page background — subtle brand gradient */
.auth-bg {
    background: linear-gradient(160deg, #EEF2FF 0%, #F8F9FF 50%, #EDE9FE 100%) !important;
    min-height: 100vh;
}

/* Auth navbar — glass */
.auth-navbar {
    background: rgba(255,255,255,0.85) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(226,232,240,0.6) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.9) !important;
}

/* Logo wordmark gradient */
.nav-logo span {
    background: linear-gradient(90deg, #3D52A0 0%, #7091E6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.03em;
}

/* Auth card — deeper shadow + border glow */
.auth-card {
    border-radius: 18px !important;
    box-shadow: 0 8px 40px rgba(61,82,160,0.12), 0 2px 8px rgba(15,23,42,0.05) !important;
    border: 1px solid rgba(226,232,240,0.8) !important;
}

/* Auth logo icon */
.auth-logo-icon {
    width: 72px !important; height: 72px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #EEF2FF 0%, #dce6ff 100%) !important;
    box-shadow: 0 4px 20px rgba(61,82,160,0.14) !important;
    margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center;
}

/* Auth title */
.auth-title {
    font-size: 26px !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    color: var(--text) !important;
}

/* Form inputs */
.form-input {
    border-radius: 10px !important;
    transition: border-color .2s, box-shadow .2s !important;
}
.form-input:focus {
    border-color: var(--indigo) !important;
    box-shadow: 0 0 0 3.5px rgba(61,82,160,0.10) !important;
}

/* Submit button */
.btn-primary {
    background: linear-gradient(135deg, #3D52A0 0%, #5B73C7 100%) !important;
    border-radius: 11px !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 14px rgba(61,82,160,0.28) !important;
    transition: all .2s !important;
}
.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(61,82,160,0.36) !important;
}
.btn-primary:active { transform: translateY(0) !important; }

/* Auth notice */
.auth-notice {
    background: rgba(61,82,160,0.06) !important;
    border: 1px solid rgba(61,82,160,0.12) !important;
    border-radius: 12px !important;
}

/* Validation errors */
.validation-error-box {
    background: var(--rose-light) !important;
    border: 1.5px solid rgba(244,63,94,0.25) !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    color: #9F1239 !important;
    margin-bottom: 16px;
}
.field-validation-error {
    font-size: 12px !important;
    color: var(--rose) !important;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(61,82,160,0.18); border-radius: 99px; }

/* Selection */
::selection { background: rgba(61,82,160,0.16); color: #2d3f7a; }

.table-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

    .table-row:last-child {
        border-bottom: none;
    }

    .table-row:hover {
        background: var(--bg);
    }


/* ============================================================
   PODIUM / LEADERBOARD
   ============================================================ */

.podium-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.podium-card {
    text-align: center;
    flex: 1;
    border-radius: 14px;
    padding: 20px 14px;
    position: relative;
}

.podium-medal {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
}

.podium-1st {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid var(--amber);
    max-width: 200px;
    box-shadow: 0 8px 28px rgba(245, 158, 11, .2);
    padding: 24px 14px;
}

.podium-2nd {
    background: var(--surface);
    border: 2px solid #C0C0C0;
    max-width: 175px;
}

.podium-3rd {
    background: var(--surface);
    border: 2px solid #CD7F32;
    max-width: 175px;
}


/* ============================================================
   REWARD CARDS
   ============================================================ */

.reward-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: all .2s;
    cursor: pointer;
}

    .reward-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        border-color: var(--indigo);
    }

    .reward-card.locked {
        opacity: .55;
        cursor: not-allowed;
    }

        .reward-card.locked:hover {
            transform: none;
            box-shadow: none;
            border-color: var(--border);
        }


/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--indigo-light) 0%, var(--bg) 55%, #e8f0fe 100%);
    display: flex;
    flex-direction: column;
}

.auth-navbar {
    height: var(--navbar-h);
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(61, 82, 160, .09);
}

.auth-logo-icon {
    width: 68px;
    height: 68px;
    background: var(--indigo);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(61, 82, 160, .25);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-2);
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

    .auth-divider span {
        font-size: 12px;
        color: var(--text-2);
    }

.auth-notice {
    background: var(--amber-light);
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 13px 16px;
    margin-top: 16px;
    display: flex;
    gap: 10px;
}

    .auth-notice p {
        font-size: 13px;
        color: #92400E;
        line-height: 1.5;
    }


/* ============================================================
   PROFILE
   ============================================================ */

.profile-cover {
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    margin-bottom: 52px;
}

    .profile-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.profile-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(61, 82, 160, .4));
}

.profile-avatar-wrap {
    position: absolute;
    bottom: -42px;
    left: 24px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

.profile-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
}

.profile-stat-num {
    font-size: 20px;
    font-weight: 800;
}

.profile-stat-label {
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
}


/* ============================================================
   WIZARD / STEPPER
   ============================================================ */

.wizard-bar {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.wizard-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--bg);
    border-right: 1px solid var(--border);
    transition: all .2s;
}

    .wizard-step:last-child {
        border-right: none;
    }

    .wizard-step.active {
        background: var(--indigo);
        color: #fff;
    }

    .wizard-step.done {
        background: var(--emerald-light);
        color: #065F46;
    }

.wizard-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.wizard-step.active .wizard-num {
    background: rgba(255,255,255,.25);
}

.wizard-step:not(.active):not(.done) .wizard-num {
    background: var(--border);
}

.wizard-step.done .wizard-num {
    background: rgba(16, 185, 129, .2);
}


/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
    cursor: pointer;
}

    .notif-item:hover {
        background: var(--bg);
    }

    .notif-item.unread {
        background: var(--indigo-light);
    }

        .notif-item.unread:hover {
            background: #e5ecff;
        }

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--indigo);
    flex-shrink: 0;
    margin-top: 6px;
}


/* ============================================================
   SETTINGS
   ============================================================ */

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

    .settings-row:last-child {
        border-bottom: none;
    }

.settings-row-label {
    font-size: 14px;
    font-weight: 600;
}

.settings-row-sub {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--border);
    border-radius: 99px;
    transition: background .2s;
}

    .toggle-slider::before {
        content: '';
        position: absolute;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        top: 3px;
        left: 3px;
        transition: transform .2s;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    }

.toggle input:checked + .toggle-slider {
    background: var(--indigo);
}

    .toggle input:checked + .toggle-slider::before {
        transform: translateX(20px);
    }


/* ============================================================
   CODE BLOCK
   ============================================================ */

.code-block {
    background: #1E293B;
    color: #E2E8F0;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 13px;
    font-family: 'Fira Code', 'Courier New', monospace;
    overflow-x: auto;
    line-height: 1.7;
    margin: 12px 0;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-2);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: .6;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 20px;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

    .breadcrumb a {
        color: var(--indigo);
        font-weight: 600;
    }

        .breadcrumb a:hover {
            text-decoration: underline;
        }


/* ============================================================
   ANSWER CARDS & UPVOTE
   ============================================================ */

.answer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 14px;
}

.answer-best {
    border: 2px solid var(--emerald);
    background: rgba(209, 250, 229, .08);
    position: relative;
}

.answer-best-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--emerald);
    color: #fff;
    padding: 3px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(16, 185, 129, .3);
}

.upvote-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    min-width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

    .upvote-btn:hover,
    .upvote-btn.voted {
        background: var(--amber-light);
        border-color: #FDE68A;
    }


/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn .25s ease;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal-sub {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 20px;
}


/* ============================================================
   SEARCH DROPDOWN
   ============================================================ */

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: 340px;
    overflow-y: auto;
    display: none;
}

    .search-dropdown.open {
        display: block;
    }

.search-result-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

    .search-result-item:last-child {
        border-bottom: none;
    }

    .search-result-item:hover {
        background: var(--indigo-light);
    }

.search-result-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.search-result-meta {
    font-size: 11px;
    color: var(--text-2);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
}


/* ============================================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ============================================================ */

@media (max-width: 1024px) {
    :root {
        --sidebar-w: 210px;
    }

    .main {
        padding: 20px 18px;
    }

    .navbar {
        padding: 0 18px;
    }

    .nav-search {
        max-width: 260px;
    }

    .right-col {
        width: 220px;
    }
}


/* ============================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-search {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 500;
        box-shadow: var(--shadow-lg);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .sidebar-overlay {
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }

        .sidebar-overlay.open {
            opacity: 1;
            pointer-events: auto;
        }

    .app-wrap {
        flex-direction: row;
    }

    .main {
        padding: 16px 14px;
        width: 100%;
    }

    .right-col {
        display: none;
    }

    .grid-2-col {
        grid-template-columns: 1fr !important;
    }

    .grid-4-col {
        grid-template-columns: 1fr 1fr !important;
    }

    .admin-grid-4 {
        grid-template-columns: 1fr 1fr !important;
    }

    .chat-wrap {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar-panel {
        width: 100% !important;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .chat-messages {
        min-height: 300px;
    }

    .msg {
        max-width: 85%;
    }

    .podium-wrap {
        flex-direction: column;
        align-items: center;
    }

    .podium-1st, .podium-2nd, .podium-3rd {
        max-width: 260px !important;
        width: 100%;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 500;
        box-shadow: var(--shadow-lg);
    }

        .admin-sidebar.open {
            transform: translateX(0);
        }
}


/* ============================================================
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
    .grid-4-col {
        grid-template-columns: 1fr !important;
    }

    .admin-grid-4 {
        grid-template-columns: 1fr !important;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .points-grid {
        grid-template-columns: 1fr !important;
    }

    .auth-card {
        padding: 24px 16px;
    }

    .navbar {
        padding: 0 14px;
    }

    .main {
        padding: 14px 12px;
    }

    .wizard-step .wizard-label {
        display: none;
    }

    .tabs .tab {
        padding: 9px 12px;
        font-size: 13px;
    }
}

/* ============================================================
   Forget Password Page
   ============================================================ */


/* ============================================================
   AUTH UX UPGRADE — focus glows, ripple, slide-in, reveals
   ============================================================ */

/* Stronger focus glow on all auth inputs */
.auth-card .form-input:focus {
    border-color: var(--indigo) !important;
    box-shadow: 0 0 0 3px rgba(61, 82, 160, 0.15) !important;
    outline: none;
}

/* Card slide-in on page load */
.auth-card {
    animation: authCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Validation error slide-down */
.field-validation-error {
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

.field-validation-error:not(:empty) {
    max-height: 60px;
    opacity: 1;
}

/* Validation summary slide-down */
.validation-error-box:not(:empty) {
    animation: slideDown 0.25s ease both;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Success message slide-down */
.success-message-box {
    animation: slideDown 0.3s ease both;
    background: var(--emerald-light);
    border: 1.5px solid rgba(16,185,129,0.25);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #065F46;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Ripple effect on buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple-anim 0.55s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* Floating label — wrap approach */
.form-group-float {
    position: relative;
    margin-bottom: 18px;
}

.form-group-float .form-input {
    padding-top: 20px;
    padding-bottom: 6px;
    height: 52px;
}

.form-group-float .form-label {
    position: absolute;
    left: 14px;
    top: 16px;
    font-size: 14px;
    color: #94A3B8;
    font-weight: 500;
    pointer-events: none;
    transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
    margin: 0;
}

.form-group-float .form-input:focus ~ .form-label,
.form-group-float .form-input:not(:placeholder-shown) ~ .form-label {
    top: 6px;
    font-size: 11px;
    color: var(--indigo);
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
    .field-validation-error { transition: none; max-height: none; opacity: 1; }
    .btn .ripple { animation: none; }
}

