/* ============================================================
   HUIT SCHEDULER — DESIGN SYSTEM v3.0
   International-grade, fully responsive, premium UI
   ============================================================ */

/* ── Google Fonts already loaded via HTML ── */

/* ── 1. DESIGN TOKENS ── */
:root {
    --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-display: "Space Grotesk", "Manrope", sans-serif;

    /* Surfaces */
    --bg:        #f0f4f8;
    --surface-0: #ffffff;
    --surface-1: #f8fafc;
    --surface-2: #eef2f7;
    --surface-3: #e4eaf2;
    --glass:     rgba(255,255,255,0.72);
    --glass-border: rgba(255,255,255,0.5);

    /* Text */
    --text-1: #0d1b2a;
    --text-2: #2e4057;
    --text-3: #607590;
    --text-4: #94aac0;

    /* Brand */
    --brand:        #1a56db;
    --brand-light:  #e8f0fe;
    --brand-dark:   #0e3a9a;
    --accent:       #f59e0b;
    --accent-light: #fef3c7;
    --success:      #10b981;
    --danger:       #ef4444;
    --danger-light: #fee2e2;
    --info:         #06b6d4;

    /* Borders */
    --border:       rgba(15,30,60,0.10);
    --border-focus: var(--brand);

    /* Shadows */
    --sh-xs: 0 1px 3px rgba(15,30,60,0.08), 0 1px 2px rgba(15,30,60,0.04);
    --sh-sm: 0 4px 12px rgba(15,30,60,0.10), 0 2px 4px rgba(15,30,60,0.06);
    --sh-md: 0 10px 30px rgba(15,30,60,0.12), 0 4px 10px rgba(15,30,60,0.07);
    --sh-lg: 0 20px 50px rgba(15,30,60,0.16), 0 8px 20px rgba(15,30,60,0.10);
    --sh-xl: 0 32px 70px rgba(15,30,60,0.22);

    /* Grid */
    --grid-bg: #f5f8fc;
    --grid-line: rgba(15,30,60,0.07);
    --header-bg: rgba(248,250,253,0.95);

    /* Type badges */
    --lt-bg: #dbeafe; --lt-text: #1d4ed8;
    --th-bg: #ffedd5; --th-text: #c2410c;

    /* Radius */
    --r-sm:  6px;
    --r-md:  12px;
    --r-lg:  18px;
    --r-xl:  24px;
    --r-2xl: 32px;

    /* Sidebar */
    --sidebar-w: 340px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur-fast: 0.15s;
    --dur: 0.25s;
    --dur-slow: 0.45s;
}

/* ── DARK MODE ── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:        #080e1a;
        --surface-0: #0e1625;
        --surface-1: #111e30;
        --surface-2: #162035;
        --surface-3: #1c2840;
        --glass:     rgba(14,22,37,0.82);
        --glass-border: rgba(255,255,255,0.08);
        --text-1: #e8f0fb;
        --text-2: #b4c8e8;
        --text-3: #7899c2;
        --text-4: #4c6a90;
        --brand:        #4f8ef7;
        --brand-light:  rgba(79,142,247,0.15);
        --brand-dark:   #2563eb;
        --accent:       #fbbf24;
        --accent-light: rgba(251,191,36,0.15);
        --success:      #34d399;
        --danger:       #f87171;
        --danger-light: rgba(248,113,113,0.12);
        --info:         #22d3ee;
        --border:       rgba(255,255,255,0.08);
        --sh-xs: 0 1px 3px rgba(0,0,0,0.4);
        --sh-sm: 0 4px 12px rgba(0,0,0,0.35);
        --sh-md: 0 10px 30px rgba(0,0,0,0.42);
        --sh-lg: 0 20px 50px rgba(0,0,0,0.50);
        --sh-xl: 0 32px 70px rgba(0,0,0,0.60);
        --grid-bg: #0e1828;
        --grid-line: rgba(255,255,255,0.05);
        --header-bg: rgba(11,19,33,0.95);
        --lt-bg: rgba(79,142,247,0.18); --lt-text: #93c5fd;
        --th-bg: rgba(251,191,36,0.15); --th-text: #fde68a;
    }
}

:root[data-theme="dark"] {
    --bg:        #080e1a;
    --surface-0: #0e1625;
    --surface-1: #111e30;
    --surface-2: #162035;
    --surface-3: #1c2840;
    --glass:     rgba(14,22,37,0.82);
    --glass-border: rgba(255,255,255,0.08);
    --text-1: #e8f0fb;
    --text-2: #b4c8e8;
    --text-3: #7899c2;
    --text-4: #4c6a90;
    --brand:        #4f8ef7;
    --brand-light:  rgba(79,142,247,0.15);
    --brand-dark:   #2563eb;
    --accent:       #fbbf24;
    --accent-light: rgba(251,191,36,0.15);
    --success:      #34d399;
    --danger:       #f87171;
    --danger-light: rgba(248,113,113,0.12);
    --info:         #22d3ee;
    --border:       rgba(255,255,255,0.08);
    --sh-xs: 0 1px 3px rgba(0,0,0,0.4);
    --sh-sm: 0 4px 12px rgba(0,0,0,0.35);
    --sh-md: 0 10px 30px rgba(0,0,0,0.42);
    --sh-lg: 0 20px 50px rgba(0,0,0,0.50);
    --sh-xl: 0 32px 70px rgba(0,0,0,0.60);
    --grid-bg: #0e1828;
    --grid-line: rgba(255,255,255,0.05);
    --header-bg: rgba(11,19,33,0.95);
    --lt-bg: rgba(79,142,247,0.18); --lt-text: #93c5fd;
    --th-bg: rgba(251,191,36,0.15); --th-text: #fde68a;
}

/* ── 2. RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* ── Ambient gradient BG ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 10% 15%,  rgba(26,86,219,0.10)  0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 10%,  rgba(245,158,11,0.08) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(16,185,129,0.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

:root[data-theme="dark"] body::before {
    background:
        radial-gradient(ellipse 70% 50% at 10% 15%,  rgba(79,142,247,0.14) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 10%,  rgba(251,191,36,0.08) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 50% 100%, rgba(52,211,153,0.06) 0%, transparent 65%);
}

/* ── 3. TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; }

/* Override Bootstrap utilities with theme tokens */
.text-dark   { color: var(--text-1) !important; }
.text-muted  { color: var(--text-3) !important; }
.text-primary{ color: var(--brand)  !important; }

.bg-white    { background-color: var(--surface-0) !important; }
.bg-light    { background-color: var(--surface-1) !important; }

.border, .border-top, .border-bottom, .border-start, .border-end,
.border-primary { border-color: var(--border) !important; }

.shadow-sm   { box-shadow: var(--sh-sm) !important; }
.shadow      { box-shadow: var(--sh-md) !important; }

/* ── 4. APP SHELL ── */
.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100dvh;
    overflow: hidden;
}

/* ── 5. SIDEBAR ── */
.sidebar-col {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    max-width: var(--sidebar-w);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--sh-md);
    z-index: 10;
    transition: transform var(--dur) var(--ease);
}

/* ── Sidebar Header ── */
.sidebar-head {
    padding: 20px 20px 16px;
    background: linear-gradient(145deg,
        rgba(26,86,219,0.07) 0%,
        rgba(245,158,11,0.05) 100%);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(26,86,219,0.35);
    flex-shrink: 0;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.03em;
    line-height: 1;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 14px;
    padding-left: 46px;
}

/* Upload Card */
.upload-zone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface-1);
    border: 1.5px dashed var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    color: var(--text-2);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-light), transparent);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
}

.upload-zone:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}

.upload-zone:hover::before { opacity: 1; }

.upload-zone-icon {
    width: 34px; height: 34px;
    background: var(--brand-light);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand);
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background var(--dur) var(--ease);
}

.upload-zone:hover .upload-zone-icon {
    background: var(--brand);
    color: white;
}

.upload-zone-text { position: relative; z-index: 1; }
.upload-zone-text .primary { font-weight: 700; font-size: 0.82rem; display: block; }
.upload-zone-text .secondary { font-size: 0.7rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }

/* Error alert */
.error-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: var(--danger-light);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--r-sm);
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
    animation: slideDown 0.2s var(--ease);
}

/* Search */
.search-wrap {
    position: relative;
}

.search-input-inner {
    width: 100%;
    padding: 9px 36px 9px 38px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    background: var(--surface-0);
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.82rem;
    outline: none;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.search-input-inner::placeholder { color: var(--text-4); }

.search-input-inner:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}

.search-icon-left {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); font-size: 15px; pointer-events: none;
}

.search-clear-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: var(--surface-2); border: none; border-radius: 50%;
    width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
    color: var(--text-3); font-size: 12px; cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}

.search-clear-btn:hover { background: var(--brand); color: white; }

.search-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-4);
    font-weight: 500;
}

.search-meta .count-badge {
    background: var(--brand-light);
    color: var(--brand);
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.68rem;
}

/* ── Sidebar Body (scrollable subject list) ── */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
}

.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-track { background: transparent; }
.sidebar-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.sidebar-body::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* Empty states */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--text-4);
    text-align: center;
    animation: fadeUp var(--dur-slow) var(--ease) both;
}

.empty-state i { font-size: 3rem; opacity: 0.35; }
.empty-state p { font-size: 0.82rem; max-width: 200px; line-height: 1.5; }

/* ── Subject Card ── */
.subject-card {
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: var(--sh-xs);
    transition: box-shadow var(--dur) var(--ease);
    animation: fadeUp var(--dur) var(--ease) both;
}

.subject-card:hover { box-shadow: var(--sh-sm); }

.subject-card.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(26,86,219,0.15), var(--sh-sm);
}

.subject-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    transition: background var(--dur-fast) var(--ease);
    position: relative;
}

.subject-card-header:hover { background: var(--surface-1); }

.subject-card.is-selected .subject-card-header {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: white;
}

.subject-color-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.subject-check-icon {
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.subject-info { flex: 1; min-width: 0; }
.subject-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.subject-count {
    font-size: 0.68rem;
    color: var(--text-3);
    font-weight: 500;
    margin-top: 1px;
}

.subject-card.is-selected .subject-count { color: rgba(255,255,255,0.65); }

.subject-chevron {
    color: var(--text-3);
    font-size: 14px;
    transition: transform var(--dur) var(--ease-spring);
    flex-shrink: 0;
}

.subject-card.is-expanded .subject-chevron { transform: rotate(180deg); }
.subject-card.is-selected .subject-chevron { color: rgba(255,255,255,0.7); }

/* Class Options List */
.class-options-list {
    border-top: 1px solid var(--border);
    max-height: 420px;
    overflow-y: auto;
    animation: expandDown var(--dur) var(--ease) both;
    overflow-x: hidden;
}

.class-options-list::-webkit-scrollbar { width: 3px; }
.class-options-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.class-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--dur-fast) var(--ease);
    position: relative;
}

.class-item:last-child { border-bottom: none; }

.class-item:hover { background: var(--surface-1); }

.class-item.is-active {
    background: var(--brand-light);
    border-left: 3px solid var(--brand);
}

.class-item.has-conflict {
    background: var(--danger-light);
    border-left: 3px solid var(--danger);
    opacity: 0.85;
}

.class-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.class-code-wrap { display: flex; flex-direction: column; gap: 2px; }
.class-code { font-size: 0.82rem; font-weight: 700; color: var(--text-1); }
.class-name-small { font-size: 0.68rem; color: var(--text-3); font-weight: 500; }
.class-conflict-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--danger);
    display: flex; align-items: center; gap: 3px;
    margin-top: 2px;
}

.check-icon { color: var(--brand); font-size: 18px; }

.session-chip-list { display: flex; flex-direction: column; gap: 5px; }

.session-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 6px 9px;
    font-size: 0.72rem;
}

.session-chip-left { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); }
.session-chip-day { font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 4px; }
.session-chip-week { color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.session-chip-teacher {
    color: var(--text-2);
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 200px;
    font-size: 0.7rem;
}

.badge-lt {
    padding: 2px 8px; border-radius: 999px; font-size: 0.65rem; font-weight: 700;
    background: var(--lt-bg); color: var(--lt-text);
}
.badge-th {
    padding: 2px 8px; border-radius: 999px; font-size: 0.65rem; font-weight: 700;
    background: var(--th-bg); color: var(--th-text);
}

/* ── 6. MAIN COLUMN ── */
.main-col {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
}

/* ── 7. TOOLBAR ── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 20px;
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh-xs);
    flex-shrink: 0;
    z-index: 5;
    flex-wrap: wrap;
}

.toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }

/* Page title */
.page-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
}

/* Week Picker */
.week-picker {
    display: flex;
    align-items: center;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.week-btn {
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    transition: all var(--dur-fast) var(--ease);
}

.week-btn:hover { background: var(--brand); color: white; }

.week-select {
    border: none;
    background: transparent;
    color: var(--text-1);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0 6px;
    cursor: pointer;
    outline: none;
    height: 32px;
    min-width: 130px;
    text-align: center;
}

.week-select option { background: var(--surface-0); color: var(--text-1); }

/* Filter Toggles */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
    height: 34px;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-3);
    transition: all var(--dur-fast) var(--ease);
    user-select: none;
    height: 100%;
}

.filter-toggle:hover {
    color: var(--text-1);
    background: var(--surface-2);
}

.filter-toggle.active-lt {
    background: rgba(26, 86, 219, 0.08);
    border-color: rgba(26, 86, 219, 0.4);
    color: var(--brand);
}

.filter-toggle.active-th {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent);
}

.filter-toggle input[type="checkbox"] {
    display: none; /* Hide native checkbox completely */
}

.filter-toggle i {
    font-size: 14px;
}

.filter-divider {
    display: none; /* Divider not needed when styled as pills */
}

/* View Switcher */
.view-switcher {
    display: flex;
    align-items: center;
    gap: 3px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 3px;
    height: 34px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 10px;
    border: none;
    background: none;
    border-radius: calc(var(--r-md) - 2px);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-3);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}

.view-btn:hover {
    color: var(--text-1);
    background: var(--surface-2);
}

.view-btn.active {
    color: var(--brand);
    background: var(--surface-0);
    box-shadow: var(--sh-sm);
}

.view-btn i {
    font-size: 14px;
}

/* Action Buttons */
.action-btn {
    display: flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--dur-fast) var(--ease);
    font-family: var(--font-body);
}

.action-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
    box-shadow: 0 4px 12px rgba(26,86,219,0.3);
    transform: translateY(-1px);
}

.action-btn.icon-only { width: 34px; padding: 0; justify-content: center; }

.theme-chip {
    display: inline-block;
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    padding: 1px 6px; border-radius: 999px;
    background: var(--brand-light); color: var(--brand);
}

/* ── 8. CALENDAR AREA ── */
.calendar-area {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: var(--bg);
}

.calendar-area::-webkit-scrollbar { width: 6px; height: 6px; }
.calendar-area::-webkit-scrollbar-track { background: transparent; }
.calendar-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.calendar-area::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ── Calendar Grid ── */
.calendar-wrapper {
    min-width: 820px;
    padding-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 54px repeat(7, minmax(110px, 1fr));
    grid-template-rows: 40px repeat(15, minmax(46px, 1fr));
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    overflow: hidden;
    position: relative;
    animation: fadeUp var(--dur-slow) var(--ease) both;
}

.calendar-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--grid-line);
    border-right: 1px solid var(--grid-line);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: sticky;
    top: 0;
    z-index: 6;
}

.time-label {
    background: var(--grid-bg);
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--grid-line);
    border-right: 2px solid var(--grid-line);
    padding: 4px 2px;
}

.time-label-text {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-4);
    writing-mode: horizontal-tb;
    text-align: center;
    line-height: 1.2;
}

.calendar-cell {
    background: var(--surface-0);
    border-right: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    transition: background var(--dur-fast) var(--ease);
}

/* ── Class Block ── */
.class-block {
    position: relative;
    margin: 2px;
    border-radius: var(--r-sm);
    padding: 6px 7px;
    color: #fff;
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease), z-index 0s;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.18);
    cursor: pointer;
    animation: popIn var(--dur) var(--ease-spring) both;
    z-index: 10;
}

.class-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
}

.class-block:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: var(--sh-lg) !important;
    z-index: 50 !important;
}

.class-block-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.class-block-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.type-pill {
    font-size: 0.55rem; font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.class-code-label {
    font-size: 0.62rem;
    font-weight: 700;
    opacity: 0.9;
    text-align: right;
}

.class-name-label {
    font-size: 0.55rem;
    opacity: 0.7;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.class-block-details {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 3px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.62rem;
}

.class-block-details > div {
    display: flex; align-items: center; gap: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0.88;
}

.conflict-pattern {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(220,53,69,0.22),
        rgba(220,53,69,0.22) 8px,
        rgba(255,255,255,0.06) 8px,
        rgba(255,255,255,0.06) 16px
    );
    border: 2px solid var(--danger) !important;
}

.preview-block {
    opacity: 0.55;
    border: 2px dashed rgba(255,255,255,0.5) !important;
    transform: scale(0.97);
    box-shadow: none !important;
}

/* Subject colors */
.bg-sub-0 { background: linear-gradient(145deg, #1a56db, #1e40af); }
.bg-sub-1 { background: linear-gradient(145deg, #0f766e, #0d9488); }
.bg-sub-2 { background: linear-gradient(145deg, #d97706, #f59e0b); }
.bg-sub-3 { background: linear-gradient(145deg, #4338ca, #6366f1); }
.bg-sub-4 { background: linear-gradient(145deg, #dc2626, #ef4444); }
.bg-sub-5 { background: linear-gradient(145deg, #059669, #10b981); }
.bg-sub-6 { background: linear-gradient(145deg, #7c3aed, #8b5cf6); }
.bg-sub-7 { background: linear-gradient(145deg, #c2410c, #f97316); }

/* ── 9. TIMELINE / GANTT ── */
.timeline-card {
    margin-top: 0;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 18px;
    animation: fadeUp var(--dur-slow) var(--ease) 0.1s both;
}

.timeline-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    color: var(--text-3);
    animation: fadeUp var(--dur-slow) var(--ease) 0.1s both;
}

.timeline-empty-state i {
    font-size: 48px;
    color: var(--text-4);
    margin-bottom: 16px;
}

.timeline-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}

.timeline-empty-state p {
    font-size: 0.85rem;
    color: var(--text-3);
    max-width: 320px;
    line-height: 1.4;
}

.timeline-empty-state strong {
    color: var(--brand);
}

.timeline-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-card-title i { color: var(--brand); font-size: 18px; }

.timeline-scroll { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--border); }
.timeline-scroll::-webkit-scrollbar { height: 5px; }
.timeline-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.timeline-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
}

.timeline-table th {
    font-size: 0.68rem; font-weight: 700;
    text-align: center;
    padding: 5px 3px;
    background: var(--surface-1);
    color: var(--text-3);
    border: 1px solid var(--grid-line);
    white-space: nowrap;
}

.timeline-table th.week-active { background: var(--brand); color: white; }

.timeline-table td {
    border: 1px solid var(--grid-line);
    padding: 3px !important;
    height: 30px;
    vertical-align: middle;
}

.timeline-table td.week-active { background: var(--brand-light); }

.sticky-col {
    position: sticky; left: 0; z-index: 3;
    background: var(--surface-1);
    border-right: 2px solid var(--border) !important;
    min-width: 190px;
    padding: 6px 10px !important;
}

.timeline-subject { font-size: 0.77rem; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.timeline-code-row { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.timeline-code { font-size: 0.68rem; color: var(--text-3); }

.timeline-bar {
    height: 14px; border-radius: 3px;
    width: 90%; margin: 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
    transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}

.timeline-bar:hover { filter: brightness(1.15); transform: scaleY(1.3); }

/* ── 10. TOAST ── */
.top-toast {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9000;
    display: flex; align-items: center; gap: 10px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: var(--r-md);
    padding: 12px 16px;
    min-width: 240px;
    box-shadow: var(--sh-lg);
    color: var(--text-1);
    font-size: 0.82rem; font-weight: 600;
    animation: slideInRight var(--dur) var(--ease-spring) both;
}

.top-toast i { color: var(--success); font-size: 20px; flex-shrink: 0; }

.toast-close {
    margin-left: auto;
    background: none; border: none;
    color: var(--text-3); cursor: pointer; padding: 2px;
    border-radius: var(--r-sm);
    font-size: 14px;
    transition: color var(--dur-fast);
}

.toast-close:hover { color: var(--danger); }

/* ── 11. MODALS ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: fadeIn var(--dur-fast) var(--ease) both;
}

.modal-card {
    background: var(--surface-0);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    width: 100%; max-width: 480px;
    overflow: hidden;
    animation: scaleIn var(--dur) var(--ease-spring) both;
    position: relative;
}

.modal-header-band {
    padding: 18px 20px;
    color: white;
    display: flex; align-items: center; justify-content: space-between;
}

.modal-header-band.danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }

.modal-title-text { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.modal-close-btn {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: background var(--dur-fast);
}

.modal-close-btn:hover { background: rgba(255,255,255,0.3); }

.modal-body { padding: 20px; }
.modal-body h4 { font-size: 1.1rem; font-weight: 800; color: var(--text-1); margin-bottom: 4px; }

.modal-meta-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.8rem; color: var(--text-3);
    margin-bottom: 4px;
}

.modal-meta-row strong { color: var(--text-1); }

.modal-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin: 14px 0;
}

.modal-stat-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px;
}

.modal-stat-label { font-size: 0.7rem; font-weight: 600; color: var(--text-3); margin-bottom: 4px; }
.modal-stat-val { font-size: 0.9rem; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.modal-stat-sub { font-size: 0.7rem; color: var(--text-3); margin-top: 2px; }

.modal-detail-list {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.modal-detail-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    gap: 12px;
}

.modal-detail-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.modal-detail-row:nth-child(odd)   { background: var(--surface-1); }

.modal-detail-label { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--text-2); white-space: nowrap; }
.modal-detail-val   { font-size: 0.8rem; font-weight: 700; color: var(--text-1); text-align: right; }

.modal-footer { padding: 14px 20px; background: var(--surface-1); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

.btn-modal {
    height: 38px; padding: 0 18px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    font-family: var(--font-body);
    font-size: 0.82rem; font-weight: 700;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}

.btn-modal-secondary { background: var(--surface-0); color: var(--text-2); }
.btn-modal-secondary:hover { background: var(--surface-2); }
.btn-modal-danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn-modal-danger:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,38,38,0.35); }

.conflict-list { list-style: none; margin: 10px 0 14px; display: flex; flex-direction: column; gap: 5px; }
.conflict-list li {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 12px;
    background: var(--danger-light);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--r-sm);
    font-size: 0.8rem; font-weight: 600;
    color: var(--danger);
}

/* ── 12. MOBILE BOTTOM NAV ── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 58px;
    min-height: 58px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    z-index: 100;
    /* Safe area for notch phones */
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-inner { display: flex; height: 100%; width: 100%; justify-content: space-between; }

.mobile-nav-btn {
    flex: 1; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    background: none; border: none; cursor: pointer;
    color: var(--text-4);
    font-family: var(--font-body);
    font-size: 0.65rem; font-weight: 700;
    transition: color var(--dur-fast) var(--ease);
    position: relative;
    padding: 0 8px;
    min-width: 0;
    white-space: nowrap;
}

.mobile-nav-btn i { font-size: 20px; transition: transform var(--dur) var(--ease-spring); }

.mobile-nav-btn.active {
    color: var(--brand);
}

.mobile-nav-btn.active i { transform: translateY(-2px); }

.mobile-nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 3px;
    background: var(--brand);
    border-radius: 0 0 4px 4px;
}

.mobile-nav-badge {
    position: absolute;
    top: 10px; right: calc(50% - 18px);
    min-width: 18px; height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 999px;
    font-size: 0.6rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--glass);
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}

/* ── 13. LOADING SPINNER ── */
.loading-inline {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    color: var(--brand); font-weight: 600; font-size: 0.82rem;
}

.spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--brand-light);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ── 14. UTILITIES ── */
.scroll-hidden::-webkit-scrollbar { display: none; }
.scroll-hidden { -ms-overflow-style: none; scrollbar-width: none; }

.selected-count-chip {
    background: var(--brand);
    color: white;
    font-size: 0.72rem; font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ── 15. ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── 16. RESPONSIVE ── */

/* Tablet: 768-1023 */
@media (max-width: 1023px) {
    :root { --sidebar-w: 290px; }
    .page-title { display: none; }
    .action-btn span { display: none; }
    .action-btn.icon-only { width: 34px; }
}

/* Mobile: ≤767px */
@media (max-width: 767px) {
    body { overflow: hidden; }

    .app-shell { flex-direction: column; }

    .sidebar-col {
        position: fixed;
        top: 0; left: 0;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: calc(100dvh - 58px);
        border-right: none;
        box-shadow: none;
        z-index: 20;
        transition: transform var(--dur) var(--ease);
    }

    .sidebar-col.hidden-mobile {
        transform: translateX(-100%);
        pointer-events: none;
    }

    .main-col {
        position: fixed;
        top: 0; left: 0;
        width: 100%;
        height: calc(100dvh - 58px);
        transition: transform var(--dur) var(--ease);
    }

    .main-col.hidden-mobile {
        transform: translateX(100%);
        pointer-events: none;
    }

    .mobile-nav { display: block; }
    .view-switcher { display: none !important; }

    /* CSS Grid Toolbar Layout for Mobile */
    .toolbar {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        height: auto !important;
    }

    .toolbar-left {
        display: contents !important;
    }

    .week-picker {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: 34px !important;
    }

    .toolbar-right {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        height: 34px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .toolbar-right button:not(:first-child) {
        display: none !important;
    }

    .action-btn {
        width: 34px !important;
        height: 34px !important;
        border-radius: var(--r-md) !important;
        padding: 0 !important;
    }

    .filter-group {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        display: flex !important;
        justify-content: stretch !important;
        width: 100% !important;
        gap: 8px !important;
        height: 34px !important;
        padding: 0 !important;
    }

    .filter-toggle {
        flex: 1 !important;
        padding: 0 12px !important;
        width: auto !important;
        height: 34px !important;
        justify-content: center !important;
    }

    .filter-toggle span {
        display: inline !important;
        font-size: 0.72rem !important;
    }

    .brand-subtitle { display: none; }

    .sidebar-head { padding: 12px 12px 10px; }

    .calendar-area { padding: 8px; }
    .calendar-wrapper { min-width: 660px; }
    .calendar-grid {
        grid-template-columns: 40px repeat(7, minmax(82px, 1fr));
        grid-template-rows: 36px repeat(15, minmax(42px, 1fr));
    }

    /* Mobile: tighter class block details */
    .class-block { padding: 4px 5px; border-radius: 5px; }
    .class-block-title { font-size: 0.68rem; -webkit-line-clamp: 1; }
    .class-block-details { font-size: 0.58rem; }
    .class-block-details > div { gap: 2px; }
}

/* Very small screens */
@media (max-width: 380px) {
    .calendar-wrapper { min-width: 600px; }
    .calendar-grid { grid-template-columns: 42px repeat(7, minmax(78px, 1fr)); }
}

/* ── Print ── */
@media print {
    .sidebar-col, .toolbar, .mobile-nav, .top-toast { display: none !important; }
    .main-col { width: 100% !important; height: auto !important; overflow: visible !important; }
    .calendar-area { overflow: visible !important; padding: 0 !important; }
    .calendar-grid { box-shadow: none !important; border-radius: 0 !important; }
    .class-block { box-shadow: none !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Dark theme btn-close fix ── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-close { filter: invert(1); }
}
:root[data-theme="dark"] .btn-close { filter: invert(1); }

 / *    % %  T U I T I O N   M O D A L    % %  * / 
 . t u i t i o n - m o d a l - c o n t e n t   { 
         b a c k g r o u n d :   v a r ( - - s u r f a c e - 0 ) ; 
         b a c k d r o p - f i l t e r :   b l u r ( 2 4 p x )   s a t u r a t e ( 1 . 5 ) ; 
         - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 2 4 p x )   s a t u r a t e ( 1 . 5 ) ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - g l a s s - b o r d e r ) ; 
         b o x - s h a d o w :   0   2 4 p x   8 0 p x   r g b a ( 1 5 , 3 0 , 6 0 , 0 . 4 ) ,   0   0   0   1 p x   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 1 )   i n s e t ; 
         o v e r f l o w :   h i d d e n ; 
         a n i m a t i o n :   p o p I n   0 . 4 s   v a r ( - - e a s e - s p r i n g )   b o t h ; 
 } 
 : r o o t [ d a t a - t h e m e = \  
 d a r k \ ]   . t u i t i o n - m o d a l - c o n t e n t   { 
         b a c k g r o u n d :   r g b a ( 1 4 , 2 2 , 3 7 , 0 . 8 5 ) ; 
         b o x - s h a d o w :   0   2 4 p x   8 0 p x   r g b a ( 0 , 0 , 0 , 0 . 8 ) ,   0   0   0   1 p x   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 )   i n s e t ; 
 } 
 
 . t u i t i o n - h e a d e r   { 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - b r a n d ) ,   # 4 f 4 6 e 5 ) ; 
         p a d d i n g :   2 0 p x   2 4 p x ; 
         p o s i t i o n :   r e l a t i v e ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 . t u i t i o n - h e a d e r : : a f t e r   { 
         c o n t e n t :   ' ' ;   p o s i t i o n :   a b s o l u t e ;   t o p :   0 ;   l e f t :   0 ;   r i g h t :   0 ;   b o t t o m :   0 ; 
         b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e   a t   1 0 0 %   0 % ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 )   0 % ,   t r a n s p a r e n t   7 0 % ) ; 
         p o i n t e r - e v e n t s :   n o n e ; 
 } 
 . t u i t i o n - h e a d e r   h 3   { 
         f o n t - s i z e :   1 . 2 5 r e m ;   f o n t - w e i g h t :   8 0 0 ;   c o l o r :   w h i t e ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   g a p :   1 0 p x ; 
         t e x t - s h a d o w :   0   2 p x   4 p x   r g b a ( 0 , 0 , 0 , 0 . 2 ) ; 
 } 
 . t u i t i o n - h e a d e r   . b t n - i c o n   {   c o l o r :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 8 ) ;   b a c k g r o u n d :   r g b a ( 0 , 0 , 0 , 0 . 1 5 ) ;   t r a n s i t i o n :   a l l   0 . 3 s   c u b i c - b e z i e r ( 0 . 3 4 ,   1 . 5 6 ,   0 . 6 4 ,   1 ) ;   } 
 . t u i t i o n - h e a d e r   . b t n - i c o n : h o v e r   {   c o l o r :   w h i t e ;   b a c k g r o u n d :   r g b a ( 0 , 0 , 0 , 0 . 3 ) ;   t r a n s f o r m :   r o t a t e ( 9 0 d e g )   s c a l e ( 1 . 1 ) ;   } 
 
 . t u i t i o n - s t a t - g r o u p   {   d i s p l a y :   g r i d ;   g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;   g a p :   1 6 p x ;   m a r g i n - b o t t o m :   2 4 p x ;   } 
 . t u i t i o n - s t a t - c a r d   { 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 4 5 d e g ,   v a r ( - - s u r f a c e - 1 ) ,   v a r ( - - s u r f a c e - 2 ) ) ; 
         b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   b o r d e r - r a d i u s :   v a r ( - - r - l g ) ;   p a d d i n g :   2 0 p x ; 
         p o s i t i o n :   r e l a t i v e ;   o v e r f l o w :   h i d d e n ;   t r a n s i t i o n :   a l l   0 . 4 s   v a r ( - - e a s e - s p r i n g ) ; 
         b o x - s h a d o w :   v a r ( - - s h - x s ) ; 
 } 
 . t u i t i o n - s t a t - c a r d : : b e f o r e   { 
         c o n t e n t :   ' ' ;   p o s i t i o n :   a b s o l u t e ;   t o p :   - 5 0 % ;   l e f t :   - 5 0 % ;   w i d t h :   2 0 0 % ;   h e i g h t :   2 0 0 % ; 
         b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e   a t   c e n t e r ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 )   0 % ,   t r a n s p a r e n t   6 0 % ) ; 
         o p a c i t y :   0 ;   t r a n s f o r m :   s c a l e ( 0 . 5 ) ;   t r a n s i t i o n :   a l l   0 . 4 s   v a r ( - - e a s e - s p r i n g ) ;   p o i n t e r - e v e n t s :   n o n e ; 
 } 
 : r o o t [ d a t a - t h e m e = \ d a r k \ ]   . t u i t i o n - s t a t - c a r d : : b e f o r e   {   b a c k g r o u n d :   r a d i a l - g r a d i e n t ( c i r c l e   a t   c e n t e r ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 0 5 )   0 % ,   t r a n s p a r e n t   6 0 % ) ;   } 
 . t u i t i o n - s t a t - c a r d : h o v e r   {   t r a n s f o r m :   t r a n s l a t e Y ( - 4 p x ) ;   b o x - s h a d o w :   v a r ( - - s h - m d ) ;   b o r d e r - c o l o r :   v a r ( - - b r a n d ) ;   } 
 . t u i t i o n - s t a t - c a r d : h o v e r : : b e f o r e   {   o p a c i t y :   1 ;   t r a n s f o r m :   s c a l e ( 1 ) ;   } 
 
 . t u i t i o n - s t a t - i c o n   { 
         w i d t h :   4 4 p x ;   h e i g h t :   4 4 p x ;   b o r d e r - r a d i u s :   1 2 p x ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ; 
         f o n t - s i z e :   2 2 p x ;   m a r g i n - b o t t o m :   1 2 p x ;   b o x - s h a d o w :   i n s e t   0   2 p x   4 p x   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 3 ) ,   0   4 p x   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; 
 } 
 . t u i t i o n - s t a t - c a r d : n t h - c h i l d ( 1 )   . t u i t i o n - s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 3 b 8 2 f 6 ,   # 1 d 4 e d 8 ) ;   c o l o r :   w h i t e ;   } 
 . t u i t i o n - s t a t - c a r d : n t h - c h i l d ( 2 )   . t u i t i o n - s t a t - i c o n   {   b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # f 5 9 e 0 b ,   # b 4 5 3 0 9 ) ;   c o l o r :   w h i t e ;   } 
 
 . t u i t i o n - s t a t - v a l   {   f o n t - s i z e :   2 . 2 r e m ;   f o n t - w e i g h t :   8 0 0 ;   f o n t - f a m i l y :   v a r ( - - f o n t - d i s p l a y ) ;   l i n e - h e i g h t :   1 ;   c o l o r :   v a r ( - - t e x t - 1 ) ;   } 
 . t u i t i o n - s t a t - l a b e l   {   f o n t - s i z e :   0 . 8 5 r e m ;   f o n t - w e i g h t :   7 0 0 ;   c o l o r :   v a r ( - - t e x t - 3 ) ;   m a r g i n - t o p :   6 p x ;   } 
 
 . t u i t i o n - t a b l e - w r a p   { 
         b a c k g r o u n d :   v a r ( - - s u r f a c e - 0 ) ;   b o r d e r :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   b o r d e r - r a d i u s :   v a r ( - - r - m d ) ; 
         m a r g i n - b o t t o m :   2 4 p x ;   b o x - s h a d o w :   v a r ( - - s h - s m ) ;   o v e r f l o w :   h i d d e n ; 
 } 
 . t u i t i o n - t a b l e - h e a d e r   { 
         b a c k g r o u n d :   v a r ( - - s u r f a c e - 1 ) ;   p a d d i n g :   1 4 p x   1 8 p x ;   b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
         d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   g a p :   1 0 p x ;   f o n t - w e i g h t :   7 0 0 ;   c o l o r :   v a r ( - - t e x t - 1 ) ;   f o n t - s i z e :   0 . 9 5 r e m ; 
 } 
 . t u i t i o n - t a b l e   {   w i d t h :   1 0 0 % ;   b o r d e r - c o l l a p s e :   c o l l a p s e ;   f o n t - s i z e :   0 . 8 5 r e m ;   } 
 . t u i t i o n - t a b l e   t h   {   p a d d i n g :   1 4 p x   1 8 p x ;   t e x t - a l i g n :   l e f t ;   b a c k g r o u n d :   v a r ( - - s u r f a c e - 2 ) ;   c o l o r :   v a r ( - - t e x t - 3 ) ;   f o n t - w e i g h t :   7 0 0 ;   p o s i t i o n :   s t i c k y ;   t o p :   0 ;   z - i n d e x :   2 ;   b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   } 
 . t u i t i o n - t a b l e   t d   {   p a d d i n g :   1 6 p x   1 8 p x ;   c o l o r :   v a r ( - - t e x t - 1 ) ;   b o r d e r - b o t t o m :   1 p x   s o l i d   v a r ( - - b o r d e r ) ;   t r a n s i t i o n :   b a c k g r o u n d   v a r ( - - d u r - f a s t ) ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r   {   t r a n s i t i o n :   t r a n s f o r m   v a r ( - - d u r )   v a r ( - - e a s e ) ,   b a c k g r o u n d   v a r ( - - d u r - f a s t ) ;   a n i m a t i o n :   f a d e U p   0 . 4 s   v a r ( - - e a s e )   b o t h ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : n t h - c h i l d ( 1 )   {   a n i m a t i o n - d e l a y :   0 . 0 5 s ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : n t h - c h i l d ( 2 )   {   a n i m a t i o n - d e l a y :   0 . 1 s ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : n t h - c h i l d ( 3 )   {   a n i m a t i o n - d e l a y :   0 . 1 5 s ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : n t h - c h i l d ( 4 )   {   a n i m a t i o n - d e l a y :   0 . 2 s ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : n t h - c h i l d ( 5 )   {   a n i m a t i o n - d e l a y :   0 . 2 5 s ;   } 
 . t u i t i o n - t a b l e   t b o d y   t r : h o v e r   {   b a c k g r o u n d :   v a r ( - - s u r f a c e - 1 ) ;   t r a n s f o r m :   s c a l e ( 1 . 0 1 )   t r a n s l a t e Y ( - 1 p x ) ;   z - i n d e x :   1 ;   p o s i t i o n :   r e l a t i v e ;   b o x - s h a d o w :   v a r ( - - s h - s m ) ;   } 
 
 . t u i t i o n - b a d g e   {   d i s p l a y :   i n l i n e - b l o c k ;   p a d d i n g :   3 p x   8 p x ;   b a c k g r o u n d :   v a r ( - - s u r f a c e - 2 ) ;   c o l o r :   v a r ( - - t e x t - 3 ) ;   b o r d e r - r a d i u s :   6 p x ;   f o n t - s i z e :   0 . 7 2 r e m ;   f o n t - w e i g h t :   7 0 0 ;   m a r g i n - r i g h t :   6 p x ;   } 
 . t u i t i o n - b a d g e - d i s c o u n t   {   b a c k g r o u n d :   r g b a ( 1 6 ,   1 8 5 ,   1 2 9 ,   0 . 1 5 ) ;   c o l o r :   # 0 5 9 6 6 9 ;   } 
 : r o o t [ d a t a - t h e m e = \ d a r k \ ]   . t u i t i o n - b a d g e - d i s c o u n t   {   c o l o r :   # 3 4 d 3 9 9 ;   } 
 
 . t u i t i o n - t o t a l - c a r d   { 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   v a r ( - - b r a n d ) ,   # 4 f 4 6 e 5 ) ; 
         p a d d i n g :   2 4 p x ;   b o r d e r - r a d i u s :   v a r ( - - r - l g ) ;   c o l o r :   w h i t e ; 
         d i s p l a y :   f l e x ;   j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ;   a l i g n - i t e m s :   c e n t e r ; 
         p o s i t i o n :   r e l a t i v e ;   o v e r f l o w :   h i d d e n ;   b o x - s h a d o w :   0   1 4 p x   4 0 p x   r g b a ( 7 9 ,   7 0 ,   2 2 9 ,   0 . 3 5 ) ; 
         a n i m a t i o n :   s c a l e I n   0 . 5 s   v a r ( - - e a s e - s p r i n g )   0 . 2 s   b o t h ; 
 } 
 . t u i t i o n - t o t a l - c a r d : : b e f o r e   { 
         c o n t e n t :   ' ' ;   p o s i t i o n :   a b s o l u t e ;   t o p :   - 1 0 0 % ;   l e f t :   - 1 0 0 % ;   w i d t h :   3 0 0 % ;   h e i g h t :   3 0 0 % ; 
         b a c k g r o u n d :   c o n i c - g r a d i e n t ( f r o m   0 d e g   a t   5 0 %   5 0 % ,   t r a n s p a r e n t   0 % ,   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 1 5 )   2 0 % ,   t r a n s p a r e n t   4 0 % ) ; 
         a n i m a t i o n :   s p i n   8 s   l i n e a r   i n f i n i t e ;   p o i n t e r - e v e n t s :   n o n e ; 
 } 
 . t u i t i o n - t o t a l - c a r d   >   d i v   {   p o s i t i o n :   r e l a t i v e ;   z - i n d e x :   1 ;   } 
 . t u i t i o n - t o t a l - l a b e l   {   f o n t - s i z e :   0 . 9 r e m ;   f o n t - w e i g h t :   8 0 0 ;   t e x t - t r a n s f o r m :   u p p e r c a s e ;   l e t t e r - s p a c i n g :   0 . 1 e m ;   c o l o r :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 9 ) ;   m a r g i n - b o t t o m :   4 p x ;   } 
 . t u i t i o n - t o t a l - s u b   {   f o n t - s i z e :   0 . 7 5 r e m ;   c o l o r :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 7 ) ;   } 
 . t u i t i o n - t o t a l - v a l   {   f o n t - s i z e :   2 . 6 r e m ;   f o n t - w e i g h t :   9 0 0 ;   f o n t - f a m i l y :   v a r ( - - f o n t - d i s p l a y ) ;   l i n e - h e i g h t :   1 ;   t e x t - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 0 , 0 , 0 , 0 . 2 5 ) ;   } 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 7 p x )   { 
         . t u i t i o n - s t a t - g r o u p   {   g r i d - t e m p l a t e - c o l u m n s :   1 f r ;   g a p :   1 2 p x ;   } 
         . t u i t i o n - t o t a l - c a r d   {   f l e x - d i r e c t i o n :   c o l u m n ;   a l i g n - i t e m s :   f l e x - s t a r t ;   g a p :   1 2 p x ;   } 
         . t u i t i o n - t o t a l - v a l   {   f o n t - s i z e :   2 . 2 r e m ;   } 
 } 
  
 