/* Portal shell for the mock college ERP.
   Keeps the SRM-AP identity — navy chrome, label:value tables — so the Earshot sheet reads as a
   different product arriving over it. Refined, deliberately not restyled into something modern:
   that contrast is what the demo is showing. Local prototype only. */

:root {
  --navy: #21455f;
  --navy-dark: #1a3850;
  --navy-hover: #2b5677;
  --gold: #b8945a;
  --page: #eef0f2;
  --line: #d9dde2;
  --line-strong: #c3c9d0;
  --label: #5b7c98;
  --value: #1a5490;
  --heading: #64798c;
  --green: #12805f;
  --green-bg: #e6f5ef;
  --red: #c0392b;
  --amber: #b7791f;
  --amber-bg: #fdf3e2;
  --sidebar-w: 300px;
  --topbar-h: 84px;
  --shadow-sm: 0 1px 2px rgba(16, 30, 44, .06);
  --shadow-md: 0 2px 10px rgba(16, 30, 44, .08);
  --shadow-pop: 0 12px 34px rgba(16, 30, 44, .18);
  --r: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #2c3a46;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gold);
  z-index: 30;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 3px; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  z-index: 20;
  box-shadow: var(--shadow-md);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: calc(var(--sidebar-w) - 24px); }
.brand-mark {
  width: 50px; height: 50px; border-radius: 50%;
  background: #fff; display: grid; place-items: center;
  font-weight: 800; color: var(--navy); font-size: 12px; letter-spacing: .04em;
  flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.brand-name { color: #fff; line-height: 1.05; }
.brand-name b { font-size: 23px; letter-spacing: .13em; display: block; font-weight: 700; }
.brand-name span { font-size: 9px; letter-spacing: .22em; color: #b9c8d6; }

.hamburger { width: 28px; flex: none; background: none; border: 0; padding: 0; cursor: pointer; }
.hamburger i { display: block; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; opacity: .9; }

/* ---------- account menu (where Sign out actually lives) ---------- */
.acct { margin-left: auto; position: relative; }
.acct-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
  color: #fff; font: inherit; font-size: 13.5px; cursor: pointer;
  transition: background .14s;
}
.acct-btn:hover { background: rgba(255, 255, 255, .16); }
.acct-btn .av {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #7f9bb3, #4d6f8c);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.acct-btn .cr { font-size: 9px; opacity: .8; transition: transform .16s; }
.acct.open .acct-btn .cr { transform: rotate(180deg); }

.acct-menu {
  position: absolute; top: calc(100% + 9px); right: 0;
  min-width: 232px; background: #fff;
  border-radius: 10px; box-shadow: var(--shadow-pop);
  overflow: hidden; z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(-5px);
  transition: opacity .14s, transform .14s, visibility .14s;
}
.acct.open .acct-menu { opacity: 1; visibility: visible; transform: none; }
.acct-menu .mh { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.acct-menu .mh b { display: block; color: #23303c; font-size: 14px; }
.acct-menu .mh span { font-size: 12px; color: #7b8896; }
.acct-menu a {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 15px; color: #38454f; text-decoration: none; font-size: 14px;
  transition: background .12s;
}
.acct-menu a:hover { background: #f3f6f8; }
.acct-menu a.out { color: var(--red); border-top: 1px solid var(--line); font-weight: 600; }
.acct-menu a.out:hover { background: #fdf1ef; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  top: calc(var(--topbar-h) + 3px); bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  overflow-y: auto;
  z-index: 10;
  padding-bottom: 56px;
}
.who { padding: 20px 16px 22px; display: flex; align-items: center; gap: 14px; }
.who .pic {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #8fa9be, #47698a);
  border: 2px solid rgba(255, 255, 255, .85);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .02em;
}
.who .txt { color: #fff; font-size: 12px; line-height: 1.45; opacity: .72; }
.who .txt b { display: block; font-weight: 600; font-size: 14.5px; opacity: 1; margin-top: 1px; }

.nav { padding: 0 8px; }
.nav a {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 12px; margin-bottom: 1px;
  color: #dbe6ef; text-decoration: none; font-size: 14.5px;
  border-radius: var(--r);
  transition: background .13s, color .13s;
}
.nav a:hover { background: var(--navy-hover); color: #fff; }
.nav a.active { background: rgba(0, 0, 0, .22); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
.nav a .ico { width: 20px; text-align: center; font-size: 15px; flex: none; opacity: .85; }
.nav a.active .ico { opacity: 1; }
.nav a .chev { margin-left: auto; opacity: .45; font-size: 10px; }

.sidebar-foot {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, .2);
  display: flex; justify-content: space-around;
  padding: 12px 0; font-size: 15px;
}
.sidebar-foot a { color: #b9c8d6; text-decoration: none; transition: color .13s; }
.sidebar-foot a:hover { color: #fff; }

/* ---------- content ---------- */
.main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 28px) 28px 44px; }

h1.page {
  font-size: 19px; font-weight: 600; color: #46596b;
  margin: 0 0 18px; letter-spacing: .05em; text-transform: uppercase;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel + .panel { margin-top: 20px; }
.panel-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--heading); font-weight: 600;
  background: #fafbfc;
  display: flex; align-items: center; gap: 8px;
}
.panel-head .right { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.panel-body { padding: 20px 16px; }

/* label : value rows */
.rows { width: 100%; border-collapse: collapse; }
.rows tr + tr td { border-top: 1px solid #eceff2; }
.rows tr:hover td { background: #fafbfc; }
.rows td { padding: 12px 16px; }
.rows td.k { color: var(--label); width: 32%; font-size: 14px; }
.rows td.sep { width: 12px; color: #b6c1cb; padding: 12px 0; }
.rows td.v { color: var(--value); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: var(--r); cursor: pointer;
  background: var(--navy); color: #fff;
  font: 600 14.5px/1 inherit;
  padding: 13px 22px; letter-spacing: .01em;
  box-shadow: var(--shadow-sm);
  transition: background .14s, transform .06s, box-shadow .14s;
}
.btn:hover { background: var(--navy-hover); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #b9c1c9; cursor: default; box-shadow: none; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: #f4f7f9; border-color: #a9b3bd; }

.muted { color: #7b8896; font-size: 13px; }
.ok { color: var(--green); font-weight: 700; }
.bad { color: var(--red); font-weight: 700; }
.warn { color: var(--amber); font-weight: 700; }

/* ---------- status pills ---------- */
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
  white-space: nowrap;
}
.pill.p { background: var(--green-bg); color: var(--green); }
.pill.a { background: #eef1f4; color: #8b959c; }
.pill.m { background: var(--amber-bg); color: var(--amber); }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); }
.stat { background: #fff; padding: 15px 16px; }
.stat b { display: block; font-size: 25px; font-weight: 700; color: var(--value); letter-spacing: -.02em; line-height: 1.15; }
.stat span { font-size: 11px; color: var(--label); letter-spacing: .05em; text-transform: uppercase; }
.stat.good b { color: var(--green); }
.stat.mute b { color: #98a4af; }

/* live dot for a running session */
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  display: inline-block; margin-right: 6px; animation: pulse 1.7s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .3 } 50% { opacity: 1 } }

/* ---------- initials avatar ---------- */
.ini {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  background: #e7ecf1; color: #56707f;
}
tr.present .ini { background: var(--green-bg); color: var(--green); }

/* ---------- course cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s, transform .1s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card .code {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; color: var(--label);
}
.card .ttl { font-size: 15.5px; font-weight: 600; color: #23303c; line-height: 1.35; }
.card .meta { font-size: 12.5px; color: #8592a0; }
.card .act { margin-top: auto; padding-top: 4px; }
.card .act .btn { width: 100%; text-align: center; text-decoration: none; display: block; }

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; --topbar-h: 62px; }
  .sidebar { display: none; }
  .brand { min-width: 0; }
  .brand-mark { width: 38px; height: 38px; font-size: 10px; }
  .brand-name b { font-size: 17px; }
  .brand-name span { font-size: 8px; }
  .acct-btn .nm { display: none; }
  .main { padding: calc(var(--topbar-h) + 18px) 12px 32px; }
  .rows td.k { width: 42%; font-size: 13px; }
  .rows td { padding: 11px 12px; }
}
