/* Akwaaba Care — Dark Mode (Default) & Meta for Developers Light Mode (modern-web-guidance compliant) */
:root {
  color-scheme: dark light;
  --bg: #0B1220;
  --canvas-grad: #0B1220;
  --surface: #131C2B;
  --surface-alt: #1B2738;
  --surface-input: #0D1626;
  --header-bg: rgba(11, 18, 32, 0.95);
  --table-head: #162235;
  --border: #26354B;
  --border-strong: #334663;
  --text: #EDF2F7;
  --muted: #9EB3C7;
  --brand: #4F94FF;
  --brand-strong: #3B82F6;
  --brand-soft: rgba(79, 148, 255, 0.2);
  --brand-ink: #FFFFFF;
  --emerald: #10B981;
  --gold: #F59E0B;
  --danger: #EF4444;
  --sky: #60A5FA;
  --text-success: #6EE7B7;
  --text-warn: #FDE68A;
  --text-danger: #FCA5A5;
  --text-info: #93C5FD;
  --pill-ok-bg: rgba(16, 185, 129, 0.18);
  --pill-ok-bd: rgba(16, 185, 129, 0.55);
  --pill-warn-bg: rgba(245, 158, 11, 0.18);
  --pill-warn-bd: rgba(245, 158, 11, 0.55);
  --pill-danger-bg: rgba(239, 68, 68, 0.2);
  --pill-danger-bd: rgba(239, 68, 68, 0.6);
  --pill-info-bg: rgba(79, 148, 255, 0.2);
  --pill-info-bd: rgba(96, 165, 250, 0.6);
  --wa-bg: #0B141A;
  --wa-hdr: #1F2C34;
  --wa-hdr-border: #2A3942;
  --wa-in: #1F2C34;
  --wa-out: #005C4B;
  --wa-text: #EDF4FA;
  --wa-meta: #A9C1CF;
  --pre-bg: #0B141F;
  --pre-text: #D1FAE5;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-bar: 0 -8px 24px rgba(0, 0, 0, 0.45);
  --tooltip-bg: #0B1929;
  --tooltip-text: #F1F5F9;
  --sidebar-w: 244px;
  --radius: 14px;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]),
:root[data-theme="dark"] {
  color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]),
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F0F2F5;
  --canvas-grad: linear-gradient(135deg, #F5F2FB 0%, #F0F4FA 40%, #EEF6FF 72%, #F1F7F4 100%);
  --surface: #FFFFFF;
  --surface-alt: #F7F8FA;
  --surface-input: #FFFFFF;
  --header-bg: rgba(255, 255, 255, 0.96);
  --table-head: #F7F8FA;
  --border: #E4E6EB;
  --border-strong: #DADDE1;
  --text: #1C2B33;
  --muted: #5D6B75;
  --brand: #0866FF;
  --brand-strong: #075CE5;
  --brand-soft: #E7F3FF;
  --brand-ink: #FFFFFF;
  --emerald: #0F9D58;
  --gold: #B45309;
  --danger: #D93025;
  --sky: #0866FF;
  --text-success: #137333;
  --text-warn: #9A5B00;
  --text-danger: #C5221F;
  --text-info: #0866FF;
  --pill-ok-bg: #E6F4EA;
  --pill-ok-bd: #A8DAB5;
  --pill-warn-bg: #FEF7E0;
  --pill-warn-bd: #F6CF65;
  --pill-danger-bg: #FCE8E6;
  --pill-danger-bd: #F6AEA9;
  --pill-info-bg: #E7F3FF;
  --pill-info-bd: #B3D7FF;
  --wa-bg: #EFEAE2;
  --wa-hdr: #F0F2F5;
  --wa-hdr-border: #D9DDE3;
  --wa-in: #FFFFFF;
  --wa-out: #D9FDD3;
  --wa-text: #111B21;
  --wa-meta: #54656F;
  --pre-bg: #F7F8FA;
  --pre-text: #1C2B33;
  --shadow-card: 0 1px 3px rgba(28, 43, 51, 0.06), 0 4px 12px rgba(28, 43, 51, 0.04);
  --shadow-bar: 0 -4px 18px rgba(28, 43, 51, 0.08);
  --tooltip-bg: #1C2B33;
  --tooltip-text: #F8FAFC;
}

@supports (color: light-dark(white, black)) {
  :root {
    accent-color: light-dark(#0866FF, #4F94FF);
    scrollbar-color: light-dark(#C2C8D0, #334663) light-dark(#F0F2F5, #0B1220);
  }
}

html.akw-sidebar-collapsed {
  --sidebar-w: 64px;
}

html.akw-theme-switching *,
html.akw-theme-switching *::before,
html.akw-theme-switching *::after {
  transition: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: clip;
}

a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Sticky Responsive Site Navigation (modern-web-guidance: navbar) */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  view-transition-name: akw-header;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}

.header-inner {
  max-inline-size: 1400px;
  margin-inline: auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.badge-env {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--pill-warn-bg);
  border: 1px solid var(--pill-warn-bd);
  color: var(--text-warn);
}

.site-header .menu-button {
  anchor-name: --menu-button;
  min-block-size: 40px;
  min-inline-size: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.site-header .site-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  position: fixed;
  inset: auto;
  inset-block-start: 4.25rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(82dvw, 18rem);
  max-inline-size: calc(100dvw - 2rem);
  max-block-size: calc(100dvh - 5.5rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) { display: none; }
}
[popover]:is(:popover-open, .\:popover-open) { display: block; }

.site-header .site-menu a,
.site-header .site-menu button.nav-action {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  inline-size: 100%;
  padding: 0.45rem 0.78rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.site-header .site-menu a:hover,
.site-header .site-menu button.nav-action:hover {
  background: var(--surface-alt);
}

.site-header .site-menu a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  border-inline-start: 3px solid var(--brand);
}

.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  inline-size: auto;
  max-inline-size: none;
  max-block-size: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.site-header.is-wide .site-menu a,
.site-header.is-wide .site-menu button.nav-action {
  inline-size: auto;
  min-block-size: 38px;
}
.site-header.is-wide .site-menu a[aria-current="page"] {
  border-inline-start: 0;
  border-block-end: 2px solid var(--brand);
  border-radius: 8px;
}
.site-header.is-measuring * { transition: none !important; }

/* Main Containers & Cards */
.page-wrap {
  max-inline-size: 1360px;
  margin-inline: auto;
  padding: 1.25rem 1.25rem 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-block-end: 1rem;
  box-shadow: var(--shadow-card);
}

.card-accent {
  border-color: var(--pill-info-bd);
  background: var(--surface);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 0.75rem; }

.akw-addons-box {
  grid-column: 1 / -1;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}
.akw-addons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-block-start: 0.45rem;
}
.akw-addon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  min-inline-size: 0;
}
.akw-addon-meta {
  min-inline-size: 0;
  overflow: hidden;
}
.akw-addon-name {
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.akw-addon-sub {
  font-size: 0.7rem;
  color: var(--muted);
}
.akw-addon-step {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.akw-addon-btn {
  inline-size: 26px;
  block-size: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.akw-addon-qty {
  min-inline-size: 16px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
}
@media (max-width: 959px) {
  .akw-addons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }
  .akw-addon-card {
    padding: 0.3rem 0.4rem;
  }
}

.kpi {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.kpi-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.kpi-val { font-size: 1.45rem; font-weight: 800; margin-block-start: 0.2rem; color: var(--text); }
.kpi-sub { font-size: 0.8rem; color: var(--muted); margin-block-start: 0.15rem; }

/* Forms & Buttons */
label.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
input, select, textarea {
  min-block-size: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-input);
  color: var(--text);
  font-size: 0.92rem;
}

[hidden],
[data-hq-only][hidden] {
  display: none !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-block-size: 42px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--border); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-warn { background: var(--pill-warn-bg); border-color: var(--pill-warn-bd); color: var(--text-warn); }
.btn-danger { background: var(--pill-danger-bg); border-color: var(--pill-danger-bd); color: var(--text-danger); }
.btn-sm { min-block-size: 36px; padding: 0.35rem 0.75rem; font-size: 0.82rem; }

.pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}
.pill-ok { background: var(--pill-ok-bg); border-color: var(--pill-ok-bd); color: var(--text-success); }
.pill-warn { background: var(--pill-warn-bg); border-color: var(--pill-warn-bd); color: var(--text-warn); }
.pill-danger { background: var(--pill-danger-bg); border-color: var(--pill-danger-bd); color: var(--text-danger); }
.pill-info { background: var(--pill-info-bg); border-color: var(--pill-info-bd); color: var(--text-info); }
.pill-blue { background: var(--brand-soft); border-color: var(--pill-info-bd); color: var(--brand); }

/* Sticky Ops Sub-Navigation Bar */
.ops-jump-nav {
  position: sticky;
  inset-block-start: 62px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.5rem 0.65rem;
  margin-block-end: 1rem;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.ops-jump-nav a {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-block-size: 38px;
  padding: 0.35rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.ops-jump-nav a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.custody-step-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  margin-block-end: 0.85rem;
}

/* Responsive Data Tables (modern-web-guidance: responsive-table) */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 75dvh);
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--table-head);
}

.data-table th, .data-table td {
  text-align: start;
  padding: 0.65rem 0.75rem;
  border-block-end: 1px solid var(--border);
  vertical-align: top;
}
.data-table thead th {
  color: var(--text);
  font-weight: 700;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface);
  z-index: 1;
}

@container (width < 600px) {
  .data-table, .data-table thead, .data-table tbody, .data-table tr, .data-table th, .data-table td {
    display: block;
  }
  .data-table thead { display: none; }
  .data-table tr {
    margin: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-alt);
    overflow: hidden;
  }
  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    background: var(--table-head);
    z-index: 2;
  }
  .data-table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted);
  }
}

/* Native Modal Dialog (modern-web-guidance: dialog, light-dismiss-a-dialog, prevent-page-scroll-under-modal-dialog) */
dialog.akw-dialog {
  inline-size: min(94dvw, 760px);
  max-block-size: 88dvh;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  overflow: auto;
  box-shadow: var(--shadow-card);
}
dialog.akw-dialog:modal {
  overscroll-behavior: contain;
}
dialog.akw-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}

/* /ops Portal & Test Guides Dialog + Single-Row Tabs (modern-web-guidance: tabs) */
dialog.akw-guides-dialog {
  inline-size: min(96dvw, 880px);
  max-block-size: 88dvh;
}
.akw-guide-tablist {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.25rem;
  border-block-end: 1px solid var(--border);
  margin-block-end: 0.85rem;
  scrollbar-width: thin;
}
.akw-guide-tab {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 0.55rem 0.8rem;
  min-block-size: 44px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.akw-guide-tab:hover,
.akw-guide-tab[aria-selected="true"] {
  color: var(--text);
}
.akw-guide-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.35rem;
  inset-block-end: 0;
  border-block-end: 3px solid var(--accent);
}
.akw-guide-panel {
  /* modern-web-guidance (tabs): DO NOT put padding/borders/margins/backgrounds directly on [role="tabpanel"] */
  display: block;
}
.akw-guide-panel[hidden] {
  display: none;
}
.akw-guide-panel-inner {
  padding: 0.2rem 0.15rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.akw-guide-step-list {
  margin: 0;
  padding-inline-start: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.55;
}
.akw-guide-step-list li + li {
  margin-block-start: 0.35rem;
}

/* MediaPipe Active Liveness Stage & Inline Phone QR */
.nia-challenge-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-end: 0.55rem;
}
.nia-step-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.nia-step-pill[data-state="active"] {
  border-color: var(--accent);
  color: var(--text);
}
.nia-step-pill[data-state="done"] {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.18);
  color: var(--text-success);
}
.nia-camera-stage {
  position: relative;
  inline-size: 100%;
  min-block-size: 210px;
  max-block-size: 300px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #060b16;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nia-camera-stage video {
  inline-size: 100%;
  max-block-size: 300px;
  object-fit: cover;
  transform: scaleX(-1);
}
.nia-overlay-canvas {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  pointer-events: none;
}
.nia-live-prompt {
  position: absolute;
  inset-inline: 0.65rem;
  inset-block-end: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(11, 18, 32, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
.nia-qr-inline {
  margin-block-start: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.nia-qr-inline svg {
  inline-size: 96px;
  block-size: 96px;
  background: #ffffff;
  border-radius: 6px;
  padding: 3px;
}

/* Multi-Persona WhatsApp Simulator Phone Frames */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1rem;
}

.wa-phone {
  display: flex;
  flex-direction: column;
  block-size: min(640px, 76dvh);
  background: var(--wa-bg);
  color: var(--wa-text);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.wa-phone-hdr {
  background: var(--wa-hdr);
  color: var(--wa-text);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-block-end: 1px solid var(--wa-hdr-border);
}

.wa-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.wa-bubble {
  max-inline-size: 90%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.86rem;
  color: var(--wa-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
}
.wa-bubble-in {
  align-self: flex-end;
  background: var(--wa-out);
  border-end-end-radius: 3px;
}
.wa-bubble-out {
  align-self: flex-start;
  background: var(--wa-in);
  border-end-start-radius: 3px;
}
.wa-meta {
  font-size: 0.72rem;
  color: var(--wa-meta);
  margin-block-start: 0.35rem;
}
.wa-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-block-start: 0.45rem;
}
.wa-quick-btn {
  min-block-size: 36px;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--pill-info-bd);
  background: var(--pill-info-bg);
  color: var(--text-info);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.wa-composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem;
  background: var(--wa-hdr);
  border-block-start: 1px solid var(--wa-hdr-border);
}
.wa-composer input { flex: 1; min-inline-size: 0; }

.quote-pre {
  background: var(--pre-bg);
  border: 1px solid var(--pill-ok-bd);
  border-radius: 12px;
  padding: 0.85rem;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--pre-text);
  margin: 0;
}

.footer-legal {
  margin-block-start: 2rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Native <details> Accordion (modern-web-guidance: accordion) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-block: 0.85rem;
}
.accordion-hdr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
[command="--toggle-all"][aria-expanded="true"] .expand,
[command="--toggle-all"][aria-expanded="false"] .collapse {
  display: none;
}
.accordion details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #08131e;
}
.accordion details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-block-size: 44px;
  padding: 0.65rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.accordion details > summary::-webkit-details-marker {
  display: none;
}
.accordion details > summary::before {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M3.2 5.5 8 10.3l4.8-4.8-1.1-1.1L8 8.1 4.3 4.4z'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}
.accordion details[open] > summary::before {
  rotate: 0deg;
}
.accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.accordion details:not([open])::details-content {
  block-size: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .accordion details > summary::before {
    transition: rotate 0.2s;
  }
  .accordion details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.25s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}
.accordion-body {
  padding: 0.15rem 1rem 0.9rem 1.85rem;
  font-size: 0.85rem;
  color: var(--text);
}
.accordion-body p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}
.accordion-body ul {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Copy-to-Clipboard Control (modern-web-guidance: copy-button) */
.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.copy-row code {
  word-break: break-all;
  font-size: 0.78rem;
}
.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.copy-button {
  min-inline-size: 34px;
  min-block-size: 34px;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.copy-button[data-copied] {
  border-color: var(--brand);
  color: #6ee7b7;
}
.copy-button[data-failed] {
  border-color: var(--danger);
  color: #fecaca;
}
.copy .tip {
  font-size: 0.76rem;
  font-weight: 700;
  color: #6ee7b7;
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.copy-button[data-copied] + .tip {
  opacity: 1;
  color: #6ee7b7;
}
.copy-button[data-failed] + .tip {
  opacity: 1;
  color: #fecaca;
}

/* Payment Setup Stage Filter Bar */
.stage-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block: 0.75rem;
}
.stage-filter-btn {
  min-block-size: 36px;
  padding: 0.3rem 0.7rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.stage-filter-btn[aria-pressed="true"] {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--brand);
  color: #6ee7b7;
}
.checklist-note-input {
  min-block-size: 36px;
  inline-size: 100%;
  min-inline-size: 140px;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
}
.checklist-status-select {
  min-block-size: 36px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
}

/* Native Switch Control (modern-web-guidance: switch) */
.shift-switch-lbl {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-block-size: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
input[type="checkbox"][switch] {
  accent-color: var(--brand);
  margin: 0;
  cursor: pointer;
  min-block-size: 24px;
  inline-size: 46px;
}
input[type="checkbox"][switch]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
input[type="checkbox"][switch].is-switch-fallback {
  appearance: none;
  position: relative;
  inline-size: 46px;
  block-size: 26px;
  min-block-size: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--border-strong);
  transition: background-color 0.2s, border-color 0.2s;
}
input[type="checkbox"][switch].is-switch-fallback::after {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  inline-size: 20px;
  block-size: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s;
}
input[type="checkbox"][switch].is-switch-fallback:checked {
  background: var(--emerald);
  border-color: var(--emerald);
}
input[type="checkbox"][switch].is-switch-fallback:checked::after {
  transform: translateX(20px);
}

/* Native Styled Progress Bar (modern-web-guidance: progress) */
progress.akw-progress {
  appearance: none;
  border: 0 solid;
  overflow: clip;
  inline-size: 100%;
  block-size: 12px;
  --progress-bar-radius: 1e5px;
  --progress-bar-track: var(--border);
  --progress-bar-fill: var(--brand);
  border-radius: var(--progress-bar-radius);
  background: var(--progress-bar-track);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.12);
}
progress.akw-progress::-webkit-progress-bar {
  background: transparent;
}
progress.akw-progress::-webkit-progress-value {
  background: var(--progress-bar-fill);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 0.3s;
}
progress.akw-progress::-moz-progress-bar {
  background: var(--progress-bar-fill);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 0.3s;
}

.allergy-alert-banner {
  border: 1px solid var(--pill-danger-bd);
  background: var(--pill-danger-bg);
  color: var(--text-danger);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 700;
  margin-block: 0.5rem;
}

.partner-readonly-banner {
  border: 1px solid var(--pill-info-bd);
  background: var(--pill-info-bg);
  color: var(--text-info);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  margin-block-end: 1rem;
}

/* ============================================================================
   Mobile-First Guided App Shell, View Transitions & Validation (modern-web-guidance)
   Desktop (>= 960px) retains full multi-panel layout; < 960px switches cleanly
   into zero-scroll step-by-step screens & bottom thumb navigation.
   ============================================================================ */
:root {
  --target-size: 24px;
}
@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

html {
  scroll-padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
}

body {
  overflow-wrap: break-word;
}
:where(a, code) {
  overflow-wrap: anywhere;
}
img, video, svg {
  max-inline-size: 100%;
}

:where(h1, h2, h3) {
  text-wrap: balance;
}
:where(p, li) {
  text-wrap: pretty;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Directional Navigation View Transitions */
@keyframes akw-slide-to-left {
  to { transform: translateX(-28%); opacity: 0; }
}
@keyframes akw-slide-from-right {
  from { transform: translateX(28%); opacity: 0; }
}
@keyframes akw-slide-to-right {
  to { transform: translateX(28%); opacity: 0; }
}
@keyframes akw-slide-from-left {
  from { transform: translateX(-28%); opacity: 0; }
}
::view-transition-group(root) {
  animation: 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
::view-transition-group(akw-header),
::view-transition-group(akw-bottom-nav),
::view-transition-group(akw-wizard-footer) {
  animation: none;
}
html:active-view-transition-type(forward)::view-transition-old(root) {
  animation-name: akw-slide-to-left;
}
html:active-view-transition-type(forward)::view-transition-new(root) {
  animation-name: akw-slide-from-right;
}
html:active-view-transition-type(backward)::view-transition-old(root) {
  animation-name: akw-slide-to-right;
}
html:active-view-transition-type(backward)::view-transition-new(root) {
  animation-name: akw-slide-from-left;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root) {
    animation: none !important;
  }
}

/* Post-Interaction Form Validation (hints above inputs so mobile keyboard never covers them) */
.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-block-end: 0.1rem;
}
.field-error {
  display: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-danger);
  margin-block-start: 0.25rem;
}
:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger) !important;
  background: var(--pill-danger-bg) !important;
}
:is(:user-invalid, .user-invalid-fallback) + .field-error {
  display: block;
}
:is(:user-valid, .user-valid-fallback):not([type="checkbox"]):not([type="radio"]) {
  border-color: var(--pill-ok-bd);
}

/* Single-input 4-digit Pickup/Handover PIN (sms-otp-form pattern) */
.akw-pin-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.55rem !important;
  font-weight: 800;
  letter-spacing: 0.42em;
  text-align: center;
  min-block-size: 54px !important;
  inline-size: 100%;
  max-inline-size: 220px;
  padding-inline-start: 0.9em !important;
  border-color: var(--brand) !important;
}

/* Visual Selectable Choice Cards */
.akw-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}
.akw-choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: 0.25rem;
  min-block-size: 64px;
  inline-size: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.akw-choice-card[aria-pressed="true"],
.akw-choice-card.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--pill-info-bd);
}
.akw-choice-title {
  font-weight: 800;
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  inline-size: 100%;
  gap: 0.5rem;
}
.akw-choice-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Guided Step Progress Header & Bottom Bars */
.akw-stepper-bar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  margin-block-end: 0.75rem;
}
.akw-stepper-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.akw-stepper-track {
  inline-size: 100%;
  block-size: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.akw-stepper-fill {
  block-size: 100%;
  background: linear-gradient(90deg, var(--brand), var(--emerald));
  border-radius: 999px;
  transition: inline-size 0.25s ease;
}

.akw-stage-dots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 0.3rem;
  margin-block: 0.45rem 0.7rem;
}
.akw-stage-dot {
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.akw-stage-dot.is-done {
  border-color: var(--pill-ok-bd);
  background: var(--pill-ok-bg);
  color: var(--text-success);
}
.akw-stage-dot.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.akw-bottom-nav,
.akw-wizard-footer {
  display: none;
}

/* QR Cards Grid */
.akw-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}
.akw-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.akw-qr-frame {
  background: #ffffff;
  padding: 0.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.akw-qr-frame img {
  inline-size: 148px;
  block-size: 148px;
  display: block;
}

.akw-mob-only {
  display: none;
}

.dj-step,
.dj-pstep,
.q-mob-step {
  display: contents;
}

@media (min-width: 960px) {
  .akw-mob-only {
    display: none !important;
  }
  #dj-driver-form > .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile-First Zero-Scroll App Mode (< 960px) */
@media (max-width: 959px) {
  .akw-desk-only {
    display: none !important;
  }
  .akw-mob-only {
    display: flex;
  }
  .card, label.field, .dj-step, .dj-pstep, .q-mob-step, .akw-mob-only {
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  input, select, textarea {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
  }
  .akw-choice-grid {
    grid-template-columns: 1fr;
  }
  #dj-mob-fleet-cards .akw-choice-card {
    padding: 0.65rem 0.85rem;
    min-block-size: 54px;
  }
  .ops-hero-card {
    padding: 0.55rem 0.75rem;
    margin-block-end: 0.5rem;
  }
  .ops-hero-card h1 {
    font-size: 0.96rem !important;
    margin-bottom: 0.15rem !important;
  }
  .site-header .header-inner {
    padding: 0.45rem 0.75rem;
    padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
  }
  .site-logo {
    font-size: 0.96rem;
  }
  .site-header .menu-button {
    min-block-size: 40px;
    padding: 0.35rem 0.7rem;
    font-size: 0.84rem;
  }
  .page-wrap.akw-has-bottom-bar {
    padding: 0.65rem 0.65rem calc(5.1rem + env(safe-area-inset-bottom, 0px));
    min-block-size: calc(100dvh - 54px);
  }
  .card {
    padding: 0.8rem 0.85rem;
    margin-block-end: 0.65rem;
    border-radius: 14px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .akw-kpi-compact {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }
  .akw-kpi-compact .kpi {
    padding: 0.55rem 0.65rem;
  }
  .akw-kpi-compact .kpi-val {
    font-size: 1.05rem;
  }
  .akw-kpi-compact .kpi-sub {
    font-size: 0.72rem;
  }

  /* Wizard step visibility on mobile: ONLY current active step is visible */
  .dj-step,
  .dj-pstep,
  .q-mob-step,
  .ph-dlg-step {
    display: none !important;
  }
  .dj-step.is-active-step,
  .dj-pstep.is-active-step,
  .q-mob-step.is-active-step,
  .ph-dlg-step.is-active-step {
    display: flex !important;
    flex-direction: column;
    gap: 0.6rem;
  }

  /* Hide desktop Ops sticky sub-nav on mobile (replaced by bottom tab bar) */
  #ops-section-nav {
    display: none !important;
  }

  /* Fixed Bottom Tab Bar (single non-wrapping row, WCAG shape indicator) */
  .akw-bottom-nav {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 45;
    view-transition-name: akw-bottom-nav;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.2rem;
    padding: 0.25rem max(0.45rem, env(safe-area-inset-right, 0px)) max(0.4rem, env(safe-area-inset-bottom, 0px)) max(0.45rem, env(safe-area-inset-left, 0px));
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-block-start: 1px solid var(--border);
    box-shadow: var(--shadow-bar);
  }
  .akw-bottom-tab {
    position: relative;
    flex: 1 1 0;
    min-inline-size: 0;
    min-block-size: 50px;
    padding: 0.35rem 0.25rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }
  .akw-bottom-tab[aria-selected="true"] {
    color: var(--brand);
    background: var(--brand-soft);
  }
  .akw-bottom-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    inset: 0 18% auto;
    border-block-start: 3px solid var(--brand);
  }
  .akw-bottom-tab-ico {
    font-size: 1.05rem;
    line-height: 1;
  }

  /* Fixed Bottom Wizard Action Footer */
  .akw-wizard-footer {
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: 45;
    view-transition-name: akw-wizard-footer;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem max(0.75rem, env(safe-area-inset-right, 0px)) max(0.65rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-block-start: 1px solid var(--border);
    box-shadow: var(--shadow-bar);
  }
  .akw-wizard-footer .btn {
    min-block-size: 48px;
    font-size: 0.92rem;
  }
  .akw-wizard-footer .akw-btn-grow {
    flex: 1;
  }

  dialog.akw-dialog {
    inline-size: 96dvw;
    max-block-size: 92dvh;
    padding: 0.9rem;
  }
}

/* Accessible viewport-clamped floating tooltip (outside overflow containers) */
.akw-tooltip {
  position: fixed;
  z-index: 9999;
  max-inline-size: min(280px, calc(100vw - 16px));
  padding: 0.48rem 0.68rem;
  border-radius: 8px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.38;
  pointer-events: none;
}

.wa-phone-badge {
  margin-block-start: 0.25rem;
  display: inline-flex;
  font-size: 0.72rem;
}

/* ============================================================================
   Meta Collapsible Left Navigation Sidebar (.akw-sidebar) + Theme Toggle Footer
   ============================================================================ */
#akw-sidebar-backdrop[hidden] {
  display: none !important;
}
#akw-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.akw-sidebar-mob-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-inline-size: 38px;
  min-block-size: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.akw-sidebar {
  position: fixed;
  inset-block-start: 59px;
  inset-block-end: 0;
  inset-inline-start: 0;
  inline-size: var(--sidebar-w, 244px);
  z-index: 38;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--text);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: inline-size 0.18s ease, transform 0.2s ease, visibility 0.2s ease;
  overflow: hidden;
}

.akw-sidebar-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem;
  border-block-end: 1px solid var(--border);
  flex-shrink: 0;
}

.akw-sidebar-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.akw-sidebar-close-mob {
  display: none;
  min-inline-size: 34px;
  min-block-size: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.akw-sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.55rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.akw-sb-group {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.akw-sb-group[hidden] {
  display: none !important;
}

.akw-sb-group-lbl {
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.akw-sb-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.akw-sb-item:hover {
  background: var(--surface-alt);
  color: var(--brand);
}
.akw-sb-item[aria-current="page"],
.akw-sb-item.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.akw-sb-ico {
  flex-shrink: 0;
  font-size: 0.96rem;
  width: 1.25rem;
  text-align: center;
}
.akw-sb-txt {
  overflow: hidden;
  text-overflow: ellipsis;
}

.akw-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.6rem;
  border-block-start: 1px solid var(--border);
  background: var(--surface-alt);
  flex-shrink: 0;
}
#akw-theme-toggle,
.akw-theme-btn {
  flex: 1 1 auto;
  min-block-size: 36px;
  padding: 0.35rem 0.6rem;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.akw-theme-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.akw-sb-collapse-btn {
  min-inline-size: 36px;
  min-block-size: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}
.akw-sb-collapse-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

@media (min-width: 960px) {
  body.akw-has-sidebar > main.page-wrap {
    margin-inline-start: var(--sidebar-w, 244px);
    max-inline-size: calc(100% - var(--sidebar-w, 244px));
  }
  html.akw-sidebar-collapsed .akw-sidebar-title,
  html.akw-sidebar-collapsed .akw-sb-group-lbl,
  html.akw-sidebar-collapsed .akw-sb-txt,
  html.akw-sidebar-collapsed .akw-theme-lbl {
    display: none;
  }
  html.akw-sidebar-collapsed .akw-sb-item {
    justify-content: center;
    padding: 0.5rem;
  }
  html.akw-sidebar-collapsed .akw-sidebar-footer {
    flex-direction: column;
    padding: 0.45rem;
  }
  html.akw-sidebar-collapsed .akw-theme-btn,
  html.akw-sidebar-collapsed .akw-sb-collapse-btn {
    inline-size: 100%;
  }
}

@media (max-width: 959px) {
  .akw-sidebar-mob-btn {
    display: inline-flex;
  }
  .akw-sidebar {
    inset-block-start: 0;
    inline-size: min(278px, 84vw);
    z-index: 55;
    transform: translateX(-105%);
    visibility: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  }
  .akw-sidebar.is-mobile-open {
    transform: translateX(0);
    visibility: visible;
  }
  .akw-sidebar-close-mob {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .akw-sb-collapse-btn {
    display: none;
  }
}

.akw-ev-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  margin-block-start: 0.3rem;
}

.akw-ev-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
