/* Brantools glass theme — shared override sheet, loaded AFTER each page's own styles.
   Remaps every page's CSS variables to the light-glass palette and reskins common chrome.
   No layout/JS changes. Chromium bug note: no backdrop-filter on scrolling content —
   blur only on small sticky chrome (nav/header). */

:root{
  /* surfaces (pages use these as panel/input/well backgrounds) */
  --bg:#eef0f2 !important; --bg2:#f7f8f9 !important; --bg3:#e9ebee !important; --bg4:#e2e5e9 !important;
  --surface:#fbfcfd !important; --surface2:#f1f3f5 !important; --panel:#fbfcfd !important; --tile:#f1f3f5 !important; --header:#fbfcfd !important;
  /* lines */
  --border:rgba(0,0,0,.10) !important; --border2:rgba(0,0,0,.18) !important; --line:rgba(0,0,0,.10) !important;
  /* ink */
  --text:#1d1d1f !important; --text2:#4b4b50 !important; --text3:#86868b !important; --txt:#1d1d1f !important;
  --dim:#86868b !important; --faint:#a0a3a8 !important;
  /* accents — one family: emerald primary, calm blue secondary */
  --green:#178a52 !important; --green-dim:rgba(23,138,82,.12) !important; --success:#178a52 !important;
  --cyan:#178a52 !important; --cyan-dim:rgba(23,138,82,.12) !important;
  --blue:#2f6fd6 !important; --blue-dim:rgba(47,111,214,.12) !important; --blue2:#2456a8 !important;
  --purple:#6b5bd2 !important; --red:#c93838 !important; --danger:#c93838 !important;
  --yellow:#b07a12 !important; --warn:#b07a12 !important; --amber:#b07a12 !important; --gold:#a8811f !important;
  --glow:transparent !important; --shadow:0 8px 24px rgba(0,0,0,.16) !important;
  /* type */
  --font:-apple-system,BlinkMacSystemFont,'SF Pro Display','SF Pro Text','Helvetica Neue',Inter,'Segoe UI',Arial,sans-serif !important;
  --ui:-apple-system,BlinkMacSystemFont,'SF Pro Display','SF Pro Text','Helvetica Neue',Inter,'Segoe UI',Arial,sans-serif !important;
  --font-ui:-apple-system,BlinkMacSystemFont,'SF Pro Display','SF Pro Text','Helvetica Neue',Inter,'Segoe UI',Arial,sans-serif !important;
  --mono:ui-monospace,'SF Mono','Cascadia Mono',Consolas,monospace !important;
  --font-mono:ui-monospace,'SF Mono','Cascadia Mono',Consolas,monospace !important;
}

body{
  background:url('/static/bg-poster.jpg') center/cover fixed #131f1a !important;
  color:var(--text);
  font-family:var(--font) !important;
  -webkit-font-smoothing:antialiased;
}

/* neon glows off, everywhere */
*{text-shadow:none !important;}

/* top chrome: frosted white menu bar (small sticky element — blur is safe here) */
body > nav, body > header{
  background:rgba(250,250,252,.86) !important;
  border-bottom:1px solid rgba(0,0,0,.08) !important;
  backdrop-filter:blur(20px) saturate(170%);
  -webkit-backdrop-filter:blur(20px) saturate(170%);
  box-shadow:none !important;
}
body > nav a, body > header a{color:#3a3a3c;}
body > nav a:hover, body > header a:hover{color:#000;}

/* kill decorative page overlays (scanlines etc.) */
body::before, body::after{content:none !important;}

/* logo/user chrome on the light bar */
.logo-text{color:#1d1d1f !important;}
.logo-icon{background:#1d1d1f !important;color:#fff !important;}
.user-pill{color:#1d1d1f !important;}
.back-btn,.signout{color:#3a3a3c !important;border-color:rgba(0,0,0,.15) !important;}
.back-btn:hover,.signout:hover{color:#000 !important;}

/* page headers that were dark strips */
.page-header{background:transparent !important;border-bottom:none !important;}
.page-header .page-title, .page-title{color:#fff;}
.page-header .page-sub, .page-sub{color:rgba(255,255,255,.75);}

/* generic panel/card treatments — white glass, soft elevation, no blur */
.panel,.card,.tool-card,.box,.section,.stat-card,.modal,.dropzone,.table-wrap{
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.88)) !important;
  border:1px solid rgba(255,255,255,.5) !important;
  box-shadow:0 6px 18px rgba(0,0,0,.18) !important;
  color:var(--text);
}

/* Inputs.
   These pages were built dark, so many hardcode a near-black field background
   with light text — often with !important. Setting only the text colour here
   left black text on a black field, i.e. invisible while typing. Background and
   text must therefore always be set together.
   Excludes controls that render themselves (checkbox, radio, range, colour
   swatch, buttons); forcing a background on those breaks their appearance. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]):not([type=file]),
select,
textarea{
  background:rgba(255,255,255,.94) !important;
  background-image:none !important;
  color:#1d1d1f !important;
  border:1px solid rgba(0,0,0,.18) !important;
  font-family:var(--font) !important;
  -webkit-text-fill-color:#1d1d1f !important;  /* autofilled values */
  caret-color:#1d1d1f !important;
}

/* Focus ring that reads on the light field */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):focus,
select:focus,
textarea:focus{
  border-color:rgba(23,138,82,.65) !important;
  box-shadow:0 0 0 3px rgba(23,138,82,.15) !important;
  outline:none !important;
}

/* Checkboxes and radios are excluded from the rule above so their native
   rendering survives, but the pages' blanket `input{background:#111}` still
   reaches them and leaves a black box on a white card. Hand them back to the
   browser and tint them with the theme accent. */
input[type=checkbox],input[type=radio]{
  background:initial !important;
  border:initial !important;
  accent-color:#178a52 !important;
}

/* Dropdown items render against the OS popup surface, not the page */
option,optgroup{
  background:#ffffff !important;
  color:#1d1d1f !important;
}

input::placeholder,textarea::placeholder{
  color:#8a8d92 !important;
  -webkit-text-fill-color:#8a8d92 !important;
  opacity:1 !important;
}

/* Disabled/readonly fields stay legible rather than washing out to nothing */
input:disabled,select:disabled,textarea:disabled,
input[readonly],textarea[readonly]{
  background:rgba(238,240,242,.94) !important;
  color:#5f6266 !important;
  -webkit-text-fill-color:#5f6266 !important;
}

/* buttons: keep page layouts, fix dark-theme text-on-accent contrast */
.btn-cyan,.btn-green,.btn-primary{color:#fff !important;}
button{font-family:var(--font) !important;}

/* tables */
table{color:var(--text);}
th{color:var(--text3) !important;}

/* scrollbars, quietly */
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-thumb{background:rgba(0,0,0,.22);border-radius:5px;}
::-webkit-scrollbar-track{background:transparent;}
