/* UCI Design System — base components (product/app register).
   Requires tokens.css. Plain CSS, no framework. Class prefix: none (short names),
   keep them; projects add their own on top. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--uci-cream-soft); color: var(--uci-navy);
  font: 400 var(--fs-base)/1.5 var(--font-sans); letter-spacing: var(--tracking-tight);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }

/* ── Type ── */
.h1, .h2, .h3 { font-family: var(--font-serif); font-weight: 700; color: var(--uci-navy); margin: 0; line-height: 1.2; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); font-weight: 600; }
.eyebrow { font-family: var(--font-script); color: var(--uci-red-ink); font-size: 22px; line-height: 1.3; }
.muted { color: var(--uci-muted); }
.small { font-size: var(--fs-sm); }
.stat { font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-stat); line-height: 1; color: var(--uci-navy); font-variant-numeric: tabular-nums; }
.label { font-size: var(--fs-xs); font-weight: 600; color: var(--uci-muted); }

/* ── Header (white bar, logo left, navy nav) ── */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--uci-divider); }
.topbar-in { max-width: 1180px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 20px; }
.topbar-logo { height: 26px; width: auto; }
.topbar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.topbar nav a { text-decoration: none; font-weight: 600; font-size: var(--fs-base); padding: 8px 12px; border-radius: var(--r-md); color: var(--uci-navy); white-space: nowrap; }
.topbar nav a:hover { background: var(--uci-surface-muted); }
.topbar nav a[aria-current="page"] { color: var(--uci-red); background: var(--uci-red-subtle); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: var(--r-md); border: 1px solid transparent; font-weight: 700; font-size: var(--fs-base);
  text-decoration: none; cursor: pointer; transition: background var(--dur), transform var(--dur), box-shadow var(--dur); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible { outline: 2px solid var(--uci-blue-bright); outline-offset: 2px; }
.btn-primary { background: var(--uci-red); color: #fff; }
.btn-primary:hover { background: var(--uci-red-hover); }
.btn-cta { background: var(--uci-yellow); color: var(--uci-navy); }        /* site "Apply Now" style */
.btn-cta:hover { background: var(--uci-yellow-hover); }
.btn-ghost { background: #fff; color: var(--uci-navy); border-color: var(--uci-border); }
.btn-ghost:hover { background: var(--uci-surface-hover); }
.btn-text { background: none; color: var(--uci-navy); padding: 0 8px; height: 32px; }
.btn-text:hover { color: var(--uci-red); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn-danger { background: #fff; color: #b42318; border-color: #f3c3bb; }
.btn-danger:hover { background: var(--uci-red-subtle); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── Card / panel ── */
.card { background: #fff; border: 1px solid var(--uci-divider); border-radius: var(--r-xl); padding: 20px; box-shadow: var(--shadow-card); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-link { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur); }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-accent { border-color: #f3c3bb; background: linear-gradient(var(--uci-red-subtle), #fff 96px); }
.panel-grid { background: var(--pattern-grid-light); background-color: #fff; }

/* ── Forms ── */
.field { display: grid; gap: 6px; }
.field > span { font-size: var(--fs-sm); font-weight: 600; color: var(--uci-navy); }
.field small { color: var(--uci-muted); font-size: var(--fs-xs); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--uci-border); border-radius: var(--r-md); background: #fff; }
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--uci-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--uci-blue-bright); box-shadow: 0 0 0 3px rgba(29,78,164,.15); }

/* ── Badges (normal case, not mono caps) ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--uci-green-subtle); color: var(--uci-green); }
.badge-wait { background: var(--uci-yellow-subtle); color: #8a5a00; }
.badge-no { background: var(--uci-red-subtle); color: #b42318; }
.badge-neutral { background: var(--uci-surface-muted); color: var(--uci-muted); }

/* ── Dense table ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--uci-divider); border-radius: var(--r-lg); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table th { text-align: left; font-size: var(--fs-xs); font-weight: 700; color: var(--uci-muted); padding: 10px 14px; background: var(--uci-panel-muted); border-bottom: 1px solid var(--uci-divider); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--uci-divider); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--uci-surface-hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Shield emblem (college / dimension mark) ── */
.shield { --c: var(--uci-red); width: 52px; height: 60px; display: grid; place-items: center; color: #fff;
  background: var(--c); font: 700 22px/1 var(--font-serif);
  clip-path: path("M26 0 L52 6 V30 C52 46 40 55 26 60 C12 55 0 46 0 30 V6 Z"); }
.shield.is-empty { background: var(--uci-surface-muted); color: var(--uci-muted); }
.college-dewantara { --c: var(--college-dewantara); }
.college-madani { --c: var(--college-madani); }
.college-hypatia { --c: var(--college-hypatia); }
.college-nexus { --c: var(--college-nexus); }

/* ── Red hero band (marketing / landing only) ── */
.hero-red { background: var(--pattern-grid-on-red); background-color: var(--uci-red); color: #fff; padding: 56px 16px; text-align: center; }
.hero-red .eyebrow { color: #fff; }
.hero-red h1 { font: 700 clamp(28px, 4vw, 48px)/1.15 var(--font-serif); margin: 8px auto 20px; max-width: 900px; }

/* ── Misc ── */
.note { border: 1px solid #f3c3bb; background: var(--uci-red-subtle); border-radius: var(--r-md); padding: 10px 14px; font-size: var(--fs-sm); }
.empty { border: 1px dashed var(--uci-border); border-radius: var(--r-lg); padding: 24px; text-align: center; color: var(--uci-muted); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--uci-navy); color: #fff; padding: 10px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-weight: 600; z-index: 50; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
