/* admin.css — Role Models Foundation admin dashboard.
 * Light theme on cream, navy sidebar, gold active states. Reuses the site brand
 * tokens (see DESIGN.md). Manager-facing: big targets, plain labels. */

:root {
  --gold: #FFC107;
  --gold-deep: #E0A800;
  --navy: #001F3F;
  --navy-2: #06294D;
  --cream: #FDFBF7;
  --ink: #19222F;
  --muted: #5B6675;
  --line: #E8E2D6;
  --line-2: #EFEAE0;
  --ok: #1E7A4D;
  --warn: #B26A00;
  --danger: #B3261E;
  --shadow: 0 22px 50px -22px rgba(0, 31, 63, .4);
  --shadow-sm: 0 6px 18px -10px rgba(0, 31, 63, .35);
  --radius: 16px;
  --f: "Nunito", system-ui, -apple-system, sans-serif;
  --d: "Fraunces", Georgia, serif;
}

* { margin: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--f);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; }

/* ---------- Login ---------- */
.a-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 193, 7, .08), transparent 60%),
    var(--navy);
}
.a-login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 36px 30px;
  box-shadow: var(--shadow);
  text-align: center;
}
.a-login-card .a-logo { margin: 0 auto 14px; }
.a-login-card .a-logo svg { height: 52px; width: auto; display: block; margin: 0 auto; }
.a-login-card h1 { font-family: var(--d); font-style: italic; font-weight: 600; font-size: 1.55rem; color: var(--navy); }
.a-login-card p { color: var(--muted); font-size: .92rem; margin: 6px 0 22px; }
.a-login-card .a-field { text-align: left; }
.a-login-err { color: var(--danger); font-weight: 700; font-size: .88rem; margin-top: 12px; min-height: 1.1em; }

/* ---------- Shell ---------- */
.a-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100dvh; }
.a-side {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.a-side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.a-side-brand svg { height: 36px; width: auto; }
.a-side-brand b { font-family: var(--d); font-style: italic; font-weight: 600; font-size: 1.1rem; }
.a-nav { display: flex; flex-direction: column; gap: 4px; }
.a-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 11px;
  color: #cfd8e3; font-weight: 700; font-size: .95rem;
  transition: background .15s, color .15s;
}
.a-nav a i { font-size: 1.25rem; }
.a-nav a:hover { background: var(--navy-2); color: #fff; }
.a-nav a.active { background: var(--gold); color: var(--navy); }
.a-side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }
.a-logout {
  width: 100%; display: flex; align-items: center; gap: 10px; justify-content: center;
  background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff;
  padding: 11px; border-radius: 11px; font-family: var(--f); font-weight: 700; cursor: pointer;
}
.a-logout:hover { background: rgba(255, 255, 255, .08); }

.a-main { min-width: 0; display: flex; flex-direction: column; }
.a-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 247, .85);
  backdrop-filter: saturate(1.2);
  position: sticky; top: 0; z-index: 10;
}
.a-top h1 { font-family: var(--d); font-style: italic; font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--navy); }
.a-top .a-top-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.a-view { padding: clamp(18px, 4vw, 40px); flex: 1; }

/* ---------- Buttons ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f); font-weight: 800; font-size: .92rem;
  padding: 11px 20px; border-radius: 100px; border: 0; cursor: pointer;
  transition: transform .12s, background .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.a-btn:active { transform: translateY(1px); }
.a-btn-gold { background: var(--gold); color: var(--navy); }
.a-btn-gold:hover { background: var(--gold-deep); }
.a-btn-navy { background: var(--navy); color: #fff; }
.a-btn-navy:hover { background: var(--navy-2); }
.a-btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.a-btn-outline:hover { border-color: var(--navy); }
.a-btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.a-btn-ghost:hover { color: var(--ink); background: var(--line-2); }
.a-btn-danger { background: #fff; color: var(--danger); border: 1.5px solid #e8c9c6; }
.a-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.a-btn-sm { padding: 7px 14px; font-size: .84rem; }
.a-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.a-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px;
}
.a-grid { display: grid; gap: 18px; }
.a-grid-3 { grid-template-columns: repeat(3, 1fr); }
.a-grid-2 { grid-template-columns: repeat(2, 1fr); }

.a-home-card { display: flex; flex-direction: column; gap: 10px; }
.a-home-card .a-home-ic {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 193, 7, .16); color: var(--navy); font-size: 1.5rem;
}
.a-home-card h3 { font-size: 1.15rem; color: var(--navy); }
.a-home-card p { color: var(--muted); font-size: .92rem; }
.a-home-card .a-btn { margin-top: 6px; align-self: flex-start; }

/* ---------- Stat tiles ---------- */
.a-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.a-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.a-stat .n { font-family: var(--d); font-style: italic; font-weight: 600; font-size: 1.9rem; color: var(--navy); }
.a-stat .l { color: var(--muted); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Forms / fields ---------- */
.a-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.a-field > label { font-weight: 800; font-size: .82rem; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.a-field .hint { font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: none; letter-spacing: 0; }
.a-input, .a-select, .a-textarea {
  font-family: var(--f); font-size: .98rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.a-input:focus, .a-select:focus, .a-textarea:focus {
  outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 193, 7, .25);
}
.a-textarea { resize: vertical; min-height: 84px; }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.a-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.a-check input { width: 18px; height: 18px; accent-color: var(--gold); }

/* segmented control (theme/rotation pickers) */
.a-seg { display: inline-flex; background: var(--line-2); border-radius: 11px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.a-seg button {
  border: 0; background: transparent; cursor: pointer; font-family: var(--f); font-weight: 800;
  font-size: .85rem; padding: 8px 14px; border-radius: 9px; color: var(--muted);
}
.a-seg button.active { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* ---------- Tables ---------- */
.a-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.a-table { width: 100%; border-collapse: collapse; }
.a-table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 800; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff;
}
.a-table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-size: .94rem; vertical-align: middle; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tbody tr { cursor: pointer; transition: background .12s; }
.a-table tbody tr:hover { background: #FCFAF4; }
.a-table .who b { color: var(--navy); display: block; }
.a-table .who span { color: var(--muted); font-size: .85rem; }

/* ---------- Badges / pills ---------- */
.a-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 800; padding: 4px 10px; border-radius: 100px; }
.a-badge.gold { background: rgba(255, 193, 7, .2); color: var(--warn); }
.a-badge.navy { background: rgba(0, 31, 63, .1); color: var(--navy); }
.a-badge.ok { background: rgba(30, 122, 77, .14); color: var(--ok); }
.a-badge.muted { background: var(--line-2); color: var(--muted); }

/* filter pills (board / forms) */
.a-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.a-pills button { border: 1.5px solid var(--line); background: #fff; color: var(--muted); font-family: var(--f); font-weight: 800; font-size: .82rem; padding: 7px 15px; border-radius: 100px; cursor: pointer; }
.a-pills button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Toolbar ---------- */
.a-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.a-search { position: relative; flex: 1; max-width: 360px; }
.a-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.a-search input { padding-left: 38px; }

/* ---------- Modal ---------- */
.a-modal { position: fixed; inset: 0; background: rgba(0, 31, 63, .55); display: none; place-items: center; padding: 20px; z-index: 100; }
.a-modal.open { display: grid; }
.a-modal-card { background: #fff; border-radius: 18px; width: 100%; max-width: 620px; max-height: 90dvh; overflow: auto; box-shadow: var(--shadow); }
.a-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.a-modal-head h2 { font-family: var(--d); font-style: italic; font-weight: 600; color: var(--navy); font-size: 1.35rem; }
.a-modal-x { background: 0; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.a-modal-body { padding: 24px; }
.a-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }

/* ---------- Toast ---------- */
.a-toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.a-toast { background: var(--navy); color: #fff; padding: 13px 18px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; animation: a-in .2s ease; }
.a-toast.ok { background: var(--ok); }
.a-toast.err { background: var(--danger); }
@keyframes a-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Empty / loading ---------- */
.a-empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.a-empty i { font-size: 2.4rem; color: var(--line); display: block; margin-bottom: 10px; }
.a-loading { text-align: center; color: var(--muted); padding: 40px; font-weight: 700; }

.a-muted { color: var(--muted); }
.a-mt { margin-top: 16px; }
.a-mb { margin-bottom: 16px; }
.a-flex { display: flex; gap: 10px; align-items: center; }
.a-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-side {
    position: static; height: auto; flex-direction: row; align-items: center;
    gap: 8px; padding: 10px 12px; overflow-x: auto;
  }
  .a-side-brand { padding: 4px 8px; }
  .a-side-brand b { display: none; }
  .a-nav { flex-direction: row; }
  .a-nav a span { display: none; }
  .a-side-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .a-logout span { display: none; }
  .a-grid-3, .a-grid-2 { grid-template-columns: 1fr; }
  .a-stats { grid-template-columns: repeat(2, 1fr); }
  .a-row { grid-template-columns: 1fr; }
}
