/* ===========================================================
   Z3CON — THE CONSOLE SKIN   assets/z3con.css   (03.11.2026)
   ===========================================================

   WHAT THIS IS
   ------------
   tools/console.php was built in the look the owner asked for: a dark
   brushed-metal case, bevelled panels, blue indicator LEDs and a segmented
   meter. It was a page of its own. This file takes that SAME language and
   lays it over the components the whole platform already shares — cards,
   tiles, buttons, inputs, tables, page headers, notes, tabs — so every page
   (terminal, owner panel, profile, settings, leaderboard, portal, auth)
   reads as one machine instead of a console sitting beside a website.

   HOW IT IS APPLIED
   -----------------
   Purely by CSS, on the class names that already exist. No page markup is
   changed by this file, so a page that is not touched still gets the skin,
   and a page that is redesigned later keeps it.

   WHAT IT DELIBERATELY DOES NOT DO
   --------------------------------
   • It does not redefine the theme tokens (--bg, --panel, --line, --text,
     --amber). The four themes keep deciding colour; this layer only adds
     the METAL: a gradient over the theme's own panel colour, a bevel, a
     hairline LED. That is why it survives a theme switch.
   • It does not change geometry: no display, no grid-template, no width.
     A skin that moves boxes is a redesign, and this is not one. The only
     spacing it adds is inside components that already own their padding.
   • It does not touch .panel — the terminal's own module. The terminal is
     the instrument panel of the product and themes already style it; the
     console language reaches it through the shared tokens, not by force.
   • Status colour stays semantic: green = up, amber = warn, red = down.
     Blue means ONE thing here — "this is instrumentation" (an LED, a
     gauge, a focus ring). It never means "state".

   The blue is the console's own #38a9ff → #0a6cff. It is hard-coded on
   purpose: it must not become amber on the amber theme, because then the
   LEDs stop reading as LEDs.
   =========================================================== */

:root{
  /* the one instrument blue */
  --con-led:#38a9ff;
  --con-led-2:#7cc8ff;
  --con-led-deep:#0a6cff;
  /* metal: a highlight on top, weight on the bottom, over the theme panel */
  --con-metal:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,0) 42%,rgba(0,0,0,.22));
  --con-edge:rgba(148,170,190,.20);
  --con-hi:inset 0 1px 0 rgba(255,255,255,.075);
  --con-lo:inset 0 -18px 30px rgba(0,0,0,.34);
  --con-bevel:var(--con-hi),var(--con-lo),0 10px 26px rgba(0,0,0,.34);
  --con-well:inset 0 2px 7px rgba(0,0,0,.55);
  --con-glow:0 0 16px rgba(56,169,255,.20);
}

/* ---------- 0. the case ------------------------------------------------
   A very quiet brushed texture behind everything. rgba only, so it is
   layered over whatever background the theme paints — never replaces it. */
body{
  background-image:
    repeating-linear-gradient(90deg,rgba(255,255,255,.014) 0 1px,transparent 1px 3px);
  background-attachment:fixed;
}

/* ---------- 0b. the auth pages — same case, smaller door ---------------- */
.auth-card{
  background-image:var(--con-metal);
  border-color:var(--con-edge);
  box-shadow:var(--con-bevel);
}
.auth-card .btn{
  box-shadow:var(--con-hi),0 3px 10px rgba(0,0,0,.35);
}

/* ---------- 1. cards — bevelled metal panels --------------------------- */
/* `!important` is not decoration here: every theme paints the card surface
   with `background: var(--chassis) !important` and its own shadow, so a
   plain rule loses the cascade no matter how late this file loads. Only the
   three properties the skin owns are forced — colour, size and layout stay
   the theme's. */
.z3-card{
  background-image:var(--con-metal) !important;
  border-color:var(--con-edge) !important;
  box-shadow:var(--con-bevel) !important;
}
/* the LED hairline across the top edge: the one detail that says "panel" */
.z3-card::before{
  content:"";position:absolute;left:16px;right:16px;top:0;height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(56,169,255,.50),transparent);
  opacity:.7;transition:opacity .18s ease;
}
.z3-card:hover::before{opacity:1}
.z3-card:hover{
  border-color:rgba(148,170,190,.30) !important;
  box-shadow:var(--con-hi),var(--con-lo),0 14px 30px rgba(0,0,0,.42) !important;
}

/* semantic cards keep their tone — the metal just sits under it */
.z3-card.is-ok,.z3-card.is-warn,.z3-card.is-off{background-blend-mode:normal}

/* the card head gets a rule, so each block reads as a module */
.z3-card-head{
  padding-bottom:10px;border-bottom:1px solid rgba(148,170,190,.14);
  margin-bottom:14px;
}
.z3-card-head .z3-h,
.z3-h{letter-spacing:.01em}

/* micro-label above a block: the console's etched caption */
.z3-kicker{
  color:var(--con-led-2);
  text-shadow:0 0 12px rgba(56,169,255,.45);
}

/* ---------- 2. stat tiles — one instrument per number ------------------ */
.z3-tiles{
  gap:10px;background:none;border:0;border-radius:0;overflow:visible;
}
.z3-tile{
  position:relative;
  border:1px solid var(--con-edge);border-radius:12px;
  background-image:var(--con-metal);
  box-shadow:var(--con-hi),inset 0 -12px 22px rgba(0,0,0,.42);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.z3-tile:hover{
  border-color:rgba(56,169,255,.38);
  box-shadow:var(--con-hi),inset 0 -12px 22px rgba(0,0,0,.42),var(--con-glow);
}
.z3-tile-v strong{
  color:#eaf4fb;
  text-shadow:0 0 14px rgba(56,169,255,.35);
  letter-spacing:.02em;
}
.z3-tile-v span{
  font:600 10.5px/1.3 var(--mono);
  letter-spacing:.10em;text-transform:uppercase;
  color:var(--muted);
}

/* ---------- 3. buttons — console keys ---------------------------------- */
.z3-btn,
.btn{
  background-image:linear-gradient(180deg,rgba(255,255,255,.06),rgba(0,0,0,.16));
  box-shadow:var(--con-hi),0 2px 6px rgba(0,0,0,.32);
  transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease;
}
.z3-btn:hover,
.btn:hover{
  border-color:rgba(56,169,255,.52);
  box-shadow:var(--con-hi),var(--con-glow),0 3px 10px rgba(0,0,0,.38);
}
.z3-btn:active,
.btn:active{transform:translateY(1px);box-shadow:inset 0 2px 6px rgba(0,0,0,.5)}
.z3-btn-p,
.btn-primary{
  box-shadow:var(--con-hi),0 4px 14px rgba(255,176,58,.22),0 0 0 1px rgba(255,176,58,.18);
}

/* ---------- 4. inputs — inset wells ------------------------------------ */
:where(.z3-card,.admin-shell,.z3-form) input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="hidden"]),
:where(.z3-card,.admin-shell,.z3-form) select,
:where(.z3-card,.admin-shell,.z3-form) textarea{
  background-color:rgba(0,0,0,.30);
  border-color:rgba(148,170,190,.22);
  box-shadow:var(--con-well);
  font-family:var(--mono);
  letter-spacing:.02em;
}
:where(.z3-card,.admin-shell,.z3-form) input:focus,
:where(.z3-card,.admin-shell,.z3-form) select:focus,
:where(.z3-card,.admin-shell,.z3-form) textarea:focus{
  outline:0;
  border-color:rgba(56,169,255,.65);
  box-shadow:var(--con-well),0 0 0 1px rgba(56,169,255,.22),var(--con-glow);
}
/* a checkbox is a switch, not a well: give it an LED when checked */
:where(.z3-card,.admin-shell) input[type="checkbox"],
:where(.z3-card,.admin-shell) input[type="radio"]{accent-color:var(--con-led)}

/* ---------- 5. tables — the readout ------------------------------------ */
:where(.z3-card,.admin-shell,.z3-table) table{
  border-collapse:separate;border-spacing:0;
}
:where(.z3-card,.admin-shell) thead th,
.z3-table thead th{
  font:700 9.5px/1.4 var(--mono);
  letter-spacing:.14em;text-transform:uppercase;
  color:var(--muted);
  background-image:linear-gradient(180deg,rgba(255,255,255,.045),rgba(0,0,0,.20));
  border-bottom:1px solid rgba(148,170,190,.20);
}
:where(.z3-card,.admin-shell) tbody tr{
  transition:background-color .12s ease;
}
:where(.z3-card,.admin-shell) tbody tr:hover{
  background-color:rgba(56,169,255,.045);
}
:where(.z3-card,.admin-shell) tbody td{
  border-bottom:1px solid rgba(148,170,190,.10);
}

/* ---------- 6. the page header — a nameplate --------------------------- */
.z3-pagehead{
  position:relative;overflow:hidden;
  padding:14px 16px;
  border:1px solid var(--con-edge);border-radius:14px;
  background-image:var(--con-metal);
  box-shadow:var(--con-bevel);
}
.z3-pagehead h1{
  color:#eaf4fb;
  text-shadow:0 0 18px rgba(56,169,255,.28);
}
.z3-pagehead p{color:var(--muted)}
/* the bezel light: a hairline under the plate, brightest at the left */
.z3-pagehead::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(56,169,255,.55),rgba(56,169,255,.06) 45%,transparent);
}

/* ---------- 7. icon chips — bezelled, with an LED when they mean state -- */
.z3ib{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.22));
  box-shadow:var(--con-hi);
}
.z3ib-ok{box-shadow:var(--con-hi),0 0 12px rgba(57,217,138,.22)}
.z3ib-warn{box-shadow:var(--con-hi),0 0 12px rgba(255,176,58,.20)}
.z3ib-off{box-shadow:var(--con-hi),0 0 12px rgba(255,82,82,.20)}
.z3ib-info{box-shadow:var(--con-hi),0 0 12px rgba(56,169,255,.22)}

/* ---------- 8. badges — engraved plates -------------------------------- */
.z3-badge{
  background-image:linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.18));
  box-shadow:var(--con-hi);
  letter-spacing:.09em;
}
.z3-badge-ok{box-shadow:var(--con-hi),0 0 12px rgba(57,217,138,.18)}
.z3-badge-warn{box-shadow:var(--con-hi),0 0 12px rgba(255,176,58,.16)}
.z3-badge-off{box-shadow:var(--con-hi),0 0 12px rgba(255,82,82,.16)}
.z3-badge-info{box-shadow:var(--con-hi),0 0 12px rgba(56,169,255,.18)}

/* ---------- 9. notes — the warning strip on the case ------------------- */
.z3-note{
  background-image:linear-gradient(180deg,rgba(255,255,255,.03),rgba(0,0,0,.20));
  box-shadow:var(--con-hi);
}
.z3-note.is-warn{border-left-color:var(--amber)}
.z3-note.is-ok{border-left-color:var(--green)}

/* ---------- 10. tabs — a selector drum -------------------------------- */
.z3-tabs{
  background-image:linear-gradient(180deg,rgba(255,255,255,.04),rgba(0,0,0,.22));
  box-shadow:var(--con-well);
}
.z3-tab.is-on,
.z3-tab[aria-selected="true"],
.z3-tab.active{
  border-color:rgba(56,169,255,.55);
  box-shadow:var(--con-hi),0 0 16px rgba(56,169,255,.20);
}

/* ---------- 11. key/value rows — engraved legend ---------------------- */
.z3-row-k,
.z3-row-v{
  font-family:var(--mono);
  letter-spacing:.02em;
}
.z3-row-k{color:var(--muted)}

/* ---------- 12. the owner nav — a rack of switches -------------------- */
.admin-nav a,
.admin-link,
.admin-nav-top,
.admin-nav-sub{
  transition:border-color .14s ease,color .14s ease,box-shadow .14s ease;
}
.admin-nav a:hover,
.admin-link:hover{
  border-color:rgba(56,169,255,.40);
  box-shadow:0 0 14px rgba(56,169,255,.14);
}
.admin-nav a.is-active,
.admin-link.active,
.admin-nav a[aria-current="page"]{
  border-color:rgba(56,169,255,.55);
  box-shadow:var(--con-hi),0 0 16px rgba(56,169,255,.18);
}

/* ---------- 13. small screens ----------------------------------------- */
@media (max-width:640px){
  .z3-card::before{left:12px;right:12px}
  .z3-pagehead{padding:12px 13px}
}
