/* Counterlit — one UI language. Only the surface tokens change. */

:root,
html[data-theme="dark"] {
  --ui-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-text: #F6F1E8;
  --ui-muted: #C4B8A8;
  --ui-line: rgba(246, 241, 232, 0.42);
  --ui-surface: #231F1B;
  --ui-surface-2: #1C1917;
  --ui-accent: #E8A15A;
  --ui-accent-ink: #F6F1E8;
  --ui-accent-soft: rgba(232, 161, 90, 0.18);
  --ui-hover: rgba(232, 161, 90, 0.2);
  --ui-hover-ink: #F6F1E8;
  --ui-hover-line: #E8A15A;
  --ui-primary: #E8A15A;
  --ui-primary-ink: #1C1917;
  --ui-header: #1C1917;
  --ui-header-ink: #F6F1E8;
  --ui-row: rgba(28, 25, 23, 0.88);
  --ui-row-alt: rgba(232, 161, 90, 0.08);
  --ui-danger: #FCA5A5;
  --ui-ok: #6EE7B7;
}

html[data-theme="light"] {
  --ui-text: #1C1917;
  --ui-muted: #6B6259;
  --ui-line: #E6DDD0;
  --ui-surface: #FBF7F1;
  --ui-surface-2: #F6F1E8;
  --ui-accent: #9A5B2F;
  --ui-accent-ink: #9A5B2F;
  --ui-accent-soft: rgba(232, 161, 90, 0.22);
  --ui-hover: #F3E6D4;
  --ui-hover-ink: #9A5B2F;
  --ui-hover-line: #E8A15A;
  --ui-primary: #1C1917;
  --ui-primary-ink: #F6F1E8;
  --ui-header: #F3E6D4;
  --ui-header-ink: #1C1917;
  --ui-row: #FBF7F1;
  --ui-row-alt: #F6F1E8;
  --ui-danger: #9F1239;
  --ui-ok: #047857;
}

html body,
html body button,
html body input,
html body select,
html body textarea,
html body table,
html body label {
  font-family: var(--ui-font) !important;
}

html body {
  color: var(--ui-text);
}

html body h1,
html body h2,
html body h3,
html body h4 {
  font-family: var(--ui-font) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--ui-text);
}

html body .form-label,
html body label.form-label {
  font-family: var(--ui-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--ui-muted) !important;
}

/* Buttons — same pill, same weight, same hover in both themes */
html body .btn,
html body button.btn,
html body a.btn {
  font-family: var(--ui-font) !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  letter-spacing: 0.01em !important;
  line-height: 1.2 !important;
}

html body .btn-primary,
html body button.btn-primary,
html body a.btn-primary,
html body button.bg-\[\#1A1A1F\],
html body .bg-\[\#1A1A1F\].text-white,
html[data-theme="light"] body .btn-primary,
html[data-theme="light"] body button.btn-primary,
html[data-theme="light"] body button.bg-\[\#1A1A1F\] {
  background: var(--ui-primary) !important;
  color: var(--ui-primary-ink) !important;
  border: 0 !important;
  box-shadow: 0 10px 22px -12px rgba(154, 91, 47, 0.85) !important;
}

html body .btn-primary:hover,
html body button.btn-primary:hover,
html[data-theme="light"] body .btn-primary:hover {
  filter: brightness(1.08);
  color: #FFFFFF !important;
}

html body button.btn.btn-compact,
html body a.btn.btn-compact,
html[data-theme="light"] body button.btn.btn-compact,
html[data-theme="light"] body tbody td button.btn.btn-compact {
  padding: 6px 14px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  background: var(--ui-primary) !important;
  color: #FFFFFF !important;
  border: 0 !important;
}

html body .btn-primary i,
html body button.btn-primary i,
html[data-theme="light"] body .btn-primary i {
  color: #FFFFFF !important;
}

html body .btn-outline,
html body button.btn-outline,
html[data-theme="light"] body .btn-outline,
html[data-theme="light"] body button.btn-outline {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1.5px solid var(--ui-line) !important;
  box-shadow: none !important;
}

html body .btn-outline:hover,
html body button.btn-outline:hover,
html[data-theme="light"] body .btn-outline:hover,
html[data-theme="light"] body button.btn-outline:hover,
html body .admin-chip:hover,
html body .sub-item:hover,
html body .module-card:hover,
html body #pos-tools-scroll .btn:hover,
html body #loc-badge:hover,
html[data-theme="light"] body .sub-item:hover,
html[data-theme="light"] body .module-card:hover,
html[data-theme="light"] body #pos-tools-scroll .btn:hover,
html[data-theme="light"] body #loc-badge:hover {
  background: var(--ui-hover) !important;
  color: var(--ui-hover-ink) !important;
  border-color: var(--ui-hover-line) !important;
}

html body .btn-outline:hover i,
html body .sub-item:hover i,
html body .module-card:hover i,
html body #pos-tools-scroll .btn:hover i,
html[data-theme="light"] body .btn-outline:hover i,
html[data-theme="light"] body .sub-item:hover i {
  color: var(--ui-hover-ink) !important;
}

html body .btn-danger,
html body .btn-outline.text-red-500,
html body .btn-outline.text-red-600,
html body .btn-outline.text-rose-500,
html[data-theme="light"] body .btn-danger,
html[data-theme="light"] body .btn-outline.text-red-500 {
  background: transparent !important;
  color: var(--ui-danger) !important;
  border: 1.5px solid var(--ui-danger) !important;
}
html body .btn-danger:hover,
html body .btn-outline.text-red-500:hover,
html[data-theme="light"] body .btn-danger:hover,
html[data-theme="light"] body .btn-outline.text-red-500:hover {
  background: rgba(244, 63, 94, 0.12) !important;
  color: var(--ui-danger) !important;
  border-color: var(--ui-danger) !important;
}
html body .btn-danger i,
html body .btn-outline.text-red-500 i,
html body .btn-danger:hover i {
  color: var(--ui-danger) !important;
}

html body .btn-success,
html body .btn.btn-success {
  background: var(--ui-ok) !important;
  color: #052E16 !important;
  border: 0 !important;
}
html[data-theme="light"] body .btn-success {
  color: #FFFFFF !important;
}

/* Cards and list shells */
html body .card,
html[data-theme="light"] body .card,
html[data-theme="light"] body .module-card {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

html body button.card:hover,
html body a.card:hover,
html body .card.cursor-pointer:hover,
html body .location-card:hover,
html body .mode-card:hover,
html body .select-card:hover {
  background: var(--ui-hover) !important;
  color: var(--ui-hover-ink) !important;
  border-color: var(--ui-hover-line) !important;
}

/* Tables and lists — one header, one row, one hover */
html body table,
html body table.sortable-table,
html body .card table,
html[data-theme="light"] body table {
  background: transparent !important;
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
  font-family: var(--ui-font) !important;
}

html body table thead,
html body table thead tr,
html body table thead th,
html body thead th,
html body .overflow-x-auto > table thead th,
html body .overflow-y-auto > table thead th,
html body .modal-shell thead th,
html body #admin-content thead th,
html body #content-area thead th,
html[data-theme="light"] body table thead,
html[data-theme="light"] body table thead tr,
html[data-theme="light"] body table thead th,
html[data-theme="light"] body thead th,
html[data-theme="light"] body .overflow-x-auto > table thead th,
html[data-theme="light"] body .modal-shell thead th,
html[data-theme="light"] body #admin-content thead th,
html[data-theme="light"] body #content-area thead th {
  background: var(--ui-header) !important;
  color: var(--ui-header-ink) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  font-family: var(--ui-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  vertical-align: middle !important;
}

html body table thead th *,
html body thead th *,
html body thead th span,
html body thead th button,
html body thead th div,
html[data-theme="light"] body table thead th *,
html[data-theme="light"] body thead th *,
html[data-theme="light"] body thead th span,
html[data-theme="light"] body thead th button {
  color: var(--ui-header-ink) !important;
  font-family: var(--ui-font) !important;
  font-weight: 700 !important;
}

html body tbody tr,
html body table tbody tr,
html body .loc-row,
html body .user-row,
html body .list-row,
html[data-theme="light"] body tbody tr,
html[data-theme="light"] body table tbody tr,
html[data-theme="light"] body .loc-row,
html[data-theme="light"] body .user-row,
html[data-theme="light"] body .list-row {
  background: var(--ui-row) !important;
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
}

html body tbody tr:nth-child(even),
html body table tbody tr:nth-child(even),
html[data-theme="light"] body tbody tr:nth-child(even) {
  background: var(--ui-row-alt) !important;
}

html body tbody tr:hover,
html body table tbody tr:hover,
html body .loc-row:hover,
html body .user-row:hover,
html body .list-row:hover,
html[data-theme="light"] body tbody tr:hover,
html[data-theme="light"] body .loc-row:hover {
  background: var(--ui-hover) !important;
  color: var(--ui-hover-ink) !important;
  box-shadow: inset 0 0 0 1px var(--ui-hover-line) !important;
}

html body tbody td,
html body table tbody td,
html[data-theme="light"] body tbody td {
  color: var(--ui-text) !important;
  border-color: var(--ui-line) !important;
  font-family: var(--ui-font) !important;
  text-align: center !important;
  vertical-align: middle !important;
}

html body tbody td .text-xs,
html body tbody td .text-gray-400,
html body tbody td .text-gray-500,
html body tbody td .text-slate-400,
html body tbody td .text-slate-500,
html[data-theme="light"] body tbody td .text-xs,
html[data-theme="light"] body tbody td .text-slate-400 {
  color: var(--ui-muted) !important;
}

html body tbody tr:hover td,
html[data-theme="light"] body tbody tr:hover td {
  color: var(--ui-hover-ink) !important;
}
html body tbody tr:hover td .text-xs,
html body tbody tr:hover td .text-slate-400,
html[data-theme="light"] body tbody tr:hover td .text-xs {
  color: var(--ui-hover-ink) !important;
}

/* Active / highlight — same sky wash everywhere */
html body .loc-tab.active,
html body .user-tab.active,
html body .prod-tab.active,
html body .hub-tab.active,
html body .sub-item.active,
html body .crm-tab.bg-sky-500\/20,
html body .bk-tab.bg-sky-500\/20,
html body .filter-chip.active,
html[data-theme="light"] body .loc-tab.active,
html[data-theme="light"] body .user-tab.active,
html[data-theme="light"] body .prod-tab.active,
html[data-theme="light"] body .hub-tab.active,
html[data-theme="light"] body .sub-item.active,
html[data-theme="light"] body .crm-tab.bg-sky-500\/20,
html[data-theme="light"] body .bk-tab.bg-sky-500\/20,
html[data-theme="light"] body .crm-tab.text-sky-200,
html[data-theme="light"] body .bk-tab.text-sky-200 {
  background: var(--ui-accent-soft) !important;
  color: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
}

html body .loc-tab,
html body .user-tab,
html body .prod-tab,
html body .hub-tab,
html body .crm-tab,
html body .bk-tab,
html body .sub-item,
html body .filter-chip {
  font-family: var(--ui-font) !important;
  font-weight: 600 !important;
}

html body .loc-tab.active i,
html body .user-tab.active i,
html body .sub-item.active i,
html body .crm-tab.bg-sky-500\/20 i,
html body .bk-tab.bg-sky-500\/20 i,
html[data-theme="light"] body .loc-tab.active i,
html[data-theme="light"] body .sub-item.active i {
  color: var(--ui-accent) !important;
}

html body .text-sky-200,
html body .text-sky-300,
html body .text-sky-400,
html[data-theme="light"] body .text-sky-100,
html[data-theme="light"] body .text-sky-200,
html[data-theme="light"] body .text-sky-300,
html[data-theme="light"] body .text-sky-400 {
  color: var(--ui-accent) !important;
}

html body .text-emerald-400,
html body .text-green-500,
html body .text-green-600,
html[data-theme="light"] body .text-emerald-400,
html[data-theme="light"] body .text-green-600 {
  color: var(--ui-ok) !important;
}
html body .text-red-400,
html body .text-red-500,
html body .text-red-600,
html[data-theme="light"] body .text-red-500,
html[data-theme="light"] body .text-red-600 {
  color: var(--ui-danger) !important;
}

/* Inputs */
html body input.form-input,
html body textarea.form-input,
html body select.form-input,
html body input[type="text"],
html body input[type="search"],
html body input[type="number"],
html body input[type="email"],
html body input[type="tel"],
html body textarea,
html body select,
html[data-theme="light"] body input,
html[data-theme="light"] body textarea,
html[data-theme="light"] body select {
  font-family: var(--ui-font) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1.5px solid var(--ui-line) !important;
  border-radius: 12px !important;
}
html body input::placeholder,
html body textarea::placeholder {
  color: var(--ui-muted) !important;
}

/* Icons follow the control, not a forced cyan */
html body .btn i,
html body .card i,
html body .sub-item i,
html body .module-card i,
html body .sil-switcher-item i,
html body header .btn i,
html[data-theme="light"] body .btn i,
html[data-theme="light"] body .sil-switcher-item i,
html[data-theme="light"] body .sub-item i,
html[data-theme="light"] body .module-card i {
  color: inherit !important;
}

html body .mod-icon,
html body .module-card .mod-icon,
html[data-theme="light"] body .mod-icon {
  background: var(--ui-accent-soft) !important;
  color: var(--ui-accent) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html body .mod-icon i,
html body .module-card .mod-icon i,
html[data-theme="light"] body .mod-icon i {
  color: var(--ui-accent) !important;
}

/* Menus */
html body .sil-switcher-menu,
html[data-theme="light"] body .sil-switcher-menu {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 16px !important;
}
html body .sil-switcher-item,
html[data-theme="light"] body .sil-switcher-item {
  color: var(--ui-text) !important;
  font-family: var(--ui-font) !important;
  font-weight: 600 !important;
  background: transparent !important;
}
html body .sil-switcher-item:hover,
html[data-theme="light"] body .sil-switcher-item:hover {
  background: var(--ui-hover) !important;
  color: var(--ui-hover-ink) !important;
}
html body .sil-switcher-item:hover i,
html[data-theme="light"] body .sil-switcher-item:hover i {
  color: var(--ui-hover-ink) !important;
}
html body .sil-switcher-logout,
html body .sil-switcher-logout i,
html[data-theme="light"] body .sil-switcher-item.sil-switcher-logout,
html[data-theme="light"] body .sil-switcher-item.sil-switcher-logout i {
  color: var(--ui-danger) !important;
}

/* CRM / list chips already used as lanes */
html body .crm-hit-row,
html[data-theme="light"] body .crm-hit-row {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 14px !important;
}
html body .crm-hit-name,
html[data-theme="light"] body .crm-hit-name { color: var(--ui-text) !important; }
html body .crm-hit-phone,
html[data-theme="light"] body .crm-hit-phone { color: var(--ui-muted) !important; }
html body .crm-hit-row:hover {
  background: var(--ui-hover) !important;
  border-color: var(--ui-hover-line) !important;
}
html body .crm-lane,
html body .crm-chip,
html body .crm-metric,
html[data-theme="light"] body .crm-lane,
html[data-theme="light"] body .crm-chip,
html[data-theme="light"] body .crm-metric {
  background: var(--ui-surface-2) !important;
  color: var(--ui-text) !important;
  border: 1px solid var(--ui-line) !important;
}

html body table thead th:hover,
html body thead th:hover,
html[data-theme="light"] body table thead th:hover,
html[data-theme="light"] body thead th:hover {
  background: var(--ui-header) !important;
  color: var(--ui-header-ink) !important;
}

html body .overflow-hidden.rounded-xl,
html body .overflow-hidden.rounded-2xl,
html body .overflow-hidden.rounded-lg,
html[data-theme="light"] body .overflow-hidden.rounded-xl,
html[data-theme="light"] body .overflow-hidden.rounded-2xl,
html[data-theme="light"] body .overflow-hidden.rounded-lg {
  background: var(--ui-surface) !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-text) !important;
}

html body input[type="checkbox"],
html body input[type="radio"],
html body input[type="file"],
html body input[type="range"],
html body input[type="color"],
html body input[type="hidden"],
html[data-theme="light"] body input[type="checkbox"],
html[data-theme="light"] body input[type="radio"] {
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  background: transparent !important;
}



/* Readable primary buttons — cream on ink, no blue aura */
html body .btn-primary,
html body button.btn-primary,
html body a.btn-primary,
html[data-theme="light"] body .btn-primary,
html[data-theme="light"] body button.btn-primary,
html[data-theme="light"] body a.btn-primary,
html[data-theme="light"] body button.bg-\[\#1A1A1F\] {
  color: #F6F1E8 !important;
  -webkit-text-fill-color: #F6F1E8 !important;
  background: #1C1917 !important;
  box-shadow: 0 8px 16px -12px rgba(28, 25, 23, 0.35) !important;
}
html body .btn-primary i,
html body button.btn-primary i,
html[data-theme="light"] body .btn-primary i,
html[data-theme="light"] body button.btn-primary i {
  color: #F6F1E8 !important;
  -webkit-text-fill-color: #F6F1E8 !important;
}
html body .text-sky-500,
html body .text-sky-600,
html body .text-sky-700,
html[data-theme="light"] body .text-sky-500,
html[data-theme="light"] body .text-sky-600,
html[data-theme="light"] body .text-sky-700 {
  color: #9A5B2F !important;
}

/* OTP in flight */
#login-otp-wrap,
#bill-wipe-otp { position: relative; }
#login-otp-wrap.is-busy::after,
#bill-wipe-otp.is-busy::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 30px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(232, 161, 90, 0.35);
  border-top-color: #E8A15A;
  animation: otp-spin 0.7s linear infinite;
}
@keyframes otp-spin { to { transform: rotate(360deg); } }

/* Logo: dim the tile, amber aura at full dim */
img[src*="logo-mark"] {
  animation: cl-mark-aura 2.6s ease-in-out infinite;
}
@keyframes cl-mark-aura {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(232, 161, 90, 0.75), 0 0 18px 6px rgba(196, 132, 58, 0.8);
    filter: brightness(0.55);
  }
  50% {
    box-shadow: 0 0 0 0 rgba(232, 161, 90, 0);
    filter: brightness(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  img[src*="logo-mark"] { animation: none; filter: none; box-shadow: none; }
}

/* Dark theme — one ink surface. Light rules above must not leak in. */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] body.login-hub,
html[data-theme="dark"] body.bg-\[\#F6F1E8\],
html[data-theme="dark"] body.bg-slate-950 {
  background: #14110E !important;
  background-image: none !important;
  color: #F6F1E8 !important;
  color-scheme: dark;
}
html[data-theme="dark"] body.login-hub {
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(232, 161, 90, 0.16), transparent 55%),
    #14110E !important;
}
html[data-theme="dark"] header,
html[data-theme="dark"] header.sticky,
html[data-theme="dark"] header.bg-white,
html[data-theme="dark"] header.h-16,
html[data-theme="dark"] .admin-top,
html[data-theme="dark"] #admin-header,
html[data-theme="dark"] .sticky.top-0 {
  background: #1C1917 !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.14) !important;
}
html[data-theme="dark"] header .logo-font,
html[data-theme="dark"] header h1,
html[data-theme="dark"] header .text-slate-400,
html[data-theme="dark"] body.login-hub .logo-font,
html[data-theme="dark"] body.login-hub #brand-title {
  color: #F6F1E8 !important;
}
html[data-theme="dark"] body.login-hub #brand-subtitle { color: #E8A15A !important; }
html[data-theme="dark"] body.login-hub .sil-brand-on-dark { display: block !important; }
html[data-theme="dark"] body.login-hub .sil-brand-on-light { display: none !important; }

html[data-theme="dark"] .card,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .module-card.active,
html[data-theme="dark"] .location-card,
html[data-theme="dark"] .mode-card,
html[data-theme="dark"] .select-card,
html[data-theme="dark"] body.login-hub .card,
html[data-theme="dark"] body.login-hub #login-card,
html[data-theme="dark"] #ui-busy-card,
html[data-theme="dark"] #co-backup-ov-card {
  background: #231F1B !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.16) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .module-card.active {
  background: #2A241F !important;
  border-color: #E8A15A !important;
}
html[data-theme="dark"] .module-card .mod-icon,
html[data-theme="dark"] .mod-icon {
  background: rgba(232, 161, 90, 0.16) !important;
  color: #E8A15A !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .module-card i,
html[data-theme="dark"] .mod-icon i {
  color: #E8A15A !important;
}

html[data-theme="dark"] #sub-menu.sub-menu-horizontal,
html[data-theme="dark"] #sub-menu.sub-menu-horizontal .sub-item,
html[data-theme="dark"] .sub-item,
html[data-theme="dark"] #cloud-owner-tools .admin-chip,
html[data-theme="dark"] .loc-tab,
html[data-theme="dark"] .user-tab,
html[data-theme="dark"] .prod-tab,
html[data-theme="dark"] .hub-tab,
html[data-theme="dark"] .crm-tab,
html[data-theme="dark"] .bk-tab,
html[data-theme="dark"] .filter-chip {
  background: #1C1917 !important;
  color: #C4B8A8 !important;
  border-color: rgba(246, 241, 232, 0.16) !important;
}
html[data-theme="dark"] .sub-item:hover,
html[data-theme="dark"] .sub-item.active,
html[data-theme="dark"] .loc-tab.active,
html[data-theme="dark"] .user-tab.active,
html[data-theme="dark"] .prod-tab.active,
html[data-theme="dark"] .hub-tab.active,
html[data-theme="dark"] .admin-chip:hover,
html[data-theme="dark"] #cloud-owner-tools .admin-chip:hover,
html[data-theme="dark"] body.login-hub .hub-badge {
  background: rgba(232, 161, 90, 0.16) !important;
  color: #F3E6D4 !important;
  border-color: #E8A15A !important;
}

html[data-theme="dark"] body .btn-primary,
html[data-theme="dark"] body button.btn-primary,
html[data-theme="dark"] body a.btn-primary,
html[data-theme="dark"] body button.btn.btn-compact,
html[data-theme="dark"] body a.btn.btn-compact,
html[data-theme="dark"] body button.bg-\[\#1A1A1F\],
html[data-theme="dark"] body.login-hub #login-submit {
  background: #E8A15A !important;
  color: #1C1917 !important;
  -webkit-text-fill-color: #1C1917 !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body .btn-primary:hover,
html[data-theme="dark"] body button.btn-primary:hover,
html[data-theme="dark"] body.login-hub #login-submit:hover {
  background: #F0B56E !important;
  color: #1C1917 !important;
  -webkit-text-fill-color: #1C1917 !important;
  filter: none !important;
}
html[data-theme="dark"] body .btn-primary i,
html[data-theme="dark"] body button.btn-primary i,
html[data-theme="dark"] body .btn-primary *,
html[data-theme="dark"] body button.btn-primary * {
  color: #1C1917 !important;
  -webkit-text-fill-color: #1C1917 !important;
}
html[data-theme="dark"] body .btn-outline,
html[data-theme="dark"] body button.btn-outline,
html[data-theme="dark"] body .btn-ghost,
html[data-theme="dark"] body button.btn-ghost {
  background: transparent !important;
  color: #F6F1E8 !important;
  -webkit-text-fill-color: #F6F1E8 !important;
  border: 1.5px solid rgba(246, 241, 232, 0.28) !important;
}
html[data-theme="dark"] body .btn-outline:hover,
html[data-theme="dark"] body button.btn-outline:hover {
  background: rgba(232, 161, 90, 0.16) !important;
  color: #F6F1E8 !important;
  border-color: #E8A15A !important;
}
html[data-theme="dark"] body .btn-danger,
html[data-theme="dark"] body .btn-outline.text-red-500 {
  background: transparent !important;
  color: #FCA5A5 !important;
  -webkit-text-fill-color: #FCA5A5 !important;
  border-color: #FCA5A5 !important;
}
html[data-theme="dark"] body .btn-success {
  background: #6EE7B7 !important;
  color: #052E16 !important;
  -webkit-text-fill-color: #052E16 !important;
}

html[data-theme="dark"] body input.form-input,
html[data-theme="dark"] body textarea.form-input,
html[data-theme="dark"] body select.form-input,
html[data-theme="dark"] body input[type="text"],
html[data-theme="dark"] body input[type="search"],
html[data-theme="dark"] body input[type="number"],
html[data-theme="dark"] body input[type="email"],
html[data-theme="dark"] body input[type="tel"],
html[data-theme="dark"] body input[type="password"],
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select,
html[data-theme="dark"] body.login-hub .form-input {
  background: #1C1917 !important;
  color: #F6F1E8 !important;
  -webkit-text-fill-color: #F6F1E8 !important;
  border: 1.5px solid rgba(246, 241, 232, 0.48) !important;
}
html[data-theme="dark"] body input::placeholder,
html[data-theme="dark"] body textarea::placeholder,
html[data-theme="dark"] body.login-hub .form-input::placeholder {
  color: #A89888 !important;
  -webkit-text-fill-color: #A89888 !important;
}
html[data-theme="dark"] body select option {
  color: #1C1917 !important;
  background: #FFFFFF !important;
}
html[data-theme="dark"] body .form-label,
html[data-theme="dark"] body.login-hub .form-label,
html[data-theme="dark"] body.login-hub #login-heading,
html[data-theme="dark"] body.login-hub .hub-link {
  color: #C4B8A8 !important;
}

html[data-theme="dark"] body table,
html[data-theme="dark"] body thead,
html[data-theme="dark"] body thead tr,
html[data-theme="dark"] body thead th,
html[data-theme="dark"] body table thead th {
  background: #2A241F !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.42) !important;
}
html[data-theme="dark"] body thead th:hover,
html[data-theme="dark"] body table thead th:hover {
  background: #3A3028 !important;
  color: #F6F1E8 !important;
}
html[data-theme="dark"] body tbody tr,
html[data-theme="dark"] body tbody td {
  background: #1C1917 !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.38) !important;
}
html[data-theme="dark"] body tbody tr:nth-child(even),
html[data-theme="dark"] body tbody tr:nth-child(even) td {
  background: #231F1B !important;
}
html[data-theme="dark"] body tbody tr:hover,
html[data-theme="dark"] body tbody tr:hover td {
  background: rgba(232, 161, 90, 0.14) !important;
  color: #F6F1E8 !important;
}

html[data-theme="dark"] .modal-shell,
html[data-theme="dark"] .modal-shell-lg,
html[data-theme="dark"] .modal-shell-sm,
html[data-theme="dark"] .modal-shell-header,
html[data-theme="dark"] .ui-dialog-card,
html[data-theme="dark"] .ui-dialog-head,
html[data-theme="dark"] .ui-dialog-body,
html[data-theme="dark"] .ui-dialog-actions,
html[data-theme="dark"] .ui-cred-shell {
  background: #1C1917 !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.16) !important;
}
html[data-theme="dark"] .ui-dialog-head h3,
html[data-theme="dark"] [id$="-modal"] h3,
html[data-theme="dark"] [id$="-modal"] label,
html[data-theme="dark"] [id$="-modal"] .form-label {
  color: #F6F1E8 !important;
}
html[data-theme="dark"] .text-slate-100,
html[data-theme="dark"] .text-slate-200,
html[data-theme="dark"] .text-slate-300,
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-\[\#1A1A1F\] {
  color: #F6F1E8 !important;
}
html[data-theme="dark"] .text-slate-400,
html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-gray-400 {
  color: #C4B8A8 !important;
}

/* Sub-module bars that were still painted cream */
html[data-theme="dark"] #module-workspace > .border-b,
html[data-theme="dark"] div[style*="#FBF7F1"],
html[data-theme="dark"] div[style*="#F6F1E8"],
html[data-theme="dark"] header[style*="#F6F1E8"] {
  background: #1C1917 !important;
  background-color: #1C1917 !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.42) !important;
}
html[data-theme="dark"] #module-title,
html[data-theme="dark"] #modules-home h1 {
  color: #F6F1E8 !important;
}
html[data-theme="dark"] #module-desc,
html[data-theme="dark"] #modules-home p {
  color: #C4B8A8 !important;
}

/* List, table, and field outlines — visible on ink */
html[data-theme="dark"] .card,
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-b,
html[data-theme="dark"] .border-t,
html[data-theme="dark"] .border-slate-600,
html[data-theme="dark"] .border-slate-700,
html[data-theme="dark"] .border-slate-800,
html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-100,
html[data-theme="dark"] .border-\[\#E4E2E8\],
html[data-theme="dark"] .divide-y > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .overflow-hidden.rounded-xl,
html[data-theme="dark"] .overflow-hidden.rounded-2xl,
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] button.btn-outline {
  border-color: rgba(246, 241, 232, 0.46) !important;
}

/* Loading cards — ink surface, cream type, amber meter */
html[data-theme="dark"] #ui-busy-overlay,
html[data-theme="dark"] #pos-boot-sync,
html[data-theme="dark"] #sil-restore-lock {
  background: rgba(10, 8, 7, 0.62) !important;
}
html[data-theme="dark"] #ui-busy-card,
html[data-theme="dark"] #pos-boot-sync > div,
html[data-theme="dark"] #sil-restore-lock > div,
html[data-theme="dark"] #co-backup-ov-card {
  background: #231F1B !important;
  color: #F6F1E8 !important;
  border-color: rgba(246, 241, 232, 0.18) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] #ui-busy-title,
html[data-theme="dark"] #ui-busy-counter,
html[data-theme="dark"] #ui-busy-done,
html[data-theme="dark"] #ui-busy-total,
html[data-theme="dark"] #pos-boot-sync-title,
html[data-theme="dark"] #sil-restore-title,
html[data-theme="dark"] #co-backup-ov-title {
  color: #F6F1E8 !important;
}
html[data-theme="dark"] #ui-busy-detail,
html[data-theme="dark"] #pos-boot-sync-sub,
html[data-theme="dark"] #sil-restore-sub {
  color: #C4B8A8 !important;
}
html[data-theme="dark"] #ui-busy-pct,
html[data-theme="dark"] #pos-boot-sync-pct,
html[data-theme="dark"] #sil-restore-pct {
  color: #E8A15A !important;
}
html[data-theme="dark"] #ui-busy-card div:has(> #ui-busy-bar),
html[data-theme="dark"] #pos-boot-sync div:has(> #pos-boot-sync-bar),
html[data-theme="dark"] #sil-restore-bar-wrap {
  background: #3A3028 !important;
}
html[data-theme="dark"] #ui-busy-bar,
html[data-theme="dark"] #pos-boot-sync-bar,
html[data-theme="dark"] #sil-restore-bar {
  background: linear-gradient(90deg, #E8A15A, #C4843A) !important;
}
html[data-theme="dark"] #sil-restore-sync {
  background: #E8A15A !important;
  color: #1C1917 !important;
}


