/* ==========================================================================
   RISE Softball — admin + coach portal design system  (v2)

   Design language follows the Michigan Exchange Students portal: a WARM
   neutral canvas (not cool grey), generous 18px radii, soft layered shadows,
   Inter/system typography, and muted secondary text. Their accent is
   terracotta; ours is the RISE teal, so the brand stays RISE while the
   feel matches the reference build.

   Reference tokens taken from michiganexchangestudents.com/assets/css/site.css:
     --cool #F7F5F1 · --slate #4A4A50 · --muted #83838B · --line #E6E3DD
     --radius 18px · --radius-sm 12px · Inter · layered soft shadows
   ========================================================================== */

:root {
  /* --- warm neutrals (the MIES canvas) --- */
  --cool:      #F7F5F1;   /* page background — warm, never blue-grey */
  --white:     #ffffff;
  --slate:     #4A4A50;   /* body text — warm grey, never black */
  --muted:     #83838B;   /* secondary text */
  --line:      #E6E3DD;   /* hairlines + borders */
  --line-soft: #EFECE6;
  --ink:       #2B2B30;   /* headings */

  /* --- RISE brand accent --- */
  --teal-900:  #043230;
  --teal-800:  #064443;
  --teal-700:  #0b6d68;
  --teal-500:  #278885;
  --teal-400:  #36b4b0;
  --teal-300:  #49c4bf;
  --teal-100:  #D8EDEC;
  --teal-50:   #EEF7F6;

  --red:       #cd1f36;
  --red-50:    #FBE8EA;
  --amber:     #8a5a12;
  --amber-50:  #FBF1DE;
  --green:     #1F7A5C;
  --green-50:  #E4F4EE;

  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  --shadow-sm: 0 1px 2px rgba(10,10,12,.06), 0 1px 3px rgba(10,10,12,.05);
  --shadow-md: 0 10px 26px rgba(10,10,12,.12), 0 3px 8px rgba(10,10,12,.07);
  --shadow-lg: 0 26px 54px rgba(10,10,12,.20);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max: 1400px;
}

/* ---------- base ---------- */
.admin-body {
  margin: 0; background: var(--cool); color: var(--slate);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.admin-body * { box-sizing: border-box; }
.admin-body a { color: var(--teal-700); text-decoration: none; }
.admin-body a:hover { color: var(--teal-800); text-decoration: underline; }
.admin-body h1, .admin-body h2, .admin-body h3, .admin-body h4 {
  margin: 0 0 .5em; line-height: 1.25; color: var(--ink); font-weight: 600; letter-spacing: -.01em;
}
.admin-body h1 { font-size: 1.55rem; }
.admin-body h2 { font-size: 1.2rem; }
.admin-body h3 { font-size: 1.02rem; }
.admin-body p { margin: 0 0 1em; }

/* ---------- shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.admin-side {
  width: 244px; flex: 0 0 244px; background: var(--white);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { padding: 22px 20px 16px; }
.admin-brand img { max-width: 116px; height: auto; display: block; }
.admin-brand .admin-brand-sub {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-top: 9px; font-weight: 600;
}

.admin-nav { padding: 6px 12px 14px; flex: 1; }
.admin-nav-group {
  padding: 16px 8px 7px; font-size: .66rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px; border-radius: var(--radius-sm);
  color: var(--slate); font-size: .92rem; font-weight: 500; text-decoration: none;
}
.admin-nav a:hover { background: var(--cool); color: var(--ink); text-decoration: none; }
.admin-nav a.active { background: var(--teal-800); color: #fff; font-weight: 600; }
.admin-nav a.active:hover { background: var(--teal-700); color: #fff; }
.admin-nav a .pill {
  margin-left: auto; background: var(--red); color: #fff; border-radius: 999px;
  padding: 1px 8px; font-size: .7rem; font-weight: 700;
}
.admin-nav a.active .pill { background: #fff; color: var(--teal-800); }

.admin-userbox { padding: 14px 20px; border-top: 1px solid var(--line); font-size: .85rem; }
.admin-userbox .nm { color: var(--ink); font-weight: 600; }
.admin-userbox .rl {
  color: var(--muted); text-transform: uppercase; font-size: .66rem;
  letter-spacing: .1em; font-weight: 700;
}
.admin-userbox a { color: var(--muted); font-size: .85rem; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  background: rgba(247,245,241,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 16px 30px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.admin-topbar h1 { margin: 0; font-size: 1.28rem; }
.admin-topbar .spacer, .card-head .spacer, .flex .spacer { flex: 1; }
.admin-content { padding: 26px 30px 70px; flex: 1; max-width: var(--max); width: 100%; }

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 20px; }
.card-head {
  padding: 17px 22px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 12px;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 22px; }
.card-foot {
  padding: 15px 22px; border-top: 1px solid var(--line-soft);
  background: var(--cool); border-radius: 0 0 var(--radius) var(--radius);
}

/* stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(172px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-tile {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat-tile .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.stat-tile .v { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.05; margin-top: 7px; letter-spacing: -.02em; }
.stat-tile .s { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.stat-tile.alert { border-color: #F0C9CE; background: var(--red-50); }
.stat-tile.alert .v { color: var(--red); }
.stat-tile a { display: block; color: inherit; text-decoration: none; }
.stat-tile a:hover { text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 19px; border-radius: 999px; border: 1px solid transparent;
  background: var(--teal-800); color: #fff; font-size: .9rem; font-family: var(--font);
  font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--teal-700); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
.btn:disabled, .btn.is-busy { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-sm { padding: 6px 13px; font-size: .82rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-ghost { background: var(--white); color: var(--slate); border-color: var(--line); }
.btn-ghost:hover { background: var(--cool); color: var(--ink); }
.btn-danger, .btn-red { background: var(--red); color: #fff; }
.btn-danger:hover, .btn-red:hover { background: #ab1a2d; color: #fff; }
.btn-plain { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-plain:hover { background: var(--cool); color: var(--slate); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 17px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field.col-2 { grid-column: span 2; } .field.col-full { grid-column: 1/-1; }
.field > label { font-size: .78rem; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.field > label .req { color: var(--red); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }

.input,
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=url], .field input[type=number], .field input[type=password],
.field input[type=date], .field select, .field textarea,
label > input[type=text], label > input[type=email], label > input[type=number],
label > input[type=password], label > select, label > textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-xs); font-size: .93rem; font-family: var(--font);
  color: var(--ink); background: var(--white);
}
.field textarea, label > textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field textarea.code { font-family: ui-monospace,Menlo,Consolas,monospace; font-size: .85rem; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus,
label > input:focus, label > select:focus, label > textarea:focus {
  outline: none; border-color: var(--teal-400); box-shadow: 0 0 0 3px rgba(54,180,176,.16);
}
.field input[readonly], .field input:disabled { background: var(--cool); color: var(--muted); }

/* legacy label-wrapped fields used by the older admin views */
.form-grid > label, .form-row > label {
  display: flex; flex-direction: column; font-size: .78rem;
  font-weight: 600; color: var(--slate); gap: 6px; min-width: 0;
}
.form-row { margin-top: 17px; }

.chk, .form-grid > label.chk, .form-row > label.chk {
  flex-direction: row; align-items: center; gap: 9px;
  font-size: .9rem; color: var(--slate); font-weight: 500;
}
.chk input { width: 17px; height: 17px; accent-color: var(--teal-700); flex: 0 0 auto; }

.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; background: var(--white); }
.fieldset > legend { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 8px; }

.form-actions {
  display: flex; gap: 11px; align-items: center;
  padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line-soft);
}

.filter-bar {
  display: flex; gap: 11px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 18px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow-sm);
}
.filter-bar .field, .filter-bar > label { min-width: 150px; }
.filter-bar .field > label, .filter-bar > label { font-size: .72rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--white); }
table.table th {
  text-align: left; padding: 12px 15px; background: var(--cool); color: var(--muted);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table td { padding: 12px 15px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--slate); }
table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr:hover { background: var(--cool); }
table.table td.num, table.table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.table td.actions { text-align: right; white-space: nowrap; }
table.table .thumb {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: var(--cool);
}
table.table a { font-weight: 500; }
.table-empty { padding: 44px 20px; text-align: center; color: var(--muted); }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .73rem; font-weight: 600; background: var(--cool);
  color: var(--muted); white-space: nowrap; border: 1px solid var(--line);
}
.badge.teal  { background: var(--teal-50);  color: var(--teal-800); border-color: var(--teal-100); }
.badge.green { background: var(--green-50); color: var(--green);    border-color: #BFE3D5; }
.badge.red   { background: var(--red-50);   color: var(--red);      border-color: #F0C9CE; }
.badge.amber { background: var(--amber-50); color: var(--amber);    border-color: #EBDCB6; }
.badge.grey  { background: var(--cool);     color: var(--muted); }

.status-pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; border: 1px solid transparent;
}
.status-pill.new      { background: var(--teal-50);  color: var(--teal-800); border-color: var(--teal-100); }
.status-pill.read     { background: var(--cool);     color: var(--muted);    border-color: var(--line); }
.status-pill.replied  { background: var(--green-50); color: var(--green);    border-color: #BFE3D5; }
.status-pill.archived { background: var(--cool);     color: var(--muted);    border-color: var(--line); }
.status-pill.pending  { background: var(--amber-50); color: var(--amber);    border-color: #EBDCB6; }
.status-pill.paid     { background: var(--green-50); color: var(--green);    border-color: #BFE3D5; }
.status-pill.unpaid   { background: var(--red-50);   color: var(--red);      border-color: #F0C9CE; }
.status-pill.flagged  { background: var(--red-50);   color: var(--red);      border-color: #F0C9CE; }
.status-pill.verified { background: var(--green-50); color: var(--green);    border-color: #BFE3D5; }

/* ---------- notices ---------- */
.notice {
  padding: 13px 17px; border-radius: var(--radius-sm); margin-bottom: 18px;
  font-size: .9rem; border: 1px solid transparent;
}
.notice.ok   { background: var(--green-50); color: var(--green);    border-color: #BFE3D5; }
.notice.err  { background: var(--red-50);   color: var(--red);      border-color: #F0C9CE; }
.notice.warn { background: var(--amber-50); color: var(--amber);    border-color: #EBDCB6; }
.notice.info { background: var(--teal-50);  color: var(--teal-800); border-color: var(--teal-100); }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 7px; align-items: center; justify-content: center; padding: 20px 0; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  font-size: .86rem; color: var(--slate); background: var(--white); text-decoration: none; font-weight: 500;
}
.pager a:hover { background: var(--cool); text-decoration: none; }
.pager .current { background: var(--teal-800); color: #fff; border-color: var(--teal-800); }
.pager .muted { color: var(--muted); border: none; background: transparent; }

/* ---------- media library ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 15px; }
.media-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--white); cursor: pointer; position: relative; box-shadow: var(--shadow-sm);
}
.media-item:hover { box-shadow: var(--shadow-md); }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--cool); }
.media-item .meta { padding: 9px 11px; font-size: .72rem; color: var(--muted); word-break: break-all; }
.media-item.selected { border-color: var(--teal-400); box-shadow: 0 0 0 3px rgba(54,180,176,.25); }
.media-item .rm {
  position: absolute; top: 7px; right: 7px; background: rgba(43,43,48,.72); color: #fff;
  border: none; border-radius: 999px; padding: 3px 9px; cursor: pointer; font-size: .72rem;
}

.img-picker { display: flex; gap: 15px; align-items: flex-start; }
.img-picker .preview {
  width: 116px; height: 116px; border-radius: var(--radius-sm); object-fit: cover;
  border: 1px solid var(--line); background: var(--cool); flex: 0 0 auto;
}
.img-picker .controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px;
  text-align: center; color: var(--muted); background: var(--white); cursor: pointer;
}
.dropzone.dragover { border-color: var(--teal-400); background: var(--teal-50); color: var(--teal-800); }

/* ---------- stat entry grid ---------- */
.stat-entry { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--white); }
.stat-entry th {
  position: sticky; top: 0; z-index: 5; background: var(--teal-800); color: #fff;
  padding: 11px 9px; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  text-align: center; white-space: nowrap; font-weight: 700;
}
.stat-entry th.player-col { text-align: left; left: 0; z-index: 6; min-width: 200px; }
.stat-entry td { border-bottom: 1px solid var(--line-soft); padding: 5px 6px; text-align: center; }
.stat-entry td.player-col {
  text-align: left; position: sticky; left: 0; background: var(--white); z-index: 2;
  border-right: 1px solid var(--line); padding: 7px 12px;
}
.stat-entry tbody tr:hover td, .stat-entry tbody tr:hover td.player-col { background: var(--cool); }
.stat-entry input {
  width: 78px; padding: 7px 6px; text-align: center; border: 1px solid var(--line);
  border-radius: var(--radius-xs); font-size: .9rem; font-family: var(--font);
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat-entry input:focus { outline: none; border-color: var(--teal-400); box-shadow: 0 0 0 3px rgba(54,180,176,.16); }
.stat-entry input.dirty   { border-color: var(--teal-400); background: var(--teal-50); font-weight: 600; }
.stat-entry input.outlier { border-color: var(--red); background: var(--red-50); color: var(--red); font-weight: 700; }
.stat-entry input.saved   { border-color: var(--green); background: var(--green-50); }
.stat-entry .pname { font-weight: 600; color: var(--ink); }
.stat-entry .pmeta { font-size: .76rem; color: var(--muted); }

.save-bar {
  position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line);
  padding: 13px 22px; display: flex; align-items: center; gap: 14px; z-index: 30;
  box-shadow: 0 -4px 16px rgba(10,10,12,.07);
}
.save-bar .count { font-size: .88rem; color: var(--muted); }

/* ---------- ranking band editor ---------- */
.band-editor { display: grid; gap: 20px; }
.band-stat { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); }
.band-stat > header { background: var(--cool); padding: 14px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.band-stat > header h4 { margin: 0; font-size: .96rem; }
.band-stat > header .dir { font-size: .74rem; color: var(--muted); }
.band-rows { padding: 15px 18px; display: flex; flex-direction: column; gap: 8px; }
.band-row { display: flex; align-items: center; gap: 10px; }
.band-row .grade {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--teal-700); font-size: .9rem;
}
.band-row .grade select { background: transparent; border: none; color: #fff; font-weight: 700; text-align: center; -webkit-appearance: none; appearance: none; width: 100%; cursor: pointer; }
.band-row .grade select option { color: var(--ink); background: #fff; }
.band-row .op { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.band-row input { width: 98px; padding: 7px 11px; border: 1px solid var(--line); border-radius: var(--radius-xs); text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font); }
.band-row .rm { color: var(--red); background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px 8px; }

/* ---------- dashboard legacy cards ---------- */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(172px,1fr)); gap: 16px; margin-bottom: 24px; }
.card-stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 5px;
}
.card-stat .n { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.05; letter-spacing: -.02em; }
.card-stat .l { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.card-stat a { color: inherit; text-decoration: none; }

/* inbox rows */
.rowchk { width: 17px; height: 17px; accent-color: var(--teal-700); }
tr.unread td { background: var(--teal-50); }
tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--teal-400); }
tr.unread .subj { font-weight: 700; color: var(--ink); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(43,43,48,.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 960px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 15px 24px; border-top: 1px solid var(--line); display: flex; gap: 11px; justify-content: flex-end; }
.modal .close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); line-height: 1; }

/* ---------- auth screens (login / coach login) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--cool); }
.auth-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 34px; max-width: 430px; width: 100%; }
.auth-card .brand { text-align: center; margin-bottom: 22px; }
.auth-card .brand img { max-width: 140px; }
.auth-card h1 { font-size: 1.3rem; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.auth-card .btn { width: 100%; }
.auth-note { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 20px; }
.auth-tabs { display: flex; gap: 6px; background: var(--cool); padding: 5px; border-radius: 999px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; padding: 9px 12px; border-radius: 999px; border: none; background: transparent;
  font-family: var(--font); font-size: .87rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.auth-tabs button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: ui-monospace,Menlo,Consolas,monospace; font-size: .86rem; }
.nowrap { white-space: nowrap; }
.mt0{margin-top:0}.mt1{margin-top:8px}.mt2{margin-top:16px}.mt3{margin-top:24px}
.mb0{margin-bottom:0}.mb1{margin-bottom:8px}.mb2{margin-bottom:16px}.mb3{margin-bottom:24px}
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.text-right { text-align: right; }

/* ---------- responsive (Jeff works from an iPad at events) ---------- */
@media (max-width: 1024px) { .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 880px) {
  .admin-shell { flex-direction: column; }
  .admin-side {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; overflow-x: auto;
    border-right: none; border-bottom: 1px solid var(--line);
  }
  .admin-brand { padding: 12px 16px; }
  .admin-brand .admin-brand-sub { display: none; }
  .admin-nav { display: flex; padding: 8px; }
  .admin-nav-group { display: none; }
  .admin-nav a { white-space: nowrap; margin-bottom: 0; }
  .admin-userbox { display: none; }
  .admin-content { padding: 18px 16px 56px; }
  .admin-topbar { padding: 14px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.col-2 { grid-column: auto; }
  .stat-entry input { width: 66px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
}
