/* ══════════════════════════════════════════════════════════════
   SKOOLED-AI · Design System · ds.css
   Artsy educational dashboard — bold, playful, high-contrast
   ══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
    --ink:          #1a1a1a;
    --ink-soft:     #333333;
    --white:        #ffffff;
    --bg:           #f7f7f5;
    --surface:      #ffffff;
    --gray-50:      #fafaf9;
    --gray-100:     #f0f0ee;
    --gray-200:     #e4e4e1;
    --gray-300:     #ccccc9;
    --gray-400:     #9e9e9b;
    --gray-500:     #6b6b68;
    --coral:        #ff5f57;
    --coral-light:  #fff1f0;
    --yellow:       #fbbf24;
    --yellow-light: #fffbeb;
    --green:        #22c55e;
    --green-light:  #f0fdf4;
    --danger:       #ef4444;
    --font-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
    --font-body:    'Nunito', 'Arial', sans-serif;
    --r-xs:         6px;
    --r-sm:         10px;
    --r:            14px;
    --r-lg:         20px;
    --r-xl:         28px;
    --sidebar-w:    70px;
    --topbar-h:     58px;
    --sh-sm:        0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --sh:           0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
    --sh-md:        0 4px 20px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05);
    --sh-lg:        0 8px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }
body { font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.65; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.025em; }

/* ══════════════════════════════════════════════════════════════
   SIDEBAR  (fixed, 70px, icon-only)
   ══════════════════════════════════════════════════════════════ */
.ds-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w); height: 100vh;
    background: var(--ink);
    display: flex; flex-direction: column; align-items: center;
    padding: 18px 0 24px; z-index: 200;
}
.ds-sidebar-logo {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--coral);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 20px; font-weight: 800;
    color: var(--white); margin-bottom: 28px; flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(255,95,87,.35);
    text-decoration: none;
}
.ds-sidebar-nav {
    display: flex; flex-direction: column; gap: 2px;
    width: 100%; padding: 0 10px; flex: 1;
}
.ds-nav-link {
    width: 100%; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.38); transition: all .18s;
    cursor: pointer; text-decoration: none;
}
.ds-nav-link:hover  { background: rgba(255,255,255,.09); color: var(--white); }
.ds-nav-link.active { background: var(--coral); color: var(--white); box-shadow: 0 4px 14px rgba(255,95,87,.4); }
.ds-nav-link svg    { width: 20px !important; height: 20px !important; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ds-sidebar-footer  { width: 100%; padding: 0 10px; }

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════════════════════ */
.ds-layout { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* ── Top Bar ── */
.ds-topbar {
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    position: sticky; top: 0; z-index: 100; flex-shrink: 0;
}
.ds-topbar-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.ds-topbar-right { display: flex; align-items: center; gap: 14px; }
.ds-topbar-nav { display: flex; gap: 2px; }
.ds-topbar-nav a {
    padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--gray-500); transition: all .15s;
}
.ds-topbar-nav a:hover    { background: var(--gray-100); color: var(--ink); }
.ds-topbar-nav a.active   { background: var(--gray-100); color: var(--ink); font-weight: 700; }
.ds-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--ink);
    color: var(--white); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.ds-user-name { font-size: 14px; font-weight: 700; font-family: var(--font-display); }
.ds-logout-btn {
    font-size: 12px; color: var(--gray-400); padding: 5px 12px;
    border: 1.5px solid var(--gray-200); border-radius: 8px;
    transition: all .15s; cursor: pointer; background: none; font-family: var(--font-body);
}
.ds-logout-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ── Page Body ── */
.ds-page { flex: 1; padding: 28px; }
.ds-page-inner { max-width: 900px; margin: 0 auto; }

/* ── Hero / Greeting ── */
.ds-hero {
    background: var(--white); border-radius: var(--r-lg);
    padding: 28px 32px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; border: 1px solid var(--gray-200);
    overflow: hidden; box-shadow: var(--sh);
    position: relative;
}
.ds-hero-content h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.ds-hero-content p  { font-size: 14px; color: var(--gray-500); font-weight: 500; }
.ds-hero-art        { flex-shrink: 0; }

/* ── Stat Chips ── */
.ds-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.ds-chip {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 50px; padding: 6px 16px;
    font-size: 12px; font-weight: 700; color: var(--ink);
    font-family: var(--font-display);
    display: flex; align-items: center; gap: 6px; box-shadow: var(--sh-sm);
}
.ds-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.ds-card {
    background: var(--white); border-radius: var(--r);
    border: 1px solid var(--gray-200); box-shadow: var(--sh); margin-bottom: 16px;
}
.ds-card-body     { padding: 26px 28px; }
.ds-card-title    { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.ds-card-subtitle { font-size: 13px; color: var(--gray-500); margin-bottom: 20px; font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.ds-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: 50px;
    font-family: var(--font-display); font-size: 13px; font-weight: 700;
    cursor: pointer; transition: all .18s; border: none; text-decoration: none;
    white-space: nowrap;
}
.ds-btn-primary { background: var(--ink); color: var(--white); }
.ds-btn-primary:hover { background: var(--ink-soft); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(26,26,26,.18); color: var(--white); }
.ds-btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ds-btn-coral { background: var(--coral); color: var(--white); }
.ds-btn-coral:hover { background: #e84e46; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(255,95,87,.3); color: var(--white); }
.ds-btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--gray-200); }
.ds-btn-outline:hover { border-color: var(--ink); }
.ds-btn-sm  { padding: 7px 16px; font-size: 12px; }
.ds-btn-lg  { padding: 14px 36px; font-size: 15px; }
.ds-btn-w   { width: 100%; }

/* ══════════════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════════════ */
.ds-fg { margin-bottom: 16px; }
.ds-label {
    display: block; font-size: 11px; font-weight: 800; color: var(--ink);
    margin-bottom: 6px; font-family: var(--font-display);
    letter-spacing: .06em; text-transform: uppercase;
}
.ds-input {
    width: 100%; padding: 11px 14px; font-size: 14px; font-family: var(--font-body);
    border: 2px solid var(--gray-200); border-radius: var(--r-sm);
    background: var(--white); color: var(--ink); transition: border-color .18s, box-shadow .18s;
    appearance: auto;
}
.ds-input:focus   { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(26,26,26,.07); }
.ds-input:disabled { background: var(--gray-100); opacity: .65; cursor: not-allowed; }
.ds-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* ── Flash / Alerts ── */
.ds-flash {
    padding: 11px 14px; border-radius: var(--r-sm);
    font-size: 13px; margin-bottom: 14px; font-weight: 600;
}
.ds-flash-error   { background: #fff1f0; color: #c0392b; border: 1.5px solid #fecaca; }
.ds-flash-success { background: var(--green-light); color: #166534; border: 1.5px solid #bbf7d0; }
.ds-flash-warning { background: var(--yellow-light); color: #92400e; border: 1.5px solid #fde68a; }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES  (login / signup / forgot / reset)
   ══════════════════════════════════════════════════════════════ */
.ds-auth-wrap {
    min-height: 100vh;
    display: grid; grid-template-columns: 1fr 1fr;
}
@media(max-width:768px){ .ds-auth-wrap { grid-template-columns: 1fr; } .ds-auth-left { display: none; } }

.ds-auth-left {
    background: var(--ink);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 44px; position: relative; overflow: hidden;
}
.ds-auth-left::before {
    content:''; position:absolute; top:-100px; right:-80px;
    width:280px; height:280px; border-radius:50%;
    background:rgba(255,95,87,.1);
}
.ds-auth-left::after {
    content:''; position:absolute; bottom:-80px; left:-60px;
    width:220px; height:220px; border-radius:50%;
    background:rgba(255,95,87,.06);
}
.ds-auth-brand { display: flex; align-items: center; gap: 12px; z-index: 1; }
.ds-auth-brand-mark {
    width: 44px; height: 44px; border-radius: 12px; background: var(--coral);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--white);
    box-shadow: 0 4px 16px rgba(255,95,87,.45); flex-shrink: 0;
}
.ds-auth-brand-name {
    font-family: var(--font-display); font-size: 18px; font-weight: 800;
    color: var(--white); letter-spacing: -0.03em;
}
.ds-auth-brand-name span { color: var(--coral); }
.ds-auth-illo { flex: 1; display: flex; align-items: center; justify-content: center; z-index: 1; padding: 28px 0; }
.ds-auth-tagline { z-index: 1; }
.ds-auth-tagline h2 {
    font-family: var(--font-display); font-size: 26px; font-weight: 800;
    color: var(--white); margin-bottom: 10px; line-height: 1.2;
}
.ds-auth-tagline p { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.6; }

.ds-auth-right {
    background: var(--bg);
    display: flex; align-items: center; justify-content: center; padding: 44px 40px;
}
.ds-auth-box { width: 100%; max-width: 400px; }
.ds-auth-box h1 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.ds-auth-box .ds-auth-sub { font-size: 14px; color: var(--gray-500); margin-bottom: 32px; font-weight: 500; }
.ds-auth-links { text-align: center; margin-top: 18px; font-size: 13px; color: var(--gray-500); }
.ds-auth-links a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ds-divider { border: none; height: 1px; background: var(--gray-200); margin: 20px 0; }

/* ── Badge ── */
.ds-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 50px;
    font-size: 11px; font-weight: 700; font-family: var(--font-display);
}
.ds-badge-coral  { background: var(--coral-light); color: var(--coral); }
.ds-badge-green  { background: var(--green-light);  color: #166534; }
.ds-badge-yellow { background: var(--yellow-light); color: #92400e; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* ── Responsive ── */
@media(max-width:768px) { .ds-sidebar { display: none; } .ds-layout { margin-left: 0; } }
