/* ═══════════════════════════════════════════════════════════════════════
   CAMP CORNHUB · CRM  —  the Playa Press, wired up.
   Extends the tokens/fonts from styles.css (loaded first). Priority here is
   CRM ease-of-use: clear hierarchy, obvious actions, fast scanning.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --ok:    #2f7d4f;
  --warn:  #C77A1A;
  --line:  rgba(13,10,6,0.14);
  --line-2:rgba(13,10,6,0.28);
  --card:  #F7EFDC;
  --shadow-hard: 4px 4px 0 var(--ink);
  --sidebar-w: 236px;
  --top-h: 60px;
}

/* kill the landing-page grain drift on data-dense screens (perf + calm) */
body.crm-body-lock::before { display: none; }

.crm { min-height: 100vh; display: flex; flex-direction: column; }

/* ─── TOP BAR ─────────────────────────────────────────────────────────── */
.crm-top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(13,10,6,0.06);
}
.crm-brand { display: flex; align-items: center; gap: 10px; }
.crm-brand img { width: 34px; height: 34px; object-fit: cover; border: 1.5px solid var(--ink); border-radius: 3px; }
.crm-brand-txt { display: flex; flex-direction: column; line-height: 1; }
.crm-brand-txt b { font-family: var(--f-disp); font-style: italic; font-size: 18px; }
.crm-brand-txt i { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); font-style: normal; margin-top: 2px; }

.crm-top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.bell {
  position: relative; width: 38px; height: 38px; border: 1.5px solid var(--ink);
  background: var(--paper); border-radius: 3px; font-size: 16px; cursor: pointer;
  display: grid; place-items: center; transition: transform .12s, background .12s;
}
.bell:hover { transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--ink); }
.bell.has-alert { border-color: var(--hot); animation: bell-shake 3s ease-in-out infinite; }
.bell-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; background: var(--hot); border: 2px solid var(--paper); border-radius: 50%; }
@keyframes bell-shake { 0%,92%,100%{transform:rotate(0)} 94%{transform:rotate(12deg)} 96%{transform:rotate(-10deg)} 98%{transform:rotate(6deg)} }

.year-wrap { display: flex; align-items: center; gap: 6px; }
.year-wrap > span { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em; color: var(--mute); }
.year-select, .inp, select.inp {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--ink);
  padding: 7px 9px; border-radius: 3px; cursor: pointer;
}
.crm-user { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1.5px solid transparent; border-radius: 20px; transition: border-color .12s; }
.crm-user:hover { border-color: var(--line-2); }
.crm-user-name { font-family: var(--f-sans); font-weight: 600; font-size: 13px; }

.nav-toggle { display: none; width: 38px; height: 38px; border: 1.5px solid var(--ink); background: var(--paper); border-radius: 3px; font-size: 17px; cursor: pointer; }

/* ─── BODY LAYOUT ─────────────────────────────────────────────────────── */
.crm-body { display: flex; flex: 1; min-height: 0; }

.crm-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--ink); color: var(--paper);
  padding: 18px 12px 24px;
  position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dust); padding: 4px 10px 8px; }
.nav-group.staff .nav-group-label { color: var(--corn); }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 4px;
  font-family: var(--f-sans); font-weight: 600; font-size: 14px;
  color: var(--paper); opacity: 0.82; position: relative;
  border: 1.5px solid transparent; transition: all .12s;
}
.nav-item:hover { opacity: 1; background: rgba(241,232,210,0.08); }
.nav-item.active { opacity: 1; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.nav-item.active .nav-ico { filter: none; }
.nav-item.reminder:not(.active) { color: var(--corn); opacity: 1; }
.nav-ico { font-size: 15px; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; width: 18px; height: 18px; background: var(--hot); color: #fff; border-radius: 50%; font-family: var(--f-mono); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(241,232,210,0.15); }
.nav-mini { text-align: left; background: none; border: none; color: var(--dust); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; padding: 4px 10px; border-radius: 3px; }
.nav-mini:hover { color: var(--corn); }

.crm-scrim { display: none; }

/* ─── MAIN / VIEW ─────────────────────────────────────────────────────── */
.crm-main { flex: 1; min-width: 0; overflow-y: auto; height: calc(100vh - var(--top-h)); }
.crm-view { max-width: 1180px; margin: 0 auto; padding: 26px 26px 80px; }

.crm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.crm-h1 { font-family: var(--f-disp); font-style: italic; font-size: clamp(28px, 4vw, 42px); line-height: 1.02; margin-top: 4px; }
.crm-page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── CARDS ───────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 5px;
  padding: 18px; box-shadow: 3px 3px 0 rgba(13,10,6,0.08);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.card-head h2 { font-family: var(--f-sans); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; }
.card-head h2 .kicker { display: block; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-side { grid-template-columns: 1.6fr 1fr; align-items: start; }

/* stat tiles */
.stat { background: var(--card); border: 1.5px solid var(--ink); border-radius: 5px; padding: 14px 16px; }
.stat-big { font-family: var(--f-disp); font-size: 34px; line-height: 1; }
.stat-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); margin-top: 6px; }
.stat.hot .stat-big { color: var(--hot); }
.stat.good .stat-big { color: var(--ok); }

/* ─── CHIPS / BADGES ──────────────────────────────────────────────────── */
.chip {
  --chip: var(--shade);
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px; border: 1.5px solid var(--chip); color: var(--chip);
  white-space: nowrap;
}
.chip-solid { background: var(--chip); color: var(--paper); }
.chip-ok { --chip: var(--ok); }
.chip-warn { --chip: var(--warn); }
.chip-hot { --chip: var(--hot); }
.chip-muted { --chip: var(--mute); }

.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--hot); color: var(--paper); border: 1.5px solid var(--ink);
  border-radius: 50%; font-family: var(--f-disp); font-style: italic; line-height: 1;
}

/* ─── BUTTONS (extends .btn from styles.css) ──────────────────────────── */
.btn-ghost { background: transparent; border-color: var(--line-2); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 7px 12px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-danger { border-color: var(--hot); color: var(--hot); }
.btn-danger:hover { background: var(--hot); color: var(--paper); box-shadow: var(--shadow-hard); }

/* ─── FORMS ───────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.field-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.field-note { font-family: var(--f-body); font-style: italic; font-size: 12px; color: var(--mute); }
.inp { width: 100%; font-family: var(--f-body); font-size: 15px; background: #FBF6E9; border: 1.5px solid var(--line-2); border-radius: 4px; padding: 10px 12px; color: var(--ink); }
.inp:focus { outline: none; border-color: var(--hot); box-shadow: 0 0 0 3px rgba(232,69,28,0.14); }
textarea.inp { resize: vertical; min-height: 84px; line-height: 1.5; }
select.inp { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; font-family: var(--f-sans); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--hot); }
.radio-group { display: flex; flex-direction: column; gap: 2px; }
.radio-opt { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-family: var(--f-body); font-size: 15px; line-height: 1.35; }
.radio-opt:hover { background: var(--paper-2); }
.radio-opt input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--hot); flex-shrink: 0; }

/* ─── TABLES ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 5px; }
table.data { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
table.data th { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); text-align: left; padding: 11px 14px; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); white-space: nowrap; position: sticky; top: 0; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(255,216,77,0.14); }
.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-name b { font-family: var(--f-disp); font-style: italic; font-weight: 400; font-size: 15px; }
.cell-sub { font-family: var(--f-mono); font-size: 10px; color: var(--mute); letter-spacing: 0.06em; }

/* ─── BANNER / ALERT ──────────────────────────────────────────────────── */
.alert { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--ink); border-left-width: 5px; border-radius: 4px; margin-bottom: 18px; background: var(--card); }
.alert-hot { border-left-color: var(--hot); background: #F7E7DE; }
.alert-warn { border-left-color: var(--warn); background: #F6EEDA; }
.alert-ok { border-left-color: var(--ok); background: #E8F0E4; }
.alert .a-txt { flex: 1; }
.alert .a-txt b { font-family: var(--f-sans); font-weight: 800; }
.alert .a-txt span { display: block; font-family: var(--f-body); font-size: 14px; color: var(--ink-2); }

/* ─── PROGRESS BAR ────────────────────────────────────────────────────── */
.prog { height: 10px; background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 20px; overflow: hidden; }
.prog > span { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--hot), var(--hot) 6px, var(--hot-2) 6px, var(--hot-2) 12px); }
.prog.good > span { background: var(--ok); }

/* ─── EMPTY / LOADING ─────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 60px 20px; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--line-2); border-top-color: var(--hot); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; }
.empty-mark { font-size: 46px; }
.empty-title { font-family: var(--f-disp); font-style: italic; font-size: 24px; margin-top: 8px; }
.empty-sub { font-family: var(--f-body); font-size: 15px; color: var(--mute); max-width: 46ch; margin: 8px auto 16px; }

/* ─── DRAG/DROP BOARD ─────────────────────────────────────────────────── */
.board-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.board-scroll { overflow-x: auto; padding-bottom: 12px; }
.board { display: flex; gap: 14px; min-width: min-content; align-items: flex-start; }
.board-col { flex: 0 0 250px; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 6px; }
.board-col-head { padding: 10px 12px; border-bottom: 1.5px solid var(--ink); border-top: 5px solid var(--col, var(--hot)); border-radius: 5px 5px 0 0; }
.board-col-head b { font-family: var(--f-sans); font-weight: 800; font-size: 14px; }
.board-col-head .sub { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.board-slots { padding: 10px; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.slot { background: var(--card); border: 1.5px solid var(--line-2); border-radius: 5px; padding: 9px 10px; }
.slot.full { border-color: var(--ok); }
.slot.under { border-color: var(--warn); border-left-width: 4px; }
.slot.over { border-color: var(--hot); background: #F7E7DE; }
.slot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.slot-head .d { font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.slot-head .cap { font-family: var(--f-mono); font-size: 10px; color: var(--mute); }
.slot-people { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; }
.person-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; padding: 2px 8px 2px 3px; font-family: var(--f-sans); font-weight: 600; font-size: 12px; cursor: grab; }
.person-chip:active { cursor: grabbing; }
.person-chip.dragging { opacity: 0.4; }
.person-chip .x { cursor: pointer; color: var(--mute); font-size: 11px; }
.person-chip .x:hover { color: var(--hot); }
.pool { display: flex; flex-wrap: wrap; gap: 6px; }
.pool .person-chip { border-style: dashed; }
.pool .person-chip.missing { border-color: var(--hot); border-style: solid; color: var(--hot); }

/* ─── INTERACTIVITY SIGNUP (service → date → 3 slots) ─────────────────── */
.day-block { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 6px; padding: 12px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.day-head b { font-family: var(--f-sans); font-weight: 800; font-size: 14px; }
.day-head .cap { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.signup-slots { display: flex; flex-direction: column; gap: 6px; }
.signup-slot { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--card); font-family: var(--f-sans); font-weight: 600; font-size: 13px; text-align: left; width: 100%; }
.signup-slot.filled .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signup-slot.filled.mine { border-color: var(--hot); background: #F7E7DE; }
.signup-slot .x { border: none; background: none; cursor: pointer; color: var(--mute); font-size: 12px; padding: 2px 4px; }
.signup-slot .x:hover { color: var(--hot); }
.signup-slot.empty { border-style: dashed; color: var(--hot); cursor: pointer; justify-content: center; transition: background .12s, transform .1s; }
.signup-slot.empty:hover:not(:disabled) { background: var(--corn); border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.signup-slot.empty:disabled { color: var(--mute); cursor: default; opacity: 0.6; }
.signup-slot.locked { font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--f-mono); color: var(--mute); border-style: dashed; }

/* ─── ADDRESS / PLACEMENT CARD (Overview) ─────────────────────────────── */
.address-line { margin-bottom: 14px; }
.address-big { font-family: var(--f-disp); font-style: italic; font-size: clamp(24px, 4vw, 34px); line-height: 1.05; color: var(--hot); margin-top: 4px; }
.address-sub { font-family: var(--f-sans); font-weight: 800; font-size: 18px; letter-spacing: 0.02em; color: var(--ink); margin-top: 2px; }
.address-map { display: block; width: 100%; max-width: 460px; height: auto; margin: 4px auto 0; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; }

/* ─── TOAST ───────────────────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--paper); font-family: var(--f-sans); font-weight: 600; font-size: 14px; padding: 12px 16px; border-radius: 4px; border-left: 4px solid var(--corn); box-shadow: var(--shadow-hard); transform: translateX(120%); transition: transform .3s cubic-bezier(.2,.8,.2,1); max-width: 340px; }
.toast.in { transform: translateX(0); }
.toast-err { border-left-color: var(--hot); }
.toast-ok { border-left-color: var(--corn); }

/* ─── MODAL ───────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(13,10,6,0.55); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .2s; }
.modal-overlay.in { opacity: 1; }
.modal-card { width: 100%; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 rgba(13,10,6,0.35); max-height: 90vh; overflow-y: auto; transform: translateY(10px); transition: transform .2s; }
.modal-overlay.in .modal-card { transform: translateY(0); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1.5px solid var(--ink); position: sticky; top: 0; background: var(--paper); }
.modal-head h3 { font-family: var(--f-disp); font-style: italic; font-size: 22px; }
.modal-x { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--mute); }
.modal-x:hover { color: var(--hot); }
.modal-card > *:not(.modal-head):not(.modal-foot) { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1.5px solid var(--line); }

/* ─── CONFIG / MISC ───────────────────────────────────────────────────── */
.config-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.config-card { max-width: 560px; background: var(--card); border: 2px solid var(--ink); border-radius: 6px; padding: 34px; box-shadow: 8px 8px 0 rgba(13,10,6,0.2); }
.config-card h1 { font-family: var(--f-disp); font-style: italic; font-size: 40px; margin: 6px 0 12px; }
.config-card p { font-family: var(--f-body); font-size: 16px; margin-bottom: 16px; }
.config-card code { font-family: var(--f-mono); font-size: 12px; background: var(--paper-3); padding: 1px 6px; border-radius: 3px; }
.config-steps { margin: 0 0 22px 20px; font-family: var(--f-body); }
.config-steps li { margin-bottom: 6px; }

.muted { color: var(--mute); }
.mono-sm { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--mute); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { border-top: 1.5px solid var(--line); margin: 16px 0; }
.hint-box { background: var(--paper-2); border: 1px dashed var(--line-2); border-radius: 4px; padding: 12px 14px; font-family: var(--f-body); font-size: 14px; color: var(--ink-2); }

/* ─── PRINT (shift board / QR labels) ─────────────────────────────────── */
.print-sheet { display: none; }
@media print {
  .crm-top, .crm-sidebar, .crm-scrim, .toast-wrap, .board-toolbar, .board-scroll { display: none !important; }
  body::before { display: none !important; }
  .crm-main, .crm-view { overflow: visible !important; height: auto !important; padding: 0 !important; max-width: none !important; }
  .print-sheet { display: block !important; }
  .print-sheet h1 { font-family: var(--f-disp); font-style: italic; font-size: 26px; margin-bottom: 4px; }
  .print-sheet .p-act { break-inside: avoid; margin: 0 0 16px; border: 1.5px solid #000; border-radius: 5px; }
  .print-sheet .p-act h2 { font-family: var(--f-sans); font-size: 15px; padding: 6px 10px; border-bottom: 1.5px solid #000; }
  .print-sheet table { width: 100%; border-collapse: collapse; }
  .print-sheet th, .print-sheet td { border: 1px solid #999; padding: 5px 8px; font-size: 12px; text-align: left; }
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .crm-sidebar {
    position: fixed; left: 0; top: var(--top-h); z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 6px 0 24px rgba(0,0,0,0.3);
  }
  body.nav-open .crm-sidebar { transform: translateX(0); }
  body.nav-open .crm-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 55; background: rgba(0,0,0,0.4); }
  .crm-brand-txt i { display: none; }
  .crm-user-name { display: none; }
  .year-wrap > span { display: none; }              /* drop "YEAR" label, keep the select */
  .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }        /* stat rows stay 2-up, not a tall stack */
  .form-grid { grid-template-columns: 1fr; }
  .crm-view { padding: 18px 14px 70px; }
  .crm-page-head { gap: 10px; }
  .crm-h1 { font-size: clamp(24px, 8vw, 34px); }
}

/* Very small screens: just the logo in the top-left, tighter chrome. */
@media (max-width: 520px) {
  .crm-top { padding: 0 12px; gap: 8px; }
  .crm-brand-txt { display: none; }
  .crm-top-right { gap: 8px; }
  .bell { width: 34px; height: 34px; }
  .crm-page-actions { width: 100%; }                /* action buttons wrap under the title */
}

/* ─── KANBAN · Build Board (Staff editor + read-only on Overview) ─────── */
.kb-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.kb-col {
  background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 6px;
  border-top: 5px solid var(--col, var(--mute)); padding: 10px 10px 12px; min-height: 90px;
  transition: background 0.15s;
}
.kb-todo  { --col: var(--hot); }
.kb-doing { --col: var(--corn); }
.kb-done  { --col: var(--ok); }
.kb-col.over { background: var(--corn); }
.kb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kb-head b { font-family: var(--f-sans); font-weight: 800; font-size: 14px; }
.kb-count { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.kb-hint { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); margin-top: 2px; }
.kb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.kb-card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 5px;
  padding: 9px 10px; cursor: grab;
}
.kb-card.dragging { opacity: 0.45; }
.kb-read .kb-card { cursor: default; }
.kb-title { font-family: var(--f-sans); font-weight: 700; font-size: 14px; line-height: 1.3; }
/* pre-wrap so the line breaks / bullets typed into the Notes box survive
   onto the card instead of collapsing into one run-on paragraph */
.kb-note {
  font-family: var(--f-body); font-size: 13.5px; line-height: 1.4; color: var(--ink-2); margin-top: 3px;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.kb-done .kb-title { text-decoration: line-through; color: var(--mute); }
.kb-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.kb-mv {
  font-family: var(--f-mono); font-size: 12px; line-height: 1; cursor: pointer;
  background: var(--paper-2); border: 1.5px solid var(--line-2); border-radius: 4px;
  padding: 3px 7px; color: var(--ink);
}
.kb-mv:hover:not(:disabled) { background: var(--corn); border-color: var(--ink); }
.kb-mv:disabled { opacity: 0.3; cursor: default; }
.kb-del:hover:not(:disabled) { background: var(--hot); border-color: var(--ink); color: var(--paper); }
.kb-empty { font-family: var(--f-mono); font-size: 11px; color: var(--mute); padding: 6px 2px; }

@media (max-width: 720px) {
  .kb-board { grid-template-columns: 1fr; }
}
.kb-who { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-family: var(--f-sans); font-weight: 600; font-size: 12px; color: var(--ink-2); }
.kb-who .avatar { flex: 0 0 auto; }

/* Payment references are free text — campers paste whole Venmo notes. Cap the
   column so a long one can't shove "Mark paid" off the end of the table. */
.ref-cell { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .ref-cell { max-width: 130px; } }
.kb-card.kb-mine { border-color: var(--hot); cursor: grab; }
.kb-yours { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hot); }

/* ─── INVENTORY · the photo log ───────────────────────────────────────── */
/* Photos are the content here, so the grid is sized around a legible shot of
   a bin on a phone, not around the text next to it. */
.inv-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.inv-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 5px;
  padding: 0; overflow: hidden; font: inherit; color: inherit;
  box-shadow: 3px 3px 0 rgba(13,10,6,0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.inv-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard); }
.inv-shot {
  position: relative; aspect-ratio: 4 / 3; background: var(--paper-2);
  display: grid; place-items: center; border-bottom: 1.5px solid var(--ink);
}
.inv-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inv-noshot { font-size: 42px; opacity: 0.35; }
.inv-qty {
  position: absolute; right: 6px; bottom: 6px;
  background: var(--ink); color: var(--paper); border-radius: 20px;
  font-family: var(--f-mono); font-size: 11px; padding: 2px 8px;
}
.inv-meta { padding: 10px 12px 12px; }
.inv-meta b { font-family: var(--f-disp); font-style: italic; font-weight: 400; font-size: 17px; line-height: 1.15; display: block; }
.inv-meta .cell-sub { margin-top: 6px; }

/* Category picker — thumb-sized targets, because this gets used standing up
   in a container with one hand full. */
.cat-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.cat-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: #FBF6E9; border: 1.5px solid var(--line-2); border-radius: 4px;
  padding: 9px 10px; font-family: var(--f-sans); font-size: 12px; font-weight: 600;
  color: var(--ink); text-align: left; line-height: 1.1;
}
.cat-btn:hover { border-color: var(--ink); }
.cat-btn.on { background: var(--hot); border-color: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.cat-ico { font-size: 16px; }

/* Two-state switch (camp gear vs a camper's) */
.seg { display: inline-flex; align-self: flex-start; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg-btn {
  cursor: pointer; background: #FBF6E9; border: 0; padding: 9px 14px;
  font-family: var(--f-sans); font-size: 12px; font-weight: 700; color: var(--ink);
}
.seg-btn + .seg-btn { border-left: 1.5px solid var(--ink); }
.seg-btn.on { background: var(--ink); color: var(--paper); }

/* Photo slot in the item form */
.photo-slot {
  position: relative; aspect-ratio: 4 / 3; max-height: 240px;
  background: var(--paper-2); border: 1.5px dashed var(--line-2); border-radius: 5px;
  display: grid; place-items: center; overflow: hidden;
}
.photo-slot img { width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.photo-empty { text-align: center; color: var(--mute); font-family: var(--f-mono); font-size: 11px; }
.photo-x {
  position: absolute; top: 6px; right: 6px; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--paper); font-size: 12px;
}

/* ─── SEASON: archive strip + rollover prompt ─────────────────────────── */
.archive-bar, .roll-bar {
  max-width: 1180px; margin: 0 auto; padding: 12px 26px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--f-body); font-size: 14px;
}
.archive-bar { background: var(--ink); color: var(--paper); border-bottom: 1.5px solid var(--ink); }
.archive-bar .btn { margin-left: auto; }
.archive-tag {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  background: var(--corn); color: var(--ink); padding: 3px 8px; border-radius: 3px;
}
.roll-bar { background: var(--corn); color: var(--ink); border-bottom: 1.5px solid var(--ink); }
.roll-bar b { font-family: var(--f-sans); font-size: 14px; }
.roll-bar .btn { margin-left: auto; }
.roll-sub { font-size: 13px; max-width: 68ch; opacity: 0.85; }

/* An archived season is legible, not lively — the accent colour stops
   inviting clicks on things that won't save. */
body.archive-mode .crm-view .btn-hot { background: var(--mute); border-color: var(--mute); }

/* Lead-only inventory breakdown — a tally you can click to filter the list. */
.tally-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; cursor: pointer; text-align: left; font: inherit; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 7px 4px; font-family: var(--f-body); font-size: 14px;
}
.tally-row:hover { background: var(--paper-2); }
.tally-row:last-child { border-bottom: 0; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
