/* CVCA Game Staffing: the pages. Colors come from the tokens in base.css. */

.week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav strong { min-width: 170px; text-align: center; font-size: 15px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-ink); font-size: 12.5px; font-weight: 650; text-decoration: underline dotted; text-underline-offset: 3px; }
.link-btn:hover { color: var(--accent); }
.vs { color: var(--slate); font-weight: 520; }
.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 13px; }
.mini-row:first-child { border-top: 0; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row strong { display: block; font-size: 13.5px; }
.mini-row small { color: var(--muted); }

/* The calendar-page date tile: TUE / 6 / OCT / 4:30 PM */
.date-block { display: grid; justify-items: center; align-content: center; flex: none; width: 62px; min-height: 64px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); line-height: 1.1; text-align: center; }
.date-block small { color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.date-block strong { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.date-block em { margin-top: 3px; color: var(--accent-ink); font-size: 11px; font-style: normal; font-weight: 700; white-space: nowrap; }

/* ---------- Dashboard: games grouped by day ---------- */
.day-group { border-top: 1px solid var(--line); }
.day-label { display: flex; align-items: baseline; gap: 8px; padding: 12px 20px 4px; color: var(--ink); font-size: 13px; font-weight: 750; }
.day-label span { color: var(--muted); font-weight: 550; }
.game-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 20px; border: 0; border-left: 3px solid transparent; background: none; text-align: left; transition: background .12s; }
.game-row:hover { background: var(--surface-2); }
.game-row.needs { border-left-color: var(--amber); }
.game-row.is-cancelled { opacity: .6; }
.game-row.is-cancelled strong { text-decoration: line-through; }
.game-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.game-main strong { font-size: 15px; font-weight: 680; }
.game-main > span { color: var(--slate); font-size: 13px; }
.game-main em { color: var(--gold-ink); font-style: normal; }
.open-list { color: var(--amber) !important; font-weight: 600; font-size: 12.5px !important; }
.game-staff { display: grid; justify-items: end; gap: 6px; flex: none; }
.game-staff small { color: var(--muted); font-size: 12px; }
.game-row.compact { padding: 8px 16px; }
.game-row.compact .date-block { display: none; }

.slot-bar { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 150px; }
.slot-bar i { width: 11px; height: 11px; border-radius: 3px; background: var(--green); }
.slot-bar i.open { background: var(--surface); box-shadow: inset 0 0 0 2px var(--amber); }
.slot-bar i.hidden { background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); }

/* ---------- Game drawer ---------- */
.staff-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.staff-summary > div { display: flex; align-items: center; gap: 8px; color: var(--slate); }
.staff-summary strong { color: var(--ink); }
.job-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.job-row { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.6fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.job-row:first-child { border-top: 0; }
.job-row:not(.is-filled) { background: color-mix(in srgb, var(--amber-soft) 55%, var(--surface)); }
.job-row.is-no-show { background: var(--red-soft); }
.job-name { display: grid; gap: 1px; min-width: 0; }
.job-name strong { font-size: 13.5px; }
.job-name .link-btn { justify-self: start; }
.job-row select { min-height: 36px; padding: 6px 8px; font-size: 13px; }
.job-row:not(.is-filled) select { color: var(--amber); font-weight: 650; }
.job-tools { display: flex; align-items: center; gap: 4px; }
.btn.vis { color: var(--muted); }
.btn.vis.on { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-soft); }
.legend { display: flex; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Calendar ---------- */
.legend-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: 6px; color: var(--muted); font-size: 12.5px; }
.legend-inline i { display: inline-block; width: 10px; height: 10px; margin-right: -6px; border-radius: 3px; }
.legend-inline i.full { background: var(--green); }
.legend-inline i.open { background: var(--amber); }
.legend-inline i.soon { background: var(--red); }
.cal-card { overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.cal-day { display: flex; flex-direction: column; gap: 3px; min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--surface-2); }
.cal-day.other .cal-date span { color: var(--muted); opacity: .7; }
.cal-day.past .cal-event { opacity: .7; }
.cal-date { display: flex; align-items: center; justify-content: space-between; min-height: 24px; padding: 0 2px 2px; }
.cal-date span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.cal-day.today .cal-date span { background: var(--button); color: #fff; }
.cal-add { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); opacity: 0; text-decoration: none; transition: opacity .12s; }
.cal-day:hover .cal-add, .week-col:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--accent-soft); color: var(--accent-ink); }
@media (hover: none) { .cal-add { opacity: 1; } }
.cal-event { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; min-height: 24px; padding: 2px 6px; border: 0; border-left: 3px solid var(--amber); border-radius: 6px; background: var(--amber-soft); color: var(--ink); font-size: 12px; text-align: left; }
.cal-event:hover { filter: brightness(.97); }
.cal-event .t { flex: none; color: var(--slate); font-weight: 650; font-variant-numeric: tabular-nums; }
.cal-event .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cal-event .c { flex: none; font-size: 11px; font-weight: 750; color: var(--amber); font-variant-numeric: tabular-nums; }
.cal-event.full { border-left-color: var(--green); background: var(--green-soft); }
.cal-event.full .c { color: var(--green); }
.cal-event.soon { border-left-color: var(--red); background: var(--red-soft); }
.cal-event.soon .c { color: var(--red); }
.cal-event.cancelled { border-left-color: var(--line-strong); background: var(--surface-3); }
.cal-event.cancelled .n { text-decoration: line-through; color: var(--muted); }
.cal-agenda { display: none; }

.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 360px; }
.week-col { display: flex; flex-direction: column; gap: 8px; padding: 10px 8px 14px; border-right: 1px solid var(--line); min-width: 0; }
.week-col:last-child { border-right: 0; }
.week-col.today { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.week-col.past .week-event { opacity: .75; }
.week-head { display: flex; align-items: baseline; gap: 6px; padding: 0 4px 6px; border-bottom: 1px solid var(--line); }
.week-head span { color: var(--muted); font-size: 11.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.week-head strong { font-size: 20px; letter-spacing: -.02em; }
.week-head .cal-add { margin-left: auto; align-self: center; }
.week-col.today .week-head strong { color: var(--accent-ink); }
.week-event { display: grid; gap: 3px; width: 100%; min-width: 0; overflow: hidden; padding: 9px 10px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; background: var(--surface); text-align: left; font-size: 12.5px; transition: box-shadow .12s, transform .12s var(--ease); }
.week-event:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.week-event.full { border-left-color: var(--green); }
.week-event.soon { border-left-color: var(--red); }
.week-event.cancelled { border-left-color: var(--line-strong); opacity: .7; }
.week-event.cancelled strong { text-decoration: line-through; }
.week-event > * { min-width: 0; }
.week-event strong { font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.we-time { color: var(--accent-ink); font-size: 12px; font-weight: 750; }
.we-sub { color: var(--slate); }
.week-event .slot-bar { margin: 4px 0 2px; }
.we-jobs { display: grid; gap: 1px; margin: 2px 0 0; padding: 0; list-style: none; }
.we-jobs li { display: flex; justify-content: space-between; gap: 6px; min-width: 0; font-size: 11.5px; }
.we-jobs li span { color: var(--muted); white-space: nowrap; }
.we-jobs li b { flex: 1; min-width: 0; overflow: hidden; text-align: right; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.we-jobs li.open b { color: var(--amber); }
.week-none { padding: 6px 4px; color: var(--muted); font-size: 12px; }

/* ---------- Schedule games ---------- */
.sched { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--button); color: #fff; font-size: 12.5px; font-weight: 750; vertical-align: 2px; }
.template-box { display: grid; gap: 8px; margin: -6px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.template-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mini-cal-nav small { text-align: center; font-size: 12px; }
.mini-cals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.mini-cal > strong { display: block; margin-bottom: 6px; font-size: 13.5px; text-align: center; }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-grid .dow { color: var(--muted); font-size: 10.5px; font-weight: 750; text-align: center; }
.mini-day { position: relative; min-width: 0; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-day:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.mini-day.past { color: var(--muted); }
.mini-day.today { border-color: var(--line-strong); }
.mini-day[aria-pressed="true"] { border-color: var(--button); background: var(--button); color: #fff; }
.mini-day i { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--muted); }
.mini-day i.same { width: 6px; height: 6px; margin-left: -3px; background: var(--gold); }
.mini-day[aria-pressed="true"] i { background: #fff; }
.sched-table td { padding: 8px 8px; }
.sched-table input { min-height: 36px; padding: 6px 9px; font-size: 13px; }
.sched-table input[type="time"] { width: 118px; }
.sched-table td.cell-name { min-width: 110px; }
.sched-foot { padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Open jobs / My games (workers) ---------- */
.open-game, .my-game { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.open-game + .open-game { margin-top: 12px; }
.open-game.is-mine { border-color: var(--green-line); }
.open-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.open-main .when { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.open-main h3 { font-size: 17px; }
.open-main .muted { font-size: 13px; }
.game-notes { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; color: var(--gold-ink); font-size: 13px; font-weight: 600; }
.game-notes .ui-icon { margin-top: 2px; }
.mine-note { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--green); font-size: 13px; }
.open-jobs { display: grid; gap: 8px; flex: 0 1 330px; min-width: 250px; }
.open-job { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.open-job strong { display: block; font-size: 14px; }
.open-job small { color: var(--muted); font-size: 12.5px; }
.my-list { display: grid; }
.my-game { align-items: center; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.my-game:first-child { border-top: 0; }

/* ---------- Payroll ---------- */
.filters { margin-bottom: 20px; padding: 16px 20px 2px; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; align-items: end; }
.print-only { display: none; }

/* ---------- Sports & jobs ---------- */
.sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.sport-card { display: flex; flex-direction: column; overflow: hidden; }
.sport-card.is-off { opacity: .65; }
.sport-card .card-head { align-items: flex-start; }
table.data.compact th { padding: 7px 12px; position: static; }
table.data.compact td { padding: 7px 12px; }
.sport-warn { display: flex; align-items: center; gap: 6px; padding: 8px 20px 0; color: var(--amber); font-size: 12.5px; font-weight: 650; }
.sport-foot { margin-top: auto; padding: 8px 12px 12px; }
.edit-rows { display: grid; gap: 8px; }
.edit-row { display: grid; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.edit-row.sport-job { grid-template-columns: minmax(140px, 1.4fr) 90px 120px auto auto; }
.edit-row input, .edit-row select { min-height: 38px; }
.edit-row .mini-label { display: none; }
.sw-label { color: var(--slate); font-size: 12.5px; font-weight: 650; }

/* ---------- Email & texts ---------- */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.channel { display: grid; gap: 12px; align-content: start; padding: 18px 20px; }
.channel.on { border-color: var(--green-line); }
.channel .btn { justify-self: start; }
.channel p.muted { font-size: 13px; }
.channel-head { display: flex; align-items: center; gap: 12px; }
.channel-head p { color: var(--muted); font-size: 13px; }
.msg-preview { max-width: 380px; overflow: hidden; color: var(--slate); text-overflow: ellipsis; white-space: nowrap; }
.msg-body { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-family: var(--font); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.account-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .sched { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .cal-agenda .day-group:first-child { border-top: 0; }
  .week-grid { grid-template-columns: 1fr; }
  .week-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .week-col:not(:has(.week-event)) { display: none; }
  .open-game { flex-wrap: wrap; }
  .open-jobs { flex-basis: 100%; min-width: 0; }
  .edit-row.sport-job { grid-template-columns: 1fr 1fr; }
  .edit-row .mini-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11.5px; font-weight: 650; }
}
@media (max-width: 640px) {
  .job-row { grid-template-columns: 1fr auto; }
  .job-row select { grid-column: 1 / -1; grid-row: 2; }
  .game-row { flex-wrap: wrap; gap: 10px 14px; }
  .game-staff { justify-items: start; flex-basis: 100%; grid-auto-flow: column; align-items: center; justify-content: start; padding-left: 76px; }
  .game-row.compact .game-staff { padding-left: 0; }
  .sport-grid { grid-template-columns: 1fr; }
  .drawer-head .date-block { display: none; }
  .mini-cals { grid-template-columns: 1fr; }
  .week-nav strong { min-width: 0; font-size: 13.5px; }
  .page-head .btn-row { width: 100%; }
  .my-game { flex-wrap: wrap; }
}

@media print {
  .print-only { display: block; }
  .print-title { margin-bottom: 12px; font-size: 18px; font-weight: 700; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tile.hero { color: #000; background: #fff; border-color: #ccc; }
  .tile.hero .tile-label, .tile.hero .tile-sub { color: #333; }
}
