:root {
  color-scheme: light;
  --ink: #2a1c14;
  --muted: #6d5848;
  --paper: #f6efe4;
  --paper-2: #fffaf3;
  --line: #e4d5c4;
  --copper: #9c4324;
  --copper-ink: #fff8f3;
  --good: #1f6a45;
  --warn: #8a4b12;
  --bad: #8d2c2c;
  --shadow: 0 18px 40px rgba(42, 28, 20, 0.08);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, #f3d7bf, transparent 55%),
    linear-gradient(180deg, #f3e6d4, var(--paper) 28%);
  color: var(--ink);
}
body[dir="rtl"] { font-family: "Geeza Pro", "Noto Naskh Arabic", Palatino, serif; }
a { color: var(--copper); }
button, input, select {
  font: inherit;
  color: inherit;
}
button, .top-actions a {
  border: 0;
  background: var(--copper);
  color: var(--copper-ink);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  min-height: 48px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.secondary, .lang, #logout {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
button:disabled { opacity: 0.55; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  min-height: 48px;
}
label { display: grid; gap: 0.35rem; font-size: 0.92rem; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
}
.top-actions { display: flex; gap: 0.5rem; align-items: center; }
.mark { margin: 0; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
main { width: min(920px, calc(100% - 1.5rem)); margin: 0 auto 3rem; }
.sheet, article, section, .card {
  background: rgba(255, 250, 243, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
h1, h2 { font-weight: 600; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.lede, .note, .who { color: var(--muted); }
.error { color: var(--bad); }
.warn { color: var(--warn); }
.row, .stats { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.row > * { flex: 1 1 140px; }
.stats article { flex: 1 1 160px; }
.stats strong { display: block; font-size: 2rem; }
.lookup, #program-form, #branch-form, #staff-form, #void-form, #login-form { display: grid; gap: 0.7rem; }
.card { margin-top: 1rem; }
.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.95rem; word-break: break-all; }
.dots { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.dots i {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid var(--copper);
  display: block;
}
.dots i.on { background: var(--copper); }
.list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.55rem; }
.list li { border-top: 1px solid var(--line); padding-top: 0.55rem; }
video { width: 100%; border-radius: 16px; background: #111; margin-top: 0.6rem; }
section + section { margin-top: 1rem; }
@media (max-width: 720px) {
  .top { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
}
