/* PPV Admin. Bright Apple look, matching Charles's Command Center: warm off-white, white cards, SF type, soft shadows. */
:root {
  --bg: #f5f4f1; --card: #ffffff; --soft: #f8f7f4; --ink: #17181c; --ink2: #3a3d45; --muted: #6b6f78; --faint: #9da1aa;
  --line: #e8e5df; --line2: #efede8; --hover-line: #d6d2ca;
  --green: #0f9f5c; --green-bg: #e8f7ef; --amber: #e8930c; --amber-ink: #9a5b05; --amber-bg: #fff5e3;
  --blue: #2f6fec; --blue-bg: #ecf2ff; --red: #e04545; --red-ink: #b42828; --red-bg: #fdeeee; --violet: #7457f5; --violet-bg: #f1edff;
  --shadow: 0 1px 2px rgba(20, 20, 28, .04), 0 4px 14px rgba(20, 20, 28, .04);
  --shadow-hi: 0 2px 6px rgba(20, 20, 28, .06), 0 14px 34px rgba(20, 20, 28, .09);
  --r: 16px;
  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 720; letter-spacing: -.02em; margin: 0; }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12.5px; }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; box-shadow: var(--shadow-hi); }
.auth-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-card .brand img { border-radius: 9px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ---------- form controls ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 12.5px; font-weight: 620; color: var(--ink2); margin-bottom: 6px; }
label.f > span em { font-style: normal; color: var(--faint); font-weight: 450; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; min-height: 42px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 86px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px var(--red-bg) !important; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 8px 15px; min-height: 38px; cursor: pointer; text-decoration: none; font-weight: 620; font-size: 13.5px; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { border-color: var(--hover-line); text-decoration: none; box-shadow: var(--shadow); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.small { min-height: 30px; padding: 4px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.linkbtn { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 0; font-size: 13.5px; }
.linkbtn:hover { text-decoration: underline; }
.msg { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 14px; }
.msg.err { background: var(--red-bg); color: var(--red-ink); }
.msg.good { background: var(--green-bg); color: #0b6e40; }
.msg.note { background: var(--amber-bg); color: var(--amber-ink); }
.msg.near { margin-top: -6px; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(245, 244, 241, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1320px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.logo b { font-family: var(--f-display); font-size: 17px; font-weight: 760; letter-spacing: -.3px; }
.logo small { color: var(--faint); font-size: 10.5px; letter-spacing: .9px; text-transform: uppercase; font-weight: 700; }
nav.tabs { display: flex; gap: 2px; margin-left: 8px; background: rgba(0, 0, 0, .04); padding: 3px; border-radius: 11px; }
nav.tabs button, nav.tabs a { white-space: nowrap; background: none; border: 0; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 620; font-size: 13px; text-decoration: none; }
nav.tabs .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 20, 28, .08); }
nav.tabs button:hover, nav.tabs a:hover { color: var(--ink); text-decoration: none; }
.top .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
main { max-width: 1320px; margin: 0 auto; padding: 24px 20px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font-size: 30px; }
.head .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; text-align: left; cursor: pointer; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.stat:hover { box-shadow: var(--shadow-hi); border-color: #dcd8d0; }
.stat .n { font-family: var(--f-display); font-size: 30px; font-weight: 760; letter-spacing: -.5px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--faint); }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-weight: 550; }
.stat.red .n { color: var(--red); } .stat.amber .n { color: var(--amber); } .stat.green .n { color: var(--green); } .stat.blue .n { color: var(--blue); }
.stat.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; box-shadow: var(--shadow); }
.panel h2 { font-size: 17px; margin-bottom: 3px; }
.panel .sub { font-size: 12.5px; color: var(--faint); margin-bottom: 12px; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.row:hover { background: var(--soft); text-decoration: none; }
.row .t { font-weight: 620; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .m { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .why { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.why.red { background: var(--red-bg); color: var(--red-ink); } .why.amber { background: var(--amber-bg); color: var(--amber-ink); }
.why.blue { background: var(--blue-bg); color: var(--blue); } .why.green { background: var(--green-bg); color: var(--green); } .why.gray { background: var(--line2); color: var(--muted); }
.empty { color: var(--faint); font-size: 13.5px; padding: 10px; }
.load { display: flex; flex-direction: column; gap: 9px; }
.load .bar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 13px; }
.load .bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.load .track { height: 8px; background: var(--line2); border-radius: 99px; overflow: hidden; }
.load .fill { height: 100%; background: var(--blue); border-radius: 99px; }
.load .bar b { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

.board-wrap { overflow-x: auto; padding-bottom: 8px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; min-width: min-content; }
.col { background: rgba(0, 0, 0, .025); border: 1px solid var(--line2); border-radius: var(--r); padding: 12px; min-width: 0; }
.col h3 { font-family: var(--f); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--faint); display: flex; justify-content: space-between; margin: 2px 2px 10px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; color: var(--ink); box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow-hi); border-color: #dcd8d0; }
.card .t { font-size: 13px; font-weight: 620; line-height: 1.35; margin-bottom: 7px; }
.card .m { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); align-items: center; }
.chip { padding: 1px 8px; border-radius: 99px; background: var(--line2); font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.chip.red { background: var(--red-bg); color: var(--red-ink); } .chip.amber { background: var(--amber-bg); color: var(--amber-ink); } .chip.green { background: var(--green-bg); color: var(--green); }
.links { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; font-weight: 600; }
.studio .ask { padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.studio .ask:last-of-type { border-bottom: 0; }

/* ---------- job form ---------- */
.form { max-width: 920px; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 20px 8px; margin-bottom: 14px; box-shadow: var(--shadow); }
.sec h2 { font-size: 17px; margin-bottom: 3px; }
.sec .sub { font-size: 12.5px; color: var(--faint); margin: 0 0 16px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.checks label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 13px; cursor: pointer; font-size: 13px; font-weight: 550; user-select: none; background: var(--card); }
.checks label:has(input:checked) { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); }
.checks input, .deliv input[type=checkbox], .toggle input { accent-color: var(--blue); }
.deliv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.deliv label { display: grid; grid-template-columns: auto minmax(0, 1fr) 64px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; cursor: pointer; }
.deliv label:has(input[type=checkbox]:checked) { border-color: var(--blue); background: var(--blue-bg); }
.deliv input[type=number] { width: 64px; min-height: 30px; padding: 4px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); }
.toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 620; cursor: pointer; }
.toggle input { width: 18px; height: 18px; }
.money { border: 1px solid #f3c9c9; background: #fffafa; }
.money h2::before { content: '🔒 '; }
.hint { font-size: 12px; color: var(--faint); margin: -8px 0 14px; }
.who-note { font-size: 12px; margin: -8px 0 14px; color: var(--muted); }
.who-note.warn { color: var(--amber-ink); }
.submit-bar { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(rgba(245, 244, 241, 0), var(--bg) 35%); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.result { max-width: 920px; }
.result .card-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; color: var(--ink); font-weight: 620; box-shadow: var(--shadow); }
.result .card-link span:last-child { color: var(--blue); white-space: nowrap; }
.result .card-link:hover { text-decoration: none; box-shadow: var(--shadow-hi); }
.result ul, .result ol { margin: 6px 0 14px; padding-left: 20px; }
.result li { margin-bottom: 4px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  nav.tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .top .who span { display: none; }
  main { padding: 20px 16px 60px; }
  .board-wrap { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols3, .deliv { grid-template-columns: minmax(0, 1fr); }
  .head h1 { font-size: 25px; }
  .load .bar { grid-template-columns: 100px minmax(0, 1fr) 24px; }
}
