/* Astrarium — shared stylesheet */

:root {
  --navy-950: #070b14;
  --navy-900: #0b1120;
  --navy-800: #111a2e;
  --navy-700: #182541;
  --navy-600: #24365c;
  --navy-500: #33477a;
  --ink-100: #f4f6fb;
  --ink-200: #dbe1ee;
  --ink-300: #b7c0d6;
  --ink-400: #8894b3;
  --accent-400: #6be8db;
  --electric-500: #5b7cfa;
  --electric-400: #7f99ff;
  --warn-500: #f2a93c;
  --danger-500: #ef5c6e;
  --success-500: #38c982;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-md: 0 12px 32px -12px rgba(7, 11, 20, 0.35);
  --shadow-lg: 0 24px 60px -20px rgba(7, 11, 20, 0.45);
  --max-width: 1180px;
  --font-sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Theme-aware tokens — light is the default */
  --bg: #f4f6fb;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --surface-border: #e3e7f1;
  --text-primary: var(--navy-900);
  --text-body: var(--navy-700);
  --input-bg: #ffffff;
  --input-border: #ccd2e0;
  --btn-dark-bg: var(--navy-900);
  --btn-dark-bg-hover: var(--navy-800);
  --btn-ghost-color: var(--navy-800);
  --btn-ghost-border: var(--navy-600);
  --btn-ghost-hover-bg: var(--navy-800);
  --divider: #e3e7f1;
  --table-border: #e3e7f1;
  --table-border-soft: #eef1f8;
  --battery-track: #e3e7f1;
  --timeline-border: #e3e7f1;
  --status-online-bg: rgba(56, 201, 130, 0.15);
  --status-online-text: #1c8a54;
  --status-offline-bg: rgba(136, 148, 179, 0.18);
  --status-offline-text: #5b6785;
  --status-pending-bg: rgba(242, 169, 60, 0.18);
  --status-pending-text: #a06a0a;
  --status-shipped-bg: rgba(91, 124, 250, 0.16);
  --status-shipped-text: #3450c9;
  --status-cancelled-bg: rgba(239, 92, 110, 0.16);
  --status-cancelled-text: #c23347;
  --tag-warn-bg: rgba(242, 169, 60, 0.16);
  --tag-warn-text: #b3720b;
  --coming-soon-bg: rgba(242, 169, 60, 0.12);
  --coming-soon-border: rgba(242, 169, 60, 0.35);
  --coming-soon-text: #8a5b06;
  --form-ok-bg: rgba(56, 201, 130, 0.14);
  --form-ok-text: #1c8a54;
  --form-err-bg: rgba(239, 92, 110, 0.14);
  --form-err-text: #c23347;

  --hero-gradient:
    linear-gradient(112deg, transparent 30%, rgba(91, 124, 250, 0.16) 31%, rgba(91, 124, 250, 0.03) 32.2%, transparent 34%) no-repeat,
    linear-gradient(66deg, transparent 62%, rgba(239, 92, 110, 0.14) 63%, rgba(239, 92, 110, 0.03) 64.2%, transparent 67%) no-repeat,
    radial-gradient(900px 480px at 88% -10%, rgba(91, 124, 250, 0.14), transparent 60%) no-repeat,
    radial-gradient(700px 460px at 2% 105%, rgba(239, 92, 110, 0.1), transparent 58%) no-repeat,
    radial-gradient(1000px 550px at 15% -15%, rgba(58, 216, 201, 0.1), transparent 55%) no-repeat,
    linear-gradient(180deg, #ffffff, #eef1f8) no-repeat;
  --page-hero-gradient:
    linear-gradient(112deg, transparent 30%, rgba(91, 124, 250, 0.14) 31%, rgba(91, 124, 250, 0.03) 32.2%, transparent 34%) no-repeat,
    linear-gradient(66deg, transparent 62%, rgba(239, 92, 110, 0.12) 63%, rgba(239, 92, 110, 0.03) 64.2%, transparent 67%) no-repeat,
    radial-gradient(700px 380px at 90% -20%, rgba(91, 124, 250, 0.12), transparent 60%) no-repeat,
    radial-gradient(600px 360px at 0% 110%, rgba(239, 92, 110, 0.08), transparent 58%) no-repeat,
    linear-gradient(180deg, #ffffff, #eef1f8) no-repeat;
  --panel-gradient: linear-gradient(160deg, rgba(11, 17, 32, 0.035), rgba(11, 17, 32, 0.015));
  --panel-border: rgba(11, 17, 32, 0.1);
  --panel-inset-bg: var(--bg-alt);
  --header-bg: rgba(244, 246, 251, 0.82);
  --header-border: rgba(11, 17, 32, 0.08);
  --nav-hover-bg: rgba(11, 17, 32, 0.06);
  --btn-secondary-color: var(--navy-900);
  --btn-secondary-border: rgba(11, 17, 32, 0.3);
  --btn-secondary-hover-border: var(--navy-900);
  --btn-secondary-hover-bg: rgba(11, 17, 32, 0.06);
  --accent-500: #2a9d8f;
  --accent-600: #1f7a6f;
  --btn-primary-shadow: 0 10px 24px -10px rgba(42, 157, 143, 0.35);
  --btn-primary-shadow-hover: 0 14px 30px -10px rgba(42, 157, 143, 0.45);
}

:root[data-theme="dark"] {
  --bg: #05070d;
  --bg-alt: var(--navy-900);
  --surface: var(--navy-800);
  --surface-border: rgba(244, 246, 251, 0.08);
  --text-primary: var(--ink-200);
  --text-body: var(--ink-300);
  --input-bg: var(--navy-900);
  --input-border: rgba(244, 246, 251, 0.18);
  --btn-dark-bg: var(--navy-600);
  --btn-dark-bg-hover: var(--navy-500);
  --btn-ghost-color: var(--ink-200);
  --btn-ghost-border: rgba(244, 246, 251, 0.3);
  --btn-ghost-hover-bg: rgba(244, 246, 251, 0.08);
  --divider: rgba(244, 246, 251, 0.12);
  --table-border: rgba(244, 246, 251, 0.15);
  --table-border-soft: rgba(244, 246, 251, 0.08);
  --battery-track: rgba(244, 246, 251, 0.12);
  --timeline-border: rgba(244, 246, 251, 0.15);
  --status-online-bg: rgba(56, 201, 130, 0.18);
  --status-online-text: #4fe0a0;
  --status-offline-bg: rgba(136, 148, 179, 0.2);
  --status-offline-text: var(--ink-300);
  --status-pending-bg: rgba(242, 169, 60, 0.2);
  --status-pending-text: #f2b355;
  --status-shipped-bg: rgba(91, 124, 250, 0.2);
  --status-shipped-text: #8fa4ff;
  --status-cancelled-bg: rgba(239, 92, 110, 0.2);
  --status-cancelled-text: #ff8a97;
  --tag-warn-bg: rgba(242, 169, 60, 0.18);
  --tag-warn-text: #f2b355;
  --coming-soon-bg: rgba(242, 169, 60, 0.14);
  --coming-soon-border: rgba(242, 169, 60, 0.4);
  --coming-soon-text: #f2c877;
  --form-ok-bg: rgba(56, 201, 130, 0.16);
  --form-ok-text: #4fe0a0;
  --form-err-bg: rgba(239, 92, 110, 0.16);
  --form-err-text: #ff8a97;

  --hero-gradient:
    linear-gradient(112deg, transparent 28%, rgba(91, 124, 250, 0.4) 29%, rgba(91, 124, 250, 0.08) 30.4%, transparent 33%) no-repeat,
    linear-gradient(66deg, transparent 58%, rgba(239, 92, 110, 0.38) 59%, rgba(239, 92, 110, 0.08) 60.4%, transparent 64%) no-repeat,
    radial-gradient(900px 480px at 88% -10%, rgba(91, 124, 250, 0.4), transparent 60%) no-repeat,
    radial-gradient(700px 460px at 2% 105%, rgba(239, 92, 110, 0.24), transparent 58%) no-repeat,
    radial-gradient(1000px 550px at 15% -15%, rgba(58, 216, 201, 0.16), transparent 55%) no-repeat,
    linear-gradient(180deg, var(--navy-950), #05070d 75%) no-repeat;
  --page-hero-gradient:
    linear-gradient(112deg, transparent 30%, rgba(91, 124, 250, 0.32) 31%, rgba(91, 124, 250, 0.06) 32.2%, transparent 34%) no-repeat,
    linear-gradient(66deg, transparent 62%, rgba(239, 92, 110, 0.3) 63%, rgba(239, 92, 110, 0.06) 64.2%, transparent 67%) no-repeat,
    radial-gradient(700px 380px at 90% -20%, rgba(91, 124, 250, 0.3), transparent 60%) no-repeat,
    radial-gradient(600px 360px at 0% 110%, rgba(239, 92, 110, 0.18), transparent 58%) no-repeat,
    linear-gradient(180deg, var(--navy-950), #05070d) no-repeat;
  --panel-gradient: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  --panel-border: rgba(244, 246, 251, 0.12);
  --panel-inset-bg: var(--navy-700);
  --header-bg: rgba(7, 11, 20, 0.92);
  --header-border: rgba(244, 246, 251, 0.08);
  --nav-hover-bg: rgba(244, 246, 251, 0.08);
  --btn-secondary-color: var(--ink-100);
  --btn-secondary-border: rgba(244, 246, 251, 0.35);
  --btn-secondary-hover-border: var(--ink-100);
  --btn-secondary-hover-bg: rgba(244, 246, 251, 0.08);
  --accent-500: #3ad8c9;
  --accent-600: #1fb6a7;
  --btn-primary-shadow: 0 10px 24px -10px rgba(58, 216, 201, 0.55);
  --btn-primary-shadow-hover: 0 14px 30px -10px rgba(58, 216, 201, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.15s ease, color 0.15s ease;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text-body); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent-500);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-500);
  color: var(--navy-950);
  box-shadow: var(--btn-primary-shadow);
}
.btn-primary:hover { background: var(--accent-600); box-shadow: var(--btn-primary-shadow-hover); }
.btn-secondary {
  background: transparent;
  color: var(--btn-secondary-color);
  border-width: 2px;
  border-color: var(--btn-secondary-border);
}
.btn-secondary:hover { border-color: var(--btn-secondary-hover-border); background: var(--btn-secondary-hover-bg); }
.btn-dark {
  background: var(--btn-dark-bg);
  color: var(--ink-100);
}
.btn-dark:hover { background: var(--btn-dark-bg-hover); }
.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-color);
  border-color: var(--btn-ghost-border);
}
.btn-ghost:hover { background: var(--btn-ghost-hover-bg); color: var(--ink-100); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-primary > li { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: var(--text-body);
  font-size: 0.93rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text-primary); background: var(--nav-hover-bg); }
.nav-primary ul {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.15s ease;
}
.nav-primary li:hover > ul,
.nav-primary li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-primary ul .nav-link {
  padding: 10px 12px;
  border-radius: 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.nav-primary ul .nav-link small { display: block; color: var(--ink-400); font-weight: 400; font-size: 0.78rem; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-gradient);
  color: var(--text-primary);
  padding: 96px 0 84px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; color: var(--text-primary); }
.hero-stats div span { color: var(--ink-400); font-size: 0.85rem; }
.hero-visual {
  background: var(--panel-gradient);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.page-hero {
  background: var(--page-hero-gradient);
  color: var(--text-primary);
  padding: 72px 0 56px;
}
.page-hero p.lead { color: var(--text-body); max-width: 60ch; font-size: 1.05rem; }
.breadcrumbs { color: var(--ink-400); font-size: 0.85rem; margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--text-primary); }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-alt); color: var(--text-primary); }
.section-dark p { color: var(--text-body); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head.align-left { margin-left: 0; text-align: left; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.card-dark {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
}
.card-dark p { color: var(--text-body); }
.icon-tile {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-500), var(--electric-500));
  color: var(--navy-950);
  margin-bottom: 16px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.product-card .thumb {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  padding: 40px;
}
.product-card .body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.product-card .price { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.product-card .price span { font-size: 0.85rem; color: var(--ink-400); font-weight: 500; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(58, 216, 201, 0.14);
  color: var(--accent-600);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tag-warn { background: var(--tag-warn-bg); color: var(--tag-warn-text); }

.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table tr { border-bottom: 1px solid var(--table-border); }
.spec-table td { padding: 12px 6px; }
.spec-table td:first-child { color: var(--ink-400); width: 40%; font-weight: 600; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list li::before {
  content: "";
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent-500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/60% no-repeat;
}

.stat-row { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-row div strong { font-size: 2rem; display: block; color: var(--text-primary); }
.stat-row div span { color: var(--ink-400); font-size: 0.85rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band p { color: var(--ink-300); margin: 6px 0 0; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-primary); }
.form-field .hint { color: var(--ink-400); font-size: 0.8rem; margin-top: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--input-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text-primary);
}
input::placeholder, textarea::placeholder { color: var(--ink-400); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--electric-500);
  box-shadow: 0 0 0 3px rgba(91, 124, 250, 0.22);
}
textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-400);
  margin-top: 12px;
}
.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { background: var(--form-ok-bg); color: var(--form-ok-text); }
.form-status.err { background: var(--form-err-bg); color: var(--form-err-text); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--ink-300); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; padding-bottom: 48px; border-bottom: 1px solid rgba(244,246,251,0.08); }
.footer-grid h4 { color: var(--ink-100); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink-300); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--accent-400); }
.footer-brand p { color: var(--ink-400); max-width: 32ch; }
.footer-contact { margin-top: 14px; font-size: 0.9rem; color: var(--ink-300); display: grid; gap: 6px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  color: var(--ink-400);
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Auth-aware nav / badges ---------- */
.auth-slot { display: flex; align-items: center; gap: 10px; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success-500); display: inline-block; }

/* ---------- App shell (logged-in area) ---------- */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 72px); }
.app-sidebar { background: var(--navy-950); color: var(--ink-200); padding: 28px 18px; }
.app-sidebar nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.app-sidebar .nav-link { color: var(--ink-300); }
.app-sidebar .nav-link[aria-current="page"] { background: rgba(58,216,201,0.14); color: var(--accent-400); }
.app-main { padding: 40px; background: var(--bg-alt); }
.app-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-pill.online { background: var(--status-online-bg); color: var(--status-online-text); }
.status-pill.offline { background: var(--status-offline-bg); color: var(--status-offline-text); }
.status-pill.pending { background: var(--status-pending-bg); color: var(--status-pending-text); }
.status-pill.shipped { background: var(--status-shipped-bg); color: var(--status-shipped-text); }
.status-pill.delivered { background: var(--status-online-bg); color: var(--status-online-text); }
.status-pill.cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }

.panel-inset { background: var(--panel-inset-bg); border: none; border-radius: var(--radius-md); }
.device-card { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; }
.device-card .meta { display: flex; gap: 16px; align-items: center; }
.device-card .device-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--navy-900); display: flex; align-items: center; justify-content: center; }
.battery-bar { width: 90px; height: 8px; border-radius: 999px; background: var(--battery-track); overflow: hidden; }
.battery-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-500), var(--electric-500)); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-left: 28px; padding-bottom: 24px; border-left: 2px solid var(--timeline-border); margin-left: 8px; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-500); }
.timeline .when { font-size: 0.78rem; color: var(--ink-400); }

.empty-state { text-align: center; padding: 48px 24px; color: var(--ink-400); }

.table-simple { width: 100%; border-collapse: collapse; }
.table-simple th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-400); padding: 10px 12px; border-bottom: 1px solid var(--table-border); }
.table-simple td { padding: 14px 12px; border-bottom: 1px solid var(--table-border-soft); font-size: 0.92rem; }

.coming-soon-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--coming-soon-bg);
  border: 1px solid var(--coming-soon-border);
  color: var(--coming-soon-text);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-weight: 600;
  font-size: 0.92rem;
}

.legal-body h2 { margin-top: 2em; }
.legal-body h3 { margin-top: 1.6em; }
.legal-body p, .legal-body li { color: var(--text-body); }
.legal-meta { color: var(--ink-400); font-size: 0.88rem; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-400); }
.divider { height: 1px; background: var(--divider); margin: 32px 0; border: none; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--header-border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { background: var(--nav-hover-bg); }
.theme-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: block; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--surface-border);
  box-shadow: 0 -16px 32px -16px rgba(7, 11, 20, 0.3);
}
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner-inner p { margin: 0; color: var(--text-body); font-size: 0.88rem; max-width: 62ch; }
.cookie-banner-inner p a { color: var(--text-primary); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: flex; overflow-x: auto; padding: 14px; }
  .app-sidebar nav ul { display: flex; }
}

@media (max-width: 720px) {
  .nav-primary, .header-actions .btn-secondary { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .device-card { flex-direction: column; align-items: flex-start; gap: 12px; }
}

body.nav-open .nav-primary {
  display: flex;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--bg);
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  overflow-y: auto;
}
body.nav-open .nav-primary ul {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  display: none;
  margin-left: 12px;
}
body.nav-open .nav-primary li:hover > ul { display: block; }
