:root{
  --navy-950:#05132d;
  --navy-900:#071a3a;
  --navy-850:#0a234b;
  --navy-800:#0d2d5d;
  --blue-600:#1778f2;
  --blue-500:#2d8cff;
  --blue-400:#55a7ff;
  --cyan-400:#60d8ff;
  --bg:#f2f7ff;
  --card:#ffffff;
  --ink:#10233f;
  --ink-2:#243b5c;
  --muted:#69809e;
  --line:#dbe7f5;
  --line-strong:#c7d9ee;
  --soft:#edf5ff;
  --soft-2:#f7faff;
  --ok:#087443;
  --ok-bg:#eafaf1;
  --danger:#b42318;
  --danger-bg:#fff1f0;
  --warn:#9a6700;
  --warn-bg:#fff7db;
  --shadow-sm:0 8px 22px rgba(17,65,124,.07);
  --shadow:0 18px 50px rgba(15,58,112,.11);
  --shadow-strong:0 28px 80px rgba(2,23,54,.20);
  --radius:22px;
  --radius-sm:15px;
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--bg)}
body{
  margin:0;
  min-height:100%;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 7% 3%,rgba(45,140,255,.09),transparent 24rem),
    radial-gradient(circle at 95% 24%,rgba(96,216,255,.08),transparent 22rem),
    linear-gradient(180deg,#f7faff 0%,var(--bg) 46%,#eef5fd 100%);
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.32;
  background-image:radial-gradient(rgba(23,120,242,.17) .65px,transparent .65px);
  background-size:22px 22px;
  mask-image:linear-gradient(to bottom,black,transparent 68%);
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.62}
.hidden{display:none!important}
img{max-width:100%}

.app-shell{min-height:100vh;padding-bottom:106px;position:relative}
.container{max-width:1000px;margin:auto;padding:22px 18px 36px;position:relative;z-index:1}

/* Brand */
.brand-lockup{display:flex;align-items:center;gap:12px;min-width:0}
.brand-logo{display:block;width:154px;aspect-ratio:1/1;height:auto;object-fit:contain;object-position:50% 50%;flex:none;border-radius:50%;clip-path:none;transform:none;transform-origin:center}
.brand-logo-small{width:52px}
.brand-copy{min-width:0}
.brand-product{font-size:12px;line-height:1.2;font-weight:850;color:var(--blue-600);letter-spacing:.09em;text-transform:uppercase}
.brand-tagline{font-size:12px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Top bar */
.topbar{
  position:sticky;top:0;z-index:30;
  background:rgba(247,250,255,.84);
  backdrop-filter:blur(20px) saturate(1.35);
  -webkit-backdrop-filter:blur(20px) saturate(1.35);
  border-bottom:1px solid rgba(199,217,238,.78);
}
.topbar-inner{max-width:1000px;margin:auto;padding:11px 18px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.student-chip{display:flex;align-items:center;gap:10px;min-width:0}
.student-meta{text-align:right;min-width:0}
.student-name{font-weight:850;color:var(--navy-900);font-size:14px;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.student-period{font-size:11px;color:var(--muted);margin-top:3px}
.account-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0 11px;border-radius:14px;
  color:#fff;font-size:12px;font-weight:850;letter-spacing:.03em;
  background:linear-gradient(135deg,var(--navy-850),var(--blue-600));
  box-shadow:0 8px 20px rgba(23,120,242,.22);
}

/* Shared surfaces */
.card{
  position:relative;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(219,231,245,.95);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow-sm);
  margin-bottom:16px;
  overflow:hidden;
}
.card::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  border-radius:inherit;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.card-elevated{box-shadow:var(--shadow)}
.card h2,.card h3{margin:0;color:var(--navy-900);letter-spacing:-.02em}
.card h2{font-size:20px}.card h3{font-size:16px}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.card-title-group{display:flex;align-items:flex-start;gap:12px;min-width:0}
.icon-tile{
  width:40px;height:40px;border-radius:13px;flex:none;
  display:grid;place-items:center;
  color:var(--blue-600);
  background:linear-gradient(145deg,#eff7ff,#e4f1ff);
  border:1px solid #d5e8ff;
}
.icon-tile svg{display:block}
.muted{color:var(--muted);line-height:1.55}
.small{font-size:13px}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Page intro */
.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:4px 2px 18px}
.page-kicker{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--blue-600);margin-bottom:7px}
.page-intro h1{margin:0;font-size:27px;line-height:1.1;letter-spacing:-.035em;color:var(--navy-950)}
.page-intro p{margin:7px 0 0;color:var(--muted);font-size:14px;line-height:1.55;max-width:610px}

/* Dashboard hero */
.hero{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  padding:24px;
  margin:3px 0 16px;
  color:#fff;
  background:
    radial-gradient(circle at 90% 10%,rgba(96,216,255,.34),transparent 15rem),
    radial-gradient(circle at 68% 120%,rgba(45,140,255,.42),transparent 19rem),
    linear-gradient(135deg,var(--navy-950) 0%,var(--navy-800) 52%,#0a4f9c 100%);
  box-shadow:var(--shadow-strong);
}
.hero::before{content:"";position:absolute;right:-55px;top:-70px;width:210px;height:210px;border:1px solid rgba(255,255,255,.17);border-radius:42px;transform:rotate(28deg)}
.hero::after{content:"";position:absolute;right:65px;bottom:-120px;width:220px;height:220px;border:1px solid rgba(255,255,255,.11);border-radius:50%}
.hero-content{position:relative;z-index:1;display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center}
.hero-kicker{font-size:11px;font-weight:900;letter-spacing:.13em;text-transform:uppercase;color:#8dd7ff;margin-bottom:7px}
.hero h1{margin:0;max-width:650px;font-size:27px;line-height:1.15;letter-spacing:-.035em}
.hero p{margin:8px 0 0;color:rgba(236,247,255,.79);font-size:14px;line-height:1.55;max-width:610px}
.hero-mark{width:84px;height:84px;border-radius:24px;display:grid;place-items:center;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(8px)}
.hero-mark svg{width:40px;height:40px}

/* Metrics */
.metric{
  position:relative;overflow:hidden;
  padding:18px;border-radius:20px;
  background:linear-gradient(145deg,#fff 0%,#f6faff 100%);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
}
.metric::before{content:"";position:absolute;width:84px;height:84px;border-radius:50%;right:-30px;top:-34px;background:rgba(45,140,255,.07)}
.metric-label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;font-weight:750}
.metric-icon{width:28px;height:28px;border-radius:9px;background:var(--soft);display:grid;place-items:center;color:var(--blue-600)}
.metric b{display:block;font-size:29px;line-height:1;margin-top:13px;color:var(--navy-950);letter-spacing:-.04em}
.metric-foot{font-size:11px;color:#8395ac;margin-top:8px}

/* Forms */
.form-section{padding:16px 0;border-top:1px solid #edf2f8}
.form-section:first-of-type{padding-top:0;border-top:0}
.form-section-head{display:flex;gap:11px;align-items:flex-start;margin-bottom:8px}
.form-section-head .mini-icon{width:30px;height:30px;border-radius:10px;background:var(--soft);color:var(--blue-600);display:grid;place-items:center;flex:none}
.form-section-head b{display:block;font-size:14px;color:var(--navy-900)}
.form-section-head span{display:block;margin-top:2px;font-size:12px;color:var(--muted);font-weight:500}
label{display:block;font-size:12px;font-weight:850;color:#334d6d;margin:13px 0 7px}
input,textarea,select{
  width:100%;
  border:1px solid var(--line-strong);
  background:#fff;
  border-radius:14px;
  padding:12px 13px;
  color:var(--ink);
  outline:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
textarea{min-height:92px;resize:vertical;line-height:1.5}
input::placeholder,textarea::placeholder{color:#9badc0}
input:hover,textarea:hover,select:hover{border-color:#b9cee7}
input:focus,textarea:focus,select:focus{border-color:var(--blue-500);box-shadow:0 0 0 4px rgba(45,140,255,.12);background:#fbfdff}

/* Buttons */
.btn{
  border:0;border-radius:14px;padding:12px 15px;font-weight:850;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  text-align:center;min-height:44px;
}
.btn:hover:not(:disabled){transform:translateY(-1px)}
.btn:active:not(:disabled){transform:translateY(0)}
.btn svg{width:17px;height:17px;flex:none}
.btn-primary{background:linear-gradient(135deg,var(--blue-600),#0b64d6);color:#fff;box-shadow:0 10px 22px rgba(23,120,242,.22)}
.btn-primary:hover:not(:disabled){box-shadow:0 12px 28px rgba(23,120,242,.28)}
.btn-dark{background:linear-gradient(135deg,var(--navy-900),var(--navy-800));color:#fff;box-shadow:0 10px 22px rgba(5,19,45,.17)}
.btn-soft{background:var(--soft);color:var(--navy-850);border:1px solid #dceaff}
.btn-danger{background:var(--danger-bg);color:var(--danger);border:1px solid #ffd7d3}
.btn-block{width:100%}
.btn-row{display:flex;gap:9px;flex-wrap:wrap}
.btn-row .btn{flex:1}

/* Chips */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 12px;font-size:12px;color:#435d7c;font-weight:750;transition:.15s}
.chip:hover{border-color:#b8d7fb;background:#f8fbff}
.chip.active{background:linear-gradient(135deg,var(--navy-850),var(--blue-600));border-color:transparent;color:#fff;box-shadow:0 7px 15px rgba(23,120,242,.17)}

/* Notices */
.notice{padding:12px 13px;border-radius:13px;background:var(--soft);font-size:13px;line-height:1.5;margin:11px 0;border:1px solid #dceaff;color:#416080}
.notice.ok{background:var(--ok-bg);color:var(--ok);border-color:#c8efd9}
.notice.err{background:var(--danger-bg);color:var(--danger);border-color:#ffd7d3}
.notice.warn{background:var(--warn-bg);color:var(--warn);border-color:#fbe8a7}

/* Dashboard/session data */
.session-item{border:1px solid var(--line);border-radius:18px;padding:16px;margin-top:12px;background:linear-gradient(145deg,#fff,#fbfdff);transition:box-shadow .16s,border-color .16s}
.session-item:hover{border-color:#c6ddf7;box-shadow:0 10px 24px rgba(16,71,135,.07)}
.session-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.session-title-line{display:flex;align-items:center;gap:10px}
.session-number-badge{width:35px;height:35px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--navy-850),var(--blue-600));color:#fff;font-weight:900;font-size:12px;box-shadow:0 7px 15px rgba(23,120,242,.18)}
.session-number{font-weight:900;color:var(--navy-900);font-size:15px}
.kv{display:grid;grid-template-columns:112px 1fr;gap:7px 12px;font-size:13px;margin-top:13px;line-height:1.52}
.kv .k{color:var(--muted);font-weight:700}
.quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.quick-card{border:1px solid var(--line);background:linear-gradient(145deg,#fff,#f8fbff);border-radius:17px;padding:14px;text-align:left;color:var(--ink);display:flex;align-items:center;gap:12px;transition:.15s}
.quick-card:hover{border-color:#b9d8fb;box-shadow:var(--shadow-sm);transform:translateY(-1px)}
.quick-card .quick-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--soft);color:var(--blue-600);flex:none}
.quick-card b{display:block;color:var(--navy-900);font-size:13px}
.quick-card span{display:block;font-size:11px;color:var(--muted);margin-top:3px;line-height:1.35}

/* Analytics */
.analytics-card{overflow:hidden}
.analytics-note{margin:-2px 0 16px;padding:10px 12px;border:1px solid #dceafb;background:#f5f9ff;border-radius:13px;color:#5e7897;font-size:11px;line-height:1.5}
.analytics-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.analytics-stat{border:1px solid var(--line);background:linear-gradient(145deg,#fff,#f8fbff);border-radius:16px;padding:13px;min-width:0}
.analytics-stat span{display:block;color:var(--muted);font-size:10px;font-weight:800;line-height:1.35}
.analytics-stat b{display:block;color:var(--navy-950);font-size:23px;line-height:1.05;letter-spacing:-.035em;margin-top:8px;word-break:break-word}
.analytics-stat small{display:block;color:#8aa0b9;font-size:9px;margin-top:5px;line-height:1.3}
.analytics-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.analytics-section{margin-top:12px}
.analytics-subcard{border:1px solid #e2ebf5;background:#fbfdff;border-radius:17px;padding:14px}
.analytics-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.analytics-section-head b{display:block;color:var(--navy-900);font-size:13px}
.analytics-section-head span{display:block;color:var(--muted);font-size:10px;line-height:1.4;margin-top:3px}
.analytics-bar-row{margin-top:10px}
.analytics-bar-label{display:flex;justify-content:space-between;gap:7px 10px;align-items:baseline;flex-wrap:wrap;font-size:10px;color:#526d8c}
.analytics-bar-label span{min-width:0}
.analytics-bar-label b{color:var(--navy-850);font-size:10px;white-space:nowrap;margin-left:auto}
.analytics-bar-label small{font-weight:700;color:#8aa0b9}
.analytics-bar-track{height:7px;border-radius:999px;background:#eaf2fb;overflow:hidden;margin-top:5px}
.analytics-bar-track>span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--navy-850),var(--blue-600))}
.analytics-empty{padding:16px 12px;border:1px dashed #ccdaea;border-radius:13px;color:#8295ac;font-size:10px;line-height:1.45;text-align:center}

.analytics-percent-track{background:linear-gradient(90deg,#eaf2fb,#eef5fc)}
.analytics-scale-note{margin:-2px 0 10px;color:#8295ac;font-size:9px;line-height:1.45}
.analytics-count-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px;border:1px solid #dce8f5;background:linear-gradient(145deg,#f8fbff,#fff);border-radius:15px;color:#526d8c;font-size:11px}
.analytics-count-summary span{font-weight:750}
.analytics-count-summary b{color:var(--navy-900);font-size:13px;white-space:nowrap}
.single-week-summary,.single-period-summary{margin-top:2px}
.analytics-count-track>span{background:linear-gradient(90deg,#5eb9ff,#1678f2)}
.week-bars{height:150px;display:flex;align-items:stretch;gap:9px;padding:8px 5px 0;border-bottom:1px solid #dfe9f4}
.week-bar-item{flex:1;min-width:0;display:grid;grid-template-rows:18px 1fr 20px;gap:4px;text-align:center}
.week-bar-value{font-size:10px;font-weight:850;color:var(--navy-850)}
.week-bar-track{position:relative;min-height:88px;border-radius:10px 10px 3px 3px;background:linear-gradient(180deg,#f3f8fe,#edf4fb);overflow:hidden;display:flex;align-items:flex-end}
.week-bar-track span{display:block;width:100%;min-height:4px;border-radius:8px 8px 2px 2px;background:linear-gradient(180deg,#5eb9ff,#1678f2)}
.week-bar-label{font-size:9px;font-weight:800;color:#8497ae}
.recent-status{margin-top:14px;padding-top:11px;border-top:1px solid #e7eef7}
.recent-status>span{font-size:9px;font-weight:800;color:#8398b0}
.recent-status-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}
.status-pill{display:inline-flex;border:1px solid #d9e7f6;background:#f5f9ff;color:#41678f;border-radius:999px;padding:6px 8px;font-size:9px;font-weight:800}
.period-volume-list{display:grid;gap:10px}
.period-volume-label{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#607994;font-size:10px}
.period-volume-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.period-volume-label b{color:var(--navy-850);font-size:11px}

/* Report */
.report-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.report-text{white-space:pre-wrap;background:#f8fbff;border:1px solid var(--line);border-radius:16px;padding:15px;font-size:13px;line-height:1.62;min-height:250px;color:#2c4665}
.report-placeholder{color:#8ba0b9}

/* Empty state */
.empty{text-align:center;padding:32px 18px;color:var(--muted)}
.empty-icon{width:54px;height:54px;border-radius:18px;background:var(--soft);display:grid;place-items:center;margin:0 auto 12px;color:var(--blue-600)}
.empty b{display:block;color:var(--navy-900);margin-bottom:5px}

/* Auth */
.auth-wrap{
  min-height:100vh;
  display:grid;place-items:center;
  padding:24px;
  position:relative;overflow:hidden;
  background:
    radial-gradient(circle at 15% 14%,rgba(85,167,255,.38),transparent 19rem),
    radial-gradient(circle at 86% 86%,rgba(96,216,255,.20),transparent 23rem),
    linear-gradient(145deg,#041127 0%,#082b5c 55%,#0a58a6 100%);
}
.auth-wrap::before{content:"";position:absolute;width:420px;height:420px;border:1px solid rgba(255,255,255,.08);border-radius:86px;transform:rotate(35deg);right:-130px;top:-190px}
.auth-wrap::after{content:"";position:absolute;width:300px;height:300px;border:1px solid rgba(255,255,255,.08);border-radius:50%;left:-120px;bottom:-120px}
.auth-layout{position:relative;z-index:1;width:min(980px,100%);display:grid;grid-template-columns:minmax(0,.95fr) minmax(390px,.75fr);gap:28px;align-items:center}
.auth-brand-panel{color:#fff;padding:20px 8px 20px 6px}
.auth-logo-shell{display:inline-grid;place-items:center;width:194px;height:194px;border-radius:50%;padding:0;background:radial-gradient(circle,rgba(45,140,255,.20),rgba(45,140,255,.04) 62%,transparent 72%);box-shadow:0 0 0 1px rgba(141,215,255,.18),0 18px 48px rgba(2,18,43,.22);margin-bottom:24px;overflow:visible}
.auth-logo-shell .brand-logo{width:100%;height:100%;max-width:none;object-fit:contain;object-position:50% 50%;border-radius:50%;clip-path:none;transform:none}
.auth-eyebrow{font-size:11px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#8dd7ff;margin-bottom:10px}
.auth-brand-panel h1{font-size:37px;line-height:1.08;letter-spacing:-.045em;margin:0;max-width:540px}
.auth-brand-panel p{font-size:14px;line-height:1.7;color:rgba(235,246,255,.77);max-width:520px;margin:14px 0 0}
.auth-feature-list{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:25px;max-width:520px}
.auth-feature{display:flex;gap:9px;align-items:flex-start;padding:11px 12px;border:1px solid rgba(255,255,255,.11);border-radius:15px;background:rgba(255,255,255,.055)}
.auth-feature svg{flex:none;color:#84dbff;margin-top:1px}
.auth-feature span{font-size:11px;line-height:1.45;color:rgba(239,248,255,.78)}
.auth-card{width:100%;margin:0;padding:24px;box-shadow:0 32px 85px rgba(1,18,44,.28);border-color:rgba(255,255,255,.85);background:rgba(255,255,255,.985)}
.auth-card-head{margin-bottom:17px}
.auth-card-head .auth-title{font-size:23px;font-weight:900;letter-spacing:-.035em;color:var(--navy-950)}
.auth-card-head p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#edf4fd;padding:4px;border-radius:14px;margin-bottom:16px;border:1px solid #deebf9}
.auth-tab{border:0;background:transparent;border-radius:10px;padding:10px;font-weight:850;color:#68809e}
.auth-tab.active{background:#fff;color:var(--navy-900);box-shadow:0 4px 13px rgba(22,71,129,.10)}
.auth-form .btn{margin-top:16px}
.auth-footnote{margin-top:14px;padding-top:13px;border-top:1px solid #edf2f7;font-size:11px;color:#8799af;line-height:1.5;text-align:center}

/* Recovery modal */
.modal-backdrop{position:fixed;inset:0;background:rgba(3,15,35,.68);backdrop-filter:blur(8px);display:grid;place-items:center;padding:16px;z-index:100}
.modal{width:min(560px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:24px;padding:22px;box-shadow:0 36px 100px rgba(0,14,36,.36)}
.modal-brand{display:flex;justify-content:center;margin-bottom:16px}
.modal-brand .brand-logo{width:132px}
.recovery-box{border:1px dashed #9dbde1;border-radius:16px;padding:15px;background:linear-gradient(145deg,#f8fbff,#eef6ff)}
.recovery-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:900;word-break:break-all;font-size:15px;color:var(--navy-850);margin-top:5px;letter-spacing:.025em}

/* Settings */
.setting-row{display:flex;align-items:flex-start;gap:12px;padding:13px 0;border-top:1px solid #edf2f7}
.setting-row:first-child{border-top:0;padding-top:0}
.setting-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--soft);color:var(--blue-600);flex:none}
.setting-copy{flex:1;min-width:0}
.setting-copy b{display:block;color:var(--navy-900);font-size:13px}
.setting-copy p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.45}

/* Bottom navigation */
.navbar{position:fixed;left:0;right:0;bottom:0;z-index:40;padding:8px 12px calc(9px + env(safe-area-inset-bottom));pointer-events:none}
.nav-inner{
  pointer-events:auto;
  width:min(690px,100%);margin:auto;
  display:grid;grid-template-columns:repeat(5,1fr);gap:4px;
  padding:6px;
  border:1px solid rgba(201,219,239,.9);
  border-radius:22px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(20px) saturate(1.35);
  box-shadow:0 14px 40px rgba(4,33,72,.16);
}
.nav-btn{border:0;background:transparent;padding:8px 4px 7px;border-radius:15px;font-size:10px;font-weight:800;color:#7186a0;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:52px;justify-content:center;transition:.15s}
.nav-btn svg{width:19px;height:19px}
.nav-btn.active{background:linear-gradient(145deg,#edf6ff,#e8f2ff);color:var(--blue-600);box-shadow:inset 0 0 0 1px #dcecff}

.inline{display:flex;gap:8px;align-items:center}
.inline>*{flex:1}
hr{border:0;border-top:1px solid var(--line);margin:17px 0}

@media(max-width:820px){
  .auth-layout{grid-template-columns:1fr;max-width:560px}
  .auth-brand-panel{text-align:center;padding:0}
  .auth-logo-shell{margin-bottom:16px}
  .auth-brand-panel h1{font-size:30px;margin:auto}
  .auth-brand-panel p{margin:10px auto 0}
  .auth-feature-list{display:none}
}

@media(max-width:680px){
  .container{padding:16px 12px 30px}
  .topbar-inner{padding:10px 12px}
  .brand-logo-small{width:46px}
  .brand-copy{display:none}
  .student-name{font-size:12px;max-width:155px}
  .student-period{font-size:10px;max-width:175px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .account-badge{min-width:34px;height:34px;border-radius:12px;padding:0 9px;font-size:11px}
  .grid-2,.grid-3,.report-toolbar,.analytics-grid{grid-template-columns:1fr}
  .analytics-metrics{grid-template-columns:1fr 1fr}
  .hero{padding:20px;border-radius:24px}
  .hero-content{grid-template-columns:1fr}
  .hero-mark{display:none}
  .hero h1{font-size:24px}
  .page-intro{margin:2px 2px 14px}
  .page-intro h1{font-size:24px}
  .page-intro p{font-size:13px}
  .card{padding:16px;border-radius:19px}
  .quick-actions{grid-template-columns:1fr}
  .kv{grid-template-columns:90px 1fr;gap:7px 9px}
  .btn-row{flex-direction:column}
  .btn-row .btn{width:100%}
  .session-item .btn-row{flex-direction:row}
  .session-item .btn-row .btn{width:auto;min-width:0;padding:10px 9px;font-size:11px}
  .auth-wrap{padding:18px 12px}
  .auth-layout{gap:14px}
  .auth-brand-panel h1{font-size:27px;max-width:520px}
  .auth-brand-panel p{font-size:13px;line-height:1.6;max-width:500px}
  .auth-logo-shell{width:164px;height:164px}
  .auth-logo-shell .brand-logo{width:100%;height:100%}
  .auth-card{padding:18px}
}

@media(max-width:410px){
  .analytics-metrics{grid-template-columns:1fr}
  .analytics-bar-label b{width:100%;margin-left:0;white-space:normal}
  .week-bars{gap:5px}
  .student-period{display:none}
  .brand-logo-small{width:105px}
  .session-item .btn-row{display:grid;grid-template-columns:1fr 1fr}
  .session-item .btn-row .btn-danger{grid-column:1/-1}
  .nav-btn{font-size:9px}
}

/* =========================================================
   Canonical typography system — v1.0.7
   Full-app audit after real tablet QA.
   Replaces earlier incremental readability override layers.
   ========================================================= */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  font-size:20px;
  line-height:1.58;
}

/* Header / identity */
.brand-product{font-size:18px;line-height:1.3}
.brand-tagline{font-size:17px;line-height:1.45}
.student-name{font-size:19px;line-height:1.3}
.student-period{font-size:17px;line-height:1.4}
.account-badge{font-size:15px}

/* Main hierarchy */
.card h2{font-size:26px;line-height:1.25}
.card h3{font-size:22px;line-height:1.3}
.muted{font-size:19px;line-height:1.6}
.small{font-size:18px;line-height:1.6}
.page-kicker{font-size:16px;line-height:1.35}
.page-intro h1{font-size:34px;line-height:1.12}
.page-intro p{font-size:20px;line-height:1.6;max-width:760px}
.hero-kicker{font-size:16px;line-height:1.35}
.hero h1{font-size:34px;line-height:1.16}
.hero p{font-size:20px;line-height:1.6;max-width:760px}

/* Dashboard */
.metric-label{font-size:17px;line-height:1.4}
.metric b{font-size:33px}
.metric-foot{font-size:16px;line-height:1.45}
.quick-card b{font-size:18px;line-height:1.4}
.quick-card span{font-size:17px;line-height:1.55}

/* Forms and controls */
.form-section-head b{font-size:21px;line-height:1.35}
.form-section-head span{font-size:19px;line-height:1.55}
label{font-size:19px;line-height:1.45;margin-top:15px}
input,textarea,select{
  font-size:20px;
  line-height:1.5;
  padding:14px 15px;
}
textarea{min-height:106px}
.btn{
  font-size:18px;
  line-height:1.35;
  min-height:48px;
  padding:13px 17px;
}
.chip{
  font-size:18px;
  line-height:1.4;
  padding:10px 14px;
}
.notice{font-size:18px;line-height:1.65}

/* Session history */
.session-number-badge{font-size:15px}
.session-number{font-size:20px;line-height:1.35}
.kv{font-size:18px;line-height:1.65;grid-template-columns:145px 1fr}

/* Analytics */
.analytics-note{font-size:18px;line-height:1.65;padding:13px 15px}
.analytics-stat span{font-size:17px;line-height:1.45}
.analytics-stat b{font-size:30px;line-height:1.1}
.analytics-stat small{font-size:16px;line-height:1.5}
.analytics-section-head b{font-size:20px;line-height:1.4}
.analytics-section-head span{font-size:17px;line-height:1.55}
.analytics-bar-label{font-size:17px;line-height:1.5;gap:8px 12px}
.analytics-bar-label b{font-size:17px;line-height:1.5}
.analytics-bar-label small{font-size:16px;line-height:1.45}
.analytics-empty{font-size:17px;line-height:1.6}
.analytics-scale-note{font-size:16px;line-height:1.55}
.analytics-count-summary{font-size:18px;line-height:1.5;padding:16px 18px}
.analytics-count-summary b{font-size:18px}
.week-bar-value{font-size:17px}
.week-bar-label{font-size:16px}
.recent-status>span{font-size:16px}
.status-pill{font-size:16px;line-height:1.4;padding:8px 12px}
.period-volume-label{font-size:17px;line-height:1.5}
.period-volume-label b{font-size:18px}
.report-text{font-size:18px;line-height:1.78}

/* Authentication / modal / settings */
.auth-eyebrow{font-size:16px}
.auth-brand-panel h1{font-size:40px}
.auth-brand-panel p{font-size:19px;line-height:1.7}
.auth-feature span{font-size:17px;line-height:1.55}
.auth-card-head .auth-title{font-size:27px;line-height:1.25}
.auth-card-head p{font-size:18px;line-height:1.6}
.auth-tab{font-size:17px;line-height:1.35}
.auth-footnote{font-size:16px;line-height:1.6}
.recovery-code{font-size:18px;line-height:1.5}
.setting-copy b{font-size:19px;line-height:1.4}
.setting-copy p{font-size:17px;line-height:1.6}

/* Bottom navigation */
.nav-btn{font-size:16px;line-height:1.25;min-height:58px;gap:5px}
.nav-btn svg{width:21px;height:21px}

/* Tablet/phone: reflow; do not collapse back into micro text. */
@media(max-width:680px){
  body{font-size:18px}
  .brand-logo-small{width:clamp(62px,15.5vw,68px)}
  .brand-product{font-size:16px}
  .brand-tagline{font-size:15px}
  .student-name{font-size:16px;max-width:180px}
  .student-period{font-size:15px;max-width:195px}
  .account-badge{font-size:14px}
  .card h2{font-size:24px}
  .card h3{font-size:21px}
  .muted{font-size:17px}
  .small{font-size:16px}
  .page-kicker,.hero-kicker{font-size:15px}
  .page-intro h1,.hero h1{font-size:30px}
  .page-intro p,.hero p{font-size:18px}
  .metric-label{font-size:16px}
  .metric-foot{font-size:15px}
  .form-section-head b{font-size:19px}
  .form-section-head span{font-size:17px}
  label{font-size:17px}
  input,textarea,select{font-size:19px}
  .btn{font-size:17px}
  .chip{font-size:16px}
  .notice{font-size:17px}
  .session-item .btn-row .btn{font-size:16px}
  .session-number{font-size:19px}
  .kv{font-size:17px;grid-template-columns:125px 1fr}
  .quick-card b{font-size:17px}
  .quick-card span{font-size:16px}
  .analytics-note{font-size:17px}
  .analytics-stat span{font-size:16px}
  .analytics-stat small{font-size:15px}
  .analytics-section-head b{font-size:19px}
  .analytics-section-head span{font-size:16px}
  .analytics-bar-label,.analytics-bar-label b{font-size:16px}
  .analytics-bar-label small{font-size:15px}
  .analytics-empty{font-size:16px}
  .analytics-scale-note{font-size:15px}
  .analytics-count-summary{font-size:17px}
  .analytics-count-summary b{font-size:17px}
  .status-pill{font-size:15px}
  .period-volume-label{font-size:16px}
  .period-volume-label b{font-size:17px}
  .report-text{font-size:17px}
  .auth-brand-panel h1{font-size:32px}
  .auth-brand-panel p{font-size:18px}
  .auth-feature span{font-size:16px}
  .auth-card-head p{font-size:17px}
  .auth-tab{font-size:16px}
  .auth-footnote{font-size:15px}
  .setting-copy b{font-size:18px}
  .setting-copy p{font-size:16px}
  .nav-btn{font-size:15px;min-height:56px}
}

@media(max-width:410px){
  body{font-size:18px}
  .analytics-metrics{grid-template-columns:1fr}
  .analytics-bar-label b{width:100%;margin-left:0;white-space:normal;font-size:16px}
  .student-period{display:none}
  .brand-logo-small{width:62px}
  .session-item .btn-row{display:grid;grid-template-columns:1fr 1fr}
  .session-item .btn-row .btn-danger{grid-column:1/-1}
  .nav-btn{font-size:14.5px}
}

/* =========================================================
   Report UX refinement — v1.0.9
   Ready-to-share flow without changing report source-of-truth.
   ========================================================= */
.report-generator-card{overflow:hidden}
.report-helper{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:-2px 0 16px;
  padding:13px 15px;
  border:1px solid #dceafb;
  background:#f6faff;
  border-radius:14px;
  color:#567391;
  font-size:17px;
  line-height:1.55;
}
.report-helper svg{flex:none;margin-top:2px;color:var(--blue-600)}
.report-result-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-top:17px;
}
.report-result-heading label{margin:0}
.report-result-heading span{
  color:#6b829e;
  font-size:16px;
  font-weight:800;
  line-height:1.35;
  text-align:right;
}
.report-text.report-ready{
  background:#fff;
  border-color:#cfe0f3;
  color:#183655;
  box-shadow:inset 0 0 0 1px rgba(21,120,242,.025);
}
.report-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.report-actions .btn{width:100%}

@media(max-width:680px){
  .report-helper{font-size:16px}
  .report-result-heading span{font-size:15px}
}

@media(max-width:360px){
  .report-actions{grid-template-columns:1fr}
}
