/* ==========================================================
   Ideal NEET Academy — Student Portal
   Built by Zenoratech
   ========================================================== */

:root {
  --ink:        #101a33;
  --ink-2:      #1b2745;
  --ink-3:      #2b3a5e;
  --slate:      #5d6b87;
  --slate-2:    #8492ab;
  --line:       #dfe4ee;
  --line-soft:  #eaeef5;
  --bg:         #eceff5;
  --card:       #ffffff;

  --brand:      #2f3191;
  --brand-2:    #4a4ccc;
  --brand-soft: #ececfb;

  --live:       #0e9f6e;
  --live-soft:  #e4f7f0;
  --soon:       #e08414;
  --soon-soft:  #fdf1e0;
  --danger:     #cf3540;
  --danger-soft:#fdecec;

  --phy:        #2f6fd0;
  --chem:       #c2410c;
  --bio:        #0e9f6e;
  --gen:        #6b21a8;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;

  --shadow:    0 1px 2px rgba(16,26,51,.05), 0 6px 20px rgba(16,26,51,.06);
  --shadow-lg: 0 2px 6px rgba(16,26,51,.07), 0 18px 44px rgba(16,26,51,.12);

  --rail: 246px;
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ==========================================================
   LOGIN
   ========================================================== */

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink);
}

.auth-brand {
  display: none;
  padding: 56px 52px;
  color: #fff;
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(74,76,204,.35), transparent 60%),
    linear-gradient(180deg, #101a33 0%, #0a1226 100%),
    #0d1730;
  position: relative;
  overflow: hidden;
}

.auth-brand-inner { position: relative; z-index: 2; max-width: 420px; }

.auth-brand h1 {
  font-size: 40px;
  line-height: 1.08;
  margin: 28px 0 16px;
  color: #fff;
}

.auth-brand p { color: #9fb0d0; font-size: 15px; margin: 0 0 32px; }

.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; color: #c4d0e6; font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.auth-points li:first-child { border-top: 0; }
.auth-points .n {
  font-family: var(--font-mono); font-size: 12px; color: #6d80a6;
  padding-top: 2px; flex: none;
}

.auth-panel {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 40px;
  min-height: 100dvh;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.auth-logo .mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  letter-spacing: -0.03em;
}
.auth-logo .txt strong {
  display: block; font-family: var(--font-display);
  font-size: 16px; font-weight: 700; letter-spacing: -0.02em;
}
.auth-logo .txt span { font-size: 12px; color: var(--slate); }

.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--slate); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 7px; color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .06s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-live { background: var(--live); color: #fff; }
.btn-live:hover { background: #0b8a5f; }
.btn-ghost {
  background: #fff; color: var(--ink-2); border-color: var(--line);
}
.btn-ghost:hover { background: var(--line-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: #e6e9f1; color: var(--slate-2);
  cursor: not-allowed; border-color: transparent;
}

.alert {
  padding: 12px 14px; border-radius: var(--r-sm);
  font-size: 14px; margin-bottom: 18px;
  border: 1px solid;
}
.alert-error   { background: var(--danger-soft); border-color: #f5c9cc; color: #96222b; }
.alert-info    { background: var(--brand-soft); border-color: #d3d3f5; color: #33338a; }
.alert-success { background: var(--live-soft); border-color: #bfe8d8; color: #0a6647; }
.alert-warn    { background: var(--soon-soft); border-color: #f5ddb8; color: #8a5308; }

.demo-hint {
  margin-top: 26px; padding: 15px 16px;
  background: #fff; border: 1px dashed var(--line);
  border-radius: var(--r-sm); font-size: 13px; color: var(--slate);
}
.demo-hint strong { color: var(--ink-2); display: block; margin-bottom: 8px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .07em; }
.demo-hint code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--line-soft); padding: 2px 6px; border-radius: 4px; color: var(--ink);
}
.demo-hint .row { display: flex; justify-content: space-between; padding: 4px 0; }

.auth-foot {
  margin-top: 26px; font-size: 12.5px; color: var(--slate-2); text-align: center;
}

@media (min-width: 900px) {
  .auth-wrap { grid-template-columns: 1.05fr 1fr; }
  .auth-brand { display: block; }
  .auth-panel { padding: 40px; }
}

/* ==========================================================
   APP SHELL
   ========================================================== */

.shell { min-height: 100dvh; }

/* --- Left rail (desktop) --- */
.rail {
  display: none;
  position: fixed; inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--ink);
  color: #fff;
  flex-direction: column;
  z-index: 40;
}

.rail-head {
  padding: 22px 20px 18px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.rail-head .mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--brand-2); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
}
.rail-head strong {
  font-family: var(--font-display); font-size: 14.5px; font-weight: 700;
  letter-spacing: -0.02em; display: block; line-height: 1.25;
}
.rail-head span { font-size: 11.5px; color: #7d8db0; }

.rail-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.rail-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: #64749a; padding: 14px 10px 7px; font-weight: 600;
}
.rail-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; margin-bottom: 2px;
  border-radius: var(--r-sm);
  color: #b7c4dd; font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .13s, color .13s;
}
.rail-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.rail-nav a.on { background: var(--brand); color: #fff; }
.rail-nav a .ic { width: 18px; height: 18px; flex: none; opacity: .95; }
.rail-nav a .badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px;
}

.rail-foot {
  padding: 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 11px;
}
.rail-foot .av {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--brand-2); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-family: var(--font-display);
}
.rail-foot .who { min-width: 0; flex: 1; }
.rail-foot .who strong {
  display: block; font-size: 13.5px; color: #fff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-foot .who span { font-size: 11.5px; color: #7d8db0; }
.rail-foot a.out {
  color: #7d8db0; padding: 6px; border-radius: 6px; display: grid; place-items: center;
}
.rail-foot a.out:hover { background: rgba(255,255,255,.08); color: #fff; }

/* --- Top bar (mobile) --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--ink); color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}
.topbar .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--brand-2); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
}
.topbar .t strong {
  display: block; font-family: var(--font-display); font-size: 14px;
  font-weight: 700; line-height: 1.2;
}
.topbar .t span { font-size: 11px; color: #8194b5; }
.topbar .sp { flex: 1; }
.topbar a.icn { color: #b7c4dd; display: grid; place-items: center; padding: 6px; }

/* --- Main --- */
.main { padding: 20px 16px 96px; }

.page-head { margin-bottom: 20px; }
.page-head .eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--slate-2); margin-bottom: 6px;
}
.page-head h1 { font-size: 25px; }
.page-head p { color: var(--slate); margin: 6px 0 0; font-size: 14.5px; }

/* --- Bottom tabs (mobile) --- */
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; color: var(--slate-2); font-size: 10.5px; font-weight: 600;
  text-decoration: none; border-radius: var(--r-sm); position: relative;
}
.tabs a.on { color: var(--brand); }
.tabs a:hover { text-decoration: none; }
.tabs .ic { width: 21px; height: 21px; }
.tabs .dot {
  position: absolute; top: 5px; right: calc(50% - 16px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--danger);
}

@media (min-width: 1000px) {
  .rail { display: flex; }
  .topbar { display: none; }
  .tabs { display: none; }
  .main { margin-left: var(--rail); padding: 32px 40px 60px; }
  .page-head h1 { font-size: 30px; }
}

.wrap { max-width: 1080px; width: 100%; }
.main { max-width: 100%; }

/* ==========================================================
   CARDS
   ========================================================== */

.card {
  background: var(--card);
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }

.card-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 10px;
}
.card-head h3 { font-size: 15.5px; }
.card-head .more { margin-left: auto; font-size: 13px; font-weight: 600; }

.section { margin-bottom: 26px; }
.section-title {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
}
.section-title h2 { font-size: 17px; }
.section-title .count {
  font-family: var(--font-mono); font-size: 12px; color: var(--slate-2);
}
.section-title .more { margin-left: auto; font-size: 13px; font-weight: 600; }

/* ==========================================================
   SIGNATURE — LIVE CLASS CARD
   ========================================================== */

.liveclass {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.liveclass .lc-strip { height: 4px; background: var(--line); }
.liveclass[data-state="live"]     .lc-strip { background: var(--live); }
.liveclass[data-state="soon"]     .lc-strip { background: var(--soon); }
.liveclass[data-state="upcoming"] .lc-strip { background: var(--brand-2); }
.liveclass[data-state="ended"]    .lc-strip { background: var(--line); }

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

.lc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.state-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 20px;
  font-family: var(--font-mono);
}
.state-pill .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
[data-state="live"] .state-pill     { background: var(--live-soft); color: #0a7d55; }
[data-state="soon"] .state-pill     { background: var(--soon-soft); color: #9a5b0a; }
[data-state="upcoming"] .state-pill { background: var(--brand-soft); color: var(--brand); }
[data-state="ended"] .state-pill    { background: var(--line-soft); color: var(--slate); }

[data-state="live"] .state-pill .pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}

.subject-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-family: var(--font-mono);
  margin-left: auto; color: var(--slate-2);
}
.subject-tag.physics   { color: var(--phy); }
.subject-tag.chemistry { color: var(--chem); }
.subject-tag.biology,
.subject-tag.botany,
.subject-tag.zoology   { color: var(--bio); }

.lc-topic {
  overflow-wrap: anywhere;
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.22; margin-bottom: 6px;
}
.lc-meta { color: var(--slate); font-size: 13.5px; margin-bottom: 16px; }
.lc-meta .dot { margin: 0 7px; color: var(--line); }

.lc-clock {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 0 16px; border-top: 1px solid var(--line-soft);
}
.lc-clock .cd {
  font-family: var(--font-mono); font-size: 30px; font-weight: 500;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  line-height: 1;
}
[data-state="live"] .lc-clock .cd     { color: var(--live); }
[data-state="soon"] .lc-clock .cd     { color: var(--soon); }
[data-state="upcoming"] .lc-clock .cd { color: var(--ink); }
[data-state="ended"] .lc-clock .cd    { color: var(--slate-2); }
.lc-clock .cd-label { font-size: 12.5px; color: var(--slate); }

.lc-track {
  height: 5px; background: var(--line-soft); border-radius: 20px;
  overflow: hidden; margin-bottom: 16px;
}
.lc-track .fill {
  height: 100%; width: 0; background: var(--live); border-radius: 20px;
  transition: width 1s linear;
}

.lc-actions { display: flex; gap: 10px; }
.lc-actions .btn { flex: 1; }

.lc-note {
  font-size: 12.5px; color: var(--slate-2); margin-top: 11px; text-align: center;
}

/* ==========================================================
   STAT TILES
   ========================================================== */

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 16px;
}
.stat .k {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--slate-2); font-weight: 600; margin-bottom: 8px;
}
.stat .v {
  font-family: var(--font-mono); font-size: 26px; font-weight: 500;
  letter-spacing: -0.03em; line-height: 1;
}
.stat .v small { font-size: 14px; color: var(--slate-2); font-weight: 400; }
.stat .sub { font-size: 12px; color: var(--slate); margin-top: 6px; }
.stat.good .v { color: var(--live); }
.stat.warn .v { color: var(--soon); }
.stat.bad  .v { color: var(--danger); }

/* ==========================================================
   LISTS
   ========================================================== */

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
}
.list-row:first-child { border-top: 0; }
.list-row .ico {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  background: var(--line-soft); color: var(--slate);
  letter-spacing: .03em;
}
.list-row .ico.physics   { background: #e8f0fc; color: var(--phy); }
.list-row .ico.chemistry { background: #fdeee6; color: var(--chem); }
.list-row .ico.biology,
.list-row .ico.botany,
.list-row .ico.zoology   { background: var(--live-soft); color: var(--bio); }

.list-row .body { flex: 1; min-width: 0; }
.list-row .body strong {
  display: block; font-size: 14.5px; font-weight: 600; color: var(--ink);
  white-space: normal; overflow-wrap: anywhere;
}
.list-row .body span { font-size: 12.5px; color: var(--slate); overflow-wrap: anywhere; }
.list-row .side { text-align: right; flex: none; max-width: 42%; }
.list-row .side .t {
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-2);
  white-space: nowrap;
}
.list-row .side .s { font-size: 11.5px; color: var(--slate-2); }

.tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 5px; letter-spacing: .04em;
  text-transform: uppercase; font-family: var(--font-mono);
}
.tag-live { background: var(--live-soft); color: #0a7d55; }
.tag-soon { background: var(--soon-soft); color: #9a5b0a; }
.tag-new  { background: var(--brand-soft); color: var(--brand); }
.tag-off  { background: var(--line-soft); color: var(--slate); }
.tag-bad  { background: var(--danger-soft); color: #96222b; }

.empty {
  padding: 40px 22px; text-align: center; color: var(--slate);
}
.empty .big { font-family: var(--font-display); font-size: 16px; color: var(--ink-2); margin-bottom: 5px; }
.empty p { margin: 0; font-size: 14px; }

/* ==========================================================
   MISC
   ========================================================== */

.notice-strip {
  background: var(--ink-2); color: #cfd9ec;
  padding: 11px 16px; border-radius: var(--r-sm);
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 18px;
}
.notice-strip .ic { flex: none; margin-top: 2px; }
.notice-strip span { min-width: 0; overflow-wrap: anywhere; }
.notice-strip strong { color: #fff; }

.grid-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1.35fr 1fr; } }

.bar-row { padding: 13px 18px; border-top: 1px solid var(--line-soft); }
.bar-row:first-child { border-top: 0; }
.bar-row .top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.bar-row .top strong { font-size: 14px; font-weight: 600; }
.bar-row .top .pc { font-family: var(--font-mono); font-size: 13.5px; }
.bar {
  height: 7px; background: var(--line-soft); border-radius: 20px; overflow: hidden;
}
.bar span { display: block; height: 100%; border-radius: 20px; }

.locked-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; background: var(--brand-soft);
  border-radius: var(--r-sm); font-size: 13px; color: #33338a;
  margin-top: 14px;
}
.locked-note svg { flex: none; margin-top: 2px; }
.locked-note span { min-width: 0; overflow-wrap: anywhere; }

.watermark-note {
  font-size: 12px; color: var(--slate-2); padding: 12px 18px;
  border-top: 1px solid var(--line-soft); background: #fafbfd;
  border-radius: 0 0 var(--r) var(--r);
}

.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  background: var(--soon-soft); color: #8a5308;
  padding: 4px 9px; border-radius: 5px; border: 1px dashed #e6c78f;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
