/* ==========================================================================
   D.A.I.O. — design tokens for the business app and its public pages
   The same family and the same "hand-built" rules as DAIO Home v8.
   Light is the first block, dark is the second. theme.js sets data-theme on
   <html> before the first paint, so the right palette is there from the start.
   ========================================================================== */

/* ---------- Light palette ---------- */
/* Brand family: navy #0b0f14 / #151b22, green #1fa971 / #168a5b, blue #2f6fed / #1f58c9,
   light blue #8cb4ff, gold #e8b84a. In light, the button green is the deeper Home shade
   (#137a50) so white button text passes AA. Every text pair here passes WCAG AA. */
:root {
  color-scheme: light;

  /* Brand */
  --navy: #0b0f14;
  --navy-2: #151b22;
  --black: #0b0f14;
  --black-2: #151b22;
  --green: #137a50;
  --green-2: #0f6a45;
  --green-brand: #1fa971;
  --blue: #2f6fed;
  --blue-2: #1f58c9;
  --gold: #e8b84a;

  /* Page, cards, fields */
  --paper: #f3f6f1;
  --page-bg: var(--paper);
  --card: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --field-bg: #ffffff;
  --shell: #eef6ee;

  /* Text */
  --ink: #1a222b;
  --muted: #5d6b78;
  --faint: #5f6c78;
  --link: var(--blue-2);
  --blue-text: #1f58c9;
  --gold-text: #8a5b00;
  --green-text: #0f6a45;
  --warn: #8a6400;
  --danger: #c03a3a;
  --danger-text: #c03a3a;
  --on-green: #ffffff;
  --on-blue: #ffffff;

  /* Edges */
  --line: #e6e8ec;
  --line-2: #cfd8e1;
  --card-line: #d7e4d8;
  --green-line: #bfe8d0;
  --blue-line: #c8d8f8;
  --gold-line: #f0d48a;
  --danger-line: #f0c2c2;
  --teal-line: #b7e0e4;

  /* Soft fills for small labels and states */
  --green-soft: #e8f7f0;
  --blue-soft: #eaf1ff;
  --gold-soft: #fff6e0;
  --danger-soft: #fdecec;
  --teal-soft: #e5f6f7;

  /* Always-dark bands: the header, the side menu, heroes. Same in both modes, a touch lighter in dark. */
  --bar-dark: #0b0f14;
  --hero-bg: #101820;
  --nav-bg: #101820;
  --nav-line: rgba(255, 255, 255, 0.08);
  --on-dark: #f4f6f8;
  --on-dark-muted: #c5d0da;
  --on-dark-link: #8cb4ff;

  /* Accent: a thin left edge on a card, never a stripe around it. */
  --accent-edge: 3px solid var(--green);

  /* Shape: cards 10px, buttons and fields 8px, full pills only for chips and badges. */
  --radius: 10px;
  --radius-sm: 8px;
  --radius-ctl: 8px;
  --radius-pill: 999px;

  /* Restrained shadows. No colored glows anywhere. */
  --shadow: 0 2px 6px rgba(11, 15, 20, 0.08);
  --shadow-sm: 0 1px 2px rgba(11, 15, 20, 0.06);
  --shadow-pop: 0 6px 16px rgba(11, 15, 20, 0.12);
  --focus: 0 0 0 3px rgba(47, 111, 237, 0.45);

  /* Type */
  --font: "Nunito", system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", sans-serif;

  /* Space: one scale, 8 / 12 / 16 / 24 / 32. 4 only inside a single control. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --tap: 44px;
}

/* ---------- Always-dark bands ---------- */
/* The header, menu, and heroes are dark in both modes, so their accent text uses the dark-mode
   shades. Pop-ups that open inside a hero go back to the page palette (look.css). */
.shell,
.side-nav,
.hero,
.open-bar,
.open-hero,
.bldg-tile,
.bldg-head,
.shop-cat-head,
.shop-pin-bar,
.open-end {
  --green-text: #8ee0b8;
  --blue-text: #8cb4ff;
  --gold-text: #e8b84a;
  --link: #8cb4ff;
}

/* ---------- Dark palette ---------- */
/* Navy page #0b0f14, bars #151b22, cards #1a222b. Text #f4f6f8 and #c5d0da, links #8cb4ff.
   Buttons keep the brighter brand green #1fa971 with navy text (6.4:1). */
:root[data-theme="dark"] {
  color-scheme: dark;

  --green: #1fa971;
  --green-2: #168a5b;

  --paper: #0b0f14;
  --page-bg: #0b0f14;
  --card: #1a222b;
  --surface: #151b22;
  --surface-2: #151b22;
  --field-bg: #151b22;
  --shell: #151b22;

  --ink: #f4f6f8;
  --muted: #c5d0da;
  --faint: #9aa6b2;
  --link: #8cb4ff;
  --blue-text: #8cb4ff;
  --gold-text: #e8b84a;
  --green-text: #8ee0b8;
  --warn: #e8b84a;
  --danger: #c03a3a;
  --danger-text: #f0c2c2;
  --on-green: #0b0f14;
  --on-blue: #ffffff;

  --line: #2c3742;
  --line-2: #5d6b78;
  --card-line: #2c3742;
  --green-line: rgba(142, 224, 184, 0.35);
  --blue-line: rgba(140, 180, 255, 0.35);
  --gold-line: rgba(232, 184, 74, 0.4);
  --danger-line: rgba(240, 194, 194, 0.4);
  --teal-line: rgba(120, 210, 218, 0.35);

  --green-soft: rgba(31, 169, 113, 0.16);
  --blue-soft: rgba(47, 111, 237, 0.18);
  --gold-soft: rgba(232, 184, 74, 0.14);
  --danger-soft: rgba(214, 69, 69, 0.16);
  --teal-soft: rgba(20, 143, 154, 0.18);

  --bar-dark: #151b22;
  --hero-bg: #151b22;
  --nav-bg: #151b22;
  --nav-line: #2c3742;

  --shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 6px 16px rgba(0, 0, 0, 0.5);
}
