/* Theme tokens (classic + beta). */
:root {
  --bg: #f5f5f5;
  --text: #111;
  --muted: #64748b;
  --header-bg: #111;
  --header-text: #fff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-row: #f9fafb;
  --surface-hover: #eef2ff;
  --border: #ddd;
  --border-soft: #e5e7eb;
  --btn-bg: #f3f4f6;
  --btn-border: #d1d5db;
  --btn-text: #111;
  --input-bg: #fff;
  --input-border: #d1d5db;
  --focus-ring: rgba(96,165,250,0.25);
  --modal-bg: #fff;
  --notif-new-bg: #eff6ff;
  --notif-new-border: #93c5fd;
  --accent: #2563eb;
  --accent-strong: #1f6fff;
  --accent-contrast: #fff;
  --danger: #ef4444;
  --danger-contrast: #fff;
  --success: #16a34a;
  --success-contrast: #fff;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --info-bg: #e0f2fe;
  --info-text: #0f172a;
  --shadow-1: rgba(0,0,0,0.06);
  --shadow-2: rgba(0,0,0,0.12);
  --shadow-3: rgba(0,0,0,0.2);

  --pos-bg: #eceff3;
  --pos-panel: #f7f8fb;
  --pos-panel-strong: #ffffff;
  --pos-panel-alt: #f4f6fb;
  --pos-panel-hover: #e9ecf7;
  --pos-border: #dcdfe6;
  --pos-border-soft: #e5e7eb;
  --pos-muted: #64748b;
  --pos-ink: #111827;
  --pos-ink-hover: #1f2937;
  --pos-accent: #1f6fff;
  --pos-accent-strong: #1f6fff;
  --pos-accent-contrast: #fff;
  --pos-danger-bg: #ffebeb;
  --pos-danger: #c0392b;
  --pos-success-bg: #ecfdf3;
  --pos-success: #166534;
  --pos-warn-bg: #fef3c7;
  --pos-warn: #92400e;
  --pos-scan-bg: #0f172a;
  --pos-scan-ring: rgba(255,255,255,0.9);
  --pos-scan-mask: rgba(0,0,0,0.25);
  --pos-scan-toast: rgba(16, 185, 129, 0.95);

  --client-bg: #050505;
  --client-text: #fff;
  --client-muted: #a1a1aa;
  --client-border: #222;
  --client-border-strong: #111;
  --client-total: #22c55e;
  --client-change: #eab308;

  --login-bg: #111;
  --login-card: #1e1e1e;
  --login-text: #fff;
  --login-border: #2a2a2a;
  --login-btn-bg: #fff;
  --login-btn-text: #111;
  --login-overlay: #0b0b0b;

  --paper-bg: #fff;
  --paper-text: #111;
  --paper-muted: #444;
  --paper-border: #aaa;
  --paper-soft: #bbb;
  --paper-accent: #333;
  --paper-surface: #f6f7fb;
}

html[data-theme="beta"] {
  --bg: #f6f3ee;
  --text: #1e1a15;
  --muted: #6a6056;
  --header-bg: #1a2622;
  --header-text: #fefbf7;
  --surface: #fffcf8;
  --surface-alt: #f7f1e8;
  --surface-row: #f2ece2;
  --surface-hover: #e8f0ea;
  --border: #d6cfc5;
  --border-soft: #e6ded3;
  --btn-bg: #f2ebe1;
  --btn-border: #d6cfc5;
  --btn-text: #1e1a15;
  --input-bg: #fffcf8;
  --input-border: #d6cfc5;
  --focus-ring: rgba(15, 118, 110, 0.25);
  --modal-bg: #fffaf5;
  --notif-new-bg: #e8f3ef;
  --notif-new-border: #7fbfb0;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-contrast: #fff;
  --danger: #b91c1c;
  --danger-contrast: #fff;
  --success: #15803d;
  --success-contrast: #fff;
  --success-bg: #dcf6e5;
  --success-text: #14532d;
  --warn-bg: #fff1d6;
  --warn-text: #92400e;
  --danger-bg: #fde8e8;
  --danger-text: #7f1d1d;
  --info-bg: #e0f2f1;
  --info-text: #0f172a;
  --shadow-1: rgba(24, 16, 8, 0.08);
  --shadow-2: rgba(24, 16, 8, 0.16);
  --shadow-3: rgba(24, 16, 8, 0.28);

  --pos-bg: #f3eee7;
  --pos-panel: #fcf8f2;
  --pos-panel-strong: #fffdf9;
  --pos-panel-alt: #f4ede3;
  --pos-panel-hover: #e9e2d8;
  --pos-border: #d6cfc5;
  --pos-border-soft: #e6ded3;
  --pos-muted: #6a6056;
  --pos-ink: #1a221f;
  --pos-ink-hover: #242f2b;
  --pos-accent: #0f766e;
  --pos-accent-strong: #0b5f59;
  --pos-accent-contrast: #fff;
  --pos-danger-bg: #f9e2e0;
  --pos-danger: #b42318;
  --pos-success-bg: #e3f2e8;
  --pos-success: #166534;
  --pos-warn-bg: #fff1d6;
  --pos-warn: #92400e;
  --pos-scan-bg: #13201e;
  --pos-scan-ring: rgba(255,255,255,0.85);
  --pos-scan-mask: rgba(0,0,0,0.3);
  --pos-scan-toast: rgba(16, 185, 129, 0.95);

  --client-bg: #0c1412;
  --client-text: #f8faf4;
  --client-muted: #9ea6a0;
  --client-border: #1f2a28;
  --client-border-strong: #16201f;
  --client-total: #34d399;
  --client-change: #f59e0b;

  --login-bg: #121917;
  --login-card: #1a2421;
  --login-text: #fefcf8;
  --login-border: #2a3430;
  --login-btn-bg: #fefcf8;
  --login-btn-text: #1a2421;
  --login-overlay: #0d1412;

  --paper-bg: #fffdf8;
  --paper-text: #1e1a15;
  --paper-muted: #5b534a;
  --paper-border: #b9b2a8;
  --paper-soft: #c9c1b7;
  --paper-accent: #4d463e;
  --paper-surface: #f3eee6;
}

/* Beta layout tweaks (theme-scoped). */
html[data-theme="beta"] body {
  background: radial-gradient(1200px 800px at 20% -10%, #fff8ef 0%, #f6f2ea 45%, #f1ede6 100%);
}

html[data-theme="beta"] header {
  box-shadow: 0 8px 20px var(--shadow-1);
}

html[data-theme="beta"] .card {
  border-radius: 14px;
  border-color: var(--border-soft);
  box-shadow: 0 10px 24px var(--shadow-1);
}

html[data-theme="beta"] body:not(.caja-no-scroll) main input,
html[data-theme="beta"] body:not(.caja-no-scroll) main select,
html[data-theme="beta"] body:not(.caja-no-scroll) main textarea {
  border-radius: 12px;
}

html[data-theme="beta"] body:not(.caja-no-scroll) main button {
  border-radius: 12px;
  box-shadow: 0 6px 14px var(--shadow-1);
}

html[data-theme="experimental"] {
  --bg: #0f1b1d;
  --text: #f8faf7;
  --muted: #a6b0aa;
  --header-bg: #0b1416;
  --header-text: #f8faf7;
  --surface: #142124;
  --surface-alt: #182a2d;
  --surface-row: #1a2f33;
  --surface-hover: #1f3a36;
  --border: #2a3a3b;
  --border-soft: #1f2e30;
  --btn-bg: #1b2b2e;
  --btn-border: #2a3a3b;
  --btn-text: #f8faf7;
  --input-bg: #121f21;
  --input-border: #2a3a3b;
  --focus-ring: rgba(69, 206, 187, 0.25);
  --modal-bg: #142124;
  --notif-new-bg: #193032;
  --notif-new-border: #2d6b68;
  --accent: #45cebb;
  --accent-strong: #2fb3a2;
  --accent-contrast: #0a1213;
  --danger: #ef4444;
  --danger-contrast: #fff;
  --success: #22c55e;
  --success-contrast: #0b1416;
  --success-bg: #1b3a2a;
  --success-text: #c7f7d4;
  --warn-bg: #3b2f1a;
  --warn-text: #fcd34d;
  --danger-bg: #3b1f1f;
  --danger-text: #fecaca;
  --info-bg: #113439;
  --info-text: #d1f7f4;
  --shadow-1: rgba(0,0,0,0.25);
  --shadow-2: rgba(0,0,0,0.35);
  --shadow-3: rgba(0,0,0,0.5);

  --pos-bg: #0f1b1d;
  --pos-panel: #152527;
  --pos-panel-strong: #182b2e;
  --pos-panel-alt: #1a2f32;
  --pos-panel-hover: #203b3a;
  --pos-border: #2a3a3b;
  --pos-border-soft: #1f2e30;
  --pos-muted: #a6b0aa;
  --pos-ink: #0b1416;
  --pos-ink-hover: #0f1b1d;
  --pos-accent: #45cebb;
  --pos-accent-strong: #2fb3a2;
  --pos-accent-contrast: #0a1213;
  --pos-danger-bg: #3b1f1f;
  --pos-danger: #fecaca;
  --pos-success-bg: #1b3a2a;
  --pos-success: #c7f7d4;
  --pos-warn-bg: #3b2f1a;
  --pos-warn: #fcd34d;
  --pos-scan-bg: #0a1213;
  --pos-scan-ring: rgba(255,255,255,0.85);
  --pos-scan-mask: rgba(0,0,0,0.45);
  --pos-scan-toast: rgba(34, 197, 94, 0.9);

  --client-bg: #0b1416;
  --client-text: #f8faf7;
  --client-muted: #98a6a1;
  --client-border: #1f2e30;
  --client-border-strong: #162326;
  --client-total: #34d399;
  --client-change: #f59e0b;

  --login-bg: #0b1416;
  --login-card: #111e20;
  --login-text: #f8faf7;
  --login-border: #203033;
  --login-btn-bg: #45cebb;
  --login-btn-text: #0a1213;
  --login-overlay: #090f10;

  --paper-bg: #0d1516;
  --paper-text: #f3f4f6;
  --paper-muted: #a1a1aa;
  --paper-border: #2a3a3b;
  --paper-soft: #2f4244;
  --paper-accent: #cbd5e1;
  --paper-surface: #0b1416;
}

/* Experimental layout tweaks (theme-scoped). */
html[data-theme="experimental"] body {
  font-size: 15px;
  background: linear-gradient(180deg, #0f1b1d 0%, #0b1416 100%);
}

html[data-theme="experimental"] header {
  padding: 16px 18px;
}

html[data-theme="experimental"] .layout {
  height: calc(100vh - 64px);
}

html[data-theme="experimental"] main {
  padding: 20px;
}

html[data-theme="experimental"] .card {
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 14px 30px var(--shadow-2);
}

html[data-theme="experimental"] aside {
  width: 240px;
}

html[data-theme="experimental"] body.sidebar-collapsed aside {
  width: 64px;
}

html[data-theme="experimental"] aside a {
  padding: 12px 10px;
}

html[data-theme="experimental"] table th,
html[data-theme="experimental"] table td {
  padding: 10px;
}

html[data-theme="experimental"] .cmdk-panel {
  width: 680px;
}

html[data-theme="experimental"] .cmd-modal-content {
  width: 760px;
}

html[data-theme="app"] {
  --bg: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --header-bg: #0f172a;
  --header-text: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f5f7fb;
  --surface-row: #f8fafc;
  --surface-hover: #ecf3ff;
  --border: #d7deea;
  --border-soft: #e5ebf5;
  --btn-bg: #f4f7fd;
  --btn-border: #d6deec;
  --btn-text: #0f172a;
  --input-bg: #ffffff;
  --input-border: #d3ddec;
  --focus-ring: rgba(37, 99, 235, 0.2);
  --modal-bg: #ffffff;
  --notif-new-bg: #eef5ff;
  --notif-new-border: #93c5fd;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-contrast: #ffffff;
}

html[data-theme="app"] body {
  font-size: 15px;
  background: radial-gradient(1200px 800px at 100% -20%, #dbeafe 0%, #eef2f7 50%, #e7edf7 100%);
}

html[data-theme="app"] header {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95) 0%, rgba(19, 33, 64, 0.92) 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

html[data-theme="app"] .layout {
  height: calc(100vh - 58px);
}

html[data-theme="app"] main {
  padding: 18px;
}

html[data-theme="app"] #sidebarToggle,
html[data-theme="app"] aside {
  display: none;
}

html[data-theme="app"] aside {
  width: 236px;
  border-right: 1px solid #dbe5f4;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 249, 255, 0.9) 100%);
}

html[data-theme="app"] .brand {
  border-radius: 16px;
  border-color: #dce7f7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

html[data-theme="app"] aside a {
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

html[data-theme="app"] aside a:hover {
  background: #eef4ff;
  border-color: #d7e3f6;
  transform: translateX(2px);
}

html[data-theme="app"] .header-gear-btn,
html[data-theme="app"] .header-guide-btn,
html[data-theme="app"] .notif-btn {
  border-radius: 12px;
  border-color: rgba(203, 213, 225, 0.45);
  background: rgba(255, 255, 255, 0.09);
}

html[data-theme="app"] .header-actions {
  margin-left: auto;
  gap: 8px;
}

html[data-theme="app"] .header-secondary {
  display: none;
}

html[data-theme="app"] .header-menu-btn {
  display: inline-flex;
}

html[data-theme="app"] #viewDelayBtn,
html[data-theme="app"] #recursosBtn {
  display: none;
}

html[data-theme="app"] .header-menu {
  top: 46px;
  min-width: 220px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #d7e4f6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(8px);
}

html[data-theme="app"] .header-menu button {
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #dce7f6;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  min-height: 40px;
  font-weight: 600;
}

html[data-theme="app"] .header-menu-section + .header-menu-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d8e3f4;
}

html[data-theme="app"] .header-menu-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0 4px 6px;
}

html[data-theme="app"] .header-menu-icon {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

html[data-theme="app"] .current-view-pill {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

html[data-theme="app"] .modal-content {
  border: 1px solid #d9e4f4;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.24);
}

html[data-theme="app"] .modal-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

html[data-theme="app"] .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3ebf7;
}

html[data-theme="app"] .modal-header button,
html[data-theme="app"] .notif-actions button,
html[data-theme="app"] #clipMatchBody button,
html[data-theme="app"] .clip-modal-actions button,
html[data-theme="app"] .scan-modal-header button {
  border-radius: 12px;
  border: 1px solid #d8e3f5;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

html[data-theme="app"] .modal-content .btn-primary,
html[data-theme="app"] #confirmPayBtn,
html[data-theme="app"] #viewDelaySave,
html[data-theme="app"] #provPassSaveGlobal,
html[data-theme="app"] #clipOpenLink,
html[data-theme="app"] #clipModalOpenLink {
  border: 1px solid transparent;
  background: linear-gradient(180deg, #2d6df0 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

html[data-theme="app"] .modal-content .btn-secondary,
html[data-theme="app"] #closePayModal,
html[data-theme="app"] #viewDelayClear,
html[data-theme="app"] #providerPassCloseGlobal,
html[data-theme="app"] #clipCancel,
html[data-theme="app"] #clipModalCancel,
html[data-theme="app"] #clipCheckStatus,
html[data-theme="app"] #clipModalCheck {
  border: 1px solid #d8e3f5;
  background: #f6f9ff;
  color: #1e293b;
}

html[data-theme="app"] #salesEmpty,
html[data-theme="app"] #vamEmpty,
html[data-theme="app"] .stock-empty,
html[data-theme="app"] .notif-empty,
html[data-theme="app"] .files-meta,
html[data-theme="app"] .backup-meta,
html[data-theme="app"] .audit-meta {
  border: 1px dashed #cfe0f6;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
  border-radius: 14px;
  padding: 12px;
  color: #64748b;
}

html[data-theme="app"] #ventasModule tbody tr td[colspan],
html[data-theme="app"] #movimientosModule tbody tr td[colspan],
html[data-theme="app"] #inventarioModule tbody tr td[colspan],
html[data-theme="app"] #liqTable tbody tr td[colspan],
html[data-theme="app"] #detailTable tbody tr td[colspan],
html[data-theme="app"] #liqHistoryTable tbody tr td[colspan] {
  background: #f7fbff;
  color: #64748b;
  font-weight: 600;
  text-align: center;
  border-color: #deebf8;
  padding: 14px 10px;
}

html[data-theme="app"] .card {
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 28px var(--shadow-1);
}

html[data-theme="app"] body:not(.caja-no-scroll) main button {
  border-radius: 14px;
  min-height: 42px;
}

html[data-theme="app"] body:not(.caja-no-scroll) main input,
html[data-theme="app"] body:not(.caja-no-scroll) main select,
html[data-theme="app"] body:not(.caja-no-scroll) main textarea {
  border-radius: 14px;
  min-height: 40px;
  border-color: #d5e0f0;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

html[data-theme="app"] body:not(.caja-no-scroll) main input:focus,
html[data-theme="app"] body:not(.caja-no-scroll) main select:focus,
html[data-theme="app"] body:not(.caja-no-scroll) main textarea:focus {
  border-color: #82a7f5;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

html[data-theme="app"] .sales-filters .field,
html[data-theme="app"] .mov-filters .field,
html[data-theme="app"] .liq-field,
html[data-theme="app"] .provider-pass-field,
html[data-theme="app"] .view-delay-row {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e1e9f6;
}

html[data-theme="app"] .sales-filters .field label,
html[data-theme="app"] .liq-field label,
html[data-theme="app"] .provider-pass-field label,
html[data-theme="app"] .view-delay-row label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

html[data-theme="app"] .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #d7e4f7;
  background: #f5f9ff;
  padding: 6px 10px;
}

html[data-theme="app"] .check input[type="checkbox"] {
  accent-color: #2563eb;
}

html[data-theme="app"] table th {
  background: #f3f7ff;
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

html[data-theme="app"] table td {
  border-color: #e4ebf6;
}

html[data-theme="app"] table tr:hover td {
  background: #f8fbff;
}

html[data-theme="app"] .table-scroll {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  overflow-x: auto;
  overflow-y: visible;
}

html[data-theme="app"] table {
  border-radius: 14px;
  border-color: var(--border-soft);
}

html[data-theme="app"] .sales-pill,
html[data-theme="app"] .pre-pill,
html[data-theme="app"] .liq-pill,
html[data-theme="app"] .mov-pill {
  border: 1px solid var(--border-soft);
  background: #f2f6fd;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

html[data-theme="app"] .sales-card-title,
html[data-theme="app"] .pre-card-title,
html[data-theme="app"] .liq-card-title,
html[data-theme="app"] .sales-card-sub,
html[data-theme="app"] .pre-card-sub,
html[data-theme="app"] .liq-card-sub,
html[data-theme="app"] #ventasModule td,
html[data-theme="app"] #preventaModule td,
html[data-theme="app"] #liqTableWrap td,
html[data-theme="app"] #detailTableWrap td,
html[data-theme="app"] #liqHistoryTableWrap td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

html[data-theme="app"] .sales-card-actions button,
html[data-theme="app"] .pre-card-actions button,
html[data-theme="app"] .liq-paid-btn,
html[data-theme="app"] .sales-view-toggle button,
html[data-theme="app"] .sales-source-toggle button,
html[data-theme="app"] .pre-view-toggle button,
html[data-theme="app"] .mov-view-toggle button,
html[data-theme="app"] .liq-view-toggle button,
html[data-theme="app"] .liq-quincena button {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

html[data-theme="app"] .module-header h2,
html[data-theme="app"] .module-header h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

html[data-theme="app"] .module-header h2 {
  font-size: clamp(1.06rem, 1.2vw + 0.9rem, 1.34rem);
}

html[data-theme="app"] .module-header h3 {
  font-size: clamp(0.98rem, 0.8vw + 0.86rem, 1.16rem);
}

html[data-theme="app"] .module-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

html[data-theme="app"] .sales-toolbar,
html[data-theme="app"] .table-actions,
html[data-theme="app"] .mov-filters,
html[data-theme="app"] .liq-filters,
html[data-theme="app"] .module-actions {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 8px;
  row-gap: 8px;
  backdrop-filter: blur(6px);
}

html[data-theme="app"] .sales-view-toggle,
html[data-theme="app"] .sales-source-toggle,
html[data-theme="app"] .pre-view-toggle,
html[data-theme="app"] .mov-view-toggle,
html[data-theme="app"] .liq-view-toggle,
html[data-theme="app"] .liq-quincena {
  border-color: #d9e2f2;
  background: #eef3fb;
}

html[data-theme="app"] .sales-view-toggle button.active,
html[data-theme="app"] .sales-source-toggle button.active,
html[data-theme="app"] .pre-view-toggle button.active,
html[data-theme="app"] .mov-view-toggle button.active,
html[data-theme="app"] .liq-view-toggle button.active,
html[data-theme="app"] .liq-quincena button.active {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

html[data-theme="app"] .sales-card,
html[data-theme="app"] .pre-card,
html[data-theme="app"] .liq-card,
html[data-theme="app"] .mov-card {
  border-radius: 16px;
  border-color: #dfe7f4;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
  gap: 10px;
}

html[data-theme="app"] #inventarioModule .module-header,
html[data-theme="app"] #movimientosModule .module-header,
html[data-theme="app"] #liqDetail .detail-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #e2eaf6;
}

html[data-theme="app"] #invTabInventory > div:first-child,
html[data-theme="app"] #inventarioModule #invTabAdjust > .card > div,
html[data-theme="app"] #inventarioModule #invTabRequests > .card > div,
html[data-theme="app"] .mov-filters,
html[data-theme="app"] .liq-filters {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dfe8f6;
  border-radius: 14px;
  padding: 8px;
  backdrop-filter: blur(6px);
}

html[data-theme="app"] #inventarioModule .inv-card,
html[data-theme="app"] #movimientosModule .mov-card,
html[data-theme="app"] #liqCards .liq-card,
html[data-theme="app"] #detailCards .liq-card,
html[data-theme="app"] #liqHistoryCards .liq-card {
  border-radius: 16px;
  border-color: #dfe8f6;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

html[data-theme="app"] #inventarioModule .inv-pill,
html[data-theme="app"] #movimientosModule .mov-pill,
html[data-theme="app"] #liqCards .liq-pill,
html[data-theme="app"] #detailCards .liq-pill,
html[data-theme="app"] #liqHistoryCards .liq-pill {
  background: #f1f6ff;
  border: 1px solid #d9e5f6;
}

html[data-theme="app"] #ventasModule #pagination {
  border-radius: 14px;
  border-color: #dbe5f4;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

html[data-theme="app"] .mobile-nav {
  gap: 8px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #d8e3f4;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
}

html[data-theme="app"] .mobile-nav-btn {
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 14px;
  gap: 6px;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

html[data-theme="app"] .mobile-nav-label {
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

html[data-theme="app"] .mobile-nav.is-carousel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}

html[data-theme="app"] .mobile-nav.is-carousel.dragging {
  cursor: grabbing;
}

html[data-theme="app"] .mobile-nav.is-carousel::-webkit-scrollbar {
  display: none;
}

html[data-theme="app"] .mobile-nav.is-carousel .mobile-nav-btn {
  flex: 0 0 auto;
  min-width: 92px;
  padding-inline: 10px;
  scroll-snap-align: start;
}

html[data-theme="app"] .mobile-nav.is-carousel .mobile-nav-label {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.2em;
}

html[data-theme="app"] .mobile-nav-btn .mobile-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: #eaf1ff;
  color: #2d4b79;
}

html[data-theme="app"] .mobile-nav-btn:not(.active) {
  background: rgba(255, 255, 255, 0.78);
  border-color: #dce7f7;
}

html[data-theme="app"] .mobile-nav-btn[data-action="menu"] .mobile-nav-icon {
  background: #eaf8f3;
  color: #0f766e;
}

html[data-theme="app"] .mobile-nav-btn[data-action="logout"] .mobile-nav-icon,
html[data-theme="app"] .mobile-nav-btn.mobile-nav-btn-logout .mobile-nav-icon {
  background: #ffe9e9;
  color: #b42318;
}

html[data-theme="app"] .mobile-nav-btn[data-action="logout"],
html[data-theme="app"] .mobile-nav-btn.mobile-nav-btn-logout {
  border-color: #f0cdcd;
}

html[data-theme="app"] .mobile-nav-btn.active {
  background: linear-gradient(180deg, #2d6df0 0%, #1d4ed8 100%);
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.34);
}

html[data-theme="app"] .mobile-nav-btn.active .mobile-nav-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

html[data-theme="app"] .mobile-nav-btn:active {
  transform: translateY(1px);
}

html[data-theme="app"] .kameh-banner-mini,
html[data-theme="app"] .pre-fab,
html[data-theme="app"] .kiosk-exit button {
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  background: linear-gradient(180deg, #2d6df0 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.34);
}

html[data-theme="app"] #ventasModule #pagination {
  border-radius: 16px;
  border: 1px solid #d6e3f6;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
}

@media (max-width: 720px) {
  html[data-theme="app"] header {
    position: sticky;
    top: 0;
    z-index: 1700;
  }

  html[data-theme="app"] main {
    padding: 12px;
    padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px));
  }

  html[data-theme="app"] body.caja-no-scroll main {
    padding-bottom: 12px;
  }

  html[data-theme="app"] aside {
    background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
    border-right: 1px solid #dbe5f4;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
  }

  html[data-theme="app"] .card {
    border-radius: 16px;
    padding: 14px;
  }

  html[data-theme="app"] .module-header h2 {
    font-size: 1.08rem;
  }

  html[data-theme="app"] .module-header h3 {
    font-size: 0.98rem;
  }

  html[data-theme="app"] .table-scroll {
    border: none;
    border-radius: 0;
  }

  html[data-theme="app"] .sales-toolbar,
  html[data-theme="app"] .table-actions,
  html[data-theme="app"] .mov-filters,
  html[data-theme="app"] .liq-filters,
  html[data-theme="app"] .module-actions {
    border-radius: 14px;
    padding: 7px;
  }

  html[data-theme="app"] .sales-toolbar > *,
  html[data-theme="app"] .table-actions > *,
  html[data-theme="app"] .module-actions > *,
  html[data-theme="app"] .mov-filters > *,
  html[data-theme="app"] .liq-filters > * {
    width: 100%;
  }

  html[data-theme="app"] #inventarioModule #invTabInventory > div:first-child > *,
  html[data-theme="app"] #inventarioModule #invTabAdjust > .card > div > *,
  html[data-theme="app"] #inventarioModule #invTabRequests > .card > div > * {
    width: 100%;
    min-width: 0 !important;
  }

  html[data-theme="app"] #inventarioModule #invTabInventory input,
  html[data-theme="app"] #inventarioModule #invTabInventory select,
  html[data-theme="app"] #inventarioModule #invTabAdjust input,
  html[data-theme="app"] #inventarioModule #invTabAdjust select,
  html[data-theme="app"] #inventarioModule #invTabRequests input,
  html[data-theme="app"] #inventarioModule #invTabRequests select,
  html[data-theme="app"] #movimientosModule .mov-filters input,
  html[data-theme="app"] #movimientosModule .mov-filters select {
    width: 100%;
    min-width: 0;
  }

  html[data-theme="app"] #inventarioModule #adjustCard,
  html[data-theme="app"] #inventarioModule #requestsProviderCard,
  html[data-theme="app"] #inventarioModule #requestsAdminCard,
  html[data-theme="app"] #liqDetail {
    margin-top: 10px !important;
  }

  html[data-theme="app"] .check {
    width: 100%;
    justify-content: flex-start;
  }

  html[data-theme="app"] .cart-increase {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  html[data-theme="app"] .cart-increase .check {
    width: auto;
    flex: 0 0 auto;
  }

  html[data-theme="app"] .cart-increase .increase-controls {
    flex: 1 1 220px;
    min-width: 0;
    flex-wrap: wrap;
  }

  html[data-theme="app"] .cart-increase .increase-controls input[type="number"] {
    width: 64px;
    flex: 0 0 auto;
  }

  html[data-theme="app"] .cart-increase .increase-controls select {
    min-width: 0;
    flex: 1 1 140px;
  }

  html[data-theme="app"] .caja-mobile-toggle {
    border-radius: 18px 18px 0 0;
    border-top: 1px solid #d7e3f6;
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
  }

  html[data-theme="app"] .caja-mobile-toggle button {
    border-radius: 14px;
    border-color: #d9e4f5;
    min-height: 46px;
  }

  html[data-theme="app"] .caja-mobile-toggle button.active {
    background: linear-gradient(180deg, #2d6df0 0%, #1d4ed8 100%);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.34);
  }

  html[data-theme="app"] #ventasModule #pagination {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  html[data-theme="app"] .pre-fab {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  html[data-theme="app"] #preventaModule .module-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  html[data-theme="app"] #preventaModule .table-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  html[data-theme="app"] #preventaModule .table-actions > * {
    width: 100%;
    min-width: 0;
  }

  html[data-theme="app"] #preventaModule .pre-view-toggle {
    width: 100%;
  }

  html[data-theme="app"] #preventaModule .pre-view-toggle button {
    flex: 1 1 0;
    min-height: 40px;
  }

  html[data-theme="app"] #ventasModule .module-header {
    align-items: flex-start;
    gap: 10px;
  }

  html[data-theme="app"] #ventasModule .module-header .table-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  html[data-theme="app"] #ventasModule .module-header .table-actions > * {
    width: 100%;
    min-width: 0;
  }

  html[data-theme="app"] #ventasModule .sales-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  html[data-theme="app"] #ventasModule .sales-toolbar > * {
    width: 100%;
    min-width: 0;
  }

  html[data-theme="app"] #ventasModule .sales-source-toggle,
  html[data-theme="app"] #ventasModule .sales-view-toggle {
    width: 100%;
  }

  html[data-theme="app"] #ventasModule .sales-source-toggle button,
  html[data-theme="app"] #ventasModule .sales-view-toggle button {
    flex: 1 1 0;
    min-height: 40px;
  }

  html[data-theme="app"] #ventasTabList > .row {
    gap: 8px !important;
    margin: 8px 0 !important;
  }

  html[data-theme="app"] #ventasTabList > .row > .card {
    min-width: 0 !important;
    width: 100%;
  }

  html[data-theme="app"] body.caja-no-scroll,
  html[data-theme="app"] body.caja-no-scroll main,
  html[data-theme="app"] body.caja-no-scroll .caja-container,
  html[data-theme="app"] body.caja-no-scroll .caja-left,
  html[data-theme="app"] body.caja-no-scroll .caja-right {
    max-width: 100%;
    overflow-x: clip;
  }

  html[data-theme="app"] body.caja-no-scroll {
    overflow-x: hidden !important;
  }

  html[data-theme="app"] body.caja-no-scroll .caja-container {
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
    padding-inline: 12px;
  }

  html[data-theme="app"] body.caja-no-scroll #productsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  html[data-theme="app"] body.caja-no-scroll .product-card {
    min-width: 0;
    padding: 10px;
    word-break: break-word;
  }

  html[data-theme="app"] body.caja-no-scroll .cart-item {
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  }

  html[data-theme="app"] body.caja-no-scroll .cart-item > * {
    min-width: 0;
  }
}

@media (max-width: 900px) and (hover: none), (max-width: 900px) and (pointer: coarse) {
  html[data-theme="app"] .caja-container {
    padding: 10px;
    padding-bottom: 84px;
    gap: 12px;
  }

  html[data-theme="app"] .caja-left,
  html[data-theme="app"] .caja-right {
    border-radius: 18px;
    border: 1px solid #dbe6f7;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    padding: 12px;
  }

  html[data-theme="app"] .caja-left h2,
  html[data-theme="app"] .caja-right h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.15;
  }

  html[data-theme="app"] .search-scope {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
  }

  html[data-theme="app"] .search-scope .scope-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  html[data-theme="app"] .cart-actions-menu {
    position: sticky;
    top: 0;
    z-index: 6;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
    padding-bottom: 8px;
  }

  html[data-theme="app"] #cartActionsToggle {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid #d9e4f5;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    font-weight: 700;
  }

  html[data-theme="app"] .cart-actions-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    max-height: 56vh;
    overflow: auto;
    z-index: 1800;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid #d9e4f5;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(10px);
  }

  html[data-theme="app"] .cart-actions-panel.open {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  html[data-theme="app"] .cart-actions-panel .pos-action,
  html[data-theme="app"] .cart-actions-panel .pos-action-group button,
  html[data-theme="app"] .cart-actions-panel .pos-action-group select {
    min-height: 42px;
    border-radius: 12px;
  }

  html[data-theme="app"] .actions-block #payBtn,
  html[data-theme="app"] .actions-block #cancelBtn {
    min-height: 48px;
    border-radius: 14px;
    font-size: 18px;
  }

  html[data-theme="app"] .cart-items {
    padding: 8px;
  }

  html[data-theme="app"] .cart-provider {
    gap: 6px;
    flex-wrap: wrap;
  }

  html[data-theme="app"] .cart-provider label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  html[data-theme="app"] .cart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  html[data-theme="app"] .cart-name {
    grid-column: 1 / -1;
  }

  html[data-theme="app"] .cart-qty {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  html[data-theme="app"] .cart-discount,
  html[data-theme="app"] .cart-inc {
    grid-column: 1;
    white-space: normal;
    flex-wrap: wrap;
  }

  html[data-theme="app"] .cart-remove {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
  }

  html[data-theme="app"] .caja-mobile-toggle button {
    min-width: 0;
    white-space: nowrap;
    font-size: 13px;
  }
}

@media (max-width: 440px) {
  html[data-theme="app"] body.caja-no-scroll .caja-container {
    max-width: 100%;
    padding-inline: 8px;
  }

  html[data-theme="app"] .caja-container {
    padding: 8px;
    gap: 8px;
  }

  html[data-theme="app"] .caja-left,
  html[data-theme="app"] .caja-right {
    border-radius: 14px;
    padding: 10px;
  }

  html[data-theme="app"] #buscadorProductos {
    font-size: 15px;
    padding: 10px 34px 10px 34px;
  }

  html[data-theme="app"] .search-scope .scope-btn {
    font-size: 11px;
    padding: 5px 8px;
  }

  html[data-theme="app"] #ventasModule .module-header .table-actions {
    grid-template-columns: 1fr;
  }

  html[data-theme="app"] .cart-increase .increase-controls {
    flex-basis: 100%;
  }

  html[data-theme="app"] .cart-increase .increase-controls select {
    flex-basis: 100%;
  }

  html[data-theme="app"] body.caja-no-scroll #productsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  html[data-theme="app"] body.caja-no-scroll .product-card {
    padding: 8px;
    font-size: 12px;
  }

  html[data-theme="app"] .cart-row {
    gap: 6px;
    padding: 6px 4px;
  }

  html[data-theme="app"] .cart-discount input,
  html[data-theme="app"] .cart-inc input {
    width: 52px;
  }

  html[data-theme="app"] .actions-block #payBtn,
  html[data-theme="app"] .actions-block #cancelBtn {
    min-height: 44px;
    font-size: 16px;
  }

  html[data-theme="app"] .caja-mobile-toggle {
    gap: 6px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }

  html[data-theme="app"] .caja-mobile-toggle button {
    font-size: 12px;
    padding: 8px 6px;
  }

  html[data-theme="app"] .mobile-nav.is-carousel .mobile-nav-btn {
    min-width: 84px;
    min-height: 50px;
  }
}

html[data-theme="experimental"] .caja-container {
  grid-template-columns: 1fr 440px;
  gap: 20px;
  padding: 20px;
}

html[data-theme="experimental"] #productsGrid {
  --product-row: 80px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 12px;
}

html[data-theme="experimental"] .product-card {
  padding: 12px;
  border-radius: 14px;
  font-size: 15px;
}

html[data-theme="experimental"] .cart-item {
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
}

html[data-theme="experimental"] .big-total {
  font-size: 32px;
  padding: 14px 16px;
}

html[data-theme="experimental"] #payBtn {
  font-size: 21px;
  padding: 16px;
}

html[data-theme="experimental"] .caja-left,
html[data-theme="experimental"] .caja-right {
  border: 1px solid var(--pos-border-soft);
  box-shadow: 0 16px 30px var(--shadow-1);
}

html[data-theme="experimental"] .caja-left h2,
html[data-theme="experimental"] .caja-right h2 {
  font-size: 22px;
  letter-spacing: 0.2px;
}

html[data-theme="experimental"] #buscadorProductos {
  padding: 14px 44px 14px 40px;
  font-size: 17px;
  border-radius: 16px;
}

html[data-theme="experimental"] .search-icon {
  font-size: 16px;
}

html[data-theme="experimental"] .search-scope {
  gap: 10px;
}

html[data-theme="experimental"] .scope-btn {
  padding: 9px 14px;
  font-size: 14px;
}

html[data-theme="experimental"] .scan-btn {
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 12px;
}

html[data-theme="experimental"] #cartActionsToggle {
  display: none;
}

html[data-theme="experimental"] .cart-actions-panel {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--pos-border-soft);
  box-shadow: none;
}

html[data-theme="experimental"] .cart-actions-panel[hidden] {
  display: flex;
}

html[data-theme="experimental"] .pos-action,
html[data-theme="experimental"] .pos-action-group button {
  padding: 12px 14px;
  border-radius: 14px;
}

html[data-theme="experimental"] .pos-action-group select {
  height: 42px;
  border-radius: 14px;
}

html[data-theme="experimental"] .qty-btn,
html[data-theme="experimental"] .remove-btn {
  padding: 8px 12px;
  border-radius: 12px;
}

html[data-theme="experimental"] .product-card,
html[data-theme="experimental"] .cart-item,
html[data-theme="experimental"] .pos-action,
html[data-theme="experimental"] .scope-btn,
html[data-theme="experimental"] .qty-btn,
html[data-theme="experimental"] .remove-btn {
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

html[data-theme="experimental"] .product-card:hover,
html[data-theme="experimental"] .cart-item:hover,
html[data-theme="experimental"] .pos-action:hover,
html[data-theme="experimental"] .scope-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--shadow-1);
}

html[data-theme="experimental"] .cart-row {
  background: var(--surface);
  border: 1px solid var(--pos-border-soft);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
  align-items: center;
  gap: 10px;
}

html[data-theme="experimental"] .cart-name {
  font-size: 15px;
}

html[data-theme="experimental"] .cart-qty-line {
  font-size: 13px;
}

html[data-theme="experimental"] .cart-discount input {
  width: 64px;
  padding: 6px 8px;
  border-radius: 10px;
}

html[data-theme="experimental"] .actions-block {
  gap: 10px;
}

html[data-theme="experimental"] .actions-block #payBtn,
html[data-theme="experimental"] .actions-block #cancelBtn {
  width: 100%;
}

html[data-theme="experimental"] .caja-mobile-toggle {
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 24px var(--shadow-2);
}

@media (max-width: 900px) {
  html[data-theme="experimental"] .caja-container {
    padding: 12px;
    padding-bottom: 76px;
  }
}

@media (max-width: 720px) {
  html[data-theme="experimental"] .cart-row {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 8px;
  }

  html[data-theme="experimental"] .cart-qty,
  html[data-theme="experimental"] .cart-discount {
    justify-self: start;
  }

  html[data-theme="experimental"] .cart-remove {
    justify-self: end;
  }
}

.theme-toggle {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

/* Mobile-exclusive theme overrides. */
html[data-mobile="1"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-row: #f8fafc;
  --surface-hover: #e2e8f0;
  --border: #e2e8f0;
  --border-soft: #e5e7eb;
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --accent-contrast: #ffffff;
  --focus-ring: rgba(14, 165, 233, 0.28);
  --shadow-1: rgba(15, 23, 42, 0.08);
  --shadow-2: rgba(15, 23, 42, 0.16);
}

html[data-mobile="1"] body.app-shell {
  font-size: 15px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
}

html[data-mobile="1"] body.app-shell .card {
  border-radius: 14px;
  box-shadow: 0 10px 22px var(--shadow-1);
}
