/* ═══════════════════════════════════════════════════════════
   STUDUET — Global Design System (studuet.css)
   Shared across ALL pages. Import FIRST before page-level CSS.
   Version: 2.0 — Production Architecture
═══════════════════════════════════════════════════════════ */

/* ── LUCIDE ICONS ── */
[data-lucide] {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 2;
    vertical-align: middle;
    flex-shrink: 0;
}
.sb-item-icon [data-lucide],
.mob-tab-icon [data-lucide] { width: 20px; height: 20px; }
.stat-icon [data-lucide],
.feed-icon [data-lucide],
.ticket-icon [data-lucide],
.notif-icon [data-lucide] { width: 22px; height: 22px; }
.tool-icon [data-lucide],
.hint-icon [data-lucide] { width: 24px; height: 24px; }
.scard-icon [data-lucide],
.c-thumb [data-lucide] { width: 28px; height: 28px; }
.benefit-icon [data-lucide] { width: 32px; height: 32px; }
.top-icon-btn [data-lucide],
.top-btn [data-lucide] { width: 18px; height: 18px; }
.nav-search [data-lucide] { width: 16px; height: 16px; }
.input-icon [data-lucide] { width: 18px; height: 18px; }
button [data-lucide] { pointer-events: none; }

/* Icons on dark/coloured backgrounds → white */
.sidebar [data-lucide],
.sb [data-lucide] { color: rgba(255,255,255,.55); }
.sidebar .sb-item.active [data-lucide],
.sidebar .sb-item:hover [data-lucide],
.sb .sb-item.active [data-lucide],
.sb .sb-item:hover [data-lucide] { color: #fff; }
.stats-strip [data-lucide],
.hero-banner [data-lucide],
.dark-section [data-lucide] { color: #fff; }
.btn-p [data-lucide],
.btn-dark [data-lucide],
.btn-teal [data-lucide],
.btn-red [data-lucide],
.btn-green [data-lucide],
.btn-amber [data-lucide] { color: #fff; }
.topbar-search [data-lucide],
.nav-search [data-lucide],
.top-search [data-lucide] { color: var(--muted); }
.top-icon-btn [data-lucide],
.top-btn [data-lucide] { color: var(--slate); }

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

:root {
    /* Primary brand */
    --p: #5B21B6;
    --pl: #7C3AED;
    --pxl: #A78BFA;
    --pxxl: #EDE9FE;
    --p-grad: linear-gradient(135deg, #5B21B6 0%, #7C3AED 100%);
    /* Neutrals */
    --ink: #0D0A1E;
    --ink2: #1A1630;
    --slate: #4B4567;
    --muted: #8B87A0;
    --bg: #F7F5FF;
    --white: #fff;
    --border: #E8E3F5;
    --border-light: #F0EBF8;
    /* Semantic */
    --teal: #0D9488;
    --amber: #B45309;
    --amberl: #F59E0B;
    --green: #047857;
    --greenl: #10B981;
    --red: #DC2626;
    /* Spacing scale */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 40px;
    /* Radius — slightly rounder */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    /* Shadow — richer, purple-tinted */
    --shadow-sm: 0 1px 4px rgba(91,33,182,.06), 0 2px 8px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(91,33,182,.08), 0 8px 24px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(91,33,182,.15), 0 4px 16px rgba(0,0,0,.08);
    --shadow-xl: 0 24px 64px rgba(91,33,182,.18), 0 8px 24px rgba(0,0,0,.10);
    /* Transitions */
    --t-fast: 0.12s ease;
    --t-std: 0.22s ease;
    --t-slow: 0.38s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--white);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6
}

h1,
h2,
h3,
h4,
h5,
h6,
.serif {
    font-family: 'Sora', sans-serif
}

a {
    text-decoration: none;
    color: inherit
}

button {
    cursor: pointer
}

img {
    max-width: 100%
}

/* ── TYPOGRAPHY ── */
.text-xs {
    font-size: 11px
}

.text-sm {
    font-size: 13px
}

.text-md {
    font-size: 15px
}

.text-lg {
    font-size: 18px
}

.text-xl {
    font-size: 22px
}

.text-muted {
    color: var(--muted)
}

.text-slate {
    color: var(--slate)
}

.text-p {
    color: var(--p)
}

.text-green {
    color: var(--green)
}

.text-red {
    color: var(--red)
}

.text-amber {
    color: var(--amber)
}

.font-bold {
    font-weight: 700
}

.font-heavy {
    font-weight: 900
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: .07em
}

/* ── BUTTONS ── */
.btn {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--r-md);
    padding: 10px 20px;
    border: none;
    transition: all var(--t-std);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    line-height: 1;
    letter-spacing: .01em;
    position: relative;
    overflow: hidden;
}

.btn-p {
    background: var(--p-grad);
    color: #fff;
    box-shadow: 0 2px 8px rgba(91,33,182,.25);
}

.btn-p:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(91,33,182,.38);
    filter: brightness(1.08);
}

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

.btn-dark {
    background: var(--ink2);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-dark:hover {
    background: var(--p);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--pxl);
    color: var(--p);
    background: var(--pxxl);
}

.btn-teal {
    background: linear-gradient(135deg, #0D9488, #0F766E);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13,148,136,.25);
}

.btn-teal:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,148,136,.35);
    filter: brightness(1.06);
}

.btn-red {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,.2);
}

.btn-red:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220,38,38,.3);
    filter: brightness(1.06);
}

.btn-green {
    background: linear-gradient(135deg, #047857, #065F46);
    color: #fff;
}

.btn-green:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn-amber {
    background: linear-gradient(135deg, #D97706, #B45309);
    color: #fff;
}

.btn-pill {
    border-radius: 50px !important;
}

.btn-lg {
    font-size: 15px;
    padding: 14px 30px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--r-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--r-sm);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-outline-p {
    background: transparent;
    border: 2px solid var(--p);
    color: var(--p);
}

.btn-outline-p:hover {
    background: var(--p-grad);
    color: #fff;
    border-color: transparent;
}

/* ── BADGES ── */
.badge {
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 800;
    display: inline-block
}

.badge-p {
    background: var(--pxxl);
    color: var(--p)
}

.badge-g {
    background: #ECFDF5;
    color: var(--green)
}

.badge-a {
    background: #FEF3C7;
    color: var(--amber)
}

.badge-r {
    background: #FEF2F2;
    color: var(--red)
}

.badge-t {
    background: rgba(13, 148, 136, .1);
    color: var(--teal)
}

.badge-ink {
    background: rgba(13, 10, 30, .08);
    color: var(--ink)
}

/* ── CARDS ── */
.card {
    background: #fff;
    border-radius: var(--r-lg);
    border: 1px solid var(--border-light);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.card-hover {
    transition: all var(--t-std);
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border);
}

/* ── FORMS ── */
.form-group {
    margin-bottom: 18px
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--slate);
    margin-bottom: 7px;
    letter-spacing: .05em;
    text-transform: uppercase
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--bg);
    outline: none;
    transition: all var(--t-fast);
}

.form-input:focus {
    border-color: var(--p);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(91,33,182,.08);
}

.form-input::placeholder {
    color: var(--muted)
}

select.form-input {
    cursor: pointer;
    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='%238B87A0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px
}

textarea.form-input {
    resize: vertical;
    min-height: 90px
}

.input-wrap {
    position: relative
}

.input-wrap .form-input {
    padding-right: 42px
}

.input-addon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    border: none;
    background: none;
    cursor: pointer;
    transition: color var(--t-fast)
}

.input-addon:hover {
    color: var(--ink)
}

/* ── DIVIDERS ── */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 12px;
    margin: 20px 0
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border)
}

/* ── LAYOUT GRID ── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px
}

.flex {
    display: flex
}

.flex-center {
    align-items: center
}

.flex-between {
    justify-content: space-between
}

.gap-sm {
    gap: 8px
}

.gap-md {
    gap: 16px
}

.gap-lg {
    gap: 24px
}

/* ── SECTION UTILITIES ── */
.section {
    padding: 88px 56px
}

.section-alt {
    background: var(--bg)
}

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    color: var(--p);
    letter-spacing: .1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 2.5px;
    background: var(--p);
    border-radius: 2px
}

.sec-h {
    font-family: 'Sora', sans-serif;
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 10px
}

.sec-h em {
    font-style: normal;
    color: var(--p)
}

/* ── CLP BARS ── */
.clp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px
}

.clp-label {
    font-size: 12px;
    color: var(--slate);
    width: 130px;
    flex-shrink: 0
}

.clp-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden
}

.clp-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .6s cubic-bezier(.4, 0, .2, 1)
}

.clp-val {
    font-size: 11px;
    font-weight: 800;
    color: var(--ink);
    width: 28px;
    text-align: right;
    flex-shrink: 0
}

/* ── PROGRESS BARS ── */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s ease
}

/* ── TOGGLE SWITCH ── */
.toggle {
    width: 42px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background var(--t-fast);
    flex-shrink: 0
}

.toggle.on {
    background: var(--p)
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left var(--t-fast);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2)
}

.toggle.on::after {
    left: 21px
}

/* ── SHARED NAV ── */
.studuet-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 56px;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(234, 230, 248, .6);
    transition: box-shadow var(--t-std)
}

.studuet-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06)
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none
}

.nav-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--ink);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.nav-logo-mark svg {
    width: 20px;
    height: 20px
}

.nav-logo-name {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
    letter-spacing: -.01em
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none
}

.nav-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--r-sm);
    transition: all var(--t-fast);
    position: relative
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--p);
    background: var(--pxxl)
}

.new-pill {
    position: absolute;
    top: -8px;
    right: 0;
    background: var(--p);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 20px
}

.nav-r {
    display: flex;
    align-items: center;
    gap: 10px
}

.ham-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    z-index: 400
}

.ham-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: all .3s
}

.ham-btn.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg)
}

.ham-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0)
}

.ham-btn.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg)
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 24px;
    z-index: 299;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 4px
}

.mobile-nav.open {
    display: flex
}

.mobile-nav a {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 10px;
    display: block;
    transition: all var(--t-fast)
}

.mobile-nav a:hover {
    background: var(--pxxl);
    color: var(--p)
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0
}

.mobile-nav .nav-btns-m {
    display: flex;
    gap: 8px;
    margin-top: 8px
}

/* ── SCROLL REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: all .7s ease
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0)
}

/* ── MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 10, 30, .55);
    backdrop-filter: blur(6px);
    z-index: 500;
    align-items: center;
    justify-content: center
}

.modal-overlay.open {
    display: flex
}

.modal {
    background: #fff;
    border-radius: var(--r-xl);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    animation: modalIn .25s ease
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.96)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all var(--t-fast)
}

.modal-close:hover {
    background: var(--border);
    color: var(--ink)
}

.modal-h {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--ink);
    margin-bottom: 6px
}

.modal-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 22px
}

/* ── TOAST ── */
.studuet-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-md);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2000;
    transform: translateY(80px);
    opacity: 0;
    transition: all .35s;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    max-width: 380px
}

.studuet-toast.show {
    transform: translateY(0);
    opacity: 1
}

/* ── LOADING SPINNER ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(91, 33, 182, .2);
    border-top-color: var(--p);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block
}

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

/* ── KEYFRAME ANIMATIONS ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .5
    }
}

/* ═══════════════════
   RESPONSIVE UTILITIES
═══════════════════ */
@media(max-width:1200px) {
    .studuet-nav {
        padding: 0 28px
    }

    .section {
        padding: 72px 40px
    }
}

@media(max-width:900px) {

    .nav-links,
    .nav-r .btn-ghost {
        display: none
    }

    .ham-btn {
        display: flex
    }

    .studuet-nav {
        padding: 0 20px
    }

    .section {
        padding: 56px 20px
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:600px) {
    .studuet-nav {
        height: 56px
    }

    .mobile-nav {
        top: 56px
    }

    .section {
        padding: 44px 16px
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr
    }

    .card {
        padding: 18px
    }
}