/* FILE: /root/inventory/frontend/shared/styles.css
   ✅ Keeps your undertone background EXACTLY as-is
   ✅ Fixes: dark text on dark undertone (was invisible)
   ✅ Fixes: light text on light surfaces (was washed out)
   Strategy:
   - Keep --text-* = DARK (for light surfaces/cards)
   - Add --on-dark-* = LIGHT (for undertone/nav/footer/hero-on-undertone)
*/

:root{
  /* Brand */
  --brand-500: #1e90ff;
  --brand-600: #2e5f97;
  --brand-300: #92b1cd;

  /* Undertone (DO NOT CHANGE) */
  --undertone-900: #081320;
  --undertone-800: #101827;
  --undertone-700: #131f33;

  /* Light surface tokens (marketing) */
  --surface-100: rgba(255,255,255,.86);
  --surface-200: rgba(255,255,255,.74);
  --surface-solid: #ffffff;

  /* Text on LIGHT backgrounds (keep dark!) */
  --text-900: #0e1116;
  --text-800: #19202b;
  --text-700: #273041;
  --text-600: #3f4a5d;
  --text-500: #57647a;

  /* Text on DARK undertone (use these on hero/nav/footer) */
  --on-dark-900: rgba(255,255,255,.96);
  --on-dark-800: rgba(255,255,255,.90);
  --on-dark-700: rgba(255,255,255,.78);
  --on-dark-600: rgba(255,255,255,.64);
  --on-dark-500: rgba(255,255,255,.50);

  /* Borders + shadows */
  --border-soft: rgba(12,18,28,.12);
  --border-soft-2: rgba(12,18,28,.18);
  --shadow-1: 0 18px 60px rgba(0,0,0,.14);
  --shadow-2: 0 18px 60px rgba(0,0,0,.22);

  /* Radius */
  --radius-1: 10px;
  --radius-2: 14px;
  --radius-3: 18px;

  /* Focus */
  --focus: 0 0 0 4px rgba(30,144,255,.22);

  /* Fonts */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

html, body{ height:100%; }

body{
  margin:0;
  font-family: var(--font-sans);
  background: var(--undertone-900); /* unchanged */
  color: var(--on-dark-800);        /* ✅ readable on dark undertone */
}

/* =========================
   THEME TOKENS (body[data-theme])
   ========================= */

body[data-theme="marketing"]{
  /* marketing pages sit on undertone with light panels on top */
  color: var(--on-dark-800);
}

/* App themes (used once you’re inside the app) */
body[data-theme="app-dark"]{
  color: var(--on-dark-800);
  --app-bg: var(--undertone-900);
  --app-surface: rgba(255,255,255,.06);
  --app-surface-2: rgba(255,255,255,.09);
  --app-border: rgba(255,255,255,.12);
  --app-text: var(--on-dark-800);
  --app-muted: var(--on-dark-600);
  --app-shadow: 0 18px 60px rgba(0,0,0,.35);
}
body[data-theme="app-light"]{
  color: var(--text-900);
  --app-bg: #f5f7fb;
  --app-surface: #ffffff;
  --app-surface-2: #eef3f9;
  --app-border: rgba(12,18,28,.12);
  --app-text: var(--text-900);
  --app-muted: var(--text-600);
  --app-shadow: 0 18px 60px rgba(0,0,0,.10);
}

/* =========================
   LAYOUT HELPERS
   ========================= */
   
.container.header-grid{
  width: 100%;
  display: flex;
  align-items: center;
}

.container{
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
}

.container.header-grid {
    width: 100%;
    display: flex;
    align-items: center;
}

.surface{
  background: var(--surface-100);
  border: 1px solid rgba(255,255,255,.70);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  color: var(--text-900); /* ✅ dark text on light panel */
}

.surface-solid{
  background: var(--surface-solid);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-1);
  color: var(--text-900); /* ✅ dark text on light panel */
}

/* =========================
   NAVBAR + AUTH STRIP
   ========================= */

.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(11,15,20,.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: var(--on-dark-800);
}

.navbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: var(--on-dark-900);
}

.brand .mark{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 10px 26px rgba(30,144,255,.22);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}

.brand .name{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}

/* If using an <img class="logo"> */
.logo{
  height: 320px;
  width: auto;
  display: block;
}

.navlinks{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}

.navlink{
  color: var(--on-dark-800);
  text-decoration:none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 10px;
  border-radius: 12px;
}
.navlink:hover{
  color: var(--on-dark-900);
  background: rgba(255,255,255,.06);
}

.authstrip{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.authstrip input[type="text"],
.authstrip input[type="password"]{
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--on-dark-900);
  padding: 0 12px;
  outline: none;
  width: 168px;
}
.authstrip input::placeholder{ color: var(--on-dark-500); }

@media (max-width: 980px){
  .authstrip input{ width: 140px; }
}
@media (max-width: 740px){
  .navlinks{ display:none; }
  .authstrip input{ width: 138px; }
}

/* =========================
   BUTTONS
   ========================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .1px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.btn-primary{
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: white;
  box-shadow: 0 16px 42px rgba(30,144,255,.22);
}
.btn-primary:hover{ filter: brightness(1.02); }

.btn-secondary{
  background: rgba(255,255,255,.10);
  color: var(--on-dark-900);
  border-color: rgba(255,255,255,.18);
}
.btn-secondary:hover{ background: rgba(255,255,255,.14); }

/* Outline on dark surfaces (navbar/hero/footer) */
.btn-outline{
  background: transparent;
  color: var(--text-800);
  border-color: rgba(255,45,255,.99);
}
.btn-outline:hover{
  border-color: rgba(255,255,255,.38);
  background: rgba(255,255,255,.06);
}

.btn:focus{ outline:none; box-shadow: var(--focus); }

/* =========================
   HERO
   ========================= */

.hero{
  padding: 66px 0 28px;
  color: var(--on-dark-800);
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 28px;
  align-items: center;
}

@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.hero-panel{
  padding: 34px;
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  font-size: 12px;
  color: var(--text-700);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.kicker .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 10px 26px rgba(30,144,255,.22);
}

.h1{
  margin: 14px 0 10px;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.6px;
  color: var(--text-500); 
}

.lead{
  margin: 0 0 18px;
  color: var(--text-900);
  font-size: 16.5px;
  line-height: 1.55;
  max-width: 64ch;
}

.hero-cta{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta .note{
  font-size: 12px;
  color: var(--on-dark-600);
}

/* Slidey/rotatatey promo panel (light surface) */
.carousel{
  padding: 18px;
  color: var(--text-900);
}

.carousel-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  margin-bottom: 12px;
}

.carousel-title{
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .3px;
  color: var(--text-900); /* ✅ dark on light */
}

.arrowbtn{
  height: 34px;
  width: 40px;
  border-radius: 12px;
  border: 1px solid rgba(12,18,28,.14);
  background: rgba(255,255,255,.92);
  color: var(--text-900);
  cursor: pointer;
}
.arrowbtn:hover{ filter: brightness(1.02); }

/* =========================
   VALUE GRID / CARDS (LIGHT SURFACES)
   ========================= */

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
}

.card{
  padding: 18px;
  border-radius: var(--radius-3);
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: var(--shadow-1);
  color: var(--text-900); /* ✅ dark text on light bg */
}

.card h3{
  margin: 0 0 8px;
  letter-spacing: -0.2px;
  color: var(--text-900);
}

.card p{
  margin: 0;
  color: var(--text-700);
  line-height: 1.5;
}

/* =========================
   FEATURE STRIP (LIGHT SURFACE)
   ========================= */

.feature-strip{
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-3);
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow-1);
  color: var(--text-900);
}

.feature-row{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(12,18,28,.10);
  color: var(--text-800);
  font-weight: 900;
  font-size: 12px;
}

.pill .mini{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 10px 26px rgba(30,144,255,.16);
}

/* =========================
   SECTION + STEPS
   ========================= */

.section{
  padding: 30px 0;
  color: var(--on-dark-800); /* section header area is on undertone */
}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-title{
  margin:0;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--on-dark-900); /* ✅ bright on dark */
}

.section-sub{
  margin: 6px 0 0;
  color: var(--on-dark-700); /* ✅ readable on dark */
  line-height: 1.5;
  max-width: 70ch;
}

.steps{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px){
  .steps{ grid-template-columns: 1fr; }
}

.step{
  padding: 18px;
  border-radius: var(--radius-3);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: var(--shadow-1);
  color: var(--text-900); /* ✅ dark on light */
}

.step .num{
  display:inline-flex;
  width: 30px;
  height: 30px;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  background: rgba(30,144,255,.15);
  color: var(--brand-600);
  font-weight: 900;
  margin-bottom: 10px;
}

.step h4{ margin: 0 0 8px; color: var(--text-900); }
.step p{ margin: 0; color: var(--text-700); line-height: 1.55; }

/* =========================
   FOOTER (ON UNDERTONE)
   ========================= */

.footer{
  margin-top: 14px;
  padding: 24px 0 36px;
  color: var(--on-dark-700);
}

.footer a{
  color: var(--on-dark-700);
  text-decoration:none;
}
.footer a:hover{ color: var(--on-dark-900); }

.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 980px){
  .footer-grid{ grid-template-columns: 1fr; }
}

.footer .mini-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}

.footer .mini-brand .mark{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 10px 26px rgba(30,144,255,.18);
}

.footer .mini-brand .name{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 16px;
  color: var(--on-dark-900);
}

.footer .fine{
  margin:0;
  font-size: 13px;
  line-height: 1.55;
}

.footer .cols{ display:flex; gap: 26px; flex-wrap: wrap; }
.footer .col a{ display:block; padding: 6px 0; font-weight: 700; font-size: 13px; }

/* =========================
   CTA BAND (ON UNDERTONE)
   ========================= */

.cta-band{
  padding: 26px;
  border-radius: var(--radius-3);
  background: linear-gradient(135deg, rgba(30,144,255,.20), rgba(46,95,151,.14));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
  color: var(--on-dark-800);
}

.cta-band h3{
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.3px;
  color: var(--on-dark-900);
}

.cta-band p{
  margin: 0 0 14px;
  color: var(--on-dark-700);
  line-height: 1.5;
}

.cta-band .btn-secondary{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
  color: var(--on-dark-900);
}
.cta-band .btn-secondary:hover{ background: rgba(255,255,255,.22); }

.cta-band .actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   TILES / LINKS (LIGHT SURFACE)
   ========================= */

.tile{
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow-1);
  text-decoration:none;
  color: var(--text-900);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.tile:hover{ transform: translateY(-1px); filter: brightness(1.01); }

.tile .label{
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 4px;
  color: var(--text-900);
}

.tile .meta{
  font-size: 13px;
  color: var(--text-700);
  line-height: 1.45;
}

/* =========================
   APP BASE (later)
   ========================= */

.app-shell{
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-text);
}

#header:empty,
#footer:empty {
  min-height: 60px;
}