
/* System-first typography (replicate.css / iOS-style) — no webfont required */

/* ─── Brand tokens — aligned with replicate.css light theme ─── */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", ui-monospace, monospace;

  --color-teal: #30d158;
  --color-blue: #007aff;
  --color-deep-blue: #0055b3;
  --color-cyan: #64d2ff;

  --brand-gradient: linear-gradient(135deg, #007aff 0%, #30d158 55%, #5ac8fa 100%);
  --brand-gradient-deep: linear-gradient(135deg, #0055b3 0%, #00bb7f 100%);
  --soft-bg-gradient: linear-gradient(135deg, rgba(0, 122, 255, 0.12), rgba(48, 209, 88, 0.1));

  --primary: #007aff;
  --primary-light: rgba(0, 122, 255, 0.1);
  --primary-dark: #0055b3;
  --teal: #30d158;
  --amber: #ff9f0a;
  --rose: #ff375f;
  --purple: #bf5af2;
  --cyan: #64d2ff;

  --brand-primary: #007aff;
  --brand-secondary: #30d158;
  --brand-primary-hover: #0055b3;

  --link: #007aff;
  --link-hover: #0055b3;

  /* Glass / dock (replicate) */
  --glass-bg: #ffffff6b;
  --glass-bg-heavy: #ffffff99;
  --glass-border: #ffffff99;
  --glass-border-inner: #ffffffcc;
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
  --glass-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.08);
  --glass-blur: blur(40px) saturate(180%);
  --dock-bg: #f2f2f7d1;
  --radius-ios-sm: 12px;
  --radius-ios: 16px;
  --radius-ios-lg: 22px;

  /* Light mode surfaces — Single-Solution / inventory chunk tokens */
  --bg: #f2f2f7;
  --bg-elevated: #ffffff8c;
  --bg-solid: #ffffff;
  --bg-grouped: #ffffff59;
  --bg-card: #ffffff;
  --bg-hover: rgba(0, 122, 255, 0.06);
  --bg-input: #ffffff;
  --fg: #1c1c1e;
  --fg-secondary: #636366;
  --fg-tertiary: #aeaeb2;
  --text: var(--fg);
  --text-muted: var(--fg-secondary);
  --text-dim: var(--fg-tertiary);
  --border: rgba(0, 0, 0, 0.05);
  --border-strong: rgba(0, 0, 0, 0.078);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-focus: #007aff;
  --focus-ring: 0 0 0 4px rgba(0, 122, 255, 0.22);
  --glass-shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.1), 0 16px 48px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-lg-ss: 22px;
  --radius-xl-ss: 28px;

  /* Above app chrome (z-40), modal overlays (≤70), and nested UI — select menus always on top */
  --lp-z-dropdown: 10050;

  --btn-radius: 12px;
  --btn-border-width: 0.5px;

  --card-shadow: var(--glass-shadow), inset 0 0.5px 0 var(--glass-border-inner);

  /* Status / success */
  /* Completed: calm teal success — same visual weight as other status chips */
  --status-completed-bg: color-mix(in srgb, var(--color-teal) 13%, #f2f2f7);
  --status-completed-text: #115e59;
  --status-completed-border: 1px solid color-mix(in srgb, var(--color-teal) 30%, #ccfbf1);
  --green-positive: #065f46;

  --status-running-bg: rgba(0, 122, 255, 0.12);
  --status-running-text: #0055b3;
  --status-running-border: 1px solid rgba(0, 122, 255, 0.35);
  --status-pending-bg: #fffbeb;
  --status-pending-text: #b45309;
  --status-pending-border: 1px solid rgba(245, 158, 11, 0.4);
  --status-failed-bg: #fef2f2;
  --status-failed-text: #b91c1c;
  --status-failed-border: 1px solid rgba(239, 68, 68, 0.35);
  --status-cancelled-bg: #f3f4f6;
  --status-cancelled-text: #4b5563;
  --status-cancelled-border: 1px solid rgba(107, 114, 128, 0.35);

  /* Badge tokens */
  --badge-success-bg: #d1fae5;
  --badge-success-text: #065f46;
  --badge-info-bg: rgba(0, 122, 255, 0.15);
  --badge-info-text: var(--color-blue);
}

html:is(.dark, [data-theme="dark"]) {
  --glass-bg: #2c2c2e6b;
  --glass-bg-heavy: #2c2c2e99;
  --glass-border: #ffffff1a;
  --glass-border-inner: #ffffff29;
  --glass-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 24px rgba(0, 0, 0, 0.2);
  --glass-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.25);
  --dock-bg: #1c1c1ed1;

  --color-blue: #0a84ff;
  --color-deep-blue: #409cff;
  --primary: #0a84ff;
  --primary-light: rgba(10, 132, 255, 0.2);
  --primary-dark: #409cff;
  --teal: #30d158;
  --amber: #ff9f0a;
  --rose: #ff375f;
  --purple: #bf5af2;
  --cyan: #64d2ff;

  --brand-primary: #0a84ff;
  --brand-secondary: #30d158;
  --brand-primary-hover: #409cff;

  --link: #0a84ff;
  --link-hover: #64d2ff;

  --bg: #000000;
  --bg-elevated: #2c2c2e80;
  --bg-solid: #1c1c1e;
  --bg-grouped: #2c2c2e59;
  --bg-card: #1c1c1e;
  --bg-hover: rgba(10, 132, 255, 0.12);
  --bg-input: #2c2c2e;
  --fg: #f5f5f7;
  --fg-secondary: #ababaf;
  --fg-tertiary: #636366;
  --text: var(--fg);
  --text-muted: var(--fg-secondary);
  --text-dim: var(--fg-tertiary);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #0a84ff;
  --focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.28);

  --card-shadow: var(--glass-shadow), inset 0 0.5px 0 var(--glass-border-inner);

  --status-completed-bg: rgba(48, 209, 88, 0.14);
  --status-completed-text: #34d399;
  --status-completed-border: 1px solid rgba(52, 211, 153, 0.35);
  --green-positive: #30d158;

  --status-running-bg: rgba(10, 132, 255, 0.15);
  --status-running-text: #7eb3ff;
  --status-running-border: 1px solid rgba(10, 132, 255, 0.35);
  --status-pending-bg: rgba(245, 158, 11, 0.12);
  --status-pending-text: #fcd34d;
  --status-pending-border: 1px solid rgba(245, 158, 11, 0.35);
  --status-failed-bg: rgba(239, 68, 68, 0.12);
  --status-failed-text: #fca5a5;
  --status-failed-border: 1px solid rgba(239, 68, 68, 0.35);
  --status-cancelled-bg: rgba(107, 114, 128, 0.15);
  --status-cancelled-text: #9ca3af;
  --status-cancelled-border: 1px solid rgba(107, 114, 128, 0.35);

  --badge-success-bg: rgba(48, 209, 88, 0.15);
  --badge-success-text: #34d399;
  --badge-info-bg: rgba(10, 132, 255, 0.18);
  --badge-info-text: #7eb3ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

button,
input,
select,
textarea {
  font-family: inherit;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
}

h1,
h2,
h3 {
  font-family: inherit;
  letter-spacing: -0.02em;
  font-weight: 600;
}

a {
  text-decoration: none;
}
a:not(.nav-pill):not(.nav-dropdown-link):not(.lp-dd-signout) {
  color: var(--link);
  transition: color 0.15s ease;
}
a:not(.nav-pill):not(.nav-dropdown-link):not(.lp-dd-signout):hover {
  color: var(--link-hover);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.18); }
html:is(.dark, [data-theme="dark"]) ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); }
html:is(.dark, [data-theme="dark"]) ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

::selection {
  color: var(--fg);
  background: rgba(0, 122, 255, 0.2);
}
html:is(.dark, [data-theme="dark"]) ::selection {
  background: rgba(10, 132, 255, 0.3);
}

/* ─── Primary / secondary — replicate.css .btn-primary & .btn-secondary ─── */
.btn-brand,
.btn.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  min-height: 36px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(0, 122, 255, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, filter 0.2s;
}
.btn-brand::after,
.btn.btn-primary::after {
  content: "";
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.2) 0%, transparent 55%);
  position: absolute;
  inset: 0;
}
@media (hover: hover) {
  .btn-brand:hover:not(:disabled),
  .btn.btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
  }
}
.btn-brand:active:not(:disabled),
.btn.btn-primary:active:not(:disabled) {
  filter: brightness(0.95);
  transform: scale(0.97);
}
.btn-brand:disabled,
.btn.btn-primary:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: none;
  filter: none;
}

.btn-brand.btn-block {
  width: 100%;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

html:is(.dark, [data-theme="dark"]) .btn-brand,
html:is(.dark, [data-theme="dark"]) .btn.btn-primary {
  box-shadow: 0 1px 8px rgba(10, 132, 255, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.15);
}
@media (hover: hover) {
  html:is(.dark, [data-theme="dark"]) .btn-brand:hover:not(:disabled),
  html:is(.dark, [data-theme="dark"]) .btn.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.45), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
  }
}

/* Glass secondary (replicate) */
.btn-brand-secondary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--btn-radius);
  min-height: 36px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  background: var(--glass-bg-heavy);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 0.5px 0 var(--glass-border-inner);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, background 0.2s;
}
@media (hover: hover) {
  .btn-brand-secondary:hover:not(:disabled) {
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow-hover), inset 0 0.5px 0 var(--glass-border-inner);
    transform: translateY(-1px);
  }
}
.btn-brand-secondary:active:not(:disabled) {
  transform: scale(0.97);
}

html:is(.dark, [data-theme="dark"]) .btn-brand-secondary:hover:not(:disabled) {
  background: rgba(58, 58, 60, 0.55);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border: none;
  border-radius: var(--btn-radius);
  transition: background 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(0, 122, 255, 0.1);
}
html:is(.dark, [data-theme="dark"]) .btn-ghost:hover {
  background: rgba(10, 132, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.btn-outline:hover {
  color: var(--brand-primary);
  background: rgba(0, 122, 255, 0.08);
}

.lp-btn.btn-danger {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  box-shadow: none;
}
.lp-btn.btn-danger:hover {
  background: #fff;
  border-color: #ef4444;
  color: #b91c1c;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}
html:is(.dark, [data-theme="dark"]) .lp-btn.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
html:is(.dark, [data-theme="dark"]) .lp-btn.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fecaca;
}

.lp-btn.btn-view {
  background: rgba(0, 122, 255, 0.1);
  border: 0.5px solid rgba(0, 122, 255, 0.28);
  color: var(--brand-primary);
  box-shadow: none;
}
.lp-btn.btn-view:hover {
  background: rgba(0, 122, 255, 0.18);
  border-color: rgba(0, 122, 255, 0.45);
  color: var(--color-deep-blue);
}
html:is(.dark, [data-theme="dark"]) .lp-btn.btn-view:hover {
  color: #7eb3ff;
  border-color: rgba(10, 132, 255, 0.45);
}

.lp-btn.btn-edit {
  background: rgba(48, 209, 88, 0.12);
  border: 0.5px solid rgba(48, 209, 88, 0.35);
  color: var(--color-teal);
  box-shadow: none;
}
.lp-btn.btn-edit:hover {
  background: rgba(48, 209, 88, 0.2);
  border-color: rgba(48, 209, 88, 0.5);
}
html:is(.dark, [data-theme="dark"]) .lp-btn.btn-edit {
  color: #34d399;
}
.btn-sm {
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.2;
  min-height: 28px;
}

/* Compact icon / pagination — lighter chrome */
.lp-btn--pager {
  padding: 6px 10px;
  min-width: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-input);
  box-shadow: none;
  font-size: 11px;
}
.lp-btn--pager:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--border));
  color: var(--brand-primary);
  box-shadow: none;
}

/* Grade badges — iOS green / blue */
.grade-aplus { background: rgba(48, 209, 88, 0.14); color: var(--color-teal); border: 1px solid rgba(48, 209, 88, 0.35); }
.grade-a { background: rgba(0, 122, 255, 0.12); color: var(--color-blue); border: 1px solid rgba(0, 122, 255, 0.3); }
.grade-b { background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.grade-c { background: color-mix(in srgb, var(--purple) 14%, transparent); color: var(--purple); border: 1px solid color-mix(in srgb, var(--purple) 35%, transparent); }
.grade-d { background: color-mix(in srgb, var(--rose) 14%, transparent); color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 35%, transparent); }

.bg-main { background: var(--bg); }
.bg-card { background: var(--bg-card); }
.bg-input { background: var(--bg-input); }
.bg-hover { background: var(--bg-hover); }
.text-main { color: var(--text); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.border-main { border-color: var(--border); }
.border-focus { border-color: var(--border-focus); }

/* Inputs — replicate .input */
.lp-input,
.input {
  width: 100%;
  padding: 9px 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-ios-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 0.5px 0 var(--glass-border-inner);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lp-input:focus,
.input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--primary-light), inset 0 0.5px 0 var(--glass-border-inner);
}
.lp-input::placeholder,
.input::placeholder { color: var(--text-dim); }

/* Narrow numeric fields (thresholds, weights); full-width number inputs omit this class */
.lp-input[type="number"].lp-input--num-compact {
  width: 65px;
  min-width: 65px;
  text-align: center;
}

html:is(.dark, [data-theme="dark"]) .lp-input,
html:is(.dark, [data-theme="dark"]) .input {
  background: var(--glass-bg-heavy);
  border-color: var(--glass-border);
}

.lp-select {
  padding: 9px 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-ios-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.lp-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--primary-light), inset 0 0.5px 0 var(--glass-border-inner);
}
.lp-select option { background: var(--bg-card); }

/* Table / modal action buttons — frosted secondary */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 6px 14px;
  min-height: 32px;
  border: 0.5px solid var(--glass-border);
  border-radius: var(--btn-radius);
  background: var(--glass-bg-heavy);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glass-shadow), inset 0 0.5px 0 var(--glass-border-inner);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
@media (hover: hover) {
  .lp-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand-primary) 40%, var(--glass-border));
    color: var(--text);
    box-shadow: var(--glass-shadow-hover), inset 0 0.5px 0 var(--glass-border-inner);
  }
}
html:is(.dark, [data-theme="dark"]) .lp-btn:hover {
  background: rgba(58, 58, 60, 0.55);
}
.lp-btn:active {
  transform: scale(0.97);
}

.lp-btn.btn-cancel,
.lp-btn--muted {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  box-shadow: none;
}
.lp-btn.btn-cancel:hover,
.lp-btn--muted:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border);
}

.lp-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-ios);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .lp-card:hover {
    box-shadow: var(--glass-shadow-hover), inset 0 0.5px 0 var(--glass-border-inner);
    transform: translateY(-2px);
  }
}

html:is(.dark, [data-theme="dark"]) .lp-card {
  background: var(--glass-bg);
}

/* Data tables — solid white (overrides inline thead --bg-input); works in light & dark */
.lp-card table,
.card table {
  background: #ffffff;
  border-collapse: separate;
  border-spacing: 0;
}
.lp-card table thead tr,
.card table thead tr {
  background: #ffffff !important;
}
.lp-card table tbody tr,
.card table tbody tr {
  background: #ffffff;
}
@media (hover: hover) {
  .lp-card table tbody tr:hover,
  .card table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-primary) 7%, #ffffff);
  }
}

/* Dark only: tables use theme surfaces (light mode keeps solid white above) */
html:is(.dark, [data-theme="dark"]) .lp-card table,
html:is(.dark, [data-theme="dark"]) .card table {
  background: var(--bg-card);
}
html:is(.dark, [data-theme="dark"]) .lp-card table thead tr,
html:is(.dark, [data-theme="dark"]) .card table thead tr {
  background: var(--bg-input) !important;
}
html:is(.dark, [data-theme="dark"]) .lp-card table tbody tr,
html:is(.dark, [data-theme="dark"]) .card table tbody tr {
  background: var(--bg-card);
}
@media (hover: hover) {
  html:is(.dark, [data-theme="dark"]) .lp-card table tbody tr:hover,
  html:is(.dark, [data-theme="dark"]) .card table tbody tr:hover {
    background: color-mix(in srgb, var(--brand-primary) 14%, var(--bg-card));
  }
}
html:is(.dark, [data-theme="dark"]) .lp-card table th,
html:is(.dark, [data-theme="dark"]) .lp-card table td,
html:is(.dark, [data-theme="dark"]) .card table th,
html:is(.dark, [data-theme="dark"]) .card table td {
  color: var(--text);
}
html:is(.dark, [data-theme="dark"]) .lp-card table thead th,
html:is(.dark, [data-theme="dark"]) .card table thead th {
  color: var(--text-muted) !important;
}

/* Alias: chunk `.card` — same glass treatment as `.lp-card` */
.card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (hover: hover) {
  .card:hover {
    box-shadow: var(--glass-shadow-hover), inset 0 0.5px 0 var(--glass-border-inner);
    transform: translateY(-2px);
  }
}

/* Modal backdrop — scrim + blur; light mode uses cooler tint so white panels read clearly */
.lp-modal-overlay {
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}
html:is(.dark, [data-theme="dark"]) .lp-modal-overlay {
  background: rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Large surfaces — modals, hero panels (replicate .card-xl) */
.card-xl {
  background: var(--glass-bg-heavy);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  border-radius: var(--radius-xl-ss);
  box-shadow: var(--glass-shadow-xl), inset 0 0.5px 0 var(--glass-border-inner);
}

/* Light mode: solid white modal body — no frosted bleed-through, strong edge */
html:not(.dark):not([data-theme="dark"]) .card-xl {
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  color: var(--text);
  /* Slightly tinted fields inside modals (Select uses var(--bg-input), etc.) */
  --bg-input: #f2f2f7;
}

/* Dark mode: keep frosted panel */
html:is(.dark, [data-theme="dark"]) .card-xl {
  background: var(--glass-bg-heavy);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow-xl), inset 0 0.5px 0 var(--glass-border-inner);
}

/* Optional: slightly denser surface for specific modals in dark mode */
html:is(.dark, [data-theme="dark"]) .card-xl.lp-modal-shell-elegant {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: var(--glass-shadow-xl);
}

/* Light modals: inputs / selects readable on white (not same-white as panel) */
html:not(.dark):not([data-theme="dark"]) .card-xl .lp-input,
html:not(.dark):not([data-theme="dark"]) .card-xl .input,
html:not(.dark):not([data-theme="dark"]) .card-xl .lp-select {
  background: #f2f2f7;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
html:not(.dark):not([data-theme="dark"]) .card-xl .lp-input:focus,
html:not(.dark):not([data-theme="dark"]) .card-xl .input:focus,
html:not(.dark):not([data-theme="dark"]) .card-xl .lp-select:focus {
  box-shadow: 0 0 0 4px var(--primary-light), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Card skeleton — shimmer bars (loading placeholders) */
.lp-skeleton-line {
  --sk-delay: 0ms;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg-input) 92%, var(--border));
}

html:is(.dark, [data-theme="dark"]) .lp-skeleton-line {
  background: color-mix(in srgb, var(--bg-input) 85%, #1e293b);
}

.lp-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 35%,
    color-mix(in srgb, var(--brand-primary) 22%, transparent) 50%,
    color-mix(in srgb, var(--brand-secondary) 18%, transparent) 52%,
    transparent 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: lp-skeleton-shimmer 1.25s linear infinite;
  animation-delay: var(--sk-delay);
}

html:is(.dark, [data-theme="dark"]) .lp-skeleton-line::after {
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 35%,
    rgba(10, 132, 255, 0.22) 50%,
    rgba(48, 209, 88, 0.14) 52%,
    transparent 65%,
    transparent 100%
  );
  background-size: 200% 100%;
}

@keyframes lp-skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Subtle breathing while skeleton content is visible (dashboard, list pages, etc.) */
.lp-dashboard-skeleton-active,
.lp-skeleton-page-active {
  animation: lp-dashboard-skeleton-breathe 2.5s ease-in-out infinite;
}

@keyframes lp-dashboard-skeleton-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.97;
  }
}

.lp-card-skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  animation: lp-card-skeleton-pop 0.45s ease-out backwards;
}

.lp-card-skeleton-grid .lp-card-skeleton:nth-child(1) { animation-delay: 0.04s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(2) { animation-delay: 0.08s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(3) { animation-delay: 0.12s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(4) { animation-delay: 0.16s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(5) { animation-delay: 0.2s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(6) { animation-delay: 0.24s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(7) { animation-delay: 0.28s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(8) { animation-delay: 0.32s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(9) { animation-delay: 0.36s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(10) { animation-delay: 0.4s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(11) { animation-delay: 0.44s; }
.lp-card-skeleton-grid .lp-card-skeleton:nth-child(12) { animation-delay: 0.48s; }

@keyframes lp-card-skeleton-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loaded cards — subtle entrance (use with .lp-card) */
.lp-card-enter {
  animation: lp-card-enter 0.45s ease-out backwards;
}

.lp-card-enter-stagger > .lp-card,
.lp-card-enter-stagger > a.lp-card {
  animation: lp-card-enter 0.42s ease-out backwards;
}

.lp-card-enter-stagger > *:nth-child(1) { animation-delay: 0.03s; }
.lp-card-enter-stagger > *:nth-child(2) { animation-delay: 0.06s; }
.lp-card-enter-stagger > *:nth-child(3) { animation-delay: 0.09s; }
.lp-card-enter-stagger > *:nth-child(4) { animation-delay: 0.12s; }
.lp-card-enter-stagger > *:nth-child(5) { animation-delay: 0.15s; }
.lp-card-enter-stagger > *:nth-child(6) { animation-delay: 0.18s; }
.lp-card-enter-stagger > *:nth-child(7) { animation-delay: 0.21s; }
.lp-card-enter-stagger > *:nth-child(8) { animation-delay: 0.24s; }
.lp-card-enter-stagger > *:nth-child(9) { animation-delay: 0.27s; }
.lp-card-enter-stagger > *:nth-child(10) { animation-delay: 0.3s; }
.lp-card-enter-stagger > *:nth-child(11) { animation-delay: 0.33s; }
.lp-card-enter-stagger > *:nth-child(12) { animation-delay: 0.36s; }

@keyframes lp-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dashboard — soft brand gradient (light mode only; matches --soft-bg-gradient) */
.lp-dashboard-bg {
  border-radius: 1rem;
}

html:not(:is(.dark, [data-theme="dark"])) .lp-dashboard-bg {
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.1), rgba(0, 122, 255, 0.1));
}

html:is(.dark, [data-theme="dark"]) .lp-dashboard-bg {
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.12), rgba(10, 132, 255, 0.14));
}

/* Single-Solution–style enterprise dashboard surface (reference: inventory.single-solution.com) */
.lp-dashboard-bg.ss-dashboard-surface {
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}

html:not(:is(.dark, [data-theme="dark"])) .lp-dashboard-bg.ss-dashboard-surface {
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 55%, #eef2f7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html:is(.dark, [data-theme="dark"]) .lp-dashboard-bg.ss-dashboard-surface {
  background: linear-gradient(165deg, #0c0c0e 0%, #12141a 45%, #0a0c12 100%);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ss-dashboard-hero .ss-brand-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.ss-tagline {
  letter-spacing: 0.02em;
}

.ss-trust-pill {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--bg-input) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  white-space: nowrap;
}

html:is(.dark, [data-theme="dark"]) .ss-trust-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Status chips (jobs, tests) — colors via modifier class + CSS vars */
.lp-status-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: capitalize;
  border-radius: 9999px;
  padding: 0.32rem 0.75rem;
  border-style: solid;
  border-width: 1px;
  max-width: 100%;
}

.lp-status-badge--completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
  border: var(--status-completed-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
html:is(.dark, [data-theme="dark"]) .lp-status-badge--completed {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.lp-status-badge--running {
  background: var(--status-running-bg);
  color: var(--status-running-text);
  border: var(--status-running-border);
  box-shadow: 0 1px 2px rgba(0, 122, 255, 0.08);
}
.lp-status-badge--pending {
  background: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: var(--status-pending-border);
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.06);
}
.lp-status-badge--failed {
  background: var(--status-failed-bg);
  color: var(--status-failed-text);
  border: var(--status-failed-border);
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.06);
}
.lp-status-badge--cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border: var(--status-cancelled-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lp-status-badge--compact {
  letter-spacing: 0.03em;
  padding: 0.18rem 0.42rem;
  font-size: 9px;
  font-weight: 600;
  border-radius: 6px;
}

/* Top app header — replicate frosted strip */
.lp-app-header {
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  background: #f2f2f7d1;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.5px rgba(0, 0, 0, 0.04);
}
html:is(.dark, [data-theme="dark"]) .lp-app-header {
  background: #1c1c1ecc;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0.5px rgba(0, 0, 0, 0.35);
}

/* Voters (non-admin): slim strip without Dashboard/Vote/History pills */
.lp-voter-header {
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  background: #f2f2f7d1;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0.5px rgba(0, 0, 0, 0.04);
}
.lp-voter-header__inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.lp-voter-header__brand {
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: 1rem;
  color: var(--fg);
  text-decoration: none;
}
.lp-voter-header__brand:hover {
  color: var(--primary);
}
.lp-voter-header__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}
.lp-voter-header__sep {
  color: var(--text-dim);
  user-select: none;
}
.lp-voter-header__link {
  color: var(--text-muted);
  text-decoration: none;
}
.lp-voter-header__link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.lp-voter-header__link--active {
  color: var(--primary);
  font-weight: 600;
}

/* Voter vote page: fixed bottom “tab bar” (centered dock, mobile-style) */
main.lp-shell-main:has(.lp-voter-bottom-bar) {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
.lp-voter-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
}
.lp-voter-bottom-bar__dock {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.25rem;
  max-width: min(26rem, 100%);
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-solid) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.lp-voter-bottom-bar__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.lp-voter-bottom-bar__item:hover {
  color: var(--primary);
  background: rgba(0, 122, 255, 0.08);
}
.lp-voter-bottom-bar__item:active {
  background: rgba(0, 122, 255, 0.12);
}
.lp-voter-bottom-bar__item--active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(0, 122, 255, 0.1);
}
.lp-voter-bottom-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.lp-voter-bottom-bar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
}

/* Admin: brand-only header */
.lp-app-header--minimal .lp-header-wrap {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.lp-header-row--center {
  justify-content: center;
}
.lp-header-row--center .lp-header-brand {
  margin: 0 auto;
}

/* Admin bottom bar (main nav + Admin sheet) */
main.lp-shell-main:has(.lp-admin-bottom-bar) {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
}
.lp-admin-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 0.5rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
}
.lp-admin-bottom-bar__dock {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.2rem;
  max-width: min(28rem, 100%);
  padding: 0.45rem 0.5rem;
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-solid) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.lp-admin-bottom-bar__item {
  flex: 1 1 auto;
  min-width: 3rem;
  max-width: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.3rem 0.35rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  font: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.lp-admin-bottom-bar__item:hover {
  color: var(--primary);
  background: rgba(0, 122, 255, 0.08);
}
.lp-admin-bottom-bar__item--active {
  color: var(--primary);
  font-weight: 700;
  background: rgba(0, 122, 255, 0.1);
}
.lp-admin-bottom-bar__item--trigger {
  max-width: 4.5rem;
}
.lp-admin-bottom-bar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.lp-admin-bottom-bar__icon--badge {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
}
.lp-admin-bottom-bar__label {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
}
.lp-admin-bottom-bar__admin-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 3rem;
  max-width: 5rem;
}
.lp-admin-bottom-bar__admin-wrap.is-open .lp-admin-bottom-bar__item--trigger {
  color: var(--primary);
  background: rgba(0, 122, 255, 0.1);
}
.lp-admin-bottom-bar__sheet {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 12.5rem;
  max-width: min(92vw, 18rem);
  padding: 0.35rem 0;
  border-radius: 14px;
  background: var(--bg-solid);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  z-index: 70;
}
.lp-admin-bottom-bar__sheet-link {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
.lp-admin-bottom-bar__sheet-link:hover {
  background: var(--bg-hover);
}
.lp-admin-bottom-bar__sheet-link--active {
  color: var(--primary);
  font-weight: 700;
}

/* Shared page shell (history, password, admin pages) */
.page-shell {
  width: 100%;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}
.page-shell__table-card {
  width: 100%;
  margin-top: 0.5rem;
}
.page-shell__table {
  width: 100%;
  border-collapse: collapse;
}
.page-shell__th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.page-shell__tr {
  border-bottom: 1px solid var(--border);
}
.page-shell__td {
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}
.page-shell__form-card {
  margin-top: 0.75rem;
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.35rem 1.5rem 1.5rem;
  box-sizing: border-box;
}
.page-shell__form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}
.page-shell__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.page-shell__field .lp-form-label {
  margin-bottom: 0;
}
.page-shell__form-actions {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}
.page-shell__back {
  margin-top: 1.25rem;
  text-align: center;
}
.page-shell__back-link {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.page-shell__back-link:hover {
  text-decoration: underline;
}
.page-shell__dash-grid {
  margin-top: 0.5rem;
  width: 100%;
}
.admin-page-shell .admin-dishes-page {
  width: 100%;
}

/* Navbar pills — segmented tab style (inactive = text only; hover = grey pill; active = white + blue + shadow)
   `text-decoration: none` matches Tailwind preflight (Next app); global `a` is scoped with :not(.nav-pill). */
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border: none;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    font-weight 0.15s ease;
}

html:not(:is(.dark, [data-theme="dark"])) .nav-pill {
  color: #6b6b70;
}

html:not(:is(.dark, [data-theme="dark"])) .nav-pill:hover:not(.nav-pill--active) {
  background: #e8e8ed;
  color: #1c1c1e;
}

/* Active: solid white, vibrant blue text, subtle lift shadow */
html:not(:is(.dark, [data-theme="dark"])) .nav-pill--active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

html:is(.dark, [data-theme="dark"]) .nav-pill {
  color: var(--text-dim);
  background: transparent;
}

html:is(.dark, [data-theme="dark"]) .nav-pill:hover:not(.nav-pill--active) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

html:is(.dark, [data-theme="dark"]) .nav-pill--active {
  background: rgba(255, 255, 255, 0.14);
  color: #7eb3ff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.nav-item {
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-pill:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-primary) 55%, transparent);
  outline-offset: 2px;
}

.nav-dropdown-panel {
  border-radius: var(--radius-ios);
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--glass-shadow-hover), inset 0 0.5px 0 var(--glass-border-inner);
  background: var(--glass-bg-heavy);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
}
html:not(:is(.dark, [data-theme="dark"])) .nav-dropdown-panel {
  background: rgba(255, 255, 255, 0.92);
}
html:is(.dark, [data-theme="dark"]) .nav-dropdown-panel {
  background: var(--glass-bg-heavy);
}

.nav-dropdown-link {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-ios-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
/* Match nav-pill--active (white / frosted) — avoid always-on blue tint */
html:not(:is(.dark, [data-theme="dark"])) .nav-dropdown-link--active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}
html:is(.dark, [data-theme="dark"]) .nav-dropdown-link--active {
  background: rgba(255, 255, 255, 0.14);
  color: #7eb3ff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
@media (hover: hover) {
  .nav-dropdown-link:hover:not(.nav-dropdown-link--active) {
    background: var(--bg-hover);
    color: var(--text);
  }
}

/* Custom select — portaled panel uses --lp-z-dropdown; stacking isolated from tables/modals */
.lp-select-dropdown {
  isolation: isolate;
}

@keyframes selectSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.select-option:hover:not(:disabled) {
  background: rgba(0, 122, 255, 0.1) !important;
  color: var(--brand-primary) !important;
}
html:is(.dark, [data-theme="dark"]) .select-option:hover:not(:disabled) {
  background: rgba(10, 132, 255, 0.14) !important;
  color: #64d2ff !important;
}

input[type="checkbox"] { accent-color: var(--brand-primary); }

.lp-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: lp-spin 0.75s linear infinite;
}
@keyframes lp-spin {
  to { transform: rotate(360deg); }
}

/* Premium / gradient badge utility */
.badge-gradient {
  background: linear-gradient(135deg, #30d158, #007aff);
  color: #fff;
  border: none;
}

/* ─── Single-Solution chunk: gradient mesh (app shell background) ─── */
.gradient-mesh {
  background:
    radial-gradient(at 20% 80%, rgba(0, 122, 255, 0.06) 0%, transparent 50%),
    radial-gradient(at 80% 20%, rgba(48, 209, 88, 0.05) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(191, 90, 242, 0.03) 0%, transparent 50%),
    radial-gradient(at 30% 30%, rgba(100, 210, 255, 0.04) 0%, transparent 50%),
    var(--bg);
}

html:is(.dark, [data-theme="dark"]) .gradient-mesh {
  background:
    radial-gradient(at 20% 80%, rgba(0, 122, 255, 0.04) 0%, transparent 50%),
    radial-gradient(at 80% 20%, rgba(48, 209, 88, 0.03) 0%, transparent 50%),
    radial-gradient(at 50% 50%, rgba(191, 90, 242, 0.02) 0%, transparent 50%),
    var(--bg);
}

/* Typography scale (inventory chunk) */
.text-title {
  letter-spacing: -0.02em;
  color: var(--fg);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .text-title {
    letter-spacing: -0.025em;
    font-size: 28px;
  }
}

.text-headline {
  letter-spacing: -0.01em;
  color: var(--fg);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.text-subhead {
  color: var(--fg-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.text-footnote {
  color: var(--fg-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.text-caption {
  color: var(--fg-tertiary);
  font-size: 11px;
  line-height: 1.3;
}

/* Logo wordmark — Lead (blue) · Pulse (accent) */
.ss-brand-wordmark__lead {
  color: var(--primary);
}

.ss-brand-wordmark__pulse {
  color: var(--teal);
}

html:is(.dark, [data-theme="dark"]) .ss-brand-wordmark__lead {
  color: var(--primary);
}

html:is(.dark, [data-theme="dark"]) .ss-brand-wordmark__pulse {
  color: var(--teal);
}

/* Dashboard metric tiles — white cards + corner blob (reference UI) */
.ss-metric-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-solid);
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .ss-metric-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
  }
}

html:is(.dark, [data-theme="dark"]) .ss-metric-card {
  background: var(--bg-card);
  border-color: color-mix(in srgb, var(--border) 90%, transparent);
  box-shadow: var(--glass-shadow);
}

.ss-metric-card__icon {
  position: relative;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* lunch-voting — layout helpers */
.food-stack { display: flex; flex-direction: column; gap: 1rem; }
.food-muted { font-size: 0.875rem; color: var(--text-muted); }
.food-dish-list { display: flex; flex-direction: column; gap: 0.5rem; }
.food-dish-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-ios-sm);
  border: 1px solid var(--border); background: var(--bg-card);
}
html:is(.dark, [data-theme="dark"]) .food-dish-row { background: var(--bg-input); }
.food-msg { padding: 0.75rem 1rem; border-radius: var(--radius-ios-sm); font-size: 0.875rem; }
.food-msg--ok { background: color-mix(in srgb, var(--color-teal) 12%, transparent); color: var(--status-completed-text); }
.food-msg--err { background: var(--status-failed-bg); color: var(--status-failed-text); }
.food-msg--info { background: rgba(0, 122, 255, 0.1); color: var(--brand-primary); }

/* LeadPulse shell / login parity (no Tailwind) */
.min-h-screen { min-height: 100vh; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-40 { z-index: 40; }
.backdrop-blur-md {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.ss-brand-wordmark {
  font-weight: 700;
  letter-spacing: -0.025em;
}

.lp-header-wrap {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.625rem 1rem;
}
@media (min-width: 640px) {
  .lp-header-wrap {
    padding: 0.75rem 1.5rem;
  }
}

.lp-header-stack {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
@media (min-width: 640px) {
  .lp-header-stack {
    gap: 0.75rem;
  }
}

.lp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.lp-header-brand {
  flex-shrink: 0;
  min-width: 0;
}

.lp-header-wordmark {
  font-size: 1.125rem;
  line-height: 1;
  margin: 0;
}

.lp-header-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 640px) {
  .lp-header-toolbar {
    gap: 0.75rem;
  }
}

/* LeadPulse-style Super Admin header dropdown (lunch-voting) */
.lp-admin-nav-wrap {
  position: relative;
  z-index: 1;
}

.lp-admin-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-left: 0.5rem;
  padding-right: 0.625rem;
}

.lp-admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.lp-admin-nav-label {
  display: none;
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .lp-admin-nav-label {
    display: inline;
  }
}

.lp-admin-nav-caret {
  font-size: 10px;
  opacity: 0.6;
  line-height: 1;
}

/* Logged-in user (non-admin) — account dropdown */
.lp-user-nav-wrap {
  position: relative;
  z-index: 1;
}

.lp-user-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: min(100vw - 8rem, 14rem);
  padding-left: 0.5rem;
  padding-right: 0.625rem;
}

.lp-admin-nav-trigger,
.lp-user-nav-trigger {
  cursor: pointer;
}

.lp-user-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--brand-primary) 18%, transparent);
  color: var(--brand-primary);
  border: 0.5px solid color-mix(in srgb, var(--brand-primary) 35%, transparent);
}

.lp-user-nav-label {
  display: none;
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (min-width: 640px) {
  .lp-user-nav-label {
    display: inline;
  }
}

.lp-user-nav-caret {
  font-size: 10px;
  opacity: 0.6;
  line-height: 1;
  flex-shrink: 0;
}

.lp-user-nav-panel {
  z-index: var(--lp-z-dropdown, 10050);
}

.lp-user-nav-email {
  margin: 0;
  padding: 0.35rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

/* LeadPulse / Tailwind parity — admin nav dropdown (matches Sidebar nav-dropdown-panel) */
.absolute {
  position: absolute;
}
.top-full {
  top: 100%;
}
.right-0 {
  right: 0;
}
.mt-2 {
  margin-top: 0.5rem;
}
.min-w-190 {
  min-width: 190px;
}
.p-1-5 {
  padding: 0.375rem;
}
.my-1-5 {
  margin-top: 0.375rem;
  margin-bottom: 0.375rem;
}
.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.rounded-lg {
  border-radius: 0.5rem;
}
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.font-medium {
  font-weight: 500;
}
.block {
  display: block;
}
.transition-all {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform,
    filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-150 {
  transition-duration: 150ms;
}

.lp-admin-nav-panel {
  z-index: var(--lp-z-dropdown, 10050);
}

.lp-admin-nav-divider {
  height: 1px;
  background: color-mix(in srgb, var(--border) 50%, transparent);
}

/* Super Admin dropdown — Sign out (red focus + no sticky blue hover / tap flash) */
a.lp-dd-signout {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
  background: transparent !important;
  color: #ef4444;
  transform: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
@media (hover: hover) {
  a.lp-dd-signout:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444;
    transform: translateX(2px);
  }
  html:is(.dark, [data-theme="dark"]) a.lp-dd-signout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fecaca;
  }
}
html:is(.dark, [data-theme="dark"]) a.lp-dd-signout {
  color: #fca5a5;
}
a.lp-dd-signout:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.45);
  outline-offset: 2px;
}

/* Header — Sign out (non-admin): keep pill danger chrome, avoid generic .lp-btn lift fighting danger */
.lp-header-toolbar a.lp-btn.btn-danger.btn-sm {
  text-decoration: none;
  flex-shrink: 0;
}
@media (hover: hover) {
  .lp-header-toolbar a.lp-btn.btn-danger.btn-sm:hover {
    transform: translateY(-1px);
  }
}

.lp-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3rem;
  height: 1.75rem;
  border-radius: 9999px;
  transition: background 0.2s;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  background: color-mix(in srgb, var(--border) 70%, var(--bg-input));
}
/* Neutral track in dark mode — brand-primary mix reads as a constant blue bar */
html:is(.dark, [data-theme="dark"]) .lp-theme-toggle {
  background: color-mix(in srgb, var(--border) 55%, var(--bg-input));
}

.lp-theme-toggle-thumb {
  position: absolute;
  top: 0.125rem;
  left: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  transition: left 0.2s ease;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
html:is(.dark, [data-theme="dark"]) .lp-theme-toggle-thumb {
  left: 22px;
}

.lp-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  position: relative;
  padding-top: 0.5rem;
  margin: 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}
@media (min-width: 640px) {
  .lp-header-nav {
    gap: 0.375rem;
    padding-top: 0.625rem;
  }
}

.lp-shell-main {
  overflow: auto;
}

.lp-shell-inner {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1rem;
}
@media (min-width: 640px) {
  .lp-shell-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.lp-page-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.lp-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lp-login-max {
  width: 100%;
  max-width: 24rem;
}

.lp-login-brand-block {
  text-align: center;
  margin-bottom: 2rem;
}

.lp-login-brand-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
}

.lp-login-brand-sub {
  font-size: 0.875rem;
  margin: 0;
  color: var(--text-dim);
}

.lp-form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
  color: var(--text-muted);
}

.lp-stack-y-4 > * + * {
  margin-top: 1rem;
}

.lp-card.p-4 {
  padding: 1rem;
}
.lp-card.p-6 {
  padding: 1.5rem;
}

.w-full {
  width: 100%;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-left {
  text-align: left;
}
.p-3 {
  padding: 0.75rem;
}
.overflow-hidden {
  overflow: hidden;
}

.lp-form-error {
  font-size: 0.875rem;
  color: #f87171;
}

.lp-login-hint {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 1rem;
  color: var(--fg);
}

.lp-dash-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lp-dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lp-dash-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-ios-sm);
  padding: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.lp-dash-tile:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
html:is(.dark, [data-theme="dark"]) .lp-dash-tile {
  background: var(--bg-input);
  box-shadow: var(--glass-shadow);
}

.lp-dash-tile__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.35rem 0;
}

.lp-dash-tile__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* ─── Admin: dishes (DataTables + modal) ─── */
/* Bleed past .lp-shell-inner horizontal padding so hero + table use full viewport width */
.admin-dishes-page {
  width: calc(100% + 2rem);
  max-width: none;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .admin-dishes-page {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.admin-dishes-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-xl-ss);
  border: 0.5px solid var(--glass-border);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--brand-primary) 12%, transparent),
    color-mix(in srgb, var(--brand-secondary) 10%, transparent)
  );
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html:is(.dark, [data-theme="dark"]) .admin-dishes-hero {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--brand-primary) 12%, var(--bg-card)),
    color-mix(in srgb, var(--brand-secondary) 8%, var(--bg-card))
  );
}

.admin-dishes-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0 0 0.35rem 0;
}

.admin-dishes-hero__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 0.35rem 0;
}

.admin-dishes-hero__sub {
  max-width: 36rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.admin-dishes-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Vote page — same hero card as admin dishes */
.vote-page-hero {
  align-items: flex-start;
}

.vote-page-hero .admin-dishes-hero__aside {
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .admin-dishes-hero__aside {
    flex-direction: row;
    align-items: center;
  }
}

.vote-closed-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.35rem 0;
}

.vote-closed-card__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.vote-closed-card__next {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

/* ─── Vote landing (ballot / leaderboard) — brand-aligned palette ─── */
.vote-landing {
  width: 100%;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  min-height: calc(100dvh - 10rem);
  position: relative;
}
.vote-landing__hero {
  text-align: center;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.vote-landing__emoji {
  display: block;
  font-size: clamp(2.75rem, 8vw, 4rem);
  line-height: 1;
  margin-bottom: 0.25rem;
  animation: vote-float 4s ease-in-out infinite;
}
@keyframes vote-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.vote-landing__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem 0;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--teal) 50%, #5ac8fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.vote-landing__dates {
  margin: 0;
  font-size: clamp(0.9375rem, 2.5vw, 1.125rem);
  font-weight: 700;
  color: var(--fg-secondary);
}
.vote-landing__sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 28rem;
  line-height: 1.4;
}
.vote-landing__ticker {
  width: 100%;
  min-height: 1.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.vote-landing__ticker-text {
  margin: 0;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--fg-tertiary);
}
.vote-landing__ticker-user {
  color: var(--primary);
}
.vote-landing__ticker-dish {
  font-weight: 800;
  color: var(--fg);
}
.vote-landing__ticker-time {
  opacity: 0.65;
}
.vote-landing__alert {
  width: 100%;
  max-width: 36rem;
  margin-bottom: 0.75rem;
}
.vote-countdown-glass {
  width: 100%;
  max-width: 28rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-xl-ss, 22px);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-solid) 82%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-shadow);
  position: relative;
  z-index: 1;
}
.vote-countdown-glass__main {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.vote-countdown-glass__label {
  margin: 0 0 0.5rem 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vote-countdown-glass__digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}
.vote-countdown-glass__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.vote-countdown-glass__num {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--fg);
}
.vote-countdown-glass__unit-lbl {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.vote-countdown-glass__colon {
  font-size: 1.25rem;
  font-weight: 700;
  opacity: 0.35;
  padding: 0 0.1rem;
  color: var(--fg-secondary);
}
.vote-countdown-glass__divider {
  width: 1px;
  align-self: stretch;
  min-height: 2.5rem;
  background: var(--border-strong);
  flex-shrink: 0;
}
.vote-countdown-glass__stat {
  text-align: center;
  flex-shrink: 0;
  min-width: 3.25rem;
}
.vote-countdown-glass__total {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--primary);
}
.vote-countdown-glass__stat-lbl {
  margin: 0.2rem 0 0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-tertiary);
}
.vote-landing__closed-card {
  width: 100%;
  max-width: 36rem;
  margin-bottom: 1rem;
}
.vote-landing__winner-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 36rem;
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-ios);
  border: 1px solid color-mix(in srgb, var(--color-teal) 35%, var(--border));
  background: color-mix(in srgb, var(--color-teal) 10%, var(--bg-card));
}
.vote-landing__winner-icon {
  font-size: 1.75rem;
  line-height: 1;
}
.vote-landing__winner-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vote-landing__winner-name {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--fg);
}
.vote-landing__you-voted {
  width: 100%;
  max-width: 36rem;
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.vote-landing__you-voted strong {
  color: var(--fg);
}
.vote-landing__empty {
  width: 100%;
  max-width: 36rem;
}
.vote-card-form {
  width: 100%;
  max-width: 20rem;
  margin: 0;
}
.vote-landing__grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  justify-items: center;
  align-content: start;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .vote-landing__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}
.vote-card {
  display: block;
  width: 100%;
  max-width: 20rem;
  text-align: left;
  color: #fff;
  border: none;
  border-radius: var(--radius-ios);
  padding: 1.175rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.vote-card-form:hover .vote-card {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}
.vote-card__inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}
.vote-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.vote-card__emoji {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  flex-shrink: 0;
}
.vote-card__meta {
  flex: 1;
  min-width: 0;
}
.vote-card__name {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.vote-card__stats {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  opacity: 0.88;
}
.vote-card__top-trail {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}
.vote-card__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.vote-card__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
  color: var(--color-teal);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid color-mix(in srgb, var(--color-teal) 28%, rgba(255, 255, 255, 0.9));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.vote-card__check svg {
  display: block;
  margin-top: 1px;
}
.vote-card--mine .vote-card__check {
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-teal);
  border-color: color-mix(in srgb, var(--color-teal) 40%, rgba(255, 255, 255, 0.95));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.vote-card__bar {
  display: block;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.vote-card__bar-fill {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  transition: width 0.35s ease;
}
.vote-card__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}
.vote-card__pill {
  max-width: 7.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vote-card__pill-more {
  font-size: 0.625rem;
  font-weight: 800;
  opacity: 0.75;
  margin-left: 0.1rem;
}
.vote-card--mine {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 8px 28px rgba(0, 122, 255, 0.25);
}
.vote-card--winner {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 0 6px color-mix(in srgb, var(--color-teal) 45%, transparent);
}

.vote-card__vote-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.vote-card__vote-pill:hover:not(:disabled) {
  background: #fff;
  transform: scale(1.02);
}
.vote-card__vote-pill:disabled {
  cursor: wait;
  opacity: 0.85;
}
.vote-card__vote-pill--done {
  cursor: default;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Card gradients — blues & teals from app tokens */
.vote-card--palette-0 {
  background: linear-gradient(135deg, #0055b3 0%, #007aff 45%, #30d158 100%);
}
.vote-card--palette-1 {
  background: linear-gradient(135deg, #0e7490 0%, #22d3ee 50%, #30d158 100%);
}
.vote-card--palette-2 {
  background: linear-gradient(135deg, #5b21b6 0%, #007aff 55%, #64d2ff 100%);
}
.vote-card--palette-3 {
  background: linear-gradient(135deg, #b45309 0%, #ff9f0a 50%, #fbbf24 100%);
}
.vote-card--palette-4 {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #5eead4 100%);
}
.vote-card--palette-5 {
  background: linear-gradient(135deg, #9d174d 0%, #e879a9 55%, #fda4af 100%);
}
.vote-card--palette-6 {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 45%, #93c5fd 100%);
}
.vote-card--palette-7 {
  background: linear-gradient(135deg, #14532d 0%, #22c55e 50%, #86efac 100%);
}

.vote-landing__spacer {
  height: 5rem;
  flex-shrink: 0;
}

/* Admin — live votes dashboard (/admin/) */
.admin-live-week-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.admin-live-week-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.admin-live-week-select {
  min-width: 12rem;
  max-width: 100%;
}

.admin-live-panel__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

.admin-live-panel__meta {
  margin: 0 0 1rem 0;
  font-size: 0.8125rem;
}

.admin-live-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-live-bar-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.admin-live-bar-row__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.admin-live-bar-row__n {
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brand-primary);
}

.admin-live-bar-track {
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
}

.admin-live-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--brand-primary) 85%, transparent),
    color-mix(in srgb, var(--brand-secondary) 65%, transparent)
  );
  min-width: 0;
  transition: width 0.35s ease;
}

.admin-live-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.admin-live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-live-table th,
.admin-live-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.admin-live-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-live-table__time {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-dishes-week-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  border: 0.5px solid color-mix(in srgb, var(--brand-primary) 28%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-dishes-week-pill--inline {
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  vertical-align: middle;
}

.admin-dishes-week-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  min-width: 12rem;
}

@media (min-width: 640px) {
  .admin-dishes-week-row {
    flex-direction: row;
    align-items: flex-end;
  }
}

.admin-dishes-week-label {
  margin-bottom: 0.25rem !important;
}

.admin-dishes-week-select {
  min-width: 11rem;
  font-size: 0.875rem;
}

.admin-dishes-col-actions {
  width: 220px;
  min-width: 12rem;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: right !important;
  vertical-align: middle !important;
}

.admin-dishes-actions-cell {
  text-align: right !important;
  vertical-align: middle !important;
}

/* Flex on <td> breaks table layout in some engines; use an inner row */
.admin-dishes-actions-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.admin-dishes-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: auto !important;
  min-height: 2.25rem !important;
  padding: 0.4rem 0.7rem !important;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-dishes-action-btn .admin-dishes-icon {
  flex-shrink: 0;
  display: block;
}

.admin-dishes-action-btn--danger {
  padding: 0.4rem 0.7rem !important;
}

.admin-dishes-col-actions.admin-dishes-col-actions--remove-only {
  width: 120px !important;
  min-width: 6.5rem !important;
  max-width: 9rem;
}

.admin-dishes-action-btn--remove {
  justify-content: center;
  min-width: 5.25rem;
}

.admin-dishes-help {
  max-width: 42rem;
  line-height: 1.45;
}

/* LeadPulse Settings–style tabs */
.admin-dishes-tabs-wrap {
  margin-bottom: 1rem;
}

.admin-dishes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-dishes-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-muted);
  text-decoration: none !important;
  margin-bottom: -1px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-dishes-tab:hover {
  color: var(--text);
}

.admin-dishes-tab--active {
  background: var(--bg-card);
  color: var(--brand-primary);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg-card);
}

html:not(.dark):not([data-theme="dark"]) .admin-dishes-tab--active {
  border-bottom-color: #ffffff;
}

.admin-dishes-panel {
  margin-top: 0;
}

.admin-dishes-table-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-dishes-table-head--voting-toolbar {
  justify-content: flex-end;
  margin-bottom: 1rem;
}

/* Bulk add modal — Select2 multi-select (matches leadpulse scraper CustomSelect / Business Category) */
.admin-dishes-bulk-modal-panel {
  max-width: 28rem;
}

.admin-dishes-bulk-field-label {
  display: block;
  font-size: 0.75rem;
  line-height: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.admin-dishes-bulk-select2-wrap {
  min-width: 0;
}

.admin-dishes-bulk-select2-wrap .select2-container {
  font-size: 0.8125rem;
}

/* Closed control — same proportions as leadpulse Select trigger (8px 12px pad, 8px radius, --bg-input) */
.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple {
  min-height: 2.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-dishes-bulk-select2-wrap
  .select2-container--default.select2-container--focus:not(.select2-container--disabled)
  .select2-selection--multiple {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* Select2 default uses `display: inline` + floated chips + absolutely positioned × — flex fixes alignment */
.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  padding: 0.2rem 0.35rem;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-search--inline {
  float: none !important;
  flex: 1 1 10rem;
  min-width: min(100%, 10rem);
  margin: 0 !important;
  padding: 0 !important;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin: 0 !important;
  padding: 0.4rem 0.15rem !important;
  height: auto !important;
  min-height: 1.625rem;
  line-height: 1.3;
  font-size: 0.8125rem;
  color: var(--text);
  caret-color: var(--brand-primary);
  vertical-align: middle;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
  color: var(--text-dim);
}

/* Chips: row layout instead of absolute × (matches Select2 4.1 structure: remove + choice__display) */
.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice {
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text);
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 32%, transparent);
  border-radius: 6px;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  position: static !important;
  left: auto !important;
  top: auto !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  min-height: 1.625rem;
  margin: 0;
  padding: 0;
  border: none !important;
  border-right: 1px solid color-mix(in srgb, var(--brand-primary) 35%, transparent) !important;
  border-radius: 5px 0 0 5px;
  background: color-mix(in srgb, var(--brand-primary) 6%, transparent);
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-dishes-bulk-select2-wrap
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove:hover,
.admin-dishes-bulk-select2-wrap
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove:focus {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
  outline: none;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  padding: 0.2rem 0.45rem 0.2rem 0.35rem !important;
  cursor: default;
  line-height: 1.25;
}

/* “Clear all” (allowClear) — vertically centered vs default top: 5px */
.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple.select2-selection--clearable {
  padding-right: 2rem;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__clear {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 !important;
  height: 1.5rem !important;
  width: 1.5rem;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.125rem;
  line-height: 1;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-dishes-bulk-select2-wrap .select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
}

/* Dropdown panel — leadpulse lp-select-dropdown */
#dishBulkModal .select2-dropdown {
  z-index: 10050;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  animation: selectSlideIn 0.15s ease-out;
}

html:is(.dark, [data-theme="dark"]) #dishBulkModal .select2-dropdown {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

#dishBulkModal .select2-results > .select2-results__options {
  padding: 0.25rem;
  max-height: 280px;
}

#dishBulkModal .select2-results__option {
  padding: 0.4375rem 0.625rem;
  margin: 0.125rem 0;
  font-size: 0.75rem;
  line-height: 1.25;
  border-radius: 6px;
  color: var(--text);
}

#dishBulkModal .select2-container--default .select2-results__option--highlighted {
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent) !important;
  color: var(--brand-primary) !important;
  font-weight: 600;
}

#dishBulkModal .select2-container--default .select2-results__option[aria-selected="true"] {
  background: color-mix(in srgb, var(--brand-primary) 10%, transparent);
  color: var(--brand-primary);
  font-weight: 600;
}

#dishBulkModal .select2-search--dropdown {
  padding: 0.375rem 0.375rem 0;
}

#dishBulkModal .select2-search--dropdown .select2-search__field {
  padding: 0.4375rem 0.625rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

#dishBulkModal .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.admin-dishes-bulk-empty {
  margin: 0;
}

/* Legacy icon-only (admin dishes now use .admin-dishes-action-btn + label) */
.admin-dishes-icon-btn {
  min-width: 2.25rem !important;
  min-height: 2.25rem !important;
  padding: 0.35rem !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: var(--btn-radius) !important;
}

.admin-dishes-icon-btn .admin-dishes-icon {
  display: block;
  flex-shrink: 0;
}

.admin-dishes-icon-btn--danger {
  padding: 0.35rem 0.45rem !important;
}

.admin-dishes-col-week {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-dishes-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.15rem 0.55rem 0.85rem;
  min-height: 42px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 122, 255, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

html:is(.dark, [data-theme="dark"]) .admin-dishes-add-btn {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 28px rgba(10, 132, 255, 0.35);
}

@media (hover: hover) {
  .admin-dishes-add-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
      0 4px 14px rgba(0, 122, 255, 0.32),
      0 12px 32px rgba(0, 122, 255, 0.18);
    filter: brightness(1.03);
  }
  html:is(.dark, [data-theme="dark"]) .admin-dishes-add-btn:hover:not(:disabled) {
    box-shadow:
      0 4px 18px rgba(10, 132, 255, 0.45),
      0 14px 36px rgba(10, 132, 255, 0.2);
  }
}

.admin-dishes-add-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.admin-dishes-add-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* + glyph sits low in most system fonts; nudge for optical center in the badge */
.admin-dishes-add-btn__plus {
  display: block;
  transform: translateY(-0.07em);
  line-height: 0;
}

.admin-dishes-table-card {
  margin-top: 0.35rem;
  padding: 1.25rem 1.35rem !important;
}
@media (min-width: 640px) {
  .admin-dishes-table-card {
    padding: 1.5rem 1.5rem !important;
  }
}

.admin-dishes-table-head {
  margin-bottom: 1rem;
}

.admin-dishes-table-head__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}

.admin-dishes-table-head__hint {
  margin: 0;
  font-size: 0.8125rem;
}

.admin-dishes-back {
  margin-top: 1rem;
}

.admin-dishes-table-card .admin-dishes-table {
  margin: 0;
}

.admin-dishes-dt-wrap {
  margin-top: 0.5rem;
}

.admin-dishes-dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-dishes-dt-toolbar .dataTables_length {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.admin-dishes-dt-toolbar .dataTables_length select {
  margin: 0 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 0.5px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-dishes-dt-toolbar .dataTables_length select:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 35%, var(--border));
}
.admin-dishes-dt-toolbar .dataTables_length select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
}

.admin-dishes-dt-toolbar .dataTables_filter {
  flex: 1 1 12rem;
  max-width: min(28rem, 100%);
}
@media (min-width: 900px) {
  .admin-dishes-dt-toolbar .dataTables_filter {
    max-width: 32rem;
  }
}

.admin-dishes-dt-toolbar .dataTables_filter label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-dishes-dt-toolbar .dataTables_filter label input {
  margin: 0;
  width: 100%;
}

.admin-dishes-dt-search {
  min-width: 0;
  border-radius: 999px !important;
  padding: 0.55rem 1.1rem !important;
  border: 0.5px solid var(--border-strong) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

html:is(.dark, [data-theme="dark"]) .admin-dishes-dt-search {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.admin-dishes-dt-search:focus {
  box-shadow: var(--focus-ring), 0 2px 8px rgba(0, 122, 255, 0.08);
}

.admin-dishes-dt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* LeadPulse-style pager: flex gap-1.5, lp-btn--pager colors (LeadPulse globals.css) */
.admin-dishes-dt-foot .dataTables_paginate {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  color: var(--text);
}

.admin-dishes-dt-foot .dataTables_paginate .paginate_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 !important;
  float: none !important;
  min-width: 2rem;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text) !important;
  box-shadow: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html:is(.dark, [data-theme="dark"]) .admin-dishes-dt-foot .dataTables_paginate .paginate_button {
  border-color: var(--border-strong);
  background: var(--bg-input);
  color: var(--fg) !important;
}

@media (hover: hover) {
  .admin-dishes-dt-foot .dataTables_paginate .paginate_button:not(.disabled):hover {
    transform: none;
    border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--border));
    color: var(--brand-primary) !important;
    background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-input));
    box-shadow: none;
  }
  html:is(.dark, [data-theme="dark"]) .admin-dishes-dt-foot .dataTables_paginate .paginate_button:not(.disabled):hover {
    background: color-mix(in srgb, var(--brand-primary) 14%, var(--bg-input));
    color: var(--brand-primary) !important;
  }
}

.admin-dishes-dt-foot .dataTables_paginate .paginate_button.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  color: var(--text-muted) !important;
}

.admin-dishes-datatable-page-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  user-select: none;
  color: var(--text-muted);
}

.admin-dishes-datatable-page-indicator__n {
  color: var(--brand-primary);
  font-weight: 600;
}

.admin-dishes-datatable-page-indicator__sep {
  color: var(--text-dim);
  margin: 0 0.05em;
  font-weight: 500;
}

/* DataTables theme bridge — do not set color on .dataTables_paginate (it muted pager buttons) */
.admin-dishes-page .dataTables_wrapper .dataTables_length,
.admin-dishes-page .dataTables_wrapper .dataTables_filter,
.admin-dishes-page .dataTables_wrapper .dataTables_info,
.admin-dishes-page .dataTables_wrapper .dataTables_processing {
  color: var(--text-muted);
}

/* DataTable body: match LeadPulse list rows — transition, cursor, flat border, bg-hover */
.admin-dishes-page table.dataTable {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

.admin-dishes-page table.dataTable thead th,
.admin-dishes-page table.dataTable thead td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent !important;
}

.admin-dishes-page table.dataTable tbody tr {
  border-bottom: 1px solid var(--border);
  background: transparent !important;
  transition: background 0.15s ease;
  cursor: pointer;
}

.admin-dishes-page table.dataTable.stripe tbody tr.odd,
.admin-dishes-page table.dataTable.stripe tbody tr.even,
.admin-dishes-page table.dataTable.display tbody tr.odd,
.admin-dishes-page table.dataTable.display tbody tr.even {
  background: transparent !important;
}

.admin-dishes-page table.dataTable tbody tr:hover,
.admin-dishes-page table.dataTable tbody tr:hover td {
  background: var(--bg-hover) !important;
}

.admin-dishes-page table.dataTable tbody th,
.admin-dishes-page table.dataTable tbody td {
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  border: none;
  border-bottom: none;
  vertical-align: middle;
  background: transparent !important;
  box-shadow: none !important;
}

.admin-dishes-page table.dataTable thead th.admin-dishes-col-actions {
  text-align: right !important;
}

.admin-dishes-page table.dataTable tbody td.admin-dishes-actions-cell {
  text-align: right !important;
  vertical-align: middle !important;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.admin-dishes-page table.dataTable.no-footer {
  border-bottom: none;
}

.admin-dishes-page .dataTables_wrapper.no-footer .dataTables_scrollBody {
  border-bottom: none;
}

.admin-dishes-page .admin-dishes-col-name {
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.35;
}

.admin-dishes-page .admin-dishes-col-added {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Modal */
.admin-dishes-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-dishes-modal-backdrop[hidden] {
  display: none !important;
}

.admin-dishes-modal-panel {
  width: 100%;
  max-width: 26rem;
  padding: 1.35rem 1.35rem 1.5rem;
  position: relative;
}

.admin-dishes-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-dishes-modal-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  margin: 0 0 0.35rem 0;
}

.admin-dishes-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
  color: var(--text);
}

.admin-dishes-modal-desc {
  margin: 0;
  font-size: 0.8125rem;
}

.admin-dishes-modal-close {
  flex-shrink: 0;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  border: 0.5px solid var(--border);
  background: color-mix(in srgb, var(--bg-input) 92%, transparent);
  color: var(--text-muted);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (hover: hover) {
  .admin-dishes-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text);
    transform: scale(1.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
}

.admin-dishes-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.admin-dishes-modal-actions .lp-btn.btn-cancel {
  min-height: 42px;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  border: 0.5px solid var(--border-strong);
  background: var(--bg-input);
  transition: transform 0.15s ease, background 0.15s ease;
}

@media (hover: hover) {
  .admin-dishes-modal-actions .lp-btn.btn-cancel:hover {
    transform: translateY(-1px);
    background: var(--bg-hover);
  }
}

.admin-dishes-modal-actions .btn-brand {
  min-height: 42px;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 8px 22px rgba(0, 122, 255, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

html:is(.dark, [data-theme="dark"]) .admin-dishes-modal-actions .btn-brand {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 26px rgba(10, 132, 255, 0.32);
}

@media (hover: hover) {
  .admin-dishes-modal-actions .btn-brand:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
      0 4px 14px rgba(0, 122, 255, 0.32),
      0 12px 28px rgba(0, 122, 255, 0.15);
  }
}
