/*
 * Shared look for the app pages (dat-don / freelancer / admin / report).
 * Token values duplicated from index.html's inline <style> on purpose — that landing
 * page works and isn't touched, duplicating ~15 lines of variables here is cheaper
 * than risking a refactor of it.
 *
 * The cost of that copy is drift, and it has already bitten once: this file sets
 * color-scheme:dark and a dialog{} colour, index.html's copy had neither, so the login
 * dialog there inherited the UA stylesheet's black CanvasText. When you fix something
 * here that is not specific to the app pages, check index.html's block for the same gap.
 */
:root{
  --bg-deep:#2A1206; --bg-mid:#3A1A08; --bg-soft:#4A2410;
  --gold:#E8B45C; --gold-bright:#F6D59A; --ember:#FF8B5E;
  --red:#C21F2B; --red-bright:#E2473F; --red-dark:#7E141C;
  --pine:#3C6B51;
  --ink:#F6EFE2; --ink-dim:rgba(246,239,226,.70); --ink-faint:rgba(246,239,226,.46);
  --ink-dark:#2B0A0A;
  --line:rgba(246,239,226,.14); --line-soft:rgba(246,239,226,.08);
  --card:rgba(255,255,255,.05);
  --font-display:'Baloo 2',system-ui,sans-serif;
  --font-body:'Be Vietnam Pro',system-ui,-apple-system,sans-serif;
}
*{font-family:var(--font-body);}
html,body{background:var(--bg-deep);}
body{color:var(--ink);}
h1,h2,h3,.display{font-family:var(--font-display);}

.content-bg{
  background-image: linear-gradient(180deg, var(--bg-deep) 0, rgba(21,14,11,0) 240px), url('bg-content.png');
  background-size: 100% 240px, 100% 100%;
  background-position: top center, center;
  background-repeat: no-repeat, no-repeat;
  background-color:var(--bg-deep);
  min-height:100vh;
}

.navbar{border-bottom:1px solid var(--line); background:rgba(16,10,7,.6); backdrop-filter:blur(10px);}
.card{background:var(--card); border:1px solid var(--line); border-radius:1rem; backdrop-filter:blur(10px);}
.btn-primary{background:linear-gradient(135deg,var(--red-bright),var(--red)); color:#fff;}
.btn-outline{border:1.5px solid rgba(232,180,92,.55); color:var(--gold-bright); background:transparent;}
.btn-dark{background:rgba(26,17,12,.55); border:1.5px solid rgba(255,255,255,.35); color:#fff;}
.btn-outline:disabled, .btn-primary:disabled{opacity:.45; cursor:not-allowed;}
.status-pill{background:rgba(232,180,92,.16); border:1px solid rgba(232,180,92,.35); color:var(--gold-bright); display:inline-flex; align-items:center; gap:.35rem; border-radius:9999px; padding:.15rem .7rem; font-size:.75rem; font-weight:600;}
.pill-pine{background:rgba(60,107,81,.35); color:#CFE7DA; border:1px solid rgba(60,107,81,.5); border-radius:9999px; padding:.1rem .55rem; font-size:.7rem;}
.pill-neutral{background:var(--line-soft); color:var(--ink-dim); border:1px solid var(--line); border-radius:9999px; padding:.1rem .55rem; font-size:.7rem;}
.pill-red{background:rgba(194,31,43,.2); color:#FBD6D6; border:1px solid rgba(194,31,43,.4); border-radius:9999px; padding:.1rem .55rem; font-size:.7rem;}
.star{color:var(--gold);}
.accent{color:var(--gold-bright);}
/* :is() takes the specificity of its strongest argument (input[type=…]), so select and
   textarea win over Tailwind's preflight reset, which the CDN injects *after* this file and
   which otherwise zeroed their padding and font-size. */
:is(select,input[type=text],input[type=number],input[type=tel],input[type=email],input[type=search],input[type=datetime-local],textarea,input[type=range]){background:rgba(255,255,255,.04); color:var(--ink); border:1px solid var(--line); border-radius:.6rem; padding:.45rem .7rem;}
select:focus,input:focus,textarea:focus{outline:none; border-color:var(--gold);}
/* Chrome paints a saved/autofilled value pale blue and ignores `background`; the inset shadow is the
   only thing that overrides it. Same dark fill as the field, so autofill doesn't look like a different input. */
input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-text-fill-color:var(--ink); caret-color:var(--ink); box-shadow:0 0 0 100px #35190b inset; transition:background-color 9999s;}
input[type=range]{accent-color:var(--gold); padding:0;}
label{color:var(--ink); font-size:.85rem; font-weight:600;}
.muted{color:var(--ink-dim);}
.faint{color:var(--ink-faint);}

/* ---------- polish layer ---------- */
:root{color-scheme:dark;}
/* The dropdown look (box, chevron, opened list) lives in ui.css. */
:is(select,input[type=text],input[type=number],input[type=tel],input[type=email],input[type=search],input[type=datetime-local],textarea){font-size:1rem; min-height:2.5rem;} /* 16px: no iOS focus-zoom */
::placeholder{color:var(--ink-faint);}
a,button{transition:background .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;}
button{cursor:pointer;}
.btn-primary:hover{filter:brightness(1.08);}
.btn-outline:hover{background:rgba(232,180,92,.1);}
.btn-dark:hover{background:rgba(26,17,12,.8);}
.btn-gold{background:linear-gradient(135deg,var(--gold-bright),var(--gold)); color:var(--ink-dark);}
/* The dat-don.html reminder to verify an email: gold border and tint so it reads as a thing to act on, not routine text */
.email-reminder{border-color:rgba(232,180,92,.55); background:rgba(232,180,92,.1);}
.email-reminder p{color:var(--ink);}
button:active{transform:translateY(1px);}
button:disabled{opacity:.5; cursor:progress;}
:focus-visible{outline:2px solid var(--gold-bright); outline-offset:2px;}

.nav-links{display:flex; gap:1.1rem; font-size:.875rem; width:100%; overflow-x:auto; white-space:nowrap; scrollbar-width:none;}
.nav-links a{color:var(--ink-dim); padding:.25rem 0;}
.nav-links a:hover{color:var(--gold-bright);}
.nav-links a[aria-current]{color:var(--gold-bright); font-weight:600; box-shadow:inset 0 -2px 0 var(--gold);}
@media (min-width:640px){ .nav-links{width:auto; margin-left:auto;} }

.card.selected{border-color:var(--gold); background:rgba(232,180,92,.09);}
.avatar{background:linear-gradient(135deg,var(--gold-bright),var(--ember)); color:var(--ink-dark); width:2.5rem; height:2.5rem; border-radius:9999px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex-shrink:0;}
.status-pill{white-space:nowrap;}
.status-pill.ok{background:rgba(60,107,81,.35); border-color:rgba(60,107,81,.6); color:#CFE7DA;}
.status-pill.bad{background:rgba(194,31,43,.2); border-color:rgba(194,31,43,.45); color:#FBD6D6;}
.form-err{background:rgba(194,31,43,.2); color:#FBD6D6; border:1px solid rgba(194,31,43,.4); border-radius:.6rem; padding:.5rem .75rem; font-size:.8rem;}

/* Unrated stars start dim; hovering fills up to the pointer. */
.rate-star{color:var(--ink-faint); font-size:1.4rem; line-height:1; padding:.15rem;}
.rate-order:hover .rate-star{color:var(--gold);}
.rate-order .rate-star:hover ~ .rate-star{color:var(--ink-faint);}

/* .toast moved to ui.css — index.html needs it too and cannot load this file. */

dialog{background:var(--bg-mid); color:var(--ink); border:1px solid var(--line); border-radius:1rem; margin:auto;}
dialog::backdrop{background:rgba(0,0,0,.65);}

/* No prefers-reduced-motion rule here on purpose — same call as the snow on index.html.
   Windows reports that preference whenever "Animation effects" is off, and the only
   motion on these pages is a 0.15s colour fade on buttons. */
