/* app-moshawer — base styles. Brand: teal #0c5a61, orange #c26d12, cream bg.
   View-specific styles live in student.css / counselor.css. */
@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --brand: #0c5a61;
  --brand-dark: #084549;
  --accent: #c26d12;
  --accent-soft: #f6e3cd;
  --cream: #f7f1e5;
  --card: #fffdf8;
  --ink: #22302f;
  --muted: #6f7a78;
  --line: #e7ddc9;
  --green: #1e7d46;
  --green-soft: #dff0e4;
  --red: #c0392b;
  --red-soft: #fbe3df;
  --orange-soft: #fdeeda;
  --radius: 14px;
  --radius-lg: 18px;
  /* design tokens: soft depth, 8px spacing rhythm */
  --shadow-sm: 0 1px 2px rgba(12, 90, 97, .05), 0 2px 8px rgba(12, 90, 97, .05);
  --shadow-md: 0 4px 16px rgba(12, 90, 97, .08);
  --shadow-lg: 0 12px 32px rgba(12, 90, 97, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0 0 8px; line-height: 1.5; }
p { margin: 0 0 10px; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
.muted { color: var(--muted); font-size: 13.5px; }
.err { color: var(--red); font-size: 13.5px; margin: 6px 0; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 12px; padding: 10px 18px;
  min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; line-height: 1.5;
  transition: background .15s, border-color .15s, opacity .15s, transform .1s, box-shadow .15s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:active { background: var(--brand-dark); }
.btn-dark { background: #22302f; color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- login ---------- */
.login-wrap { max-width: 440px; margin: 0 auto; padding: 32px 16px 40px; }
.login-brand { text-align: center; margin-bottom: 20px; }
.login-features { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 20px;
  background: var(--brand); color: #fff; font-size: 38px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 4px 14px rgba(12, 90, 97, .28);
}
.login-brand h1 { font-size: 28px; color: var(--brand); }
.login-sub { color: var(--muted); font-size: 14px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(12, 90, 97, .05);
}
.login-card h2 { font-size: 18px; color: var(--brand); }
.login-card-main { border: 1.5px solid var(--brand); }
.login-card-guest { border-top: 4px solid var(--accent); }
.login-card-guest h2 { color: var(--accent); }
.guest-note {
  background: #dceeed; color: var(--brand); border-radius: 10px;
  padding: 10px 12px; font-size: 13.5px; margin-top: 12px;
}
.counselor-line { text-align: center; margin: 18px 0 6px; }
.counselor-line a { color: var(--muted); font-size: 13px; text-decoration: none; }
.counselor-line a:hover { text-decoration: underline; }
.login-card-dim { background: #f3ecdc; }
.fld-label { display: block; font-weight: 700; font-size: 13.5px; margin: 12px 0 5px; }
.login-card input[type="text"], .login-card input[type="password"] {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; outline: none;
}
.login-card input[type="text"]:focus, .login-card input[type="password"]:focus { border-color: var(--brand); }
.track-row { display: flex; gap: 8px; }
.track-btn {
  flex: 1; padding: 9px 0; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 700;
}
.track-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- app shell ---------- */
.app-header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 12px rgba(8, 63, 68, .22); }
.menu-btn {
  flex: none; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 12px;
  background: rgba(255, 255, 255, .22); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.menu-btn:hover { background: rgba(255, 255, 255, .32); }
.menu-btn svg { width: 22px; height: 22px; }
.app-header-in {
  max-width: 1180px; margin: 0 auto; padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.header-side { display: flex; align-items: center; gap: 10px; }
.whoami { font-size: 13.5px; opacity: .95; }
.app-header .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
#view { max-width: 1180px; margin: 0 auto; padding: 16px; }

/* ---------- shared bits ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 17px; color: var(--brand); }
.card h3 { font-size: 15.5px; }
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 12.5px; font-weight: 700; line-height: 1.9;
}
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-orange { background: var(--orange-soft); color: var(--accent); }
.chip-grey { background: #ece7da; color: var(--muted); }
.chip-teal { background: #dceeed; color: var(--brand); }
.chip-code { background: #e8e2f2; color: #5b4a8a; direction: ltr; unicode-bidi: plaintext; }
.bar { height: 10px; background: #eee5d2; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.bar.low > i { background: var(--red); }
.bar.mid > i { background: var(--accent); }
details.collapsed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
details.collapsed summary { cursor: pointer; font-weight: 800; color: var(--brand); list-style: none; }
details.collapsed summary::-webkit-details-marker { display: none; }
details.collapsed summary::after { content: " ▾"; color: var(--muted); }
details.collapsed[open ] summary::after { content: " ▴"; }
table.schem { width: 100%; border-collapse: collapse; font-size: 14px; }
table.schem th, table.schem td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; }
table.schem th { color: var(--muted); font-size: 13px; font-weight: 700; }
table.schem tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }
.ok-mark { color: var(--green); font-weight: 800; }
.bad-mark { color: var(--red); font-weight: 800; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #22302f; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50;
  max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { color: var(--muted); text-align: center; padding: 18px 0; }

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  #view { padding: 12px; }
  .card { padding: 13px; }
}
