/* BK Promoters office — "Range Card" theme (yellow-brick-road edition: yellow on black, red only for warnings), borrowed from The Gun Show Show admin (Brandon 2026-10-07: "I kind of like
   the design that we used for the Gun Show Show website"). Loads after the Tailwind CDN; the re-tint block at the end
   recolors every existing page's slate/sky utilities so nothing had to be rewritten. */
:root {
  --bg: #0d0d0f; --panel: #16161a; --panel-2: #1c1c20; --line: #232326; --line-2: #2a2a30;
  --text: #ececec; --muted: #9a9aa3; --dim: #6f6f78;
  --accent: #f5c518; --accent-soft: #ffd84d; --accent-bg: #2a2410; --accent-line: #4a3f14; --on-accent: #141100;
  --red: #ff5a4a; --red-soft: #ff8a7e; --red-bg: #2a1512; --red-line: #3a1f22;
  --green: #7ee39c; --green-bg: #1f2a1f; --amber: #ffb020; --amber-soft: #ffcf6e; --amber-bg: #3a2e12; --blue: #7ec3ff; --blue-bg: #1c2a3a;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif; --body: 'IBM Plex Sans', system-ui, sans-serif;
  --radius: 8px; --radius-lg: 12px;
}
html { background: var(--bg); }
body { background: var(--bg) !important; color: var(--text) !important; font-family: var(--body); font-size: 14px; margin: 0; }
h1 { font-family: var(--display); font-weight: 700; font-size: 30px !important; letter-spacing: .02em; line-height: 1.1; }
h2 { font-family: var(--body); }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: #fff0a8; }
code, pre { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
input, select, textarea, button { font-family: inherit; }
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=url], select, textarea {
  background: var(--panel-2) !important; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(245,197,24,.18); }
input[type=datetime-local], input[type=date], input[type=time] { color-scheme: dark; }
::placeholder { color: var(--dim); }
details > summary { color: var(--muted); }

/* ── shell ── */
.adm-shell { display: flex; min-height: 100vh; }
.adm-side { width: 212px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; box-sizing: border-box; padding: 18px 12px 12px; scrollbar-width: none;
  background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.adm-brand { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .03em; color: #fff; padding: 2px 12px 14px; white-space: nowrap; }
.adm-brand span { color: var(--accent); }
.adm-sec { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 10px 12px 3px; }
.adm-side::-webkit-scrollbar { display: none; }
.adm-nav { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--radius); color: #c9c9cf; font-weight: 500; font-size: 14px; }
.adm-nav .ico { width: 18px; height: 18px; display: inline-flex; opacity: .85; } .adm-nav .ico svg { width: 18px; height: 18px; }
.adm-nav:hover { background: var(--panel-2); color: #fff; }
.adm-nav.active { background: var(--accent-bg); color: var(--accent-soft); font-weight: 600; }
.adm-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.adm-me { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--muted); font-size: 12px; }
.adm-me .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; text-transform: uppercase; }
.adm-main { flex-grow: 1; min-width: 0; box-sizing: border-box; }
.adm-main.flush .h-\[calc\(100vh-42px\)\], .adm-main.flush .h-\[calc\(100vh-48px\)\] { height: 100vh !important; }
.adm-toggle { display: none; }
.adm-shell.app .adm-side, .adm-shell.app .adm-toggle { display: none !important; }   /* the app's Admin area (AdminActivity) draws its own tabs */
@media (max-width: 900px) {
  .adm-side { position: fixed; left: -240px; z-index: 40; transition: left .15s; }
  .adm-side.open { left: 0; }
  .adm-toggle { display: inline-flex; position: fixed; top: 8px; left: 8px; z-index: 50; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
}

/* ── login ── */
.adm-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.adm-login form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; width: 340px; display: flex; flex-direction: column; gap: 12px; }
.adm-login .adm-brand { padding: 0 0 6px; }
.adm-login input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px; }
.adm-login button { background: var(--accent); color: var(--on-accent); border: 0; border-radius: var(--radius); padding: 11px; font-weight: 600; font-size: 15px; cursor: pointer; }
.adm-login button:hover { background: var(--accent-soft); }

/* ── components for new pages ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.kpi .label { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.kpi .value { font-family: var(--display); font-size: 36px; font-weight: 700; margin-top: 4px; line-height: 1; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
table { border-collapse: collapse; }
thead th { font-size: 11px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--dim) !important; font-weight: 600; padding: 8px 8px !important; border-bottom: 1px solid var(--line); }
tbody td { padding: 9px 8px !important; }
tbody tr:hover td { background: #1a1a1e; }

/* ── re-tint the Tailwind utilities the existing pages use ── */
.bg-slate-900, .bg-slate-900\/80 { background-color: var(--panel) !important; }
.bg-slate-800, .bg-slate-800\/60, .bg-slate-800\/70 { background-color: var(--panel) !important; }
.bg-slate-700 { background-color: var(--panel-2) !important; }
.bg-slate-600 { background-color: #26262b !important; }
.hover\:bg-slate-600:hover { background-color: #33333a !important; } .hover\:bg-slate-700:hover, .hover\:bg-slate-800:hover { background-color: var(--panel-2) !important; }
form .bg-slate-900, select.bg-slate-900, input.bg-slate-900, textarea.bg-slate-900, select.bg-slate-700, input.bg-slate-700 { background-color: var(--panel-2) !important; }
.border-slate-600, .border-slate-700, .border-slate-800 { border-color: var(--line) !important; }
.border-t.border-slate-700 { border-color: #1f1f23 !important; }
.text-slate-100 { color: var(--text) !important; } .text-slate-300 { color: #c9c9cf !important; }
.text-slate-400 { color: var(--muted) !important; } .text-slate-500 { color: var(--dim) !important; }
.text-sky-400, .text-sky-300 { color: var(--accent-soft) !important; }
.bg-sky-700, .bg-sky-600, .hover\:bg-sky-600:hover, .hover\:bg-sky-500:hover { background-color: var(--accent) !important; color: var(--on-accent) !important; }
.bg-sky-500\/20 { background-color: var(--accent-bg) !important; color: var(--accent-soft) !important; } .bg-sky-400 { background-color: var(--accent) !important; }
.text-yellow-300 { color: var(--amber-soft) !important; } .bg-yellow-500\/20 { background-color: var(--amber-bg) !important; }
.text-green-400, .text-green-300, .text-emerald-200 { color: var(--green) !important; } .bg-green-500\/20, .bg-emerald-700\/40 { background-color: var(--green-bg) !important; }
.bg-green-700, .bg-emerald-700, .hover\:bg-green-600:hover, .hover\:bg-emerald-600:hover { background-color: #2f7a46 !important; color: #fff !important; }
.text-red-400, .text-red-300 { color: var(--red-soft) !important; } .bg-red-800, .bg-red-900, .bg-red-900\/40, .bg-red-500\/20, .hover\:bg-red-700:hover, .hover\:bg-red-800:hover { background-color: var(--red-bg) !important; color: #ffb0a6 !important; }
.text-orange-400 { color: #ffa36b !important; }
.rounded, .rounded-lg { border-radius: var(--radius) !important; }
button.rounded, a.rounded { font-weight: 600; }

/* ── phone view (Brandon 2026-10-20: "mobile views… where the table goes off the screen… replace the table entries with cards
   instead so that everything fits on the screen, but only in mobile view") ── base.html tags every table `cards-m` and copies
   each column's header into the cell's data-label; under 700px a row is a card, each cell a "label · value" line. ── */
@media (max-width: 700px) {
  table.cards-m, table.cards-m > tbody, table.cards-m > tbody > tr, table.cards-m > tbody > tr > td { display: block; width: 100%; box-sizing: border-box; }
  table.cards-m > thead { display: none; }
  table.cards-m > tbody > tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 8px 12px; margin: 0 0 10px; }
  table.cards-m > tbody > tr:hover > td { background: transparent; }
  table.cards-m > tbody > tr > td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0 !important; border: 0 !important; text-align: right; white-space: normal !important; }
  table.cards-m > tbody > tr > td::before { content: attr(data-label); color: var(--dim); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; text-align: left; flex: 0 0 36%; }
  table.cards-m > tbody > tr > td[data-label=""]::before { display: none; }
  table.cards-m > tbody > tr > td[data-label=""] { justify-content: flex-start; text-align: left; }
  table.cards-m > tbody > tr > td:first-child { font-weight: 600; color: var(--text); }
  table.cards-m > tbody > tr > td[colspan] { display: block; text-align: left; }
  table.cards-m > tbody > tr > td[colspan]::before { display: none; }
  table.cards-m > tbody > tr > td > button, table.cards-m > tbody > tr > td > a.rounded { min-height: 36px; padding: 6px 12px !important; }
  table.cards-m > tbody > tr > td > .cv { flex: 1 1 auto; display: block; min-width: 0; text-align: right; }
  table.cards-m > tbody > tr > td[data-label=""] > .cv, table.cards-m > tbody > tr > td[colspan] > .cv { text-align: left; }
  table.cards-m > tbody > tr > td.long { flex-wrap: wrap; }
  table.cards-m > tbody > tr > td.long > .cv { flex-basis: 100%; text-align: left; }
  .adm-main .flex:not(.flex-col) { flex-wrap: wrap; }
  .adm-main .grid-cols-3, .adm-main .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }   /* three or four across → two on a phone */
  .adm-main label, .adm-main .text-xs, .adm-main .text-sm { overflow-wrap: anywhere; }
  .adm-main input, .adm-main select, .adm-main textarea { max-width: 100%; box-sizing: border-box; }
  .adm-main { padding-left: 12px !important; padding-right: 12px !important; }
  .whitespace-nowrap { white-space: normal !important; }
}
