/* ── CSS VARIABLES ──────────────────────────────── */
:root {
  --navy:       #0a2837;
  --navy-mid:   #11435c;
  --navy-glow:  rgba(0,0,0,.10);
  --amber:      #00824b;
  --amber-dk:   #00824b;
  --amber-lt:   #fef3ee;
  --amber-ring: rgba(213,67,8,.25);
  --page-bg:    #f8f8fa;
  --card-bg:    #fff;
  --border:     #e5e5e5;
  --text:       #222222;
  --muted:      #666666;
  --radius: 4px;
  --sidebar-w:  240px;
}

/* ── RESET ─────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Roboto', sans-serif; font-variation-settings: '"wdth" 100'; background: var(--page-bg); min-height: 100vh; color: var(--text); }

/* ── AUTH ──────────────────────────────────────── */
.auth-wrap { min-height: 100vh; height: 100vh; display: flex; flex-direction: row; background: var(--page-bg); }
.auth-left {
  width: 46%; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden; flex-shrink: 0;
}
.auth-left::before {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(213,67,8,.06);
  top: -60px; right: -60px; pointer-events: none;
}
.auth-left::after {
  content: ''; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.03);
  bottom: -100px; right: -80px; pointer-events: none;
}
.auth-left-logo { margin-bottom: 2.5rem; }
.auth-left-logo-row { display: flex; align-items: center; gap: 12px; }
.auth-left-logo-icon { width: 44px; height: 44px; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-left-logo-name { font-family: 'Roboto', sans-serif; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.auth-left-brand { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 4px; font-weight: 600; padding-left: 56px; letter-spacing: .06em; text-transform: uppercase; }
.auth-left h1 { font-family: 'Roboto', sans-serif; font-size: 30px; font-weight: 700; color: #fff; line-height: 1.3; letter-spacing: -.02em; margin-bottom: 1rem; }
.auth-left h1 span { color: var(--amber); }
.auth-left p { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.75; max-width: 340px; margin-bottom: 2rem; }

/* Left panel feature list */
.auth-features { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.7); }
.auth-feat-icon { width: 30px; height: 30px; border-radius: 4px; background: rgba(213,67,8,.15); border: 1px solid rgba(213,67,8,.25); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }

.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--page-bg); }
.auth-card { background: #fff; border-radius: 4px; border: 1px solid var(--border); padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.auth-card h2 { font-family: 'Roboto', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -.02em; }
.auth-card > p { font-size: 13px; color: var(--muted); margin-bottom: 2rem; }

/* ── FIELDS ────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 11px; font-weight: 700; color: #333333; margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.field input, .field select { width: 100%; padding: 11px 16px; min-height: 44px; border: 1px solid var(--border); border-radius: 4px; font-size: 16px; background: #fff; color: var(--text); font-family: 'Roboto', sans-serif; transition: .2s; }
.field input::placeholder { color: #b1bac2; }
.field input:focus, .field select:focus { outline: none; border-color: var(--amber-dk); box-shadow: 0 0 0 3px var(--amber-ring); }

/* Input with icon wrapper */
.input-wrap { position: relative; }
.input-wrap .i-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #b1bac2; pointer-events: none; display: flex; align-items: center; }
.input-wrap .i-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.input-wrap input { padding-left: 40px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #999999; display: flex; align-items: center; padding: 4px; }
.eye-btn:hover { color: var(--navy); }
.eye-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── BUTTONS (Blueprint) ─────────────────────── */
.btn-primary {
  width: 100%; padding: 15px 22px; min-height: 52px;
  background: #00824b;
  color: #ffffff; border: none; border-radius: 4px;
  font-size: 16px; font-weight: 600; font-family: 'Roboto', sans-serif;
  cursor: pointer; letter-spacing: .01em; transition: .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn-primary:hover { background: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)), #00824b; transform: translateY(-1px); }
.btn-primary:disabled { background: #b1bac2; color: #e5e5e5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: #ffffff; color: var(--navy); border: 1px solid var(--border); border-radius: 4px; padding: 11px 18px; font-size: 14px; font-weight: 600; font-family: 'Roboto', sans-serif; cursor: pointer; transition: .2s; min-height: 44px; }
.btn-ghost:hover { background: #f8f8fa; border-color: var(--navy); color: var(--navy); }
.btn-sm { width: auto; padding: 11px 22px; font-size: 14px; min-height: 44px; }
.btn-signout { width: 100%; background: rgba(255,255,255,.07); color: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.14); border-radius: 4px; padding: 8px; font-size: 12px; font-weight: 600; font-family: 'Roboto', sans-serif; cursor: pointer; transition: .2s; min-height: 40px; }
.btn-signout:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── MISC AUTH ─────────────────────────────────── */
.err { color: #D54308; font-size: 13px; margin-top: 8px; font-weight: 500; }
.toggle-link { text-align: center; margin-top: 1.25rem; font-size: 13px; color: var(--muted); }
.toggle-link a { color: var(--navy); text-decoration: none; cursor: pointer; font-weight: 600; }
.reset-box { margin-top: 1rem; background: #fef3ee; border: 1.5px solid rgba(213,67,8,.3); border-radius: 4px; padding: 1.25rem; }
.reset-box > p { font-size: 13px; color: #D54308; margin-bottom: 1rem; font-weight: 500; }
.attempts-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.attempt-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5e5e5; border: 1.5px solid #999999; }
.attempt-dot.used { background: var(--navy); border-color: var(--navy); }
.success-msg { color: #00824b; font-size: 13px; display: flex; align-items: center; gap: 6px; font-weight: 600; }

/* Email chip */
.email-chip { background: var(--amber-lt); border: 1px solid rgba(213,67,8,.4); border-radius: 4px; padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.email-chip span { font-size: 13px; font-weight: 600; color: var(--navy); word-break: break-all; }

/* ── APP LAYOUT ────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────── */
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy) 0%, #0a2837 100%); flex-shrink: 0; display: flex; flex-direction: column; transition: transform .3s ease; z-index: 50; }
.sidebar-logo { padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo-row { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon { width: 36px; height: 36px; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-logo-name { font-family: 'Roboto', sans-serif; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.sidebar-by { font-size: 10px; color: rgba(255,255,255,.35); margin-top: 2px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.nav-section { font-size: 10px; font-weight: 500; color: rgba(255,255,255,.35); letter-spacing: .8px; text-transform: uppercase; padding: 1rem 1.25rem 5px; }
.nav-item { padding: 9px 1.25rem; font-size: 13px; font-weight: 500; cursor: pointer; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 10px; transition: .15s; border-right: 2px solid transparent; border-radius: 0; min-height: 44px; }
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.nav-item.active { background: rgba(0,130,75,.15); color: #00824b; border-right-color: #00824b; font-weight: 600; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 1.25rem; }
.sidebar-user-card { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--amber); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--navy); flex-shrink: 0; }
.user-info .user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 148px; }
.user-info .user-role { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 1px; letter-spacing: .04em; text-transform: uppercase; }

/* ── TOPBAR (mobile/tablet) ────────────────────── */
.topbar { display: none; align-items: center; justify-content: space-between; padding: 0 1rem; height: 56px; background: var(--navy); position: sticky; top: 0; z-index: 60; flex-shrink: 0; }
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.topbar-logo-icon { width: 28px; height: 28px; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.topbar-logo-icon svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2.5; }
.topbar-logo-name { font-family: 'Roboto', sans-serif; font-size: 16px; font-weight: 700; color: #fff; }
.hamburger { width: 44px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; border-radius: 4px; transition: .2s; }
.hamburger:hover { background: rgba(255,255,255,.1); }
.hamburger span { width: 20px; height: 2px; background: #fff; border-radius: 4px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── DRAWER OVERLAY ────────────────────────────── */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 49; opacity: 0; transition: opacity .3s; }
.drawer-overlay.active { opacity: 1; }

/* ── MAIN ──────────────────────────────────────── */
.main { flex: 1; padding: 2.5rem; overflow-y: auto; background: var(--page-bg); min-width: 0; }
.page-header { margin-bottom: 2rem; }
.page-title { font-family: 'Roboto', sans-serif; font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.page-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ── METRICS ───────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 2rem; }
.metric { background: var(--card-bg); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1rem; border-top: 2px solid #999999; box-shadow: 0 2px 8px var(--navy-glow); }
.metric .m-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.metric .m-value { font-family: 'Roboto', sans-serif; font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.metric .m-value.good { color: #00824b; }
.metric .m-value.bad  { color: #D54308; }

/* ── CARDS ─────────────────────────────────────── */
.card { background: var(--card-bg); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; box-shadow: 0 2px 8px var(--navy-glow); }
.card-title { font-family: 'Roboto', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; letter-spacing: -.01em; }

/* ── TABLE ─────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; padding: 9px 14px; font-weight: 500; font-size: 10px; color: #999999; border-bottom: 0.5px solid var(--border); letter-spacing: .5px; text-transform: uppercase; background: #f8f8fa; }
td { padding: 12px 14px; border-bottom: 0.5px solid #e5e5e5; color: #333333; font-size: 12px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f8fa; }

/* ── MOBILE TABLE → CARDS ──────────────────────── */
.mobile-cards { display: none; flex-direction: column; gap: 10px; }
.m-card { background: var(--card-bg); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.m-card-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; }
.m-card-row:last-child { margin-bottom: 0; }
.m-card-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.m-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

/* ── BADGES ────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.badge-present { background: #e5f9f0; color: #006838; }
.badge-absent  { background: #fef3ee; color: #993c1d; }
.badge-warn    { background: var(--amber-lt); color: #D54308; }
.badge-info    { background: #e6f3fa; color: #1f7ead; }

/* ── UPLOAD ────────────────────────────────────── */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2.5rem; text-align: center; cursor: pointer; transition: .2s; background: #f8f8fa; }
.upload-zone:hover { border-color: var(--amber-dk); background: var(--amber-lt); }
.upload-icon { width: 52px; height: 52px; background: var(--amber-lt); border: 1px solid rgba(213,67,8,.3); border-radius: 4px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.upload-icon svg { width: 22px; height: 22px; stroke: var(--amber-dk); fill: none; stroke-width: 1.5; }
.upload-zone p { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ── FORM FIELDS ───────────────────────────────── */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-size: 11px; font-weight: 700; color: #333333; margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 11px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 16px; background: #fff; color: var(--text); font-family: 'Roboto', sans-serif; transition: .2s; min-height: 44px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #b1bac2; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--amber-dk); box-shadow: 0 0 0 3px var(--amber-ring); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.filter-row { display: flex; gap: 10px; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: center; }
.filter-input { padding: 11px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 16px; background: #fff; color: var(--text); font-family: 'Roboto', sans-serif; min-height: 44px; transition: .2s; }
.filter-input:focus { outline: none; border-color: var(--amber-dk); box-shadow: 0 0 0 3px var(--amber-ring); }

/* ── LEARNER PROGRAMME HEADER ──────────────────── */
.prog-header { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); border-radius: 4px; padding: 1.75rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1.25rem; }
.prog-avatar { width: 56px; height: 56px; border-radius: 4px; background: var(--amber); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: var(--navy); flex-shrink: 0; }
.prog-info h2 { font-family: 'Roboto', sans-serif; font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.prog-info p { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 3px; }
.att-bar { height: 6px; background: rgba(255,255,255,.15); border-radius: 4px; overflow: hidden; margin-top: 10px; width: 200px; }
.att-bar-fill { height: 100%; border-radius: 4px; background: var(--amber); }
.att-bar-fill.low { background: rgba(213,67,8,.3); }
.att-pct { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 5px; }

/* ── BOTTOM NAV (learner mobile) ───────────────── */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: #fff; border-top: 1px solid var(--border); z-index: 60; align-items: stretch; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: #999999; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; transition: .15s; border: none; background: transparent; font-family: 'Roboto', sans-serif; min-height: 44px; }
.bottom-nav-item svg { width: 18px; height: 18px; }
.bottom-nav-item.active { color: var(--navy); }
.bottom-nav-item.active svg { stroke: var(--navy); }

/* ── MODAL ─────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); padding: 1rem; }
.modal { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 1.75rem; width: 100%; max-width: 420px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.modal h3 { font-family: 'Roboto', sans-serif; font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; letter-spacing: -.01em; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.5rem; }

/* ── PREVIEW PANEL ─────────────────────────────── */
.preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: flex-end; justify-content: flex-end; backdrop-filter: blur(2px); }
.preview-panel { width: 560px; height: 100vh; background: var(--page-bg); display: flex; flex-direction: column; overflow: hidden; box-shadow: -8px 0 40px rgba(0,0,0,.18); }
.preview-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.preview-badge { background: var(--amber-lt); color: var(--navy); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid rgba(213,67,8,.3); }
.preview-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.preview-tabs { display: flex; gap: 4px; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.preview-tab { padding: 8px 18px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s; }
.preview-tab:hover { color: var(--text); }
.preview-tab.active { color: var(--navy); border-bottom-color: var(--amber); font-weight: 600; }
.upload-tab.active { color: var(--navy); border-bottom-color: var(--amber); }
.btn-view { background: var(--amber-lt); color: var(--navy); border: 1px solid rgba(213,67,8,.35); border-radius: 4px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Roboto', sans-serif; transition: .2s; white-space: nowrap; }
.btn-view:hover { background: rgba(213,67,8,.2); }

/* ── DELETE PANEL ──────────────────────────────── */
.delete-result-item { padding: 10px 14px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 6px; cursor: pointer; transition: background .15s; }
.delete-result-item:hover { background: var(--amber-lt); border-color: rgba(213,67,8,.4); }
.delete-result-item.active { background: var(--amber-lt); border-color: rgba(213,67,8,.5); border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; }
.delete-learner-wrapper { margin-bottom: 6px; }
.delete-learner-wrapper .delete-result-item { margin-bottom: 0; }

/* ── MISC ──────────────────────────────────────── */
.sheet-note { background: var(--amber-lt); border: 1px solid rgba(213,67,8,.3); border-radius: 4px; padding: 10px 14px; font-size: 13px; color: #D54308; margin-bottom: 1.25rem; font-weight: 500; }
.desktop-only-notice { display: none; min-height: 100vh; align-items: center; justify-content: center; flex-direction: column; background: var(--navy); text-align: center; padding: 2rem; }

/* ── WELCOME BANNER ────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 4px; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.welcome-text { font-family: 'Roboto', sans-serif; font-size: 18px; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.welcome-sub  { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 3px; }

/* ── PASSWORD RESET BOX ────────────────────────── */
.admin-reset-box { margin-top: 1rem; background: #fef3ee; border: 1.5px solid rgba(213,67,8,.3); border-radius: 4px; padding: 1.25rem; }
.admin-reset-box p { font-size: 13px; color: #D54308; margin-bottom: 1rem; font-weight: 500; }
.pw-rules { font-size: 12px; color: var(--muted); margin-bottom: 1rem; background: #f8f8fa; border-radius: 4px; padding: 10px 12px; line-height: 1.8; }
.pw-rules strong { color: #333333; }

/* ════════════════════════════════════════════════
   RESPONSIVE — ADMIN DESKTOP LOCK + LEARNER COMPAT
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sidebar { position: fixed; top: 0; left: 0; height: 100%; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .topbar { display: flex; }
  .app { flex-direction: column; }
  .main { padding: 1.5rem; }
  .drawer-overlay { display: block; }
  .auth-left p { display: none; }
  .auth-left { padding: 2rem; }
  .auth-left h1 { font-size: 24px; }
  .auth-features { display: none; }
}
@media (max-width: 768px) {
  .auth-left { width: 40%; padding: 1.5rem; }
  .auth-left h1 { font-size: 20px; }
  .auth-left-logo-name { font-size: 18px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .prog-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .att-bar { width: 100%; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-input { width: 100%; }
}
@media (max-width: 480px) {
  .auth-wrap { flex-direction: column; }
  .auth-left { width: 100%; padding: 1.5rem 1.25rem; min-height: auto; justify-content: flex-start; padding-top: 2rem; }
  .auth-left::after { display: none; }
  .auth-left h1 { font-size: 18px; margin-bottom: .5rem; }
  .auth-left-logo { margin-bottom: 1rem; }
  .auth-right { padding: 1.25rem; }
  .auth-card { padding: 1.5rem; border-radius: 4px; }
  .auth-card h2 { font-size: 18px; }
  .main { padding: 1rem 1rem 80px; }
  .page-title { font-size: 20px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric .m-value { font-size: 24px; }
  .metric { padding: 1rem; }
  .card { padding: 1rem; }
  .prog-header { padding: 1.25rem; }
  .prog-avatar { width: 44px; height: 44px; font-size: 16px; }
  .prog-info h2 { font-size: 16px; }
  .tbl-wrap table { display: none; }
  .mobile-cards { display: flex; }
  .bottom-nav { display: flex; }
  .modal { border-radius: 4px; padding: 1.25rem; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn-ghost, .modal-footer .btn-primary { width: 100%; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .auth-left { width: 44%; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════
   DASHBOARD — REDESIGNED SECTIONS
════════════════════════════════════════════════ */

/* ── GREETING BANNER ───────────────────────────── */
.dash-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a2837 0%, #0a2837 100%);
  border-radius: 4px; padding: 2rem 2rem;
  min-height: 120px;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
/* decorative blurred circles */
.dash-bc { position: absolute; border-radius: 50%; pointer-events: none; }
.dash-bc1 { width: 220px; height: 220px; background: rgba(213,67,8,.07); top: -60px; right: 120px; }
.dash-bc2 { width: 140px; height: 140px; background: rgba(0,130,75,.08); bottom: -50px; right: 30px; }
.dash-bc3 { width: 80px;  height: 80px;  background: rgba(255,255,255,.04); top: 10px; left: 260px; }

.dash-banner-left { position: relative; z-index: 1; }
.dash-banner-eyebrow { font-size: 10px; font-weight: 700; color: rgba(213,67,8,.7); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.dash-banner-greeting { font-family: 'Roboto', sans-serif; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; line-height: 1.2; }
.dash-banner-sub { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 6px; }

.dash-banner-avatar-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.dash-banner-avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; }
.dash-banner-role { font-size: 10px; font-weight: 700; color: rgba(213,67,8,.8); letter-spacing: .08em; text-transform: uppercase; }

/* ── STAT CARDS (scoped to #adminMetrics only) ─── */
#adminMetrics .metric {
  position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  cursor: default;
  padding: 1.4rem;
  border-top-width: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
#adminMetrics .metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}

/* colored top borders */
#adminMetrics .metric:nth-child(1) { border-top-color: #1f7ead; }
#adminMetrics .metric:nth-child(2) { border-top-color: #00824b; }
#adminMetrics .metric:nth-child(3) { border-top-color: #00824b; }
#adminMetrics .metric:nth-child(4) { border-top-color: #0a2837; }

/* faded background icon — top right corner */
#adminMetrics .metric::before {
  content: ''; position: absolute;
  right: 10px; top: 10px;
  width: 70px; height: 70px;
  opacity: 0.1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
#adminMetrics .metric:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232196F3' stroke-width='1.5'%3E%3Cpath d='M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 00-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 010 7.75'/%3E%3C/svg%3E");
}
#adminMetrics .metric:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300BFA5' stroke-width='1.5'%3E%3Cpath d='M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z'/%3E%3C/svg%3E");
}
#adminMetrics .metric:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC107' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
#adminMetrics .metric:nth-child(4)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F97316' stroke-width='1.5'%3E%3Cpath d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
}

/* bigger Roboto numbers */
#adminMetrics .metric .m-value {
  font-family: 'Roboto', sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 4px;
}

/* description note via ::after on the m-value */
#adminMetrics .metric .m-value::after {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #999999;
  margin-top: 2px;
  letter-spacing: 0;
}
#adminMetrics .metric:nth-child(1) .m-value::after { content: 'enrolled across all batches'; }
#adminMetrics .metric:nth-child(2) .m-value::after { content: 'active programmes'; }
#adminMetrics .metric:nth-child(3) .m-value::after { content: 'running instances'; }
#adminMetrics .metric:nth-child(4) .m-value::after { content: 'Zoom sheets configured'; }

/* ── BATCH OVERVIEW CARD ───────────────────────── */
.dash-section-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 1.1rem; }
.dash-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dash-section-title { font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 600; color: #0a2837; letter-spacing: -.01em; }

/* Batch table visual rows */
.dash-batch-card #batchSummaryTable th { background: #f8f8fa; }
.dash-batch-card #batchSummaryTable tbody td:first-child {
  font-weight: 700; color: #0a2837;
  padding-left: 24px; position: relative;
}
.dash-batch-card #batchSummaryTable tbody td:first-child::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: #00824b;
}
.dash-batch-card #batchSummaryTable tbody tr:nth-child(2) td:first-child::before { background: #1f7ead; }
.dash-batch-card #batchSummaryTable tbody tr:nth-child(3) td:first-child::before { background: #00824b; }
.dash-batch-card #batchSummaryTable tbody tr:nth-child(4) td:first-child::before { background: #0a2837; }
.dash-batch-card #batchSummaryTable tbody tr:nth-child(5) td:first-child::before { background: #1f7ead; }
.dash-batch-card #batchSummaryTable tbody tr:nth-child(6) td:first-child::before { background: #0a2837; }

/* Learner count as pill */
.dash-batch-card #batchSummaryTable tbody td:last-child {
  font-family: 'Roboto', sans-serif; font-weight: 700; color: #0a2837; font-size: 14px;
}

/* ── TWO-COLUMN GRID ───────────────────────────── */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Upload rows */
.dash-upload-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 4px;
  margin-bottom: 8px;
  background: #f8f8fa;
}
.dash-upload-icon {
  width: 38px; height: 38px; border-radius: 4px;
  background: rgba(10,40,55,.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-upload-info { flex: 1; min-width: 0; }
.dash-upload-name { font-size: 13px; font-weight: 600; color: #333333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-upload-meta { font-size: 11px; color: #999999; margin-top: 2px; }
.dash-upload-counts { display: flex; gap: 6px; flex-shrink: 0; }
.dash-cnt-p { font-size: 12px; font-weight: 700; color: #00824b; background: #e5f9f0; padding: 3px 8px; border-radius: 4px; }
.dash-cnt-a { font-size: 12px; font-weight: 700; color: #D54308; background: #fef3ee; padding: 3px 8px; border-radius: 4px; }
.dash-upload-hint { font-size: 12px; color: #b1bac2; text-align: center; padding: 1rem 0; }

/* Alert cards column */
.dash-alerts-col { display: flex; flex-direction: column; gap: 10px; }
.dash-alert-card {
  background: #fff; border: 1px solid var(--border); border-radius: 4px;
  overflow: hidden; display: flex;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.dash-alert-bar { width: 5px; flex-shrink: 0; }
.dash-alert-amber .dash-alert-bar { background: #00824b; }
.dash-alert-blue  .dash-alert-bar { background: #1f7ead; }
.dash-alert-body { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 12px; flex: 1; }
.dash-alert-icon { font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.dash-alert-title { font-size: 13px; font-weight: 700; color: #222222; margin-bottom: 3px; }
.dash-alert-sub { font-size: 12px; color: #666666; line-height: 1.4; }

/* ── COMING SOON (dashboard bottom) ───────────── */
.dash-coming-soon {
  border: 1.5px dashed rgba(0,0,0,.18);
  border-radius: 4px;
  padding: 1.5rem;
  background: rgba(0,0,0,.015);
  margin-top: 0;
}
.dash-cs-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dash-cs-title { font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 700; color: #333333; }
.dash-cs-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--amber-lt); color: #D54308; border: 1px solid rgba(213,67,8,.4);
  padding: 3px 8px; border-radius: 4px;
}
.dash-cs-desc { font-size: 12px; color: #999999; margin-bottom: 14px; line-height: 1.5; }
.dash-cs-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-cs-btn {
  padding: 8px 16px; border-radius: 4px; font-size: 12px; font-weight: 600;
  font-family: 'Roboto', sans-serif; cursor: pointer; transition: background .15s;
  line-height: 1.3;
}
.dash-cs-btn-teal { background: transparent; border: 1.5px solid rgba(0,130,75,.55); color: #006838; }
.dash-cs-btn-teal:hover { background: rgba(0,130,75,.08); }
.dash-cs-btn-navy { background: transparent; border: 1.5px solid rgba(0,0,0,.3); color: #0a2837; }
.dash-cs-btn-navy:hover { background: rgba(0,0,0,.06); }

/* ════════════════════════════════════════════════
   DASHBOARD — PIPELINE CARD
════════════════════════════════════════════════ */

.dash-pipeline-sub {
  font-size: 13px; color: var(--muted);
  margin: 2px 0 1.5rem; line-height: 1.5;
}

/* Pipeline row */
.dash-pl-row {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.dash-pl-row::-webkit-scrollbar { height: 3px; }
.dash-pl-row::-webkit-scrollbar-thumb { background: #e5e5e5; border-radius: 4px; }

/* Rotated row label */
.dash-pl-label {
  writing-mode: vertical-rl; text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px; font-weight: 700; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase;
  flex-shrink: 0; width: 22px; margin-right: 14px; user-select: none;
}

/* Row body */
.dash-pl-body { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; }

/* ── STAGE NODE ─────────────────────────────── */
.dash-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex-shrink: 0; width: 96px; text-align: center;
}
.dash-stage-icon {
  width: 44px; height: 44px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dash-stage-icon svg { width: 20px; height: 20px; fill: none; stroke-width: 1.8; }
.dash-stage-name { font-size: 11px; font-weight: 600; color: #333333; line-height: 1.3; }
.dash-stage-sub  { font-size: 10px; color: #999999; line-height: 1.3; margin-top: -2px; }

/* ── CONNECTOR LINE (with animated dots) ────── */
.dash-conn {
  position: relative; height: 2px; background: #e5e5e5;
  flex-shrink: 0; width: 48px; overflow: visible;
}

/* Animated dot — base class, used in both connectors and fork arms */
.dash-anim-dot {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot-c, #00824b); opacity: 0;
  animation: dotFlow 2.8s ease-in-out infinite;
  animation-delay: var(--dot-d, 0s);
}
@keyframes dotFlow {
  0%   { left: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ── FORK AREA (dual input → merge) ─────────── */
.dash-fork-area   { display: flex; align-items: center; flex-shrink: 0; gap: 0; }
.dash-fork-inputs { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.dash-fork-or     { font-size: 10px; color: #b1bac2; font-style: italic; user-select: none; }

/* CSS bracket connecting two inputs to one output */
.dash-fork-conn {
  position: relative; width: 36px;
  align-self: stretch; flex-shrink: 0; margin: 0 2px;
}
.dash-fork-arm-top,
.dash-fork-arm-bot {
  position: absolute; left: 0; right: 0; overflow: visible;
}
.dash-fork-arm-top {
  top: 0; height: 50%;
  border-top: 2px solid #e5e5e5; border-right: 2px solid #e5e5e5;
  border-radius: 0 4px 0 0;
}
.dash-fork-arm-bot {
  bottom: 0; height: 50%;
  border-bottom: 2px solid #e5e5e5; border-right: 2px solid #e5e5e5;
  border-radius: 0 0 4px 0;
}
/* Dots in fork arms travel along the horizontal top/bottom borders */
.dash-fork-arm-top .dash-anim-dot { top: -4px;  transform: none; }
.dash-fork-arm-bot .dash-anim-dot { bottom: -4px; top: auto; transform: none; }

/* Divider between pipeline rows */
hr.dash-pl-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── STATUS BAR ─────────────────────────────── */
.dash-status-bar {
  display: flex; align-items: center; padding: .875rem 1.25rem;
  gap: 0; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.dash-status-item {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 180px; padding: 4px 1rem;
}
.dash-status-item:first-child { padding-left: 0; }
.dash-status-item + .dash-status-item { border-left: 1px solid var(--border); }
.dash-status-icon  { font-size: 15px; flex-shrink: 0; }
.dash-status-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.dash-status-value {
  font-family: 'Roboto', sans-serif; font-size: 14px;
  font-weight: 700; color: var(--text); margin-left: auto; white-space: nowrap;
}
