/* Rippner Tennis — Stringing Bench.
 * Brand: navy #1b4458 anchors, green #95d600 for action, blue #2596b5 for the
 * cross/secondary voice, platinum #F1F5F5 surfaces. Sized for a bench tablet:
 * big cards, big targets, readable at arm's length.
 * Shares the tokens and reset in styles.css.
 */

body.bench { background: var(--platinum); }
body.bench main { padding-bottom: 40px; }

/* ---- top bar (.deskline lives in styles.css — both pages use it) ---- */
.whoami { display: flex; align-items: center; gap: 9px; color: #e7eff2; font-size: 13px; }
.whoami-label { color: #a9c2ce; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.whoami strong { font-size: 15px; font-weight: 800; }
.whoami button { min-height: 34px; padding: 0 11px; border: 1px solid rgb(255 255 255 / 26%); border-radius: 999px; background: transparent; color: #d9e6ec; font-size: 12px; font-weight: 700; }
.whoami button:hover { background: rgb(149 214 0 / 20%); border-color: var(--green); color: #fff; }

/* ---- who is stringing ---- */
.picker { max-width: 1000px; margin: 44px auto; padding: 34px 26px; background: white; border: 1px solid var(--line); border-radius: 16px; text-align: center; box-shadow: 0 10px 34px rgb(27 68 88 / 8%); }
.picker h1 { font-size: clamp(26px, 3vw, 34px); color: var(--navy); letter-spacing: -.03em; }
.picker p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 26px; }
.who { min-height: 92px; border: 2px solid var(--line); border-radius: 14px; background: var(--platinum); color: var(--navy); font-size: 20px; font-weight: 800; letter-spacing: -.01em; transition: transform .12s, border-color .12s, background .12s; }
.who:hover { border-color: var(--green); background: var(--green-soft); transform: translateY(-2px); }
.who:active { transform: translateY(0); }

/* ---- tabs ---- */
.bench-body { max-width: 1500px; margin: 0 auto; padding: 0 16px; }
.tabs { display: flex; gap: 8px; margin: 18px 0 14px; flex-wrap: wrap; }
.tab { min-height: 46px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--navy); font-size: 14px; font-weight: 750; }
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab.active { background: var(--navy); border-color: var(--navy); color: white; }

.bench-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.bench-toolbar .queue-search input { height: 48px; }
.period-pick { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 13px; font-weight: 700; }
.period-pick select { width: auto; min-width: 260px; margin-top: 0; height: 48px; }

/* ---- location filter ---- */
.loc-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.loc { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--navy); font-size: 13px; font-weight: 750; }
.loc:hover { border-color: var(--blue); color: var(--blue); }
.loc.active { background: var(--navy); border-color: var(--navy); color: white; }
.loc-count { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--platinum); color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.loc.active .loc-count { background: rgb(255 255 255 / 18%); color: white; }
.loc-urgent { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: #fde5e2; color: var(--danger); font-size: 12px; font-weight: 850; font-variant-numeric: tabular-nums; }
.loc.active .loc-urgent { background: #ffd9d4; color: #8c1c16; }

/* ---- racket cards ---- */
.racket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.racket { display: flex; flex-direction: column; gap: 9px; padding: 17px; background: white; border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: 14px; box-shadow: 0 6px 20px rgb(27 68 88 / 6%); }
.racket.express { border-left-color: var(--green); }
.racket.is-done { border-left-color: #c3d0d6; background: #fbfdfd; }

/* Due in under two days — the whole card is flagged, not just the badge, so a
   stringer scanning the bench sees what has to go on the machine next. */
.racket.urgent { border-left-width: 8px; }
.urgent-strip { align-self: flex-start; margin: -3px 0 2px; padding: 4px 11px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.racket.urgent-soon { border-left-color: #e0a300; box-shadow: 0 6px 20px rgb(224 163 0 / 14%); }
.racket.urgent-soon .urgent-strip { background: #fff3d4; color: #7a5502; }
.racket.urgent-today { border-left-color: #d97600; background: #fffaf3; box-shadow: 0 6px 22px rgb(217 118 0 / 16%); }
.racket.urgent-today .urgent-strip { background: #ffe6c9; color: #8a4404; }
.racket.urgent-overdue { border-left-color: var(--danger); background: #fffafa; box-shadow: 0 6px 22px rgb(179 38 30 / 16%); }
.racket.urgent-overdue .urgent-strip { background: #fde5e2; color: var(--danger); }
.racket.urgent-overdue h3 { color: var(--danger); }
.racket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket { font: 800 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); letter-spacing: .02em; }
.racket h3 { font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; line-height: 1.15; }
.who-for { color: var(--muted); font-size: 13px; font-weight: 600; }
.tag { display: inline-block; width: fit-content; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.hybrid-tag { background: var(--blue-soft); color: #14566d; }
.express-tag { background: var(--green-soft); color: #3f5c00; }
.racket-strings { font-size: 13px; line-height: 1.45; color: #2a4756; }
.racket-strings p { margin: 2px 0; }
.racket-strings b { color: var(--navy); font-weight: 800; }
.racket-note { font-size: 12.5px; line-height: 1.4; color: #4b6472; padding: 9px 11px; border-radius: 9px; background: var(--platinum); overflow-wrap: anywhere; }
.racket-note b { color: var(--navy); }
.racket-done { font-size: 12.5px; color: var(--muted); }
.racket-done b { color: var(--navy); }
.racket button { margin-top: auto; min-height: 48px; border-radius: 10px; font-size: 14px; font-weight: 800; }
.racket .primary { border: 1px solid #7fb800; background: var(--green); color: #14210a; }
.racket .primary:hover { background: #86c200; }
.racket .ghost { border: 1px solid var(--line); background: white; color: var(--muted); font-weight: 700; font-size: 12.5px; min-height: 40px; }
.racket .ghost:hover { border-color: #c0cfd6; color: var(--navy); background: var(--platinum); }

.due { font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: var(--platinum); white-space: nowrap; }
.due.soon { background: #fff4d9; color: #7a5502; }
.due.today { background: #ffe9cf; color: #8a4404; }
.due.overdue { background: #fde5e2; color: var(--danger); }
.done-flag { font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: #3f5c00; background: var(--green-soft); padding: 4px 10px; border-radius: 999px; }

/* ---- pay periods ---- */
.pay-table { background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgb(27 68 88 / 6%); }
.pay-row { display: grid; grid-template-columns: minmax(120px, 1fr) 84px minmax(120px, 2fr); gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid #e6eef0; }
.pay-row:first-child { border-top: 0; }
.pay-head { background: var(--platinum); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pay-name { font-size: 16px; font-weight: 750; color: var(--navy); }
.pay-count { font-size: 24px; font-weight: 850; color: var(--navy); font-variant-numeric: tabular-nums; }
.pay-bar { display: block; height: 12px; border-radius: 999px; background: var(--platinum); overflow: hidden; }
.pay-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--green)); }
.pay-row.me { background: #f7fdea; }
.pay-row.me .pay-name::after { content: " · you"; color: #6d8f10; font-size: 12px; font-weight: 700; }
.pay-total { background: var(--navy); color: white; font-weight: 800; }
.pay-total .pay-count, .pay-total span { color: white; }
.pay-total span:first-child { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.pay-note { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---- pay period: a stringer's rackets, folded away until tapped ---- */
.pay-row[data-pay] { cursor: pointer; }
.pay-row[data-pay]:hover { background: #f6fafb; }
.pay-row.me[data-pay]:hover { background: #f2fbe1; }
.pay-row[data-pay]:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.pay-caret { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 12px; transition: transform .15s ease; }
.pay-row.is-open .pay-caret { transform: rotate(90deg); }
.pay-list { background: var(--platinum); border-top: 1px solid #e6eef0; padding: 4px 18px 10px; }
.pay-item { display: grid; grid-template-columns: 116px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid #dde8ea; }
.pay-item:first-child { border-top: 0; }
.pay-item-date { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pay-item-main { font-size: 14px; color: var(--navy); }
.pay-item-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.pay-item-svc { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pay-send { margin-left: auto; padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--navy); font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.pay-send:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pay-send:disabled { opacity: .55; cursor: default; }

/* ---- mark-strung sheet ---- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgb(18 48 62 / 55%); }
.sheet { width: min(560px, 100%); max-height: 92vh; overflow: auto; display: grid; gap: 15px; padding: 22px; background: white; border-radius: 18px; box-shadow: 0 24px 60px rgb(9 28 38 / 34%); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sheet-head h2 { font-size: 23px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.sheet-head .eyebrow { color: var(--muted); }
.sheet-head button { font-size: 27px; line-height: 1; color: var(--muted); padding: 0 6px; }
.sheet-head button:hover { color: var(--navy); }
.sheet-who { margin-top: 10px; padding: 11px 13px; border-radius: 10px; background: var(--green-soft); color: #3f5c00; font-size: 13px; font-weight: 650; }
.sheet-who b { font-weight: 850; }
.sheet-mail { margin-top: 10px; padding: 10px 13px; border-radius: 10px; background: var(--blue-soft); color: #14566d; font-size: 13px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.sheet-mail.muted { background: var(--platinum); color: var(--muted); }
.sheet .opt { margin-left: 5px; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: #9aa7ae; }
.sheet textarea { min-height: 92px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 10px; }
.sheet-actions button { min-height: 50px; padding: 0 22px; border-radius: 10px; font-size: 15px; font-weight: 800; }
.sheet-actions .secondary { border: 1px solid var(--line); background: white; color: var(--navy); }
.sheet-actions .primary { border: 1px solid #7fb800; background: var(--green); color: #14210a; }
.sheet-actions .primary:hover { background: #86c200; }

/* ---- toast ---- */
#bench-toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 80; opacity: 0; pointer-events: none; padding: 13px 20px; border-radius: 999px; background: var(--navy); color: white; font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px rgb(9 28 38 / 30%); transition: opacity .18s, transform .18s; }
#bench-toast.show { opacity: 1; transform: translate(-50%, 0); }
#bench-toast.bad { background: var(--danger); }

@media (max-width: 780px) {
  .bench-body { padding: 0 10px; }
  .racket-grid { grid-template-columns: 1fr; }
  .deskline { display: none; }
  .pay-row { grid-template-columns: 1fr 64px; }
  .pay-item { grid-template-columns: 1fr; gap: 2px; }
  .pay-send { margin-left: 0; width: 100%; }
  .pay-bar { display: none; }
  .period-pick select { min-width: 0; width: 100%; }
  .period-pick { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
}

@media print { body.bench { display: none; } }
