/* ============================================================
   Lecture+ College Portal · portal.css
   Aesthetic: Swiss / High-Contrast — authority, clarity, truth.
   Palette derived from /app/design_guidelines.json
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --canvas-2: #f1f5f9;
  --brand: #0f172a;
  --brand-ink: #f8fafc;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --whatsapp: #25d366;
  --whatsapp-ink: #ffffff;
  --focus: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-width: 320px;
    overflow-x: hidden;
}



::selection { background: var(--ink); color: var(--brand-ink); }

h1, h2, h3, h4, h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}
/*h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }*/

h1 {
    font-size: 24px;
    font-weight: 700;
}

h2 {
    font-size: 18px;
    font-weight: 700;
}

h3 {
    font-size: 15px;
    font-weight: 700;
}
p  { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--ink);
}

.login-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #2563eb 120%);
    padding: 48px 56px;
    color: var(--brand-ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.4), transparent 65%);
}
.login-hero .brand-mark {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--brand-ink); color: var(--ink);
  font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 24px;
}
.login-hero .kicker {
  text-transform: uppercase; letter-spacing: 0.24em;
  font-size: 11px; color: rgba(248, 250, 252, 0.6);
  margin-top: 40px;
}
.login-hero h2 {
  color: var(--brand-ink);
  font-size: 42px;
  margin-top: 12px;
  line-height: 1.1;
  max-width: 440px;
}
.login-hero .tagline { color: rgba(248, 250, 252, 0.7); margin-top: 24px; max-width: 380px; }
.login-hero .stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 64px; z-index: 1; position: relative;
}
.login-hero .stat p:first-child { font-family: 'Plus Jakarta Sans'; font-size: 32px; font-weight: 800; }
.login-hero .stat p:last-child { color: rgba(248, 250, 252, 0.6); font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; }

.login-panel {
    background: var(--surface);
    padding: 56px 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.login-card { max-width: 400px; width: 100%; }
.login-card .kicker { text-transform: uppercase; letter-spacing: 0.24em; font-size: 11px; color: var(--muted); }
.login-card h1 { margin-top: 12px; margin-bottom: 8px; }
.login-card .sub { color: var(--muted); margin-bottom: 32px; }

.field-group { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }

.input, .select, .textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  outline: none;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
select.input, select.select { appearance: none; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat right 14px center var(--surface); padding-right: 36px; }

.primary, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--brand-ink);
  padding: 12px 22px; border: 0; border-radius: var(--radius);
  font-family: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.primary:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); background: #111827; }
.primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.btn-secondary:hover { border-color: var(--ink); background: var(--canvas-2); }

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border: 0; border-radius: var(--radius);
  font-weight: 600; font-size: 13px; cursor: pointer;
  transition: transform 120ms, box-shadow 120ms;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--whatsapp); color: var(--whatsapp-ink);
  padding: 10px 18px; border: 0; border-radius: var(--radius);
  font-weight: 600; font-size: 13px; cursor: pointer;
  transition: transform 120ms, box-shadow 120ms, filter 120ms;
}
.btn-whatsapp:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); }
.btn-whatsapp::before { content: "◉"; }

.btn-danger-ghost {
  background: transparent; color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3); padding: 8px 14px;
  border-radius: var(--radius); font-weight: 600; font-size: 12px; cursor: pointer;
}
.btn-danger-ghost:hover { background: rgba(239, 68, 68, 0.08); }

.role-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--canvas-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; margin-bottom: 20px; }
.role-toggle label { text-align: center; padding: 9px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); cursor: pointer; transition: background 120ms, color 120ms; }
.role-toggle input { position: absolute; opacity: 0; }
.role-toggle input:checked + label { background: var(--ink); color: var(--brand-ink); }

.error {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: inline-block;
}
.notice {
  color: var(--ink-3);
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}
.success {
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.helper-links { display: flex; justify-content: space-between; margin-top: 24px; color: var(--muted); font-size: 12px; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--canvas);
}

.sidebar {
    background: var(--ink);
    color: var(--brand-ink);
    padding: 22px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid rgba(248, 250, 252, 0.08); }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-ink); color: var(--ink); font-family: 'Plus Jakarta Sans'; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.brand-mark span { color: var(--accent); }
.brand-title { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-size: 14px; color: var(--brand-ink); }
.brand-sub { font-size: 11px; color: rgba(248, 250, 252, 0.55); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 2px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius);
  color: rgba(248, 250, 252, 0.72); font-size: 13px; font-weight: 500;
  transition: background 120ms, color 120ms;
}
.nav-item:hover { background: rgba(248, 250, 252, 0.06); color: var(--brand-ink); text-decoration: none; }
.nav-item.active { background: var(--brand-ink); color: var(--ink); }
.nav-icon { font-size: 15px; opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer { border-top: 1px solid rgba(248, 250, 252, 0.08); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.user-name { font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.user-role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(248, 250, 252, 0.5); }
.signout { font-size: 12px; color: rgba(248, 250, 252, 0.7); padding: 8px 12px; border-radius: var(--radius); background: rgba(248, 250, 252, 0.06); text-align: left; }
.signout:hover { background: rgba(248, 250, 252, 0.12); text-decoration: none; color: var(--brand-ink); }

/* ============================================================
   WORKSPACE
   ============================================================ */
.workspace { display: flex; flex-direction: column; min-height: 100vh; }
.workspace-header {
  background: var(--surface);
  padding: 24px 40px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 6px; }
.workspace-title { font-family: 'Plus Jakarta Sans'; font-size: 24px; font-weight: 800; color: var(--ink); }
.workspace-header-actions { display: flex; align-items: center; gap: 12px; }
.ping-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.date-chip { font-size: 12px; color: var(--muted); background: var(--canvas-2); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }

.workspace-body { padding: 32px 40px; flex: 1; display: flex; flex-direction: column; gap: 28px; }

.workspace-foot { padding: 20px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; background: var(--surface); }

/* ============================================================
   PANELS & CARDS
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-body {
    padding: 20px 22px;
}

.card-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .card-head h2, .card-head h3 {
        display: flex;
        align-items: center;
        gap: 8px;
    }

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.grid {
    display: grid;
    gap: 16px;
}

    .grid.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid.cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

@media (max-width: 1280px) {
    .grid.cols-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .grid.cols-3, .grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

    .stat-card::after {
        content: "";
        position: absolute;
        right: -30px;
        top: -30px;
        width: 120px;
        height: 120px;
        background: radial-gradient(circle, rgba(37, 99, 235, 0.06), transparent 70%);
    }

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 600;
}

.stat-value {
    font-family: 'Plus Jakarta Sans';
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
}

.stat-delta {
    font-size: 12px;
    font-weight: 600;
}

    .stat-delta.up {
        color: var(--success);
    }

    .stat-delta.down {
        color: var(--danger);
    }

.stat-hint {
    font-size: 11px;
    color: var(--muted);
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
.workspace {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.workspace-header {
    background: var(--surface);
    padding: 18px 28px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
}

.crumb {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 4px;
}

.workspace-title {
    font-family: 'Plus Jakarta Sans';
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
}

.workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.date-chip {
    font-size: 12px;
    color: var(--muted);
    background: var(--canvas-2);
    border: 1px solid var(--line);
    padding: 5px 10px;
    border-radius: 999px;
}

.workspace-body {
    padding: 24px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.workspace-foot {
    padding: 16px 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    background: var(--surface);
    flex-wrap: wrap;
    gap: 8px;
}
 /* Small desktops / laptops (1366 × 768 sweet spot) */
@media (max-width: 1440px) {
    .workspace-title {
        font-size: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .card-body {
        padding: 18px 20px;
    }

    .workspace-body {
        padding: 20px 24px;
        gap: 18px;
    }

    .workspace-header {
        padding: 16px 24px;
    }

    .workspace-foot {
        padding: 14px 24px;
    }
}

/* Mid laptops */
@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: 208px minmax(0, 1fr);
    }

    .sidebar {
        padding: 20px 12px 14px;
        gap: 20px;
    }

    .brand-title {
        font-size: 13px;
    }

    .brand-sub {
        display: none;
    }

    .nav-item {
        padding: 9px 10px;
        font-size: 12.5px;
    }

    .workspace-header, .workspace-body, .workspace-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .chart-container {
        height: 240px;
    }
}

/* Tablets */
@media (max-width: 960px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 32px 28px;
    }

        .login-hero h2 {
            font-size: 30px;
        }

        .login-hero .stats {
            margin-top: 32px;
            gap: 16px;
        }

    .login-panel {
        padding: 32px 24px;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        padding: 16px 16px 12px;
    }

    .sidebar-brand {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .sidebar-footer {
        border-top: 0;
        padding-top: 0;
    }

    .workspace-header, .workspace-body, .workspace-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .workspace-title {
        font-size: 18px;
    }
}

/* Phones */
@media (max-width: 640px) {
    h1 {
        font-size: 20px;
    }

    .card-head {
        padding: 14px 16px;
    }

    .card-body {
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .filter-strip {
        grid-template-columns: 1fr;
    }

        .filter-strip .actions {
            margin-top: 8px;
        }

    .login-hero {
        padding: 24px 20px;
    }

        .login-hero h2 {
            font-size: 24px;
        }

   .login-panel {
  background: var(--surface);
  padding: 56px 72px;
  display: flex; flex-direction: column; justify-content: center;
}

    .role-toggle {
        grid-template-columns: 1fr;
    }

    .helper-links {
        flex-direction: column;
        gap: 6px;
    }
}

.stat-card { padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; background: radial-gradient(circle, rgba(37, 99, 235, 0.06), transparent 70%); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); font-weight: 600; }
.stat-value { font-family: 'Plus Jakarta Sans'; font-size: 32px; font-weight: 800; color: var(--ink); }
.stat-delta { font-size: 12px; font-weight: 600; }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-hint { font-size: 12px; color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; background: var(--canvas-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill.success { background: rgba(16, 185, 129, 0.1); color: #065f46; border-color: rgba(16, 185, 129, 0.3); }
.pill.warn { background: rgba(245, 158, 11, 0.1); color: #92400e; border-color: rgba(245, 158, 11, 0.3); }
.pill.danger { background: rgba(239, 68, 68, 0.1); color: #991b1b; border-color: rgba(239, 68, 68, 0.3); }
.pill.accent { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; border-color: rgba(37, 99, 235, 0.3); }

/* ============================================================
   FORMS / FILTER STRIP
   ============================================================ */
.filter-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

    .filter-strip .field {
        gap: 4px;
    }

    .filter-strip .actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 20px;
        flex-wrap: wrap;
    }


/* ============================================================
   TABLES
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .data-table thead th {
        text-align: left;
        padding: 10px 14px;
        background: var(--canvas-2);
        color: var(--muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        font-weight: 600;
        border-bottom: 1px solid var(--line);
        white-space: nowrap;
    }

    .data-table tbody td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
        color: var(--ink-2);
        vertical-align: middle;
    }

    .data-table tbody tr:hover {
        background: var(--canvas-2);
    }

    .data-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .data-table.compact tbody td {
        padding: 8px 12px;
    }
/* When a table sits directly inside a card, allow horizontal scroll on narrow screens */
.card > table.data-table, .card > .data-table {
    display: block;
    overflow-x: auto;
}

    .card > table.data-table > thead, .card > .data-table > thead,
    .card > table.data-table > tbody, .card > .data-table > tbody {
        display: table;
        width: 100%;
        table-layout: auto;
        min-width: 640px;
    }

/*.status-radio { display: inline-flex; align-items: center; gap: 4px; }
.status-radio label { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; color: var(--muted); cursor: pointer; background: var(--surface); }
.status-radio input { position: absolute; opacity: 0; pointer-events: none; }
.status-radio input:checked + label.present { background: var(--success); border-color: var(--success); color: white; }
.status-radio input:checked + label.absent { background: var(--danger); border-color: var(--danger); color: white; }
.status-radio input:checked + label.late { background: var(--warn); border-color: var(--warn); color: white; }*/
.status-radio-list {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .status-radio-list input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .status-radio-list label {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 600;
        color: var(--muted);
        cursor: pointer;
        background: var(--surface);
    }

    /* PRESENT */
    .status-radio-list input[type="radio"]:nth-of-type(1):checked + label {
        background: var(--success);
        border-color: var(--success);
        color: white;
    }

    /* ABSENT */
    .status-radio-list input[type="radio"]:nth-of-type(2):checked + label {
        background: var(--danger);
        border-color: var(--danger);
        color: white;
    }

    /* LATE */
    .status-radio-list input[type="radio"]:nth-of-type(3):checked + label {
        background: var(--warn);
        border-color: var(--warn);
        color: white;
    }
.empty-state { padding: 60px 40px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 4px; }

/* ============================================================
   CHARTS
   ============================================================ */
.chart-container {
    position: relative;
    height: 260px;
}

    .chart-container.tall {
        height: 340px;
    }


/* ============================================================
   Toast / notices
   ============================================================ */
.toast-stack { position: fixed; top: 24px; right: 24px; z-index: 50; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: var(--brand-ink); padding: 12px 18px; border-radius: var(--radius); font-size: 13px; box-shadow: var(--shadow-lg); animation: slideIn 200ms ease-out; }
.toast.success { background: var(--success); }
.toast.danger { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* small helpers */
.hstack { display: flex; align-items: center; gap: 10px; }
.vstack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
hr.sep { border: 0; border-top: 1px dashed var(--line); margin: 20px 0; }

/* Login media query */
@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 40px; }
  .login-panel { padding: 40px 32px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .workspace-body, .workspace-header, .workspace-foot { padding-left: 20px; padding-right: 20px; }
}
