/*
 * Restaurant & Cafe — Apple Themes & Contrast v3.0.2
 * Drop-in replacement for assets/css/themes.css
 * Supports the v3 theme names and the earlier v2 aliases.
 */

body[data-design-theme], body[data-theme] {
  --radius: 22px;
  --overlay: rgba(0,0,0,.62);
  --on-danger: #fff;
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}
body[data-mode="dark"] { color-scheme: dark; }

/* Artisan / Ruby */
body[data-design-theme="artisan"],
body[data-theme="ruby"] {
  --bg: #F7F3F4;
  --panel: #FFFFFF;
  --panel2: #F0E7EA;
  --text: #1D1D1F;
  --muted: #5F565A;
  --line: #D9CDD1;
  --accent: #8A1737;
  --accent-strong: #681029;
  --accent2: #7A4A00;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #7A4A00;
  --gold2: #7A4A00;
  --red: #B4233F;
  --green: #18794E;
  --success: #18794E;
  --danger: #B4233F;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.82);
  --sidebar-bg: #241116;
  --sidebar-text: #FAF7F8;
  --sidebar-muted: #D2BEC4;
  --sidebar-active: #4A1D2A;
  --shadow: 0 18px 55px rgba(78,30,46,.13);
}
body[data-design-theme="artisan"][data-mode="dark"],
body[data-theme="ruby"][data-mode="dark"] {
  --bg: #100D0E;
  --panel: #1C1719;
  --panel2: #2B2225;
  --text: #F5F5F7;
  --muted: #BDB4B7;
  --line: #49383E;
  --accent: #A5274D;
  --accent-strong: #7C1938;
  --accent2: #E7B75F;
  --on-accent: #FFFFFF;
  --on-accent2: #241701;
  --gold: #E7B75F;
  --gold2: #E7B75F;
  --red: #E0526F;
  --green: #56C58A;
  --success: #56C58A;
  --danger: #E0526F;
  --cream: #1C1719;
  --input-bg: #251E20;
  --topbar-bg: rgba(28,23,25,.82);
  --sidebar-bg: #080607;
  --sidebar-text: #F5F5F7;
  --sidebar-muted: #BDB4B7;
  --sidebar-active: #351720;
  --shadow: 0 22px 65px rgba(0,0,0,.42);
}

/* Botanical / Emerald */
body[data-design-theme="botanical"],
body[data-theme="emerald"] {
  --bg: #F2F7F4;
  --panel: #FFFFFF;
  --panel2: #E4EEE8;
  --text: #10231A;
  --muted: #526158;
  --line: #C8D8CF;
  --accent: #0F6A43;
  --accent-strong: #0A4F31;
  --accent2: #695000;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #695000;
  --gold2: #695000;
  --red: #A72C37;
  --green: #0F6A43;
  --success: #0F6A43;
  --danger: #A72C37;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.82);
  --sidebar-bg: #0B3020;
  --sidebar-text: #F4FBF7;
  --sidebar-muted: #B8D2C3;
  --sidebar-active: #174D35;
  --shadow: 0 18px 55px rgba(20,78,50,.12);
}
body[data-design-theme="botanical"][data-mode="dark"],
body[data-theme="emerald"][data-mode="dark"] {
  --bg: #0B110D;
  --panel: #151C18;
  --panel2: #202B24;
  --text: #F5FAF7;
  --muted: #B2BDB7;
  --line: #35483D;
  --accent: #16764D;
  --accent-strong: #105A3A;
  --accent2: #DDBB62;
  --on-accent: #FFFFFF;
  --on-accent2: #1E1602;
  --gold: #DDBB62;
  --gold2: #DDBB62;
  --red: #E05C67;
  --green: #58CC91;
  --success: #58CC91;
  --danger: #E05C67;
  --cream: #151C18;
  --input-bg: #1C2520;
  --topbar-bg: rgba(21,28,24,.82);
  --sidebar-bg: #050806;
  --sidebar-text: #F5FAF7;
  --sidebar-muted: #B2BDB7;
  --sidebar-active: #123524;
  --shadow: 0 22px 65px rgba(0,0,0,.43);
}

/* Neon / Midnight */
body[data-design-theme="neon"],
body[data-theme="midnight"] {
  --bg: #F5F4FB;
  --panel: #FFFFFF;
  --panel2: #EBE8F7;
  --text: #1B1930;
  --muted: #5C5870;
  --line: #D4D0E4;
  --accent: #5336B8;
  --accent-strong: #3E258F;
  --accent2: #00646B;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #00646B;
  --gold2: #00646B;
  --red: #B42355;
  --green: #087A5A;
  --success: #087A5A;
  --danger: #B42355;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.80);
  --sidebar-bg: #17132D;
  --sidebar-text: #FAF9FF;
  --sidebar-muted: #C6C1DD;
  --sidebar-active: #312660;
  --shadow: 0 18px 58px rgba(76,49,173,.16);
}
body[data-design-theme="neon"][data-mode="dark"],
body[data-theme="midnight"][data-mode="dark"] {
  --bg: #0B0B12;
  --panel: #171824;
  --panel2: #22243A;
  --text: #F7F7FB;
  --muted: #B8B7C7;
  --line: #3B3D59;
  --accent: #5D3BC4;
  --accent-strong: #45279D;
  --accent2: #42D8D0;
  --on-accent: #FFFFFF;
  --on-accent2: #071716;
  --gold: #42D8D0;
  --gold2: #42D8D0;
  --red: #FF6389;
  --green: #4CDDA4;
  --success: #4CDDA4;
  --danger: #FF6389;
  --cream: #171824;
  --input-bg: #202131;
  --topbar-bg: rgba(23,24,36,.80);
  --sidebar-bg: #05050A;
  --sidebar-text: #F7F7FB;
  --sidebar-muted: #B8B7C7;
  --sidebar-active: #27204C;
  --shadow: 0 22px 70px rgba(0,0,0,.52);
}

/* Street / Sunset */
body[data-design-theme="street"],
body[data-theme="sunset"] {
  --bg: #FFF6ED;
  --panel: #FFFFFF;
  --panel2: #FCE6D5;
  --text: #21170E;
  --muted: #625649;
  --line: #E2CDBB;
  --accent: #B42318;
  --accent-strong: #8C1A12;
  --accent2: #7A5100;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #7A5100;
  --gold2: #7A5100;
  --red: #B42318;
  --green: #167346;
  --success: #167346;
  --danger: #B42318;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.82);
  --sidebar-bg: #2A160D;
  --sidebar-text: #FFF9F4;
  --sidebar-muted: #E0C2B0;
  --sidebar-active: #58301C;
  --shadow: 0 18px 55px rgba(139,57,23,.13);
}
body[data-design-theme="street"][data-mode="dark"],
body[data-theme="sunset"][data-mode="dark"] {
  --bg: #120F0C;
  --panel: #1F1914;
  --panel2: #2D241D;
  --text: #FFF8F2;
  --muted: #C6B9AF;
  --line: #4C3D33;
  --accent: #B93127;
  --accent-strong: #92241C;
  --accent2: #E9B949;
  --on-accent: #FFFFFF;
  --on-accent2: #211500;
  --gold: #E9B949;
  --gold2: #E9B949;
  --red: #EF5750;
  --green: #54C580;
  --success: #54C580;
  --danger: #EF5750;
  --cream: #1F1914;
  --input-bg: #29211B;
  --topbar-bg: rgba(31,25,20,.82);
  --sidebar-bg: #080604;
  --sidebar-text: #FFF8F2;
  --sidebar-muted: #C6B9AF;
  --sidebar-active: #392317;
  --shadow: 0 22px 65px rgba(0,0,0,.44);
}

/* Minimal / Royal */
body[data-design-theme="minimal"],
body[data-theme="royal"] {
  --bg: #F5F5F7;
  --panel: #FFFFFF;
  --panel2: #ECECF0;
  --text: #1D1D1F;
  --muted: #5F6368;
  --line: #D2D2D7;
  --accent: #0066CC;
  --accent-strong: #004F9E;
  --accent2: #6E4E00;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #6E4E00;
  --gold2: #6E4E00;
  --red: #B42318;
  --green: #18794E;
  --success: #18794E;
  --danger: #B42318;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.82);
  --sidebar-bg: #111214;
  --sidebar-text: #F5F5F7;
  --sidebar-muted: #B7B7BD;
  --sidebar-active: #2A2A2E;
  --shadow: 0 18px 55px rgba(0,0,0,.10);
}
body[data-design-theme="minimal"][data-mode="dark"],
body[data-theme="royal"][data-mode="dark"] {
  --bg: #0E0E10;
  --panel: #1C1C1E;
  --panel2: #2C2C2E;
  --text: #F5F5F7;
  --muted: #B4B4BA;
  --line: #454549;
  --accent: #0969C7;
  --accent-strong: #07539D;
  --accent2: #D9B45B;
  --on-accent: #FFFFFF;
  --on-accent2: #1C1402;
  --gold: #D9B45B;
  --gold2: #D9B45B;
  --red: #E05C54;
  --green: #56C78B;
  --success: #56C78B;
  --danger: #E05C54;
  --cream: #1C1C1E;
  --input-bg: #252527;
  --topbar-bg: rgba(28,28,30,.82);
  --sidebar-bg: #070708;
  --sidebar-text: #F5F5F7;
  --sidebar-muted: #B4B4BA;
  --sidebar-active: #2B2B2E;
  --shadow: 0 22px 65px rgba(0,0,0,.44);
}

/* Heritage / Coffee */
body[data-design-theme="heritage"],
body[data-theme="coffee"] {
  --bg: #F6F1EC;
  --panel: #FFFFFF;
  --panel2: #ECE1D8;
  --text: #271B15;
  --muted: #65574F;
  --line: #D8C9BC;
  --accent: #6B3B22;
  --accent-strong: #4F2A18;
  --accent2: #725000;
  --on-accent: #FFFFFF;
  --on-accent2: #FFFFFF;
  --gold: #725000;
  --gold2: #725000;
  --red: #9D332E;
  --green: #397049;
  --success: #397049;
  --danger: #9D332E;
  --cream: #FFFFFF;
  --input-bg: #FFFFFF;
  --topbar-bg: rgba(255,255,255,.82);
  --sidebar-bg: #2C1A10;
  --sidebar-text: #FFF9F3;
  --sidebar-muted: #D7C1B0;
  --sidebar-active: #56341F;
  --shadow: 0 18px 55px rgba(82,49,28,.13);
}
body[data-design-theme="heritage"][data-mode="dark"],
body[data-theme="coffee"][data-mode="dark"] {
  --bg: #120F0D;
  --panel: #211A16;
  --panel2: #302620;
  --text: #FBF7F3;
  --muted: #C5BAB2;
  --line: #4F4036;
  --accent: #82462A;
  --accent-strong: #61321D;
  --accent2: #D7AA72;
  --on-accent: #FFFFFF;
  --on-accent2: #211305;
  --gold: #D7AA72;
  --gold2: #D7AA72;
  --red: #D85C52;
  --green: #6DBE81;
  --success: #6DBE81;
  --danger: #D85C52;
  --cream: #211A16;
  --input-bg: #2A211C;
  --topbar-bg: rgba(33,26,22,.82);
  --sidebar-bg: #080605;
  --sidebar-text: #FBF7F3;
  --sidebar-muted: #C5BAB2;
  --sidebar-active: #3D291E;
  --shadow: 0 22px 65px rgba(0,0,0,.45);
}

/* --------------------------------------------------------------------------
   Apple-style colour application. Critical text and surfaces never depend on
   the legacy hard-coded colours in app.css.
   -------------------------------------------------------------------------- */
body[data-design-theme], body[data-theme] {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  color: var(--text);
}
body[data-design-theme] .topbar,
body[data-theme] .topbar {
  background: var(--topbar-bg);
  color: var(--text);
  border-bottom-color: var(--line);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
body[data-design-theme] .topbar nav a,
body[data-theme] .topbar nav a { color: var(--muted); }
body[data-design-theme] .topbar nav a:hover,
body[data-theme] .topbar nav a:hover { color: var(--accent); }
body[data-design-theme] .brand small,
body[data-theme] .brand small,
body[data-design-theme] .eyebrow,
body[data-theme] .eyebrow,
body[data-design-theme] .price,
body[data-theme] .price,
body[data-design-theme] .category-number,
body[data-theme] .category-number { color: var(--accent); }
body[data-design-theme] .cart-pill,
body[data-theme] .cart-pill {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid color-mix(in srgb, var(--accent) 68%, var(--line));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 20%, transparent);
}
body[data-design-theme] .cart-pill b,
body[data-theme] .cart-pill b { background: var(--accent2); color: var(--on-accent2); }

body[data-design-theme] .hero,
body[data-theme] .hero {
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 34%),
    radial-gradient(circle at 12% 86%, color-mix(in srgb, var(--accent2) 10%, transparent), transparent 36%);
}
body[data-design-theme] .hero:before,
body[data-theme] .hero:before {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  box-shadow:
    0 0 0 55px color-mix(in srgb, var(--accent) 4%, transparent),
    0 0 0 110px color-mix(in srgb, var(--accent2) 3%, transparent);
}
body[data-design-theme] .hero h1,
body[data-theme] .hero h1,
body[data-design-theme] .section-title h2,
body[data-theme] .section-title h2,
body[data-design-theme] .menu-head h1,
body[data-theme] .menu-head h1 { color: var(--text); font-family: inherit; letter-spacing: -.045em; }
body[data-design-theme] .hero h1 em,
body[data-theme] .hero h1 em { color: var(--accent); }
body[data-design-theme] .hero p,
body[data-theme] .hero p,
body[data-design-theme] .section-title p,
body[data-theme] .section-title p,
body[data-design-theme] .product-info p,
body[data-theme] .product-info p,
body[data-design-theme] .category-card p,
body[data-theme] .category-card p { color: var(--muted); }

body[data-design-theme] .hero-card,
body[data-theme] .hero-card,
body[data-design-theme] .product-card,
body[data-theme] .product-card,
body[data-design-theme] .category-card,
body[data-theme] .category-card,
body[data-design-theme] .form-card,
body[data-theme] .form-card,
body[data-design-theme] .summary-card,
body[data-theme] .summary-card,
body[data-design-theme] .auth-card,
body[data-theme] .auth-card,
body[data-design-theme] .menu-side,
body[data-theme] .menu-side,
body[data-design-theme] .modal-card,
body[data-theme] .modal-card {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: none;
  outline: 0;
}
body[data-design-theme] .category-card,
body[data-theme] .category-card { background: linear-gradient(150deg, var(--panel), var(--panel2)); }
body[data-design-theme] .category-card:nth-child(even),
body[data-theme] .category-card:nth-child(even) { transform: none; }
body[data-design-theme] .category-card:after,
body[data-theme] .category-card:after {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--accent);
  border: 1px solid var(--line);
}
body[data-design-theme] .product-card:hover,
body[data-theme] .product-card:hover { border-color: var(--accent); }
body[data-design-theme] .product-image,
body[data-theme] .product-image { background: var(--panel2); }
body[data-design-theme] .section.soft,
body[data-theme] .section.soft,
body[data-design-theme] .modal-foot,
body[data-theme] .modal-foot { background: var(--panel2); }
body[data-design-theme] .menu-head,
body[data-theme] .menu-head { background: linear-gradient(180deg, var(--panel2), var(--bg)); color: var(--text); }
body[data-design-theme] .tag,
body[data-theme] .tag {
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  color: var(--text);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}
body[data-design-theme] .tag.sale,
body[data-theme] .tag.sale { background: var(--red); color: #fff; }
body[data-design-theme] .old-price,
body[data-theme] .old-price { color: var(--muted); }
body[data-design-theme] .hero-badge,
body[data-theme] .hero-badge { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
body[data-design-theme] .hero-badge small,
body[data-theme] .hero-badge small { color: var(--muted); }
body[data-design-theme] .modal,
body[data-theme] .modal { background: var(--overlay); backdrop-filter: blur(8px); }
body[data-design-theme] .modal-close,
body[data-theme] .modal-close { background: var(--text); color: var(--bg); }
body[data-design-theme] .qty button,
body[data-theme] .qty button,
body[data-design-theme] .qty input,
body[data-theme] .qty input { color: var(--text); }

body[data-design-theme] input,
body[data-design-theme] select,
body[data-design-theme] textarea,
body[data-theme] input,
body[data-theme] select,
body[data-theme] textarea {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--line);
}
body[data-design-theme] input::placeholder,
body[data-design-theme] textarea::placeholder,
body[data-theme] input::placeholder,
body[data-theme] textarea::placeholder { color: var(--muted); opacity: .82; }
body[data-design-theme] input:focus,
body[data-design-theme] select:focus,
body[data-design-theme] textarea:focus,
body[data-theme] input:focus,
body[data-theme] select:focus,
body[data-theme] textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
body[data-design-theme] input[type="checkbox"],
body[data-design-theme] input[type="radio"],
body[data-theme] input[type="checkbox"],
body[data-theme] input[type="radio"] { accent-color: var(--accent); }

body[data-design-theme] .btn.primary,
body[data-theme] .btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent-strong));
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: 0 9px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}
body[data-design-theme] .btn.ghost,
body[data-theme] .btn.ghost { background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--text); border-color: var(--line); }
body[data-design-theme] .btn.ghost:hover,
body[data-theme] .btn.ghost:hover { background: var(--panel2); border-color: var(--accent); }
body[data-design-theme] .btn.red,
body[data-theme] .btn.red { background: var(--red); color: #fff; }
body[data-design-theme] .summary-row,
body[data-theme] .summary-row { color: var(--muted); }
body[data-design-theme] .summary-row.total,
body[data-theme] .summary-row.total { color: var(--text); }
body[data-design-theme] .radio-card:has(input:checked),
body[data-theme] .radio-card:has(input:checked),
body[data-design-theme] .gateway-choice:has(input:checked),
body[data-theme] .gateway-choice:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
body[data-design-theme] .gateway-choice,
body[data-theme] .gateway-choice { background: var(--panel2); color: var(--text); }
body[data-design-theme] .gateway-choice-icon,
body[data-design-theme] .gateway-logo-letter,
body[data-theme] .gateway-choice-icon,
body[data-theme] .gateway-logo-letter { background: linear-gradient(180deg, var(--accent), var(--accent-strong)); color: var(--on-accent); }
body[data-design-theme] .flash.success,
body[data-theme] .flash.success { background: color-mix(in srgb, var(--green) 13%, var(--panel)); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); color: var(--text); }
body[data-design-theme] .flash.error,
body[data-theme] .flash.error { background: color-mix(in srgb, var(--red) 13%, var(--panel)); border-color: color-mix(in srgb, var(--red) 45%, var(--line)); color: var(--text); }
body[data-design-theme] footer,
body[data-theme] footer { background: var(--panel2); color: var(--muted); border-top-color: var(--line); }
body[data-design-theme] footer b,
body[data-theme] footer b { color: var(--text); }

/* Admin login / installer: fixes the invisible dark text on the old dark card. */
body.install-page[data-design-theme],
body.install-page[data-theme] { background-color: var(--bg); color: var(--text); }
body.install-page[data-design-theme] .install-card,
body.install-page[data-theme] .install-card {
  background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
body.install-page[data-design-theme] .install-card h1,
body.install-page[data-design-theme] .install-card h2,
body.install-page[data-design-theme] .install-card h3,
body.install-page[data-design-theme] .install-card label,
body.install-page[data-theme] .install-card h1,
body.install-page[data-theme] .install-card h2,
body.install-page[data-theme] .install-card h3,
body.install-page[data-theme] .install-card label { color: var(--text) !important; }
body.install-page[data-design-theme] .install-card p,
body.install-page[data-design-theme] .install-card .muted,
body.install-page[data-design-theme] .install-card .back-link,
body.install-page[data-theme] .install-card p,
body.install-page[data-theme] .install-card .muted,
body.install-page[data-theme] .install-card .back-link { color: var(--muted) !important; }
body.install-page[data-design-theme] .install-card .eyebrow,
body.install-page[data-theme] .install-card .eyebrow { color: var(--accent) !important; }
body.install-page[data-design-theme] .install-card input,
body.install-page[data-theme] .install-card input { background: var(--input-bg) !important; color: var(--text) !important; border-color: var(--line) !important; }

/* Admin panel */
body.admin-body[data-design-theme],
body.admin-body[data-theme] { background: var(--bg); color: var(--text); --admin-accent: var(--accent); }
body.admin-body[data-design-theme] .admin-sidebar,
body.admin-body[data-theme] .admin-sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg), color-mix(in srgb, var(--sidebar-bg) 84%, var(--panel)));
  color: var(--sidebar-text);
  border-right-color: color-mix(in srgb, var(--sidebar-muted) 20%, transparent);
}
body.admin-body[data-design-theme] .admin-sidebar nav a,
body.admin-body[data-theme] .admin-sidebar nav a { color: var(--sidebar-muted); }
body.admin-body[data-design-theme] .admin-sidebar nav a:hover,
body.admin-body[data-design-theme] .admin-sidebar nav a.active,
body.admin-body[data-theme] .admin-sidebar nav a:hover,
body.admin-body[data-theme] .admin-sidebar nav a.active { background: var(--sidebar-active); color: var(--sidebar-text); }
body.admin-body[data-design-theme] .admin-top,
body.admin-body[data-theme] .admin-top { background: var(--topbar-bg); color: var(--text); border-bottom-color: var(--line); }
body.admin-body[data-design-theme] .admin-top small,
body.admin-body[data-design-theme] .stat small,
body.admin-body[data-design-theme] .table th,
body.admin-body[data-design-theme] .gateway-card-head small,
body.admin-body[data-design-theme] .gateway-admin-card p,
body.admin-body[data-design-theme] .gateway-meta,
body.admin-body[data-design-theme] .theme-option small,
body.admin-body[data-design-theme] .design-theme-card small,
body.admin-body[data-theme] .admin-top small,
body.admin-body[data-theme] .stat small,
body.admin-body[data-theme] .table th,
body.admin-body[data-theme] .gateway-card-head small,
body.admin-body[data-theme] .gateway-admin-card p,
body.admin-body[data-theme] .gateway-meta,
body.admin-body[data-theme] .theme-option small,
body.admin-body[data-theme] .design-theme-card small { color: var(--muted); }
body.admin-body[data-design-theme] .stat,
body.admin-body[data-design-theme] .admin-card,
body.admin-body[data-design-theme] .gateway-admin-card,
body.admin-body[data-design-theme] .theme-option,
body.admin-body[data-design-theme] .design-theme-card,
body.admin-body[data-design-theme] .appearance-choice,
body.admin-body[data-theme] .stat,
body.admin-body[data-theme] .admin-card,
body.admin-body[data-theme] .gateway-admin-card,
body.admin-body[data-theme] .theme-option,
body.admin-body[data-theme] .design-theme-card,
body.admin-body[data-theme] .appearance-choice { background: var(--panel); color: var(--text); border-color: var(--line); }
body.admin-body[data-design-theme] .admin-card h1,
body.admin-body[data-design-theme] .admin-card h2,
body.admin-body[data-design-theme] .admin-card h3,
body.admin-body[data-design-theme] .stat strong,
body.admin-body[data-design-theme] .gateway-admin-card h3,
body.admin-body[data-theme] .admin-card h1,
body.admin-body[data-theme] .admin-card h2,
body.admin-body[data-theme] .admin-card h3,
body.admin-body[data-theme] .stat strong,
body.admin-body[data-theme] .gateway-admin-card h3 { color: var(--text); }
body.admin-body[data-design-theme] input,
body.admin-body[data-design-theme] select,
body.admin-body[data-design-theme] textarea,
body.admin-body[data-theme] input,
body.admin-body[data-theme] select,
body.admin-body[data-theme] textarea { background: var(--input-bg); color: var(--text); border-color: var(--line); }
body.admin-body[data-design-theme] .table th,
body.admin-body[data-design-theme] .table td,
body.admin-body[data-theme] .table th,
body.admin-body[data-theme] .table td { border-bottom-color: var(--line); }
body.admin-body[data-design-theme] .table tbody tr:hover,
body.admin-body[data-theme] .table tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
body.admin-body[data-design-theme] .admin-theme-name,
body.admin-body[data-design-theme] .gateway-test,
body.admin-body[data-design-theme] .webhook-box,
body.admin-body[data-theme] .admin-theme-name,
body.admin-body[data-theme] .gateway-test,
body.admin-body[data-theme] .webhook-box { background: var(--panel2); color: var(--muted); border-color: var(--line); }
body.admin-body[data-design-theme] .gateway-admin-card.enabled,
body.admin-body[data-theme] .gateway-admin-card.enabled { border-color: var(--accent); box-shadow: 0 14px 38px color-mix(in srgb, var(--accent) 13%, transparent); }
body.admin-body[data-design-theme] .theme-option:has(input:checked),
body.admin-body[data-design-theme] .design-theme-card:has(input:checked),
body.admin-body[data-design-theme] .appearance-choice:has(input:checked),
body.admin-body[data-theme] .theme-option:has(input:checked),
body.admin-body[data-theme] .design-theme-card:has(input:checked),
body.admin-body[data-theme] .appearance-choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }

/* Status badges */
body.admin-body[data-mode="light"] .badge { background:#E8E8ED; color:#343438; }
body.admin-body[data-mode="light"] .badge.new { background:#FFF0C2; color:#704D00; }
body.admin-body[data-mode="light"] .badge.accepted,
body.admin-body[data-mode="light"] .badge.paid { background:#D9EFFF; color:#075985; }
body.admin-body[data-mode="light"] .badge.preparing { background:#EEE5FF; color:#5B21A6; }
body.admin-body[data-mode="light"] .badge.ready,
body.admin-body[data-mode="light"] .badge.completed,
body.admin-body[data-mode="light"] .badge.active { background:#D9F5E4; color:#116437; }
body.admin-body[data-mode="light"] .badge.cancelled,
body.admin-body[data-mode="light"] .badge.failed { background:#FFE2DF; color:#922B21; }
body.admin-body[data-mode="dark"] .badge { background:#343438; color:#F5F5F7; }
body.admin-body[data-mode="dark"] .badge.new { background:#594207; color:#FFE39A; }
body.admin-body[data-mode="dark"] .badge.accepted,
body.admin-body[data-mode="dark"] .badge.paid { background:#123E59; color:#B7E4FF; }
body.admin-body[data-mode="dark"] .badge.preparing { background:#3D275F; color:#E0C8FF; }
body.admin-body[data-mode="dark"] .badge.ready,
body.admin-body[data-mode="dark"] .badge.completed,
body.admin-body[data-mode="dark"] .badge.active { background:#164B31; color:#B9F4D1; }
body.admin-body[data-mode="dark"] .badge.cancelled,
body.admin-body[data-mode="dark"] .badge.failed { background:#5A2724; color:#FFC5BE; }

/* New order alert remains deliberately high contrast. */
body.admin-body .admin-order-alert-bar { background: linear-gradient(180deg,#C32B22,#941B15); color:#FFF; border-color:rgba(255,255,255,.22); }
body.admin-body .admin-order-alert-bar small { color:rgba(255,255,255,.88); }
body.admin-body .admin-order-alert-list { background:#151518; color:#F8F8FA; border-color:#3A3A40; }
body.admin-body .admin-order-alert-heading time,
body.admin-body .admin-order-alert-copy p { color:#C7C7CC; }
body.admin-body .admin-order-alert-label { color:#FFD98A; }

/* Theme cards use Apple-like gradients, not clashing patterns. */
.preview-artisan { background:linear-gradient(135deg,#FFF,#F0E2E7); color:#8A1737; }
.preview-botanical { background:linear-gradient(135deg,#FFF,#E1EEE6); color:#0F6A43; border-radius:0; }
.preview-neon { background:linear-gradient(135deg,#171824,#302260); color:#72E5DE; box-shadow:none; }
.preview-street { background:linear-gradient(135deg,#FFF7EF,#F6D6C1); color:#B42318; }
.preview-minimal { background:linear-gradient(135deg,#FFF,#ECECF0); color:#0066CC; }
.preview-heritage { background:linear-gradient(135deg,#FFF,#E9DDD3); color:#6B3B22; background-image:none; }
.design-theme-card { border-radius:20px; overflow:hidden; }
.design-preview { min-height:115px; }

body[data-design-theme] :focus-visible,
body[data-theme] :focus-visible { outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent); outline-offset:2px; }
body[data-design-theme] ::selection,
body[data-theme] ::selection { background:var(--accent); color:var(--on-accent); }
