/*
 * The things every page shows, including index.html, which deliberately does not load
 * app.css (it keeps its own copy of the tokens). This file holds no tokens of its own —
 * it reads whichever :root the page already defines — so it can be loaded beside either
 * stylesheet without fighting it. Anything needed on the landing page *and* the app
 * pages goes here.
 *
 * The login popup is built in JS by assets/firebase-client.js and the freelancer card by
 * assets/catalog.js; no page carries their markup, so this is the only place their look
 * is defined.
 */

/* Tailwind's .flex/.grid/.block have the same specificity as its [hidden] reset and come
   later, so <div hidden class="flex"> would still show. Pages toggle `hidden`; make it win. */
[hidden]{display:none !important;}

.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;}

/* ---------------------------------------------------------------- login popup ---- */
#loginDlg{background:none; border:none; color:var(--ink); padding:0; margin:auto; max-width:92vw; overflow:visible;}
#loginDlg::backdrop{background:rgba(10,6,4,.74);}

.login-panel{
  position:relative; width:min(25rem,92vw); padding:1.75rem; border-radius:1.5rem;
  background:rgba(26,16,11,.94); border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  box-shadow:0 30px 70px -20px rgba(0,0,0,.8);
}
.login-panel h2{font-size:1.35rem; line-height:1.25; margin:0 0 1.1rem;}
.login-panel label{display:block; color:var(--ink-dim); font-size:.8rem; font-weight:600; margin-bottom:.4rem;}
.login-panel input{
  width:100%; background:rgba(255,255,255,.06); color:var(--ink);
  border:1px solid var(--line); border-radius:.75rem; padding:.7rem .9rem; font-size:1rem;
}
.login-panel input::placeholder{color:var(--ink-faint);}
.login-panel input:focus{outline:none; border-color:var(--gold); background:rgba(255,255,255,.1);}
.login-panel .btn-primary{
  display:block; width:100%; margin-top:1.1rem; padding:.75rem 1.25rem;
  border-radius:9999px; font-size:.9rem; font-weight:600;
}
/* Sits under the button: the answer to "do I need to register first?" */
.login-note{color:var(--ink-faint); font-size:.78rem; line-height:1.55; margin-top:1rem; text-align:center;}
/* Sits under the heading on the OTP step: where the code went. */
.login-hint{color:var(--ink-dim); font-size:.8rem; line-height:1.55; margin:-.6rem 0 1.1rem;}
.login-dismiss{
  display:block; width:100%; padding:.5rem; margin-top:.6rem;
  font-size:.78rem; color:var(--ink-faint); background:none; border:none; cursor:pointer;
}
.login-dismiss:hover{color:var(--ink);}
/* guard() in ui.js disables the button for the length of the request. */
.login-panel button:disabled{opacity:.5; cursor:progress;}

/* ---------------------------------------------------------------------- toast ---- */
.toast{
  position:fixed; left:50%; bottom:1.25rem; transform:translateX(-50%); z-index:100;
  max-width:min(92vw,28rem); background:var(--bg-soft); color:var(--ink);
  border:1px solid rgba(232,180,92,.5); border-radius:.8rem; padding:.7rem 1rem;
  font-size:.875rem; box-shadow:0 16px 40px -12px rgba(0,0,0,.7);
}
.toast.bad{border-color:var(--red-bright); background:#4a1414;}

/* ------------------------------------------------------------------ dropdowns (select) ---- */
/* One look for every <select> on the site. Two layers:
   1. Everywhere: our own box and gold chevron, and an opened list on a surface clearly lighter than the
      page. (The list used to be --bg-mid, which is the page colour, so it dissolved into the background.)
   2. Browsers with customisable selects (Chromium 135+): the opened list itself is styled, because the
      system one paints a blue highlight no stylesheet can change. Others keep layer 1.
   The :not() pair is only there to out-rank app.css's :is(select,…) rule and Tailwind's utilities. */
select:not([multiple]):not([size]){
  -webkit-appearance:none; appearance:none; color-scheme:dark; cursor:pointer; color:var(--ink);
  background-color:rgba(255,255,255,.06);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23E8B45C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right .8rem center; background-size:1rem;
  padding-right:2.4rem; border:1px solid rgba(246,239,226,.22); border-radius:.75rem;
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:not([multiple]):not([size]):hover{border-color:rgba(232,180,92,.55); background-color:rgba(255,255,255,.09);}
select:not([multiple]):not([size]):focus-visible{border-color:var(--gold); box-shadow:0 0 0 3px rgba(232,180,92,.22);}
select:not([multiple]):not([size]):disabled{opacity:.5; cursor:not-allowed;}
select:not([multiple]):not([size]) option{background:#5A2E14; color:var(--ink);}

@supports (appearance:base-select){
  select:not([multiple]):not([size]),select:not([multiple]):not([size])::picker(select){appearance:base-select;}
  select:not([multiple]):not([size]){display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding-right:.8rem; background-image:none;}
  select:not([multiple]):not([size])::picker-icon{content:""; flex:none; width:1rem; height:1rem; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23E8B45C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6'/%3E%3C/svg%3E") center/contain no-repeat; transition:rotate .18s ease;}
  select:not([multiple]):not([size]):open::picker-icon{rotate:180deg;}
  select:not([multiple]):not([size])::picker(select){
    margin-block:.35rem; padding:.3rem; max-block-size:min(20rem,60vh);
    background:#5A2E14; color:var(--ink); border:1px solid rgba(232,180,92,.4); border-radius:.8rem;
    box-shadow:0 18px 40px -12px rgba(0,0,0,.75);
  }
  select:not([multiple]):not([size]) option{display:flex; align-items:center; gap:.6rem; padding:.5rem .7rem; border-radius:.5rem; background:transparent; cursor:pointer;}
  select:not([multiple]):not([size]) option:hover,select:not([multiple]):not([size]) option:focus-visible{background:rgba(232,180,92,.18);}
  select:not([multiple]):not([size]) option:checked{background:rgba(232,180,92,.26); color:var(--gold-bright); font-weight:600;}
  select:not([multiple]):not([size]) option::checkmark{order:1; margin-left:auto; color:var(--gold-bright);}
}
@media (prefers-reduced-motion:reduce){
  select:not([multiple]):not([size]),select:not([multiple]):not([size])::picker-icon{transition:none;}
}

/* ------------------------------------------------------------------ range slider ---- */
/* Opt in with class="range". The gold fill up to the thumb is `--fill` (a percentage the page sets from
   the input's value): WebKit has no "progress" part to colour, Firefox does and ignores the variable. */
input[type=range].range{
  -webkit-appearance:none; appearance:none; display:block; width:100%; height:1.5rem; margin:.25rem 0 0; padding:0;
  background:transparent; border:0; cursor:pointer; --fill:0%;
}
input[type=range].range:focus{outline:none;}
input[type=range].range::-webkit-slider-runnable-track{
  height:.4rem; border-radius:9999px;
  background:linear-gradient(90deg,var(--gold) var(--fill),rgba(246,239,226,.16) var(--fill));
}
input[type=range].range::-moz-range-track{height:.4rem; border-radius:9999px; background:rgba(246,239,226,.16);}
input[type=range].range::-moz-range-progress{height:.4rem; border-radius:9999px; background:var(--gold);}
input[type=range].range::-webkit-slider-thumb{
  -webkit-appearance:none; width:1.4rem; height:1.4rem; margin-top:-.5rem; border-radius:9999px;
  background:linear-gradient(135deg,var(--gold-bright),var(--gold)); border:3px solid var(--bg-deep,#2A1206);
  box-shadow:0 0 0 1.5px var(--gold), 0 3px 10px rgba(0,0,0,.55); transition:transform .12s ease, box-shadow .12s ease;
}
input[type=range].range::-moz-range-thumb{
  box-sizing:border-box; width:1.4rem; height:1.4rem; border-radius:9999px;
  background:linear-gradient(135deg,var(--gold-bright),var(--gold)); border:3px solid var(--bg-deep,#2A1206);
  box-shadow:0 0 0 1.5px var(--gold), 0 3px 10px rgba(0,0,0,.55); transition:transform .12s ease, box-shadow .12s ease;
}
input[type=range].range:hover::-webkit-slider-thumb{transform:scale(1.1);}
input[type=range].range:hover::-moz-range-thumb{transform:scale(1.1);}
input[type=range].range:active::-webkit-slider-thumb{transform:scale(1.18); box-shadow:0 0 0 1.5px var(--gold), 0 0 0 7px rgba(232,180,92,.22), 0 3px 10px rgba(0,0,0,.55);}
input[type=range].range:active::-moz-range-thumb{transform:scale(1.18); box-shadow:0 0 0 1.5px var(--gold), 0 0 0 7px rgba(232,180,92,.22), 0 3px 10px rgba(0,0,0,.55);}
input[type=range].range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 1.5px var(--gold), 0 0 0 5px rgba(232,180,92,.4), 0 3px 10px rgba(0,0,0,.55);}
input[type=range].range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 1.5px var(--gold), 0 0 0 5px rgba(232,180,92,.4), 0 3px 10px rgba(0,0,0,.55);}
@media (prefers-reduced-motion:reduce){
  input[type=range].range::-webkit-slider-thumb,input[type=range].range::-moz-range-thumb{transition:none;}
}

/* ------------------------------------------------------------------ bell (header) ---- */
.bell{position:relative; display:inline-flex;}
.bell-btn{
  position:relative; font-size:1rem; line-height:1; padding:.4rem .55rem; border-radius:9999px; cursor:pointer;
  background:rgba(255,255,255,.05); border:1px solid var(--line); color:var(--ink);
}
.bell-btn:hover,.bell-btn[aria-expanded="true"]{border-color:var(--gold);}
.bell-dot{
  position:absolute; top:-.35rem; right:-.35rem; min-width:1.1rem; height:1.1rem; padding:0 .3rem; border-radius:9999px;
  display:flex; align-items:center; justify-content:center; background:var(--red-bright); color:#fff; font-size:.65rem; font-weight:700;
}
.bell-dot[hidden]{display:none;}
.bell-panel{
  position:absolute; top:calc(100% + .6rem); right:0; z-index:60; width:min(23rem,calc(100vw - 1.5rem));
  max-height:min(70vh,30rem); overflow-y:auto; text-align:left; font-size:.85rem; color:var(--ink);
  background:var(--bg-soft); border:1px solid rgba(232,180,92,.4); border-radius:.9rem; box-shadow:0 16px 40px -12px rgba(0,0,0,.7);
}
.bell-panel[hidden]{display:none;}
.bell-head{padding:.7rem 1rem; font-weight:700; border-bottom:1px solid var(--line);}
.bell-empty{padding:1.1rem 1rem; color:var(--ink-dim); line-height:1.55;}
.bell-item{display:block; padding:.7rem 1rem; border-bottom:1px solid var(--line-soft); color:var(--ink);}
.bell-item:last-child{border-bottom:0;}
.bell-item:hover{background:rgba(255,255,255,.05);}
.bell-item.new{background:rgba(232,180,92,.1); box-shadow:inset 3px 0 0 var(--gold);}
.bell-item strong{display:block; font-weight:700;}
.bell-item span{display:block; color:var(--ink-dim); line-height:1.5; margin-top:.15rem;}
.bell-item time{display:block; color:var(--ink-faint); font-size:.72rem; margin-top:.3rem;}

/* --------------------------------------------------------- ask() question sheet ---- */
dialog.sheet{background:none; border:none; padding:0; margin:auto; color:var(--ink); max-width:92vw;}
dialog.sheet::backdrop{background:rgba(10,6,4,.7);}
.sheet-panel{width:min(26rem,92vw); padding:1.5rem; border-radius:1.25rem; background:rgba(30,18,12,.97); border:1px solid rgba(255,255,255,.16); box-shadow:0 30px 70px -20px rgba(0,0,0,.8);}
.sheet-panel h3{font-family:var(--font-display); font-size:1.25rem; line-height:1.25; margin-bottom:.4rem;}
.sheet-msg{color:var(--ink-dim); font-size:.85rem; line-height:1.55; margin-bottom:1rem;}
.sheet-label{display:block; color:var(--ink-dim); font-size:.8rem; font-weight:600; margin-top:.5rem;}
.sheet-label textarea,.sheet-label input{display:block; width:100%; margin-top:.4rem; background:rgba(255,255,255,.06); color:var(--ink); border:1px solid var(--line); border-radius:.75rem; padding:.6rem .8rem; font-size:1rem; font-weight:400;}
.sheet-label textarea:focus,.sheet-label input:focus{outline:none; border-color:var(--gold);}
.sheet-actions{display:flex; justify-content:flex-end; gap:.5rem; margin-top:1.25rem;}
.sheet-actions button{border-radius:9999px; padding:.55rem 1.1rem; font-size:.85rem; font-weight:600;}
.sheet-cancel{color:var(--ink-dim); border:1px solid var(--line);}
.sheet-ok{background:linear-gradient(135deg,var(--gold-bright),var(--gold)); color:var(--ink-dark);}
.sheet-danger{background:linear-gradient(135deg,var(--red-bright),var(--red)); color:#fff;}

/* Star picker: inputs run 5→1 in the markup and the row is reversed on screen, so
   "this label and every label after it" is exactly "this star and the ones to its left". */
.star-input{display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:.15rem; border:0; padding:0; margin:.25rem 0 .5rem;}
.star-input input{position:absolute; opacity:0; width:1px; height:1px;}
.star-input label{font-size:2rem; line-height:1; color:rgba(246,239,226,.22); cursor:pointer; padding:0 .1rem;}
.star-input input:checked ~ label,.star-input label:hover,.star-input label:hover ~ label{color:var(--gold);}
.star-input input:focus-visible + label{outline:2px solid var(--gold-bright); border-radius:.3rem;}

/* -------------------------------------------------------------- voice player ---- */
/* The one loud thing on a card: the product is a voice, so hearing it is one tap. */
.vp{
  --size:2.6rem;
  position:relative; z-index:2; flex-shrink:0; display:inline-flex; align-items:center; gap:.55rem;
  height:var(--size); min-width:var(--size); padding:0; border-radius:9999px; justify-content:center;
  background:linear-gradient(135deg,var(--gold-bright),var(--gold)); color:var(--ink-dark);
  box-shadow:0 8px 20px -8px rgba(232,180,92,.7); cursor:pointer;
}
.vp:hover{filter:brightness(1.06);}
.vp-big{--size:3rem; padding:0 1.2rem 0 1rem; font-weight:700; font-size:.9rem;}
.vp-icon{width:0; height:0; border-style:solid; border-width:.42rem 0 .42rem .7rem; border-color:transparent transparent transparent currentColor; margin-left:.15rem;}
.vp-eq{display:none; align-items:flex-end; gap:2px; height:.9rem;}
.vp-eq i{display:block; width:3px; height:100%; background:currentColor; border-radius:2px; transform-origin:bottom; animation:vp-eq .9s ease-in-out infinite;}
.vp-eq i:nth-child(2){animation-delay:-.6s;} .vp-eq i:nth-child(3){animation-delay:-.3s;} .vp-eq i:nth-child(4){animation-delay:-.75s;}
.vp[data-state="playing"] .vp-icon{display:none;}
.vp[data-state="playing"] .vp-eq{display:inline-flex;}
.vp[data-state="loading"]{opacity:.7; cursor:progress;}
@keyframes vp-eq{0%,100%{transform:scaleY(.3);} 50%{transform:scaleY(1);}}

/* ------------------------------------------------------------ freelancer card ---- */
.fc{
  position:relative; display:flex; flex-direction:column; gap:.75rem;
  padding:1.1rem; border-radius:1.1rem; background:rgba(255,255,255,.045);
  border:1px solid var(--line); transition:border-color .15s ease, background .15s ease;
}
.fc:hover{border-color:rgba(232,180,92,.45); background:rgba(255,255,255,.065);}
.fc-off{opacity:.72;}
.fc-mine{border-color:rgba(232,180,92,.55);}
/* File inputs: the browser's own "Chọn tệp" button is pale grey with dark text, which does not read on this dark
   page. Same gold pill as the other secondary buttons, and the "no file chosen" text in a readable tone. */
input[type=file]{color:var(--ink-dim); font-size:.88rem; max-width:100%;}
input[type=file]::file-selector-button{
  margin-right:.8rem; padding:.5rem 1.1rem; cursor:pointer; border-radius:9999px; font:inherit; font-weight:600;
  color:var(--gold-bright); background:rgba(232,180,92,.14); border:1.5px solid rgba(232,180,92,.55);
  transition:background .15s ease, border-color .15s ease;
}
input[type=file]:hover::file-selector-button{background:rgba(232,180,92,.26); border-color:var(--gold-bright);}
input[type=file]:focus-visible{outline:2px solid var(--gold-bright); outline-offset:3px; border-radius:9999px;}
input[type=file]:disabled{opacity:.5; cursor:not-allowed;}
input[type=file]:disabled::file-selector-button{cursor:not-allowed;}

/* Urgency tags on the admin queue ("Quá giờ 12 phút", "Còn 8 phút", a blocked caller): red = act now, gold = soon. */
.urgent{display:inline-block; margin-left:.5rem; padding:.1rem .6rem; border-radius:9999px; font-size:.72rem; font-weight:700; vertical-align:middle;}
.urgent.late{background:rgba(194,31,43,.25); color:#FBD6D6; border:1px solid rgba(194,31,43,.5);}
.urgent.soon{background:rgba(232,180,92,.18); color:var(--gold-bright); border:1px solid rgba(232,180,92,.4);}
/* A caller's busy windows (catalog.js busyBlock): red chips, because red here means "not bookable". */
.busy-day{display:flex; flex-wrap:wrap; align-items:baseline; gap:.35rem .8rem; padding:.4rem 0; border-top:1px solid var(--line-soft);}
.busy-day:first-child{border-top:0;}
.busy-label{flex:none; min-width:6.5rem; font-size:.82rem; font-weight:600; color:var(--ink-dim);}
.busy-slots{display:flex; flex-wrap:wrap; gap:.4rem;}
.busy-chip{display:inline-block; border-radius:9999px; padding:.15rem .65rem; font-size:.78rem; font-variant-numeric:tabular-nums; background:rgba(194,31,43,.16); color:#FBD6D6; border:1px solid rgba(194,31,43,.38);}
.fc-number{display:flex; align-items:baseline; gap:.5rem; font-size:.85rem; font-variant-numeric:tabular-nums;}
.fc-number strong{font-size:1rem; letter-spacing:.02em; color:var(--ink);}
.fc-head{display:flex; align-items:center; gap:.75rem;}
.fc-avatar{
  width:2.9rem; height:2.9rem; flex-shrink:0; border-radius:9999px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--gold-bright),var(--ember)); color:var(--ink-dark); font-weight:800; font-size:.95rem;
}
.fc-who{min-width:0; flex:1;}
.fc-name{font-family:var(--font-display); font-size:1.12rem; font-weight:700; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.fc-name a{color:var(--ink);}
/* The name link covers the whole card, so the card is one click target; the play button
   and the order button sit above it (z-index) and stay their own targets. */
.fc-name a::after{content:""; position:absolute; inset:0; border-radius:inherit;}
.fc-name a:focus-visible{outline:none;}
.fc:has(.fc-name a:focus-visible){outline:2px solid var(--gold-bright); outline-offset:2px;}
.fc-sub{color:var(--ink-faint); font-size:.78rem; margin-top:.15rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.fc-bio{color:var(--ink-dim); font-size:.85rem; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.fc-tags{display:flex; flex-wrap:wrap; gap:.35rem;}
.fc-stats{display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .9rem; font-size:.8rem; color:var(--ink-dim);}
.fc-rating{color:var(--ink); font-weight:600;}
.fc-paused{color:#FBD6D6; font-weight:600;}
.fc-foot{display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-top:auto; padding-top:.75rem; border-top:1px solid var(--line-soft);}
.fc-price{font-weight:700; font-size:1rem; color:var(--gold-bright);}
.fc-price .faint{font-weight:400; font-size:.8rem;}
.fc-cta{
  position:relative; z-index:2; border-radius:9999px; padding:.5rem 1rem; font-size:.85rem; font-weight:600; white-space:nowrap;
  background:linear-gradient(135deg,var(--red-bright),var(--red)); color:#fff;
}
.fc-cta:hover{filter:brightness(1.08);}
.fc-cta-quiet{background:none; border:1.5px solid rgba(232,180,92,.55); color:var(--gold-bright);}

.tag{display:inline-flex; align-items:center; border-radius:9999px; padding:.15rem .6rem; font-size:.72rem; font-weight:500; background:rgba(232,180,92,.12); color:var(--gold-bright); border:1px solid rgba(232,180,92,.28);}
.tag-pine{background:rgba(60,107,81,.35); color:#CFE7DA; border-color:rgba(60,107,81,.55);}
.tag-plain{background:var(--line-soft); color:var(--ink-dim); border-color:var(--line);}

/* --------------------------------------------------------------- toggle chips ---- */
/* A checkbox or radio dressed as a pill; the real input stays in the DOM for keyboard
   and screen readers. */
.chip{position:relative; display:inline-flex; cursor:pointer;}
.chip input{position:absolute; opacity:0; width:1px; height:1px;}
.chip span{display:inline-flex; align-items:center; border-radius:9999px; padding:.4rem .85rem; font-size:.82rem; border:1px solid var(--line); color:var(--ink-dim); background:rgba(255,255,255,.03); user-select:none; transition:background .15s ease, color .15s ease, border-color .15s ease;}
.chip:hover span{border-color:rgba(232,180,92,.45); color:var(--ink);}
.chip input:checked + span{background:rgba(232,180,92,.18); border-color:var(--gold); color:var(--gold-bright); font-weight:600;}
.chip input:focus-visible + span{outline:2px solid var(--gold-bright); outline-offset:2px;}
.chip input:disabled + span{opacity:.4; cursor:not-allowed;}

/* ---------------------------------------------------------- order progress ---- */
.steps{display:flex; list-style:none; padding:0; margin:.9rem 0 .2rem; counter-reset:step;}
.steps li{flex:1; position:relative; text-align:center; font-size:.7rem; color:var(--ink-faint); padding-top:1.35rem; counter-increment:step;}
.steps li::before{content:""; position:absolute; top:.3rem; left:50%; transform:translateX(-50%); width:.7rem; height:.7rem; border-radius:9999px; background:var(--bg-soft); border:2px solid rgba(246,239,226,.25); z-index:1;}
.steps li::after{content:""; position:absolute; top:.6rem; left:-50%; width:100%; height:2px; background:rgba(246,239,226,.15);}
.steps li:first-child::after{display:none;}
.steps li.done{color:var(--ink-dim);}
.steps li.done::before{background:var(--gold); border-color:var(--gold);}
.steps li.done::after,.steps li.now::after,.steps li.stuck::after{background:var(--gold);}
.steps li.now{color:var(--gold-bright); font-weight:700;}
.steps li.now::before{background:var(--bg-deep); border-color:var(--gold-bright); box-shadow:0 0 0 4px rgba(232,180,92,.2);}
.steps li.stuck{color:#FBD6D6; font-weight:700;}
.steps li.stuck::before{background:var(--red); border-color:var(--red-bright);}

/* ---------------------------------------------------------------------- tabs ---- */
.tabs{display:flex; gap:.25rem; border-bottom:1px solid var(--line); overflow-x:auto; scrollbar-width:none;}
.tabs button{padding:.65rem .9rem; font-size:.9rem; color:var(--ink-dim); border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap;}
.tabs button:hover{color:var(--ink);}
.tabs button[aria-selected="true"]{color:var(--gold-bright); font-weight:700; border-bottom-color:var(--gold);}
.tabs .count{display:inline-flex; min-width:1.25rem; justify-content:center; margin-left:.35rem; padding:0 .35rem; border-radius:9999px; font-size:.7rem; background:rgba(232,180,92,.2); color:var(--gold-bright);}

/* --------------------------------------------------------------- stat tiles ---- */
.stats{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem;}
@media (min-width:768px){ .stats{grid-template-columns:repeat(4,minmax(0,1fr));} }
.stat{padding:.9rem 1rem; border-radius:1rem; background:rgba(255,255,255,.045); border:1px solid var(--line);}
.stat-label{font-size:.75rem; color:var(--ink-faint);}
.stat-value{font-family:var(--font-display); font-size:1.5rem; font-weight:700; line-height:1.2; margin-top:.15rem;}

/* -------------------------------------------------------------- on/off switch ---- */
.switch{display:inline-flex; align-items:center; gap:.6rem; cursor:pointer; font-size:.85rem; font-weight:600;}
.switch input{position:absolute; opacity:0; width:1px; height:1px;}
.switch-track{position:relative; width:2.6rem; height:1.5rem; border-radius:9999px; background:rgba(246,239,226,.18); transition:background .15s ease;}
.switch-track::after{content:""; position:absolute; top:.2rem; left:.2rem; width:1.1rem; height:1.1rem; border-radius:9999px; background:var(--ink); transition:transform .15s ease;}
.switch input:checked + .switch-track{background:var(--pine);}
.switch input:checked + .switch-track::after{transform:translateX(1.1rem);}
.switch input:focus-visible + .switch-track{outline:2px solid var(--gold-bright); outline-offset:2px;}

/* ------------------------------------------------------------ loading shapes ---- */
.skeleton{border-radius:1.1rem; background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.08),rgba(255,255,255,.04)); background-size:200% 100%; animation:sk 1.4s ease-in-out infinite; min-height:13rem;}
@keyframes sk{0%{background-position:100% 0;} 100%{background-position:-100% 0;}}

/* --------------------------------------------------------------- empty state ---- */
.empty{padding:2rem 1.25rem; text-align:center; border:1px dashed var(--line); border-radius:1.1rem; color:var(--ink-dim); font-size:.9rem;}
.empty strong{display:block; color:var(--ink); font-family:var(--font-display); font-size:1.15rem; margin-bottom:.3rem;}

/* ------------------------------------------------------------------- notices ---- */
.notice{border-radius:.8rem; padding:.6rem .85rem; font-size:.82rem; margin-top:.85rem; background:rgba(255,255,255,.05); color:var(--ink-dim);}
.notice.bad{background:rgba(194,31,43,.15); color:#FBD6D6;}
.notice.go{background:rgba(232,180,92,.12); color:var(--gold-bright);}

/* ----------------------------------------------------------- call evidence ---- */
/* The caller's "after the call" block (freelancer.html) and CSKH's view of it (admin.html). */
.evidence{border:1px dashed var(--line); border-radius:.9rem; padding:.9rem 1rem;}
.req{font-size:.7rem; font-weight:700; color:#FBD6D6; margin-left:.4rem;}
.shot-preview{display:block; max-height:14rem; max-width:100%; margin-top:.6rem; border-radius:.6rem; border:1px solid var(--line);}
.shot-preview[hidden]{display:none;} /* display:block above would otherwise beat the hidden attribute */
