:root {
  --bg: #f2f2f2;
  --panel: #fff;
  --ink: #121212;
  --muted: #686868;
  --line: #dedede;
  --brand: #ff5a00;
  --brand2: #ff9800;
  --ok: #198754;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 12px 35px rgba(0, 0, 0, .10);
}
* { box-sizing: border-box; }
html,body { min-height: 100%; min-height: 100dvh; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px max(18px, calc((100vw - 1120px)/2)); background: rgba(14,14,14,.97); color: #fff; border-bottom: 3px solid var(--brand); }
.brand { display: flex; gap: 11px; align-items: center; }
.brand div { display: flex; flex-direction: column; }
.brand small { color: #c5c5c5; }
.logo { width: 118px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(255,90,0,.28)); }
.icon-btn,.link-btn { border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn { display:grid; place-items:center; min-width:36px; min-height:36px; font-size: 22px; }
.top-actions { display:flex; align-items:center; gap:8px; }
.admin-only { display:none; }
.top-actions select { width:auto; min-width:125px; padding:8px; background:#222; color:#fff; border-color:#444; }
main { max-width: 1120px; margin: auto; padding: 28px 18px 100px; }
.view { display: none; }
.view.active { display: block; }
.hero { position:relative; isolation:isolate; overflow:hidden; min-height:260px; display: flex; justify-content: space-between; align-items: end; padding: 34px; border-radius: 20px; background:#080808; color: #fff; border-bottom: 4px solid var(--brand); box-shadow: var(--shadow); }
.hero > * { position:relative; z-index:2; }
.hero::before { content:""; position:absolute; inset:0; z-index:0; background:url('assets/fastfix-brand-wall.png') right 34% center/cover no-repeat; opacity:.34; filter:saturate(.88) contrast(1.08); pointer-events:none; }
.hero::after { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(90deg,rgba(5,5,5,.98) 0%,rgba(5,5,5,.88) 42%,rgba(5,5,5,.38) 75%,rgba(5,5,5,.22) 100%); pointer-events:none; }
.hero-copy { max-width:620px; }
.hero-brand { display:flex; align-items:center; margin-bottom:12px; }
.hero-brand img { width:220px; height:92px; object-fit:contain; object-position:left center; }
h1,h2,p { margin: 0; }
.hero h1 { font-size: clamp(28px,5vw,46px); margin: 5px 0; }
.hero p { color: #c8c8c8; }
.eyebrow { font-size: 11px; letter-spacing: .16em; color: #777; font-weight: 850; }
.hero .eyebrow { color: var(--brand2); }
.primary,.secondary { border: 0; border-radius: 10px; padding: 13px 18px; font-weight: 850; cursor: pointer; }
.primary { background: linear-gradient(135deg,var(--brand2),var(--brand)); color: #151515; box-shadow: 0 8px 22px rgba(255,90,0,.24); }
.danger { border: 1px solid #dc2626; border-radius: 10px; padding: 14px 18px; background: #dc2626; color: #fff; font-weight: 900; cursor: pointer; }
.danger:hover { background: #b91c1c; }
.danger:disabled { opacity: .6; cursor: wait; }
.primary:hover { filter: brightness(1.05); }
.primary.compact { padding: 10px 14px; }
.secondary { background: var(--line); color: var(--ink); }
.dashboard-search { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin:14px 0 20px; padding:10px; background:var(--panel); border:1px solid var(--line); border-top:3px solid var(--brand); border-radius:var(--radius); box-shadow:var(--shadow); }
.dashboard-search-icon { display:grid; place-items:center; width:44px; height:44px; border-radius:10px; background:linear-gradient(135deg,#191919,#342014); color:var(--brand2); font-size:28px; font-weight:900; }
.dashboard-search input { border:0; padding:12px 6px; background:transparent; }
.dashboard-search input:focus { outline:0; border:0; }
.dashboard-search .primary { min-height:46px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 20px 0 30px; }
.stat-card { min-width:0; background: var(--panel); color:var(--ink); text-align:left; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); cursor:pointer; transition:.15s ease; }
.stat-card:hover { border-color:var(--brand); transform:translateY(-2px); }
.stat-card.all-statuses { background:linear-gradient(135deg,#191919,#342014); color:#fff; }
.stats span { color: var(--muted); }
.stat-card.all-statuses span { color:#ddd; }
.stats strong { display: block; font-size: 30px; margin-top: 7px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 25px 0 14px; }
.section-actions { display:flex; align-items:center; gap:8px; }
.section-head .link-btn { color: var(--brand); font-weight: 850; }
.toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 12px; margin-bottom: 14px; }
.result-info { min-height:22px; margin:-4px 2px 10px; color:var(--muted); font-size:13px; }
input,select,textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--panel); color: var(--ink); font: inherit; }
input:focus,select:focus,textarea:focus { outline: 2px solid rgba(255,90,0,.25); border-color: var(--brand); }
textarea { min-height: 78px; resize: vertical; }
.order-list { display: grid; gap: 10px; }
.order-card { display: grid; grid-template-columns: 110px 1.2fr 1fr 170px; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 16px; cursor: pointer; transition: .15s ease; }
.order-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.order-card b { font-size: 16px; }
.order-card small { display: block; color: var(--muted); }
.order-lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-thumb { width: 58px; height: 58px; flex: 0 0 58px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #ececec; color: var(--muted); border: 1px solid var(--line); }
.card-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-thumb.thumb-error { opacity: .55; }
.pill { display: inline-flex; width: max-content; padding: 6px 10px; border-radius: 99px; background: #fff0e7; color: #c94600; font-size: 12px; font-weight: 850; }
.pill.ready { background: #d1fae5; color: #047857; }
.pill.warn { background: #fef3c7; color: #b45309; }
.card-status { max-width: 220px; border: 0; cursor: pointer; appearance: auto; }
.card-status option { background: var(--panel); color: var(--ink); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; background: var(--panel); }
legend { padding: 0 8px; font-size: 17px; font-weight: 900; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid label { color: var(--muted); font-size: 13px; font-weight: 700; }
.grid input,.grid select,.grid textarea { margin-top: 6px; }
.wide { grid-column: 1/-1; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.checks label { display: flex; align-items: center; gap: 7px; }
.checks input { width: auto; accent-color: var(--brand); }
.submit { width: 100%; padding: 16px; }
.photo-picker { display: block; padding: 15px; border: 2px dashed var(--brand); border-radius: 12px; background: rgba(255,90,0,.06); color: var(--ink); font-weight: 850; cursor: pointer; text-align: center; }
.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-picker small { display: block; margin-top: 5px; color: var(--muted); font-weight: 500; }
.compact-photo { padding: 10px; margin-bottom: 12px; }
.photo-preview,.photo-gallery { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }
.photo-preview img,.photo-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.photo-gallery a { display: block; }
.photo-item { position: relative; min-width: 0; }
.delete-photo { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(15,15,15,.82); color: #fff; font-size: 21px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.delete-photo:hover { background: #d92d20; }
.delete-photo:disabled { opacity: .45; }
.no-photos { grid-column: 1/-1; color: var(--muted); text-align: center; padding: 12px; }
.photo-section { margin-top: 12px; }
.access-help { margin: 0 0 18px; color: var(--muted); }
.staff-access-list { display: grid; gap: 14px; }
.staff-card { border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 14px; padding: 16px; background: var(--bg); }
.staff-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.staff-card-head small { display:block; color:var(--muted); }
.access-switch { display:flex; align-items:center; gap:7px; color:var(--ink); font-weight:800; }
.access-switch input,.permission-line input { width:auto; accent-color:var(--brand); }
.city-rights { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.city-permission { border:1px solid var(--line); border-radius:10px; padding:11px; background:var(--panel); }
.city-permission b { display:block; margin-bottom:7px; }
.permission-line { display:flex; flex-wrap:wrap; gap:9px; font-size:12px; color:var(--muted); }
.permission-line label { display:flex; align-items:center; gap:4px; }
.save-access { margin-top:12px; }
dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-top: 4px solid var(--brand); border-radius: 0; padding: clamp(18px,3vw,38px) max(18px,calc((100vw - 1100px)/2)); background: var(--panel); color: var(--ink); box-shadow: none; overflow-y: auto; }
dialog::backdrop { background: rgba(0,0,0,.72); }
#closeDialog { position: sticky; bottom: 0; width: 100%; margin-top: 10px; box-shadow: 0 -8px 20px var(--panel); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.detail { padding: 12px; background: var(--bg); border-radius: 10px; }
.detail small { display: block; color: var(--muted); }
.status-select { margin: 12px 0; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 12; display: none; grid-template-columns: repeat(3,1fr); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 2px solid var(--brand); }
.bottom-nav button { border: 0; background: none; color: var(--muted); font-size: 11px; }
.bottom-nav span { display: block; font-size: 22px; }
.bottom-nav button.active { color: var(--brand); font-weight: 800; }
#toast { position: fixed; left: 50%; bottom: 85px; transform: translate(-50%,20px); padding: 11px 16px; border-radius: 10px; background: #111; color: #fff; border-left: 4px solid var(--brand); opacity: 0; pointer-events: none; transition: .2s; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
body.dark { --bg: #0b0b0b; --panel: #171717; --ink: #f5f5f5; --muted: #aaa; --line: #353535; --shadow: none; }
@media(max-width:720px) {
  main { padding: 18px 12px 92px; }
  .hero { display: block; min-height:330px; padding: 22px; }
  .hero::before { background-position:center; opacity:.28; }
  .hero::after { background:linear-gradient(180deg,rgba(5,5,5,.32) 0%,rgba(5,5,5,.72) 48%,rgba(5,5,5,.97) 82%); }
  .hero-copy { padding-top:115px; }
  .hero-brand img { width:180px; height:72px; }
  .brand .logo { width:76px; height:38px; }
  .brand small { display:none; }
  .hero .primary { margin-top: 20px; width: 100%; }
  .dashboard-search { grid-template-columns:auto minmax(0,1fr); margin-top:12px; }
  .dashboard-search .primary { grid-column:1/-1; width:100%; }
  .stats { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .order-card { grid-template-columns: 1fr 1fr; }
  .order-card .device { grid-column: 1/-1; }
  .card-thumb { width: 52px; height: 52px; flex-basis: 52px; }
  .grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .bottom-nav { display: grid; }
  .topbar { padding: 12px; }
  .details-grid { grid-template-columns: 1fr; }
  .photo-preview,.photo-gallery { grid-template-columns: repeat(3,1fr); }
  .city-rights { grid-template-columns:1fr; }
}
