/**
 * YLAÜXI shell — mobile nav, notifications, dashboard guides, tables, drawers.
 * Palette: neutrals + white/black + champagne accent only.
 */

/* RTL (Arabic / Hebrew) — activated via html.ylux-rtl */
html.ylux-rtl,
html.ylux-rtl .content,
html.ylux-rtl .sidebar {
  direction: rtl;
}
html.ylux-rtl .sidebar {
  border-left: none;
  border-right: 0.5px solid var(--ylux-border);
}
html.ylux-rtl .tbl th,
html.ylux-rtl .tbl td {
  text-align: right;
}

/* ── Page subtitle (Tier 1/2) ── */
.ph-sub {
  font-family: var(--ylux-font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ylux-text-m);
  margin: -10px 0 18px;
  font-weight: 400;
}

.ylux-tier-signature-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 24px 12px;
  padding: 12px 16px;
  border: 0.5px solid rgba(196, 181, 168, 0.35);
  background: rgba(196, 181, 168, 0.06);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ylux-text-m);
  letter-spacing: 0.02em;
}
.ylux-tier-signature-notice[hidden] { display: none !important; }
.ylux-tier-signature-notice-text strong {
  color: var(--ylux-text);
  font-weight: 500;
}
.ylux-tier-signature-notice-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ylux-accent-d);
  text-decoration: none;
  white-space: nowrap;
}
.ylux-tier-signature-notice-link:hover { text-decoration: underline; }

/* ── Breadcrumb bar (fixed height — no layout shift) ── */
#lau-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 0.5px solid var(--ylux-border);
  background: var(--ylux-bg2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ylux-text-m);
  flex-shrink: 0;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  overflow: hidden;
  position: sticky;
  top: 52px;
  z-index: 18;
}
#lau-breadcrumb .bc-home {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ylux-text-m);
  cursor: pointer;
  transition: color 0.15s var(--ylux-ease);
}
#lau-breadcrumb .bc-home:hover { color: var(--ylux-accent); }
#bc-trail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}
.bc-item {
  cursor: pointer;
  transition: color 0.15s var(--ylux-ease);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
.bc-item:hover { color: var(--ylux-accent); }
.bc-sep { opacity: 0.35; flex-shrink: 0; }
.bc-cur {
  color: var(--ylux-text);
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── FAB offset above mobile nav ── */
@media (max-width: 768px) {
  #fab, #toast, #ylux-toast {
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }
}

/* ── Dark mode overlays ── */
html.ylux-dark .ylux-cmd.srch-ov,
html[data-theme="dark"] .ylux-cmd.srch-ov {
  background: rgba(18, 17, 16, 0.88) !important;
}
html.ylux-dark #mob-overlay,
html[data-theme="dark"] #mob-overlay {
  background: rgba(10, 9, 8, 0.72) !important;
}

/* ── Mobile bottom nav (Tier 2) — floating pill ── */
#ylux-mob-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 90;
  width: max-content;
  max-width: calc(100% - 16px);
  background: #FFFFFF;
  border: 0.5px solid var(--ylux-border);
  border-radius: 999px;
  padding: 8px 10px;
  justify-content: center;
  gap: 2px;
}
html[data-theme="dark"] #ylux-mob-nav,
html.ylux-dark #ylux-mob-nav {
  background: #121110;
}
.mob-nav-btn {
  flex: 0 1 auto;
  min-width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border: none;
  border-radius: 999px;
  background: none;
  font-family: var(--ylux-font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ylux-text-m);
  cursor: pointer;
}
.mob-nav-btn .ylux-ic { opacity: 0.55; }
.mob-nav-btn span { display: none; }
.mob-nav-btn.active { color: var(--ylux-text); background: var(--ylux-bg-subtle); }
.mob-nav-btn.active .ylux-ic { opacity: 1; }

@media (max-width: 768px) {
  #ylux-mob-nav { display: flex; }
  .main { padding-bottom: 92px; }
  #ylux-notif-drawer { max-width: 100%; }
  #lau-breadcrumb { font-size: 11px; padding: 0 12px; }
}

/* ── Mobile More drawer ── */
#ylux-more-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.4);
  z-index: 95;
}
#ylux-more-backdrop.open { display: block; }
/* Floating chrome (More drawer, product tour, notification drawer, generic
   drawer) re-pins the whole light token set, not just its own background —
   it sits above the page rather than inside it, so it and everything in
   it (buttons, icons) must stay legible and on-brand even when the page
   itself is in dark mode, where these tokens would otherwise flip dark. */
#ylux-more-drawer {
  --ylux-bg: #FAFAF8; --ylux-bg2: #FFFFFF; --ylux-bg-subtle: #F4F2EE;
  --ylux-text: #0A0A0A; --ylux-text-s: #5C5854; --ylux-text-m: #6E5F52;
  --ylux-border: rgba(10, 10, 10, 0.08); --ylux-border-s: rgba(10, 10, 10, 0.14);
  --ylux-faint: rgba(196, 181, 168, 0.06);
  --ylux-accent-f: rgba(196, 181, 168, 0.1); --ylux-accent-fb: rgba(196, 181, 168, 0.18);
  --bg: var(--ylux-bg); --bg2: var(--ylux-bg2); --text: var(--ylux-text);
  --text-s: var(--ylux-text-s); --text-m: var(--ylux-text-m);
  --border: var(--ylux-border); --border-s: var(--ylux-border-s);
  --faint: var(--ylux-faint); --cap-f: var(--ylux-accent-f); --cap-fb: var(--ylux-accent-fb);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  background: #FFFFFF;
  color: #0A0A0A;
  border-top: 0.5px solid rgba(10, 10, 10, 0.08);
  padding: 16px 16px calc(72px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.22s ease;
  max-height: 70vh;
  overflow-y: auto;
}
#ylux-more-drawer.open { transform: translateY(0); }
.ylux-more-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0A0A0A;
}
.ylux-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ylux-more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 0.5px solid rgba(10, 10, 10, 0.08);
  background: #FAFAF8;
  font-family: var(--ylux-font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6E5F52;
  cursor: pointer;
}

/* ── Product tour ── */
#ylux-tour-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(10, 9, 8, 0.55);
  align-items: flex-end;
  justify-content: center;
  padding: 24px 16px calc(80px + env(safe-area-inset-bottom));
}
.ylux-tour-card {
  --ylux-bg: #FAFAF8; --ylux-bg2: #FFFFFF; --ylux-bg-subtle: #F4F2EE;
  --ylux-text: #0A0A0A; --ylux-text-s: #5C5854; --ylux-text-m: #6E5F52;
  --ylux-border: rgba(10, 10, 10, 0.08); --ylux-border-s: rgba(10, 10, 10, 0.14);
  --ylux-faint: rgba(196, 181, 168, 0.06);
  --ylux-accent-f: rgba(196, 181, 168, 0.1); --ylux-accent-fb: rgba(196, 181, 168, 0.18);
  --bg: var(--ylux-bg); --bg2: var(--ylux-bg2); --text: var(--ylux-text);
  --text-s: var(--ylux-text-s); --text-m: var(--ylux-text-m);
  --border: var(--ylux-border); --border-s: var(--ylux-border-s);
  --faint: var(--ylux-faint); --cap-f: var(--ylux-accent-f); --cap-fb: var(--ylux-accent-fb);
  background: #FFFFFF;
  color: #0A0A0A;
  border: 0.5px solid rgba(10, 10, 10, 0.08);
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 420px;
  width: 100%;
}
.ylux-tour-step {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A89880;
  margin-bottom: 8px;
}
.ylux-tour-title {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: #0A0A0A;
}
.ylux-tour-body {
  font-size: 0.78rem;
  color: #6E5F52;
  line-height: 1.65;
  margin-bottom: 18px;
}
.ylux-tour-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Notification drawer (Tier 2) ── */
#ylux-notif-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.35);
  z-index: 200;
  backdrop-filter: blur(2px);
}
#ylux-notif-backdrop.open { display: block; }
#ylux-notif-drawer {
  --ylux-bg: #FAFAF8; --ylux-bg2: #FFFFFF; --ylux-bg-subtle: #F4F2EE;
  --ylux-text: #0A0A0A; --ylux-text-s: #5C5854; --ylux-text-m: #6E5F52;
  --ylux-border: rgba(10, 10, 10, 0.08); --ylux-border-s: rgba(10, 10, 10, 0.14);
  --ylux-faint: rgba(196, 181, 168, 0.06);
  --ylux-accent-f: rgba(196, 181, 168, 0.1); --ylux-accent-fb: rgba(196, 181, 168, 0.18);
  --bg: var(--ylux-bg); --bg2: var(--ylux-bg2); --text: var(--ylux-text);
  --text-s: var(--ylux-text-s); --text-m: var(--ylux-text-m);
  --border: var(--ylux-border); --border-s: var(--ylux-border-s);
  --faint: var(--ylux-faint); --cap-f: var(--ylux-accent-f); --cap-fb: var(--ylux-accent-fb);
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  z-index: 201;
  background: #FFFFFF;
  color: #0A0A0A;
  border-left: 0.5px solid rgba(10, 10, 10, 0.08);
  transform: translateX(100%);
  transition: transform 0.32s var(--ylux-ease);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(10, 10, 10, 0.06);
}
#ylux-notif-drawer.open { transform: translateX(0); }
.ylux-nd-hd {
  padding: 18px 20px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0A0A0A;
}
.ylux-nd-hd h3 {
  font-family: var(--ylux-font-editorial);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ylux-nd-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.ylux-nd-item {
  padding: 12px 20px;
  border-bottom: 0.5px solid rgba(10, 10, 10, 0.08);
  cursor: pointer;
  transition: background 0.15s;
}
.ylux-nd-item:hover { background: rgba(196, 181, 168, 0.06); }
.ylux-nd-item.unread { border-left: 2px solid #C4B5A8; }
.ylux-nd-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #0A0A0A;
  margin-bottom: 4px;
}
.ylux-nd-body {
  font-size: 0.72rem;
  color: #5C5854;
  line-height: 1.5;
}
.ylux-nd-time {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6E5F52;
  margin-top: 6px;
}

/* ── Dashboard guides (Tier 4) ── */
/* #ylux-first-run is no longer a boxed panel — it's the "Next Steps" card
   grid (see .dash-next-* in lau-os-shell.css), styled to match YLAUXI's
   version exactly. Only the Industry Spotlight companion panel still
   wants the bordered box treatment. */
#ylux-industry-spotlight {
  margin-bottom: 0;
  border: 0.5px solid var(--ylux-border);
  background: var(--ylux-bg2);
  padding: 18px 20px;
}

/* ── Panel empty states (visible chrome, no data required) ── */
.ylux-panel-empty {
  min-height: 88px;
  padding: 24px 20px;
  border: 0.5px dashed var(--ylux-border);
  background: var(--ylux-bg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
}
.ylux-panel-empty-title {
  font-family: var(--ylux-font-editorial);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ylux-text-s);
}
.ylux-panel-empty-desc {
  font-size: 0.72rem;
  color: var(--ylux-text-m);
  line-height: 1.55;
  max-width: 420px;
}
.ylux-empty {
  min-height: 72px;
  padding: 20px 18px;
  border: 0.5px dashed var(--ylux-border);
  background: var(--ylux-bg);
  font-size: 0.72rem;
  color: var(--ylux-text-m);
  line-height: 1.5;
  text-align: left;
  border-radius: 14px;
}
.ylux-empty-icon {
  margin-bottom: 8px;
  opacity: 0.45;
}
.ylux-spot-lbl {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ylux-accent-d);
  margin-bottom: 8px;
}
.ylux-spot-title {
  font-family: var(--ylux-font-editorial);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.ylux-spot-desc {
  font-size: 0.75rem;
  color: var(--ylux-text-s);
  line-height: 1.6;
  margin-bottom: 14px;
}
.ylux-spot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ylux-spot-link {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 0.5px solid var(--ylux-border-s);
  background: var(--ylux-bg);
  color: var(--ylux-text-s);
  cursor: pointer;
  font-family: var(--ylux-font-display);
  transition: all 0.15s var(--ylux-ease);
  border-radius: 999px;
}
.ylux-spot-link:hover {
  border-color: var(--ylux-accent);
  color: var(--ylux-text);
}
.ylux-fr-steps { display: grid; gap: 8px; }
.ylux-fr-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--ylux-border);
  cursor: pointer;
  transition: border-color 0.15s;
}
.ylux-fr-step:hover { border-color: var(--ylux-accent); }
.ylux-fr-step.done { opacity: 0.55; }
.ylux-fr-check {
  width: 18px;
  height: 18px;
  border: 0.5px solid var(--ylux-border-s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.ylux-fr-step.done .ylux-fr-check {
  background: var(--ylux-text);
  color: var(--ylux-bg2);
  border-color: var(--ylux-text);
}

/* ── Agent tier meter (Tier 3) ── */
#ag-tier-meter {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 0.5px solid var(--ylux-border);
  background: var(--ylux-bg2);
  display: none;
  border-radius: 14px;
}
#ag-tier-meter.visible { display: block; }
.ag-tier-track {
  height: 2px;
  background: var(--ylux-border);
  margin-top: 8px;
  border-radius: 1px;
  overflow: hidden;
}
.ag-tier-fill {
  height: 100%;
  background: var(--ylux-accent);
  transition: width 0.4s var(--ylux-ease);
}

/* ── Luxury tables (Tier 3) ── */
.tbl { border-collapse: collapse; width: 100%; }
.tbl thead th {
  position: sticky;
  top: 0;
  background: var(--ylux-bg2);
  z-index: 2;
}
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover td { background: var(--ylux-faint); }

/* ── Empty states (Tier 1) ── */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 0.5px solid var(--ylux-border);
  background: var(--ylux-bg2);
  border-radius: 14px;
}
.empty-state .es-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state .es-title {
  font-family: var(--ylux-font-editorial);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.empty-state .es-desc {
  font-size: 0.75rem;
  color: var(--ylux-text-m);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto 16px;
}

/* ── Unified drawer / modal shell (Tier 3) ── */
.ylux-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  z-index: 400;
}
.ylux-drawer-backdrop.open { display: block; }
.ylux-drawer {
  --ylux-bg: #FAFAF8; --ylux-bg2: #FFFFFF; --ylux-bg-subtle: #F4F2EE;
  --ylux-text: #0A0A0A; --ylux-text-s: #5C5854; --ylux-text-m: #6E5F52;
  --ylux-border: rgba(10, 10, 10, 0.08); --ylux-border-s: rgba(10, 10, 10, 0.14);
  --ylux-faint: rgba(196, 181, 168, 0.06);
  --ylux-accent-f: rgba(196, 181, 168, 0.1); --ylux-accent-fb: rgba(196, 181, 168, 0.18);
  --bg: var(--ylux-bg); --bg2: var(--ylux-bg2); --text: var(--ylux-text);
  --text-s: var(--ylux-text-s); --text-m: var(--ylux-text-m);
  --border: var(--ylux-border); --border-s: var(--ylux-border-s);
  --faint: var(--ylux-faint); --cap-f: var(--ylux-accent-f); --cap-fb: var(--ylux-accent-fb);
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 96vw);
  height: 100vh;
  background: #FFFFFF;
  color: #0A0A0A;
  border-left: 0.5px solid rgba(10, 10, 10, 0.08);
  z-index: 401;
  transform: translateX(100%);
  transition: transform 0.32s var(--ylux-ease);
  overflow-y: auto;
  padding: 24px;
}
.ylux-drawer.open { transform: translateX(0); }

/* ── Brand CMS polish (Tier 3) ── */
#v-brand-detail.ylux-brand-cms .tabs,
#v-brand-detail.ylux-brand-cms .sub-tabs {
  border-bottom: 0.5px solid var(--ylux-border);
}
#v-brand-detail.ylux-brand-cms .cms-form {
  border-radius: var(--ylux-radius);
  border-color: var(--ylux-border);
}
#v-brand-detail.ylux-brand-cms .fi,
#v-brand-detail.ylux-brand-cms .cms-input {
  border-radius: var(--ylux-radius);
}
/* A filter select inside Brand Detail is still a filter, not a form
   field — this scope's blanket .fi override above would otherwise win
   on specificity and undo the pill treatment applied via .fi-pill. */
#v-brand-detail.ylux-brand-cms .fi-pill {
  border-radius: 999px;
}

/* ── Density modes (Tier 5) ── */
html[data-density="compact"] .content { padding: 20px 20px 48px; }
html[data-density="compact"] .mc,
html[data-density="compact"] .card { padding: 12px 14px !important; }
html[data-density="comfortable"] .content { padding: 36px 36px 64px; }

/* ── Neutral-only overrides — kill stray reds/greens/blues (Tier 5) ── */
#toast.t-ok,
#toast.t-err,
#toast.t-info { border-left-color: var(--ylux-accent) !important; }
.b-warn,
.b-crit,
.b-ok,
.badge.b-ok,
.badge.b-warn,
.badge.b-crit,
.sev-badge,
.lg-badge,
.rm-status-badge,
.vnd-status-active,
.int-status.on,
.ed-type-social,
.ed-type-email,
.ed-type-event,
#v-security .sc-stat.crit .sc-stat-n,
#v-security .sc-stat.warn .sc-stat-n,
#v-security .sc-stat.ok .sc-stat-n,
#v-security .sev-badge.critical,
#v-security .sev-badge.high,
#v-legal .lg-badge.active,
#v-legal .lg-badge.filed,
#v-legal .lg-badge.registered,
#v-legal .lg-badge.needed,
#v-legal .lg-badge.pending,
#v-legal .todo-chip,
#v-legal .due-soon,
#v-vpn .vpn-badge.active,
.pulse-dot,
.serp-title,
.serp-url,
.serp-desc {
  color: var(--ylux-text-s) !important;
  border-color: var(--ylux-border-s) !important;
  background: var(--ylux-faint) !important;
}
.int-status.on,
.lg-badge.active,
.lg-badge.filed,
.vpn-badge.active {
  color: var(--ylux-text) !important;
  border-color: var(--ylux-accent) !important;
  background: var(--ylux-accent-f) !important;
}
.lau-topbar .tb-live {
  background: var(--ylux-accent) !important;
  box-shadow: 0 0 0 2px var(--ylux-accent-f) !important;
}
.pulse-dot { background: var(--ylux-accent) !important; }
.serp-preview { background: var(--ylux-bg2) !important; }
.serp-title { color: var(--ylux-text) !important; }
.serp-url { color: var(--ylux-text-m) !important; }
.serp-desc { color: var(--ylux-text-s) !important; }

/* Inline / legacy hex — enforce brand palette only */
input[type=checkbox],
input[type=radio],
input[type=range] { accent-color: var(--ylux-accent) !important; }
button.btn-out[style*="color:var(--crit)"],
button[style*="color:var(--crit)"] {
  color: var(--ylux-text) !important;
  border-color: var(--ylux-border-s) !important;
}
#ss-serp-title { color: var(--ylux-text) !important; }
#ss-serp-url { color: var(--ylux-text-m) !important; }
#ss-serp-desc { color: var(--ylux-text-s) !important; }
.ed-type-social,
.ed-type-email,
.ed-type-event {
  background: var(--ylux-accent-f) !important;
  border-color: var(--ylux-accent) !important;
  color: var(--ylux-text-s) !important;
}
.vnd-status-active { color: var(--ylux-accent-d) !important; }
.int-status.on { background: var(--ylux-accent) !important; }
#v-legal .lg-stat-n { color: var(--ylux-text) !important; }
#lg-onetime, #lg-tm-needed { color: var(--ylux-accent-d) !important; }
#lg-tm-filed { color: var(--ylux-text) !important; }
tr[style*="background:var(--faint)"] { background: var(--ylux-faint) !important; }
.badge.b-crit { color: var(--ylux-text) !important; background: var(--ylux-faint) !important; border-color: var(--ylux-border-s) !important; }
.badge.b-ok { color: var(--ylux-accent-d) !important; background: var(--ylux-accent-f) !important; border-color: rgba(196,181,168,.25) !important; }

/* ── Dark mode — full ylux token map (Tier 1) ── */
html.ylux-dark {
  --ylux-bg: #0a0908;
  --ylux-bg2: #121110;
  --ylux-bg-subtle: #1a1918;
  --ylux-text: #f5f2ec;
  --ylux-text-s: #aaa099;
  --ylux-text-m: #6a6560;
  --ylux-border: rgba(245, 242, 236, 0.08);
  --ylux-border-s: rgba(245, 242, 236, 0.14);
  --ylux-faint: rgba(245, 242, 236, 0.04);
  --ylux-accent-f: rgba(196, 181, 168, 0.12);
  --ylux-accent-fb: rgba(196, 181, 168, 0.22);
  --ylux-shadow: 0 24px 48px rgba(10, 9, 8, 0.35);
  --bg: var(--ylux-bg);
  --bg2: var(--ylux-bg2);
  --text: var(--ylux-text);
  --text-s: var(--ylux-text-s);
  --text-m: var(--ylux-text-m);
  --border: var(--ylux-border);
  --border-s: var(--ylux-border-s);
  --faint: var(--ylux-faint);
  --cap-f: var(--ylux-accent-f);
  --cap-fb: var(--ylux-accent-fb);
}
html.ylux-dark .topbar {
  background: rgba(18, 17, 16, 0.88);
}

/* RTL, component level (from the Lau OS-only ylux-rtl.css, now shared). Active when
   ylux-shell.js sets <html dir="rtl">. */
/**
 * ylux-rtl.css
 * ============
 * Right-to-left layout overrides for the YLAUXI / LAU OS platform.
 *
 * All rules are scoped to [dir="rtl"], which is injected on <html> by the
 * Jinja2 context variable `html_dir` (set by ylauxi_platform/i18n.py →
 * init_i18n → _i18n_context). They activate automatically for Arabic (ar)
 * and any future RTL locale (he, fa, ur) without touching LTR markup.
 *
 * Load order: after ylux.css and ylux-shell.css so specificity wins cleanly.
 * chmod +x is not required for CSS — this comment is for parity with the
 * extract-i18n.sh header style.
 */

/* ── Root direction ── */
[dir="rtl"] {
  direction: rtl;
  unicode-bidi: embed;
}

/* ── Sidebar ── */
[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 0.5px solid var(--ylux-border);
  /* float-based sidebars: flip from left to right */
  float: right;
}

[dir="rtl"] .sidebar .sb-wordmark,
[dir="rtl"] .sidebar .sb-sub,
[dir="rtl"] .sidebar .sb-lbl {
  text-align: right;
}

/* ── Nav items (.ni) and nav dots/icons (.nd) ── */
[dir="rtl"] .ni {
  direction: rtl;
  text-align: right;
  /* Icons sit to the right of label text in RTL */
  flex-direction: row-reverse;
}

[dir="rtl"] .nd {
  direction: rtl;
  text-align: right;
  /* Swap left margin to right margin */
  margin-left: 0;
  margin-right: auto;
}

/* Active indicator: swap inset-left accent bar to inset-right */
[dir="rtl"] .ni.act {
  box-shadow: inset -2px 0 0 var(--ylux-accent);
}

/* ── Topbar ── */
[dir="rtl"] .topbar {
  direction: rtl;
}

[dir="rtl"] .tb-search {
  text-align: right;
  padding-left: 12px;
  padding-right: 28px; /* room for search icon on the right */
}

/* Search icon repositioning (if absolutely placed) */
[dir="rtl"] .tb-search-icon,
[dir="rtl"] .tb-search + svg,
[dir="rtl"] .tb-search + .ylux-ic {
  left: auto;
  right: 8px;
}

/* ── Breadcrumb ── */
[dir="rtl"] #lau-breadcrumb {
  direction: rtl;
  flex-direction: row-reverse;
}

[dir="rtl"] #bc-trail {
  flex-direction: row-reverse;
}

/* ── Flex rows that need reversing ── */
[dir="rtl"] .flex-row,
[dir="rtl"] .row,
[dir="rtl"] .kpi-row,
[dir="rtl"] .tb-row,
[dir="rtl"] .form-row,
[dir="rtl"] .card-row {
  flex-direction: row-reverse;
}

/* ── Tables ── */
[dir="rtl"] .tbl th,
[dir="rtl"] .tbl td {
  text-align: right;
}

[dir="rtl"] .tbl th:first-child,
[dir="rtl"] .tbl td:first-child {
  padding-right: 0;
  padding-left: 16px;
}

[dir="rtl"] .tbl th:last-child,
[dir="rtl"] .tbl td:last-child {
  padding-left: 0;
  padding-right: 16px;
}

/* ── Form inputs & placeholders ── */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder {
  text-align: right;
}

/* Input icons / prefix adornments */
[dir="rtl"] .input-icon-left,
[dir="rtl"] .form-icon {
  left: auto;
  right: 12px;
}

[dir="rtl"] .input-icon-left ~ input,
[dir="rtl"] .form-icon ~ input {
  padding-left: 12px;
  padding-right: 36px;
}

/* ── Absolute-positioned UI elements ── */
[dir="rtl"] .dropdown,
[dir="rtl"] .popover,
[dir="rtl"] .tooltip {
  left: auto;
  right: 0;
  text-align: right;
}

/* ── Margin / padding flips for common utility classes ── */
[dir="rtl"] .ml-auto  { margin-left: 0;    margin-right: auto; }
[dir="rtl"] .mr-auto  { margin-right: 0;   margin-left: auto; }
[dir="rtl"] .pl-0     { padding-left: 0;   padding-right: 0; }
[dir="rtl"] .pr-0     { padding-right: 0;  padding-left: 0; }
[dir="rtl"] .text-left  { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

/* ── Notification / alert banners ── */
[dir="rtl"] .alert,
[dir="rtl"] .toast,
[dir="rtl"] .banner {
  direction: rtl;
  text-align: right;
  border-left: none;
  border-right: 3px solid var(--ylux-accent);
}

/* ── KPI / metric cards ── */
[dir="rtl"] .kpi,
[dir="rtl"] .mc,
[dir="rtl"] .brc {
  text-align: right;
}

[dir="rtl"] .kpi-label,
[dir="rtl"] .kpi-lbl,
[dir="rtl"] .ml {
  text-align: right;
}

/* ── Section headings ── */
[dir="rtl"] .sec-h,
[dir="rtl"] .ph,
[dir="rtl"] .page-title {
  text-align: right;
}

/* ── Content area ── */
[dir="rtl"] .content {
  direction: rtl;
}
