/* DISTHUB — Distivo-inspired light dashboard + dark mode (fonts loaded in layout) */
:root {
  --dh-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --dh-green: #16a34a;
  --dh-green-soft: #dcfce7;
  --dh-green-dark: #15803d;
  --dh-teal: #0d9488;
  --dh-blue: #2563eb;
  --dh-orange: #ea580c;
  --dh-red: #dc2626;
  --dh-page: #f1f5f9;
  --dh-surface: #ffffff;
  --dh-bg: #f8fafc;
  --dh-border: #e2e8f0;
  --dh-text: #0f172a;
  --dh-muted: #64748b;
  --dh-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --dh-radius: 16px;
  --dh-radius-sm: 12px;
  --dh-sidebar-w: 252px;
}

.disthub-module-theme {
  --dh-module-page-max: 1380px;
}

.disthub-root.theme-dark {
  --dh-page: #0f1419;
  --dh-surface: #1a2332;
  --dh-bg: #141c27;
  --dh-border: #2d3b4f;
  --dh-text: #f1f5f9;
  --dh-muted: #94a3b8;
  --dh-green-soft: rgba(22, 163, 74, 0.2);
  --dh-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html.disthub-root {
  scroll-behavior: smooth;
}

body.disthub-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--dh-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--dh-text);
  background: var(--dh-page);
}

.dh-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dh-muted {
  color: var(--dh-muted);
  font-size: 0.9rem;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ——— Sidebar ——— */
.sidebar {
  width: var(--dh-sidebar-w);
  flex-shrink: 0;
  background: var(--dh-surface);
  border-right: 1px solid var(--dh-border);
  padding: 0.85rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
  z-index: 30;
  box-shadow: 4px 0 32px rgba(15, 23, 42, 0.04);
}

.sidebar-menu {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.45rem 0.65rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--dh-green) 0%, var(--dh-green-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
}

.sidebar-brand-logo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.sidebar-brand-logo-img {
  width: 56px;
  height: 56px;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 11px;
}

.sidebar-title {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--dh-text);
  line-height: 1.15;
}

.sidebar-tagline {
  font-size: 0.7rem;
  color: var(--dh-muted);
  margin-top: 0.1rem;
  line-height: 1.2;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dh-muted);
  margin: 0.55rem 0 0.2rem 0.5rem;
  padding: 0;
}

.sidebar-section-label:first-child {
  margin-top: 0.15rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.55rem;
  border-radius: 10px;
  color: var(--dh-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.25;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-item svg,
.nav-item .nav-icon-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.92;
}

.nav-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.nav-item-icon--home { background: #ecfdf5; color: #059669; }
.nav-item-icon--bills { background: #ccfbf1; color: #0f766e; }
.nav-item-icon--assign { background: #e0f2fe; color: #0369a1; }
.nav-item-icon--employee_hisab { background: #fef3c7; color: #b45309; }
.nav-item-icon--manage_hisab { background: #ede9fe; color: #6d28d9; }
.nav-item-icon--daily_hisab { background: #ccfbf1; color: #0f766e; }
.nav-item-icon--my_hisab { background: #fce7f3; color: #be185d; }
.nav-item-icon--unpaid { background: #fee2e2; color: #dc2626; }
.nav-item-icon--missing { background: #ffedd5; color: #c2410c; }
.nav-item-icon--parties { background: #f1f5f9; color: #475569; }
.nav-item-icon--permissions { background: #dbeafe; color: #1d4ed8; }
.nav-item-icon--signout { background: #f1f5f9; color: #64748b; }

.nav-item-icon--role {
  background: transparent;
  padding: 0;
}

.nav-item-icon--role .dh-etype-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-item.is-active .nav-item-icon--home { background: #059669; color: #fff; }
.nav-item.is-active .nav-item-icon--bills { background: #0f766e; color: #fff; }
.nav-item.is-active .nav-item-icon--assign { background: #0369a1; color: #fff; }
.nav-item.is-active .nav-item-icon--employee_hisab { background: #b45309; color: #fff; }
.nav-item.is-active .nav-item-icon--manage_hisab { background: #6d28d9; color: #fff; }
.nav-item.is-active .nav-item-icon--daily_hisab { background: #0d9488; color: #fff; }
.nav-item.is-active .nav-item-icon--my_hisab { background: #be185d; color: #fff; }
.nav-item.is-active .nav-item-icon--unpaid { background: #dc2626; color: #fff; }
.nav-item.is-active .nav-item-icon--missing { background: #c2410c; color: #fff; }
.nav-item.is-active .nav-item-icon--parties { background: #475569; color: #fff; }
.nav-item.is-active .nav-item-icon--permissions { background: #1d4ed8; color: #fff; }

.nav-item--signout:hover:not(.nav-item--disabled) {
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.15);
}

.nav-item--signout:hover .nav-item-icon--signout {
  background: #dc2626;
  color: #fff;
}

.disthub-root.theme-dark .nav-item--signout:hover:not(.nav-item--disabled) {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
}

.disthub-root.theme-dark .nav-item--signout:hover .nav-item-icon--signout {
  background: #dc2626;
  color: #fff;
}

.nav-item.is-active .nav-item-icon--role .dh-etype-badge {
  box-shadow: 0 0 0 2px var(--dh-green);
}

.nav-item:hover:not(.nav-item--disabled) {
  background: var(--dh-page);
  color: var(--dh-text);
}

.nav-item.is-active {
  background: var(--dh-green-soft);
  color: var(--dh-green-dark);
  border-color: rgba(22, 163, 74, 0.25);
  box-shadow: inset 4px 0 0 var(--dh-green);
}

.disthub-root.theme-dark .nav-item:not(.is-active) {
  color: #cbd5e1;
}

.disthub-root.theme-dark .nav-item:hover:not(.is-active):not(.nav-item--disabled) {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.45);
}

.disthub-root.theme-dark .nav-item.is-active {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.nav-item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--dh-border);
  flex-shrink: 0;
}

.sidebar-footer-user-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.sidebar-footer-user-row .sidebar-user-card {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.sidebar-nav--footer {
  margin-bottom: 0.35rem;
}

.sidebar-theme-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--dh-border);
  background: var(--dh-page);
  color: var(--dh-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.sidebar-theme-icon-btn:hover {
  background: var(--dh-green-soft);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--dh-green-dark, #15803d);
}

.sidebar-theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-theme-icon .nav-icon-svg {
  width: 18px;
  height: 18px;
}

.disthub-root:not(.theme-dark) .sidebar-theme-icon--sun {
  display: none;
}

.disthub-root.theme-dark .sidebar-theme-icon--moon {
  display: none;
}

.main-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-height: 40px;
  margin-top: 0.5rem;
  padding: 0.28rem 0.65rem;
  background: var(--dh-page);
  border-bottom: 1px solid var(--dh-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.main-topbar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  background: var(--dh-surface);
  color: var(--dh-text);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.main-topbar-toggle:hover {
  background: var(--dh-green-soft);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--dh-green-dark, #15803d);
}

.main-topbar-toggle.is-sidebar-open {
  border-color: rgba(13, 148, 136, 0.45);
  background: var(--dh-green-soft);
  color: var(--dh-green-dark, #0f766e);
}

.main-topbar-hamburger {
  display: block;
  width: 16px;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
  opacity: 1;
}

.main-topbar-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dh-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Teal module pages: no extra header strip — button sits on the hero */
.main:has(.assign-hero) {
  position: relative;
  padding-top: 0.65rem;
}

.main:has(.assign-hero) .main-topbar {
  position: absolute;
  top: 0.65rem;
  left: 1.25rem;
  z-index: 25;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.main:has(.assign-hero) .main-topbar-toggle {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.75);
  color: #0f172a;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
}

.main:has(.assign-hero) .main-topbar-toggle:hover {
  background: #fff;
  border-color: #fff;
  color: #0f766e;
}

.main:has(.assign-hero) .main-topbar-toggle.is-sidebar-open {
  background: #fff;
  border-color: #fff;
  color: #0f766e;
}

.main:has(.assign-hero) .main-topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main:has(.assign-hero) .content {
  padding-top: 0;
}

.main:has(.assign-hero) .assign-hero {
  padding-left: 2.85rem;
}

html.disthub-focus-mode .app-shell .sidebar {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
}

html.disthub-focus-mode .app-shell .main {
  flex: 1;
  width: 100%;
  max-width: 100%;
}

html.disthub-focus-mode .content {
  max-width: none;
}

html.disthub-focus-mode .assign-page {
  max-width: none;
}

html.disthub-focus-mode .sidebar-backdrop {
  display: none !important;
}

.nav-open-label {
  display: none !important;
}

.disthub-root.theme-dark .sidebar-theme-icon-btn {
  background: rgba(0, 0, 0, 0.2);
  border-color: var(--dh-border);
  color: #cbd5e1;
}

.disthub-root.theme-dark .sidebar-theme-icon-btn:hover {
  background: rgba(13, 148, 136, 0.2);
  border-color: rgba(45, 212, 191, 0.45);
  color: #5eead4;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: var(--dh-green-soft);
  border: 1px solid rgba(22, 163, 74, 0.2);
  margin-bottom: 0.45rem;
}

.disthub-root.theme-dark .sidebar-user-card {
  background: rgba(22, 163, 74, 0.12);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dh-green);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dh-text);
}

.sidebar-user-email {
  font-size: 0.75rem;
}

.sidebar-version {
  font-size: 0.72rem;
  color: var(--dh-muted);
  text-align: center;
}

/* ——— Main ——— */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--dh-page);
}

.icon-moon {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset -3px -1px 0 0 currentColor;
  opacity: 0.75;
}

.icon-moon.sm {
  width: 14px;
  height: 14px;
}

.content {
  padding: 1rem 1.25rem 2rem;
  flex: 1;
}

.disthub-module-theme .content {
  padding-left: 1rem;
  padding-right: 1rem;
}

.disthub-module-theme .assign-page {
  max-width: var(--dh-module-page-max);
}

.main:not(:has(.assign-hero)) .content {
  padding-top: 0.5rem;
}

.content-lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ——— Page hero (bills / home blocks) ——— */
.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.page-hero-left {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.page-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--dh-green-soft);
  color: var(--dh-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.page-hero h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-hero .dh-lead {
  margin: 0.25rem 0 0;
  color: var(--dh-muted);
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.bill-kind-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.bill-kind-segment {
  display: inline-flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  padding: 4px;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.bill-kind-segment .bill-kind-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.95rem;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  color: var(--dh-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.bill-kind-seg-icon {
  flex-shrink: 0;
}

.bill-kind-segment .bill-kind-seg:hover:not(.is-on) {
  background: rgba(15, 23, 42, 0.04);
}

.bill-kind-segment .bill-kind-seg.is-on {
  background: #e8ecf1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.bill-kind-segment .bill-kind-seg--cash:not(.is-on) {
  color: #0d9488;
}

.bill-kind-segment .bill-kind-seg--debit:not(.is-on) {
  color: #b91c1c;
}

.bill-kind-segment .bill-kind-seg--cash.is-on {
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.35);
}

.bill-kind-segment .bill-kind-seg--debit.is-on {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.bill-kind-refresh.icon-btn {
  flex-shrink: 0;
}

.bill-kind-refresh.is-spinning svg {
  animation: dh-refresh-spin 0.75s linear infinite;
}

.pill-group {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  padding: 3px;
  gap: 2px;
}

.pill-group a,
.pill-group span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--dh-muted);
}

li.bill-card[hidden],
li.bill-card.bill-card--kind-hidden {
  display: none !important;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dh-muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.icon-btn:hover {
  border-color: var(--dh-green);
  color: var(--dh-green);
}

/* ——— Stats ——— */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.stat-tile {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--dh-shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

a.stat-tile-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.stat-tile-link:hover {
  border-color: var(--dh-teal);
  box-shadow: var(--dh-shadow-lg, 0 4px 14px rgba(0, 0, 0, 0.08));
}

.stat-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-tile-icon.green {
  background: #dcfce7;
  color: var(--dh-green);
}
.stat-tile-icon.teal {
  background: #ccfbf1;
  color: var(--dh-teal);
}
.stat-tile-icon.blue {
  background: #dbeafe;
  color: var(--dh-blue);
}
.stat-tile-icon.orange {
  background: #ffedd5;
  color: var(--dh-orange);
}

.stat-tile--alert {
  border: 2px solid var(--dh-orange);
  background: color-mix(in srgb, var(--dh-orange) 10%, var(--dh-surface));
}

.dashboard-per-day-table tr.row-zero-bills td {
  background: color-mix(in srgb, var(--dh-orange) 14%, var(--dh-surface));
}

.disthub-root.theme-dark .stat-tile-icon.green {
  background: rgba(22, 163, 74, 0.2);
}
.disthub-root.theme-dark .stat-tile-icon.teal {
  background: rgba(13, 148, 136, 0.2);
}
.disthub-root.theme-dark .stat-tile-icon.blue {
  background: rgba(37, 99, 235, 0.2);
}
.disthub-root.theme-dark .stat-tile-icon.orange {
  background: rgba(234, 88, 12, 0.2);
}

.stat-tile-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dh-muted);
}

.stat-tile-value {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dh-text);
  line-height: 1.1;
  margin-top: 0.2rem;
}

/* ——— Cards ——— */
.dh-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--dh-shadow);
}

.dh-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dh-text);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-family: var(--dh-font);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}

.btn-primary {
  background: linear-gradient(180deg, #22c55e 0%, var(--dh-green-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--dh-surface);
  color: var(--dh-text);
  border: 1px solid var(--dh-border);
}

.btn-secondary:hover {
  border-color: var(--dh-green);
  color: var(--dh-green);
}

code {
  font-size: 0.84em;
  background: var(--dh-page);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  border: 1px solid var(--dh-border);
}

/* ——— Bills toolbar (search, area, date) ——— */
.bill-toolbar-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.bill-toolbar-form .toolbar-inline {
  margin-bottom: 0;
}

.bill-toolbar-form .toolbar-date-row {
  margin-bottom: 0;
}

.toolbar-area-row,
.toolbar-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.toolbar-filters-row {
  justify-content: flex-start;
}

.toolbar-date-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  flex: 0 1 auto;
}

.toolbar-filters-row .filter-area {
  flex: 1 1 auto;
  min-width: min(200px, 100%);
}

.bill-summary-grid {
  margin: 0.15rem 0 0.35rem;
}

.bill-summary-grid.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.5rem;
}

@media (max-width: 720px) {
  .bill-summary-grid.stats-grid {
    grid-template-columns: 1fr;
  }
}

.bill-toolbar-form .bill-summary-grid .stat-tile {
  min-height: 88px;
}

.bill-toolbar-form .bill-summary-grid .stat-tile-icon svg {
  display: block;
}

.filter-area {
  position: relative;
  display: inline-block;
  max-width: 100%;
  z-index: 30;
}

.filter-area-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: min(420px, 100%);
  padding: 0.45rem 0.75rem 0.45rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  background: var(--dh-surface);
  box-shadow: var(--dh-shadow);
  font-family: var(--dh-font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dh-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-area-trigger:hover {
  border-color: var(--dh-green);
}

.filter-area-trigger.is-open,
.filter-area-trigger:focus-visible {
  border-color: var(--dh-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
  outline: none;
}

.filter-area-pin {
  flex-shrink: 0;
  color: var(--dh-green);
}

.filter-area-label {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
}

.filter-area-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-left: 0.15rem;
  border-right: 2px solid var(--dh-muted);
  border-bottom: 2px solid var(--dh-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}

.filter-area-trigger.is-open .filter-area-chevron {
  transform: rotate(225deg) translateY(2px);
}

.filter-area-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: max(100%, min(280px, 92vw));
  max-width: min(420px, calc(100vw - 2rem));
  max-height: min(320px, 55vh);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.filter-area-popover[hidden] {
  display: none !important;
  pointer-events: none;
}

.filter-area-listbox {
  overflow-y: auto;
  padding: 0.35rem;
  max-height: min(300px, 52vh);
}

.filter-area-opt {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: var(--dh-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dh-text);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.filter-area-opt:hover {
  background: var(--dh-page);
}

.filter-area-opt.is-selected,
.filter-area-opt[aria-selected="true"] {
  background: var(--dh-blue);
  color: #fff;
}

.filter-area-opt.is-selected:hover,
.filter-area-opt[aria-selected="true"]:hover {
  background: #1d4ed8;
  color: #fff;
}

.disthub-root.theme-dark .filter-area-popover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.disthub-root.theme-dark .filter-area-opt:hover {
  background: rgba(148, 163, 184, 0.12);
}

.disthub-root.theme-dark .filter-area-opt.is-selected,
.disthub-root.theme-dark .filter-area-opt[aria-selected="true"] {
  background: var(--dh-blue);
  color: #f8fafc;
}

/* ——— Search toolbar (input + buttons inline) ——— */
.toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.toolbar-inline .search-bar {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
}

.toolbar-inline-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.toolbar-inline-meta {
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .toolbar-inline-meta {
    width: 100%;
    margin-left: 0;
    text-align: right;
  }
}

.toolbar-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.btn-filter-by-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  background: var(--dh-surface);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--dh-shadow);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.btn-filter-by-date:hover {
  border-color: var(--dh-green);
  background: var(--dh-green-soft);
  color: var(--dh-green-dark);
}

.btn-filter-by-date-icon {
  flex-shrink: 0;
  color: var(--dh-green);
}

.toolbar-date-active {
  font-size: 0.86rem;
}

.toolbar-date-clear {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--dh-muted);
  text-decoration: none;
}

.toolbar-date-clear:hover {
  color: var(--dh-green);
  text-decoration: underline;
}

.search-bar {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  font-family: var(--dh-font);
  font-size: 0.92rem;
  color: var(--dh-text);
  box-shadow: var(--dh-shadow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1rem 50%;
}

.search-bar:focus {
  outline: none;
  border-color: var(--dh-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.filter-select {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  font-family: var(--dh-font);
  font-size: 0.88rem;
  color: var(--dh-text);
  cursor: pointer;
}

/* ——— Bill list (card rows) ——— */
.dh-sync-banner {
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--dh-text);
}

.dh-sync-banner a {
  margin-left: 0.5rem;
  font-weight: 600;
  color: var(--dh-green-dark, #15803d);
}

.disthub-root.theme-dark .dh-sync-banner {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}

.dh-auto-sync-badge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.disthub-root.theme-dark .dh-auto-sync-badge {
  color: #86efac;
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(74, 222, 128, 0.35);
}

.dh-auto-sync-toast {
  position: fixed;
  left: 50%;
  bottom: 3.25rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 95;
  max-width: min(92vw, 420px);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  background: #15803d;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dh-auto-sync-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dh-bill-poll-badge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.dh-bill-poll-badge.has-new {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fdba74;
}

.disthub-root.theme-dark .dh-bill-poll-badge {
  color: #93c5fd;
  background: rgba(30, 64, 175, 0.2);
  border-color: rgba(147, 197, 253, 0.35);
}

.disthub-root.theme-dark .dh-bill-poll-badge.has-new {
  color: #fdba74;
  background: rgba(154, 52, 18, 0.2);
  border-color: rgba(253, 186, 116, 0.4);
}

.dh-bill-poll-notice {
  position: fixed;
  left: 50%;
  bottom: 3.25rem;
  transform: translateX(-50%) translateY(16px);
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(94vw, 520px);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  background: #c2410c;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dh-bill-poll-notice.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dh-bill-poll-notice-text {
  flex: 1;
  line-height: 1.35;
}

.dh-bill-poll-sync-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #c2410c;
  background: #fff;
  cursor: pointer;
}

.dh-bill-poll-sync-btn:hover {
  background: #ffedd5;
}

.dh-bill-poll-dismiss {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: transparent;
  cursor: pointer;
  opacity: 0.85;
}

.dh-bill-poll-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.12);
}

.bill-canvas-bag-panel {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 42%);
}

.disthub-root.theme-dark .bill-canvas-bag-panel {
  border-color: rgba(251, 146, 60, 0.35);
  background: linear-gradient(180deg, rgba(154, 52, 18, 0.12) 0%, var(--dh-card, #1e293b) 48%);
}

.bill-canvas-bag-rule {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.bill-canvas-bag-block {
  margin-bottom: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #fde68a;
}

.disthub-root.theme-dark .bill-canvas-bag-block {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(251, 191, 36, 0.25);
}

.bill-canvas-bag-block--group {
  border-color: #fdba74;
}

.bill-canvas-bag-block-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a3412;
  margin-bottom: 0.65rem;
}

.disthub-root.theme-dark .bill-canvas-bag-block-title {
  color: #fdba74;
}

.bill-canvas-bag-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.bill-canvas-bag-stats dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: #78716c;
  margin: 0 0 0.2rem;
}

.bill-canvas-bag-stats dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.bill-canvas-bag-stats--highlight dd {
  font-size: 1.15rem;
  color: #c2410c;
}

.disthub-root.theme-dark .bill-canvas-bag-stats--highlight dd {
  color: #fdba74;
}

.bill-canvas-bag-give strong {
  font-size: 1.35rem;
  color: #c2410c;
}

.bill-canvas-bag-items {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}

.bill-canvas-bag-group-table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.bill-canvas-bag-group-table th,
.bill-canvas-bag-group-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #fde68a;
  text-align: left;
}

.bill-canvas-bag-group-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.bill-canvas-bag-group-table tr.is-current-bill {
  background: rgba(251, 191, 36, 0.15);
}

.bill-canvas-bag-group-table a {
  color: #c2410c;
  font-weight: 600;
  text-decoration: none;
}

.bill-canvas-bag-group-table a:hover {
  text-decoration: underline;
}

.bill-list-wrap {
  margin-bottom: 5rem;
}

.bill-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bill-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.bill-card--mismatch {
  border-color: #fca5a5;
  background: #fffbfb;
  padding-top: 1.35rem;
}

.disthub-root.theme-dark .bill-card--mismatch {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.12);
}

.bill-card-mismatch-tab {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 0.22rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-radius: 0 13px 0 10px;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  pointer-events: none;
}

.bill-card--mismatch:hover {
  background: #fef2f2;
  border-color: #f87171;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.12);
}

.disthub-root.theme-dark .bill-card--mismatch:hover {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.65);
}

.bill-card:hover {
  background: #f0fdf4;
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.1);
}

.disthub-root.theme-dark .bill-card:hover {
  background: rgba(22, 163, 74, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}

.bill-card--empty {
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

.bill-card-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.bill-card-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--dh-green);
  cursor: pointer;
}

.bill-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 0.15rem 0.25rem;
  margin: -0.15rem -0.25rem;
}

.bill-card-main:hover {
  background: transparent;
}

.bill-card-main--static {
  cursor: default;
}

.bill-card-main--static:hover {
  background: transparent;
}

.bill-list-wrap--excel-only .bill-card:hover {
  background: var(--dh-surface);
  border-color: var(--dh-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.bill-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.bill-card-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bill-card-party {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--dh-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.bill-card-party-sub {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--dh-muted);
  text-transform: none;
  letter-spacing: 0;
  word-break: break-word;
}

.bill-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  font-size: 0.82rem;
  color: var(--dh-muted);
}

.bill-card-vcn {
  color: var(--dh-green);
  font-weight: 600;
}

.bill-card-vcn--debit {
  color: var(--dh-red);
}

.bill-card-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--dh-page);
  color: var(--dh-muted);
  border: 1px solid var(--dh-border);
  flex-shrink: 0;
}

.bill-card-amt {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dh-text);
}

.bill-card-date {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 500;
  color: var(--dh-muted);
}

.bill-card-date-icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.bill-card-kg {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--dh-green-dark, #15803d);
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
}

.disthub-root.theme-dark .bill-card-kg {
  color: #86efac;
  background: rgba(22, 163, 74, 0.2);
  border-color: rgba(74, 222, 128, 0.35);
}

.bill-card-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bill-act {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, opacity 0.12s;
}

.bill-act:hover {
  transform: translateY(-1px);
}

.bill-act[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.bill-act--view {
  background: #dbeafe;
  color: #2563eb;
  border-color: #bfdbfe;
}

.bill-act--view:hover {
  background: #bfdbfe;
}

.bill-act--party {
  background: #dcfce7;
  color: #16a34a;
  border-color: #bbf7d0;
}

.bill-act--history {
  background: #ccfbf1;
  color: #0d9488;
  border-color: #99f6e4;
}

.bill-act--delete {
  background: #ffe4e6;
  color: #e11d48;
  border-color: #fecdd3;
}

@media (max-width: 720px) {
  .bill-card {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .bill-card-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.35rem;
    border-top: 1px solid var(--dh-border);
    margin-top: 0.25rem;
    padding-left: 2rem;
  }
}

/* ——— Bill table (legacy) ——— */
.bill-table-wrap {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
  box-shadow: var(--dh-shadow);
}

.bill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bill-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dh-muted);
  background: var(--dh-page);
  border-bottom: 1px solid var(--dh-border);
}

.bill-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dh-border);
  vertical-align: middle;
}

.bill-table tbody tr:last-child td {
  border-bottom: none;
}

.bill-table tbody tr:hover td {
  background: var(--dh-page);
}

.bill-row-main {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dh-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bill-row-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--dh-muted);
}

.bill-hash {
  color: var(--dh-green);
  font-weight: 600;
}

.type-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--dh-page);
  color: var(--dh-muted);
  border: 1px solid var(--dh-border);
}

.bill-row-sub-amount {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dh-text);
  margin-left: 0.15rem;
}

.bill-row-sub-date {
  font-size: 0.82rem;
  font-weight: 500;
}

.bill-row-sub-kg {
  font-weight: 500;
  white-space: nowrap;
}

.bill-row-products {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.bill-view-conv {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.row-actions .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--dh-border);
}

.data-table th {
  background: var(--dh-page);
  color: var(--dh-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tbody tr:hover td {
  background: var(--dh-page);
}

.ok {
  color: var(--dh-green);
}
.bad {
  color: var(--dh-red);
}

.fab-bar {
  position: sticky;
  bottom: 1rem;
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  pointer-events: none;
}

.fab-bar-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.dh-bill-kind {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  vertical-align: middle;
}

.dh-bill-kind--cash {
  background: #dcfce7;
  color: var(--dh-green-dark);
}

.dh-bill-kind--debit {
  background: #fee2e2;
  color: var(--dh-red);
}

.disthub-root.theme-dark .dh-bill-kind--cash {
  background: rgba(22, 163, 74, 0.25);
  color: #86efac;
}

.disthub-root.theme-dark .dh-bill-kind--debit {
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
}

.dh-party-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ——— Mobile nav ——— */
.disthub-nav-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar-backdrop {
  display: none;
}

.nav-open-label {
  display: none;
}

.nav-open-icon {
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
  vertical-align: middle;
  margin-right: 0.35rem;
}

@media (max-width: 960px) {
  html.disthub-focus-mode .app-shell .sidebar {
    width: var(--dh-sidebar-w);
    min-width: var(--dh-sidebar-w);
    padding: 0.85rem 0.65rem 0.75rem;
    border-right: 1px solid var(--dh-border);
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    cursor: pointer;
  }

  .disthub-nav-cb:checked ~ .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .disthub-nav-cb:checked ~ .app-shell .sidebar {
    transform: translateX(0);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.12);
  }

  .main {
    width: 100%;
  }

  .content {
    padding: 1rem 1rem 2rem;
  }

}

/* ——— Date-wise sync (Home) ——— */
.sync-date-fab {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--dh-border);
  border-radius: 14px;
  background: var(--dh-surface);
  color: #334155;
  box-shadow: var(--dh-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, transform 0.12s;
}

.sync-date-fab:hover {
  border-color: var(--dh-green);
  color: var(--dh-green);
  transform: translateY(-1px);
}

.disthub-root.theme-dark .sync-date-fab {
  color: #cbd5e1;
}

.dh-modal[hidden] {
  display: none !important;
}

.dh-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.dh-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.dh-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  padding: 1.25rem 1.35rem 1.15rem;
}

.dh-modal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}

.dh-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dh-text);
}

.dh-modal-close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.dh-modal-close:hover {
  background: #bae6fd;
}

.disthub-root.theme-dark .dh-modal-close {
  background: rgba(56, 189, 248, 0.2);
  color: #e2e8f0;
}

.disthub-root.theme-dark .dh-modal-close:hover {
  background: rgba(56, 189, 248, 0.35);
}

#bill-date-modal.dh-modal:not([hidden]) {
  z-index: 110;
}

#bill-date-modal .dh-modal-panel {
  max-width: 420px;
}

.sync-date-form {
  margin-top: 0.25rem;
}

.sync-date-modal-hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}

body.bill-date-modal-open {
  overflow: hidden;
}

.bill-card-area {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dh-cal-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--dh-border);
  background: var(--dh-page);
  color: var(--dh-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}

.dh-cal-arrow:hover {
  border-color: var(--dh-green);
  color: var(--dh-green);
}

.dh-cal-selects {
  display: flex;
  gap: 0.45rem;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.dh-cal-select {
  font-family: var(--dh-font);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dh-text);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--dh-border);
  background: var(--dh-page);
  cursor: pointer;
  max-width: 48%;
}

.dh-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--dh-green);
}

.dh-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.dh-cal-all-dates-wrap {
  margin-top: 0.15rem;
}

.dh-cal-all-dates {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 2px solid var(--dh-border);
  background: var(--dh-page);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.dh-cal-all-dates:hover {
  border-color: rgba(22, 163, 74, 0.45);
  color: var(--dh-green);
}

.dh-cal-all-dates.is-selected {
  border-color: var(--dh-green);
  background: rgba(22, 163, 74, 0.08);
  color: var(--dh-green);
}

.disthub-root.theme-dark .dh-cal-all-dates.is-selected {
  background: rgba(22, 163, 74, 0.18);
}

.dh-cal-cell--pad {
  min-height: 40px;
}

.dh-cal-day {
  aspect-ratio: 1;
  min-height: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--dh-page);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dh-cal-day:hover {
  border-color: rgba(22, 163, 74, 0.35);
}

.dh-cal-day.is-today:not(.is-selected) {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.04);
}

.dh-cal-day.is-selected {
  border-color: var(--dh-green);
  background: rgba(22, 163, 74, 0.08);
}

.disthub-root.theme-dark .dh-cal-day.is-selected {
  background: rgba(22, 163, 74, 0.18);
}

.dh-modal-err {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--dh-red);
}

/* Confirm modals (Submit all / Hisab complete) — consistent theme */
.dh-confirm-modal .dh-modal-panel {
  max-width: 520px;
  padding: 1.15rem 1.25rem 1.1rem;
}
.dh-confirm-modal .dh-modal-title {
  font-weight: 800;
  letter-spacing: 0.01em;
}
.dh-confirm-modal-strong {
  margin-top: 0.55rem;
  font-weight: 800;
  color: var(--dh-text);
}
.dh-confirm-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.35rem;
}
.dh-confirm-modal-foot .btn {
  min-width: 92px;
}

/* Sync-by-date: spinner on trigger while API runs */
@keyframes dh-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

#sync-date-open.is-syncing svg {
  display: block;
  animation: dh-refresh-spin 0.75s linear infinite;
}

#sync-date-open.is-syncing {
  cursor: progress;
}

.dh-sync-inline-err {
  display: inline-block;
  max-width: min(280px, 70vw);
  margin-left: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dh-red);
  vertical-align: middle;
  overflow-wrap: anywhere;
}

/* Bill list → detail */
.bill-row-detail-link,
.bill-card-main {
  text-decoration: none;
  color: inherit;
}

.row-actions a.icon-btn {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Single bill view */
.bill-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1.25rem;
}

.bill-view-back {
  display: inline-flex;
}

.bill-view-refresh.is-refreshing .bill-view-refresh-label::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.45em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.12em;
  animation: dh-spin 0.65s linear infinite;
}

@keyframes dh-spin {
  to {
    transform: rotate(360deg);
  }
}

.bill-refresh-status {
  font-size: 0.88rem;
  color: var(--dh-green);
}

.bill-refresh-status--err {
  color: #b45309;
}

.bill-view-refreshed,
.bill-view-locked {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.bill-view-refreshed {
  border-left: 4px solid var(--dh-green);
  background: #ecfdf5;
}

.bill-view-locked {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
}

.bill-view-empty {
  padding: 2rem 0;
}

.bill-view-alert {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid #d97706;
  background: #fffbeb;
}

.bill-view-alert-title {
  margin: 0 0 0.45rem;
  font-weight: 600;
  color: #92400e;
}

.bill-view-alert-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.bill-view-excel-summary .bill-view-excel-lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.bill-view-excel-dl {
  display: grid;
  gap: 0.65rem 1.5rem;
  margin: 0;
}

.bill-view-excel-dl > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.bill-view-excel-dl dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dh-muted);
}

.bill-view-excel-dl dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dh-text);
}

.bill-view-header {
  margin-bottom: 1.35rem;
}

.bill-view-no {
  display: inline-block;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--dh-text);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.18), rgba(22, 163, 74, 0.06));
  border: 1px solid rgba(22, 163, 74, 0.4);
  border-radius: var(--dh-radius-sm);
  padding: 0.55rem 1.1rem;
  margin: 0 0 0.5rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.disthub-root.theme-dark .bill-view-no {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.28), rgba(22, 163, 74, 0.1));
  box-shadow: none;
}

.bill-view-meta {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.bill-view-meta-sep {
  color: var(--dh-muted);
  font-weight: 600;
}

.bill-view-meta-amt {
  font-weight: 800;
  color: var(--dh-green-dark);
}

.disthub-root.theme-dark .bill-view-meta-amt {
  color: var(--dh-green);
}

.bill-view-panel {
  margin-bottom: 1.15rem;
}

.bill-view-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dh-muted);
}

.bill-view-party-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--dh-text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.bill-view-stack {
  margin-top: 0.75rem;
}

.bill-view-stack:first-of-type {
  margin-top: 0;
}

.bill-view-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dh-muted);
  margin-bottom: 0.25rem;
}

.bill-view-value {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--dh-text);
}

.bill-view-address {
  white-space: pre-wrap;
}

.bill-view-products-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.bill-view-products-head .bill-view-card-title {
  margin-bottom: 0;
}

.bill-view-line-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dh-green-dark);
  background: var(--dh-green-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.disthub-root.theme-dark .bill-view-line-count {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.2);
}

.bill-view-lines-empty {
  text-align: center;
  padding: 1.75rem 1rem;
  border: 1px dashed var(--dh-border);
  border-radius: var(--dh-radius-sm);
  background: var(--dh-page);
}

.bill-view-lines-empty-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dh-text);
}

.bill-view-lines-empty-text {
  margin: 0 auto 0.75rem;
  max-width: 36rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.bill-view-lines-empty-meta {
  font-size: 0.82rem;
}

.bill-view-lines-empty-meta code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
}

.bill-view-table-scroll {
  overflow-x: auto;
  margin: 0 -0.15rem;
  border-radius: var(--dh-radius-sm);
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
}

.bill-view-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.89rem;
}

.bill-view-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.bill-view-table th,
.bill-view-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--dh-border);
  vertical-align: top;
}

.bill-view-table th {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.1), rgba(22, 163, 74, 0.03));
  color: var(--dh-text);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bill-view-table th .bill-view-th-sub {
  display: block;
  font-weight: 500;
  font-size: 0.72em;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.2rem;
}

.disthub-root.theme-dark .bill-view-table th {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.22), rgba(22, 163, 74, 0.06));
}

.bill-view-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.disthub-root.theme-dark .bill-view-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.bill-view-table tbody tr:hover td {
  background: rgba(22, 163, 74, 0.06);
}

.bill-view-table .col-sr {
  width: 2.75rem;
  text-align: center;
  font-weight: 700;
  color: var(--dh-muted);
}

.bill-view-table .col-product {
  font-weight: 600;
  color: var(--dh-text);
  max-width: 280px;
}

.bill-view-table .col-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bill-view-table .col-kg {
  color: var(--dh-teal);
  font-weight: 600;
}

.bill-view-table .col-amt {
  font-weight: 700;
  color: var(--dh-text);
}

.bill-view-unit {
  font-weight: 600;
  font-size: 0.78em;
  color: var(--dh-muted);
  text-transform: lowercase;
}

.bill-view-total-row td {
  border-bottom: none;
  padding-top: 1rem;
  padding-bottom: 0.35rem;
  font-size: 0.95rem;
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.08), transparent) !important;
}

.disthub-root.theme-dark .bill-view-total-row td {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.15), transparent) !important;
}

/* —— Insights: duplicate bills & missing series —— */
.page-hero-icon--warn {
  background: #fff7ed;
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.25);
}

.page-hero-icon--alert {
  background: #fef2f2;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.22);
}

.disthub-root.theme-dark .page-hero-icon--warn {
  background: rgba(234, 88, 12, 0.15);
  color: #fdba74;
}

.disthub-root.theme-dark .page-hero-icon--alert {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
}

.insights-toolbar {
  margin-bottom: 1rem;
}

.insights-filter-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dh-muted);
  margin-bottom: 0.35rem;
}

.insights-date-input,
.insights-select {
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  color: var(--dh-text);
  font: inherit;
  font-size: 0.9rem;
}

.insights-filter-group {
  display: flex;
  flex-direction: column;
}

.insights-stats {
  margin-bottom: 1.25rem;
}

.stat-tile-value--sm {
  font-size: 1.05rem !important;
  line-height: 1.3;
  word-break: break-word;
}

.insights-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.insights-empty--compact {
  padding: 1.75rem 1.25rem;
}

.insights-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--dh-green-soft);
  color: var(--dh-green);
}

.insights-empty-icon--ok {
  background: var(--dh-green-soft);
  color: var(--dh-green);
}

.insights-empty-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.dup-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dup-group {
  padding: 0;
  overflow: hidden;
}

.dup-group-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--dh-border);
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.06), transparent);
}

.disthub-root.theme-dark .dup-group-head {
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.1), transparent);
}

.dup-group-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.dup-group-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.3);
}

.disthub-root.theme-dark .dup-group-badge {
  background: rgba(234, 88, 12, 0.18);
  color: #fdba74;
}

.dup-group-vcn {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dh-green-dark, #15803d);
}

.dup-group-vcn--debit {
  color: #1d4ed8;
}

.dup-copy {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  border-bottom: 1px solid var(--dh-border);
  border-radius: 0;
  box-shadow: none;
}

.dup-copy:last-child {
  border-bottom: none;
}

.dup-copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dup-action-form {
  display: inline-block;
  margin: 0;
}

.dup-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dup-group-action {
  margin: 0;
}

.dup-preview-note {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.dup-copy--keep {
  border-left: 4px solid var(--dh-green, #16a34a);
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.06), transparent);
}

.dup-copy--drop {
  border-left: 4px solid #ea580c;
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.05), transparent);
  opacity: 0.92;
}

.disthub-root.theme-dark .dup-copy--keep {
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.12), transparent);
}

.disthub-root.theme-dark .dup-copy--drop {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.1), transparent);
}

.dup-copy-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c2410c;
}

.dup-copy-tag--keep {
  color: #15803d;
}

.dup-copy-tag--drop {
  color: #c2410c;
}

.disthub-root.theme-dark .dup-copy-tag--keep {
  color: #86efac;
}

.dup-copy-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dup-copy-meta-text {
  flex: 1;
  min-width: 0;
}

.dup-copy-party {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.dup-copy-details {
  font-size: 0.82rem;
  line-height: 1.45;
}

.dup-copy-details code {
  font-size: 0.78rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--dh-bg);
}

.dup-copy-amt {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dh-green-dark, #15803d);
  white-space: nowrap;
}

.mismatch-bills-panel {
  margin-bottom: 1.35rem;
}

.mismatch-bills-panel .missing-series-head {
  margin-bottom: 0.75rem;
}

.mismatch-count {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.mismatch-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mismatch-table .col-num {
  text-align: right;
  white-space: nowrap;
}

.mismatch-table .col-action {
  text-align: right;
  width: 5rem;
}

.mismatch-diff {
  color: #b45309;
  font-weight: 600;
}

.mismatch-issue {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  max-width: 14rem;
}

.mismatch-issue--no_lines {
  background: #fef2f2;
  color: #991b1b;
}

.mismatch-issue--offer_only {
  background: #fffbeb;
  color: #92400e;
}

.stat-tile-link {
  color: inherit;
  text-decoration: none;
}

.stat-tile-link:hover {
  color: var(--dh-green);
  text-decoration: underline;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.col-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  min-width: 7.5rem;
}

.bill-import-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.bill-import-modal[hidden] {
  display: none !important;
}

body.bill-import-open {
  overflow: hidden;
}

.bill-import-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.bill-import-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1.15rem 1.25rem;
}

.bill-import-head {
  position: relative;
  padding-right: 2rem;
}

.bill-import-close {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--dh-muted);
}

.bill-import-help {
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.bill-import-file-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.bill-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bill-import-err {
  color: #b91c1c;
  font-size: 0.88rem;
}

.bill-import-summary,
.bill-import-status {
  font-size: 0.88rem;
  margin: 0.35rem 0 0;
}

.bill-import-status {
  font-style: italic;
}

.bill-import-preview {
  margin-top: 1rem;
}

.missing-series-panel,
.missing-ranges-panel {
  margin-bottom: 1rem;
}

.missing-series-head {
  margin-bottom: 1rem;
}

.missing-series-sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.missing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.missing-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.disthub-root.theme-dark .missing-chip {
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.ms-recover-status {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--dh-surface-2, #f1f5f9);
}

.ms-recover-status--error {
  color: #b91c1c;
  background: #fef2f2;
}

.ms-recover-status--ok {
  color: #166534;
  background: #f0fdf4;
}

.missing-chip--api {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.marg-vs-db-panel {
  border-left: 4px solid #f97316;
}

.missing-range-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.missing-range-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.missing-range-chip {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--dh-bg);
  border: 1px solid var(--dh-border);
}

.missing-range-arrow {
  color: var(--dh-muted);
  font-weight: 700;
}

.missing-range-count {
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .dup-copy-meta {
    flex-wrap: wrap;
  }

  .dup-copy-amt {
    width: 100%;
    text-align: right;
  }
}

.bill-upload-form input[type=file] {
  display: block;
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.bill-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bill-upload-preview {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--dh-surface-alt, #f4f6f8);
  margin-top: 0.5rem;
}

.dh-card-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.party-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.party-search-form .dh-input {
  min-width: 220px;
}

.party-upload-sample {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.party-table-wrap {
  max-height: min(70vh, 900px);
  overflow: auto;
}

.party-table-wrap .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--dh-surface, #fff);
}

/* ——— Party Master ——— */
.pm-page {
  max-width: 100%;
}

.pm-hero-icon {
  background: linear-gradient(145deg, #0d9488 0%, #16a34a 100%) !important;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35) !important;
}

.pm-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.pm-stats .pm-stat-tile {
  border: 1px solid var(--dh-border);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pm-stats .pm-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--dh-shadow);
}

.pm-stat-filtered .stat-tile-icon {
  background: rgba(13, 148, 136, 0.12);
  color: var(--dh-teal);
}

.pm-list-card {
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: var(--dh-radius);
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  box-shadow: var(--dh-shadow);
}

.pm-toolbar {
  margin-bottom: 1.25rem;
}

.pm-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pm-list-title {
  margin: 0 !important;
}

.pm-list-sub {
  margin: 0;
  font-size: 0.88rem;
}

.pm-filter-bar {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.06) 0%, rgba(13, 148, 136, 0.04) 100%);
  border: 1px solid rgba(22, 163, 74, 0.12);
  margin-bottom: 1.1rem;
}

.pm-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .pm-filter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }
  .pm-search-wrap {
    flex: 1 1 280px;
    min-width: 220px;
  }
  .pm-filter-row {
    flex: 2 1 auto;
    flex-wrap: nowrap;
  }
}

.pm-search-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pm-search-wrap:focus-within {
  border-color: var(--dh-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.pm-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dh-green);
  pointer-events: none;
  display: flex;
  opacity: 0.85;
}

.pm-search-input {
  flex: 1;
  width: 100%;
  padding: 0.8rem 3.25rem 0.8rem 2.85rem;
  font-family: var(--dh-font);
  font-size: 0.95rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--dh-text);
}

.pm-search-input:focus {
  outline: none;
  box-shadow: none;
}

.pm-search-go {
  flex-shrink: 0;
  width: 44px;
  border: none;
  border-left: 1px solid var(--dh-border);
  background: linear-gradient(180deg, var(--dh-green) 0%, var(--dh-green-dark) 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}

.pm-search-go:hover {
  filter: brightness(1.08);
}

.pm-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.pm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
  flex: 1;
  max-width: 220px;
}

.pm-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dh-muted);
}

.pm-select {
  width: 100%;
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  font-family: var(--dh-font);
  font-size: 0.9rem;
  border: 1px solid var(--dh-border);
  border-radius: 11px;
  background: var(--dh-surface);
  color: var(--dh-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.pm-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: var(--dh-font);
  font-size: 0.9rem;
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  background: var(--dh-surface);
  color: var(--dh-text);
}

.pm-select:focus,
.pm-input:focus {
  outline: none;
  border-color: var(--dh-green);
}

.pm-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-bottom: 0.1rem;
}

.pm-table-wrap {
  border-radius: 12px;
  border: 1px solid var(--dh-border);
}

.pm-table tbody tr {
  transition: background 0.12s;
}

.pm-table tbody tr:hover {
  background: rgba(22, 163, 74, 0.04);
}

.pm-col-num {
  width: 3rem;
  color: var(--dh-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.pm-col-actions {
  width: 9.5rem;
  text-align: center;
}

.pm-cell-name {
  min-width: 140px;
  max-width: 200px;
}

.pm-cell-address {
  min-width: 160px;
  max-width: 240px;
}

.pm-name {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dh-text);
  line-height: 1.35;
}

.pm-addr-line {
  display: block;
  font-size: 0.82rem;
  color: var(--dh-muted);
  line-height: 1.4;
}

.pm-addr-line2 {
  margin-top: 0.12rem;
}

.pm-dash {
  color: var(--dh-muted);
}

.pm-cell-contact {
  white-space: nowrap;
  font-size: 0.88rem;
}

.pm-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dh-muted);
  font-weight: 700;
  padding: 0.75rem 0.85rem;
  background: var(--dh-page);
  border-bottom: 1px solid var(--dh-border);
}

.pm-table tbody td {
  padding: 0.7rem 0.85rem;
  vertical-align: middle;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--dh-border);
}

.pm-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

.disthub-root.theme-dark .pm-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.pm-area-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--dh-green-soft);
  color: var(--dh-green-dark);
}

.disthub-root.theme-dark .pm-area-badge {
  color: #86efac;
}

.pm-row-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}

.pm-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  font-family: var(--dh-font);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, box-shadow 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.pm-act-btn:hover {
  transform: translateY(-1px);
}

.pm-act-icon {
  display: flex;
  line-height: 0;
}

.pm-act-edit {
  background: rgba(37, 99, 235, 0.1);
  color: var(--dh-blue);
  border-color: rgba(37, 99, 235, 0.2);
}

.pm-act-edit:hover {
  background: rgba(37, 99, 235, 0.16);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.pm-act-del {
  background: rgba(220, 38, 38, 0.08);
  color: var(--dh-red);
  border-color: rgba(220, 38, 38, 0.18);
}

.pm-act-del:hover {
  background: rgba(220, 38, 38, 0.14);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.18);
}

.pm-btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 11px;
  font-weight: 600;
}

body.pm-modal-open {
  overflow: hidden;
}

.pm-modal:not([hidden]) {
  display: flex !important;
}

.pm-modal-panel {
  animation: pmModalIn 0.22s ease-out;
}

@keyframes pmModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pm-empty {
  text-align: center;
  padding: 3rem 1.5rem;
}

.pm-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.pm-empty-title {
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.pm-modal-panel {
  max-width: 440px;
  padding: 0;
  overflow: visible;
  border-radius: 20px;
}

.pm-delete-panel {
  max-width: 400px;
}

.pm-modal-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--dh-green) 0%, var(--dh-teal) 100%);
}

.pm-modal-accent--danger {
  background: linear-gradient(90deg, #f87171 0%, var(--dh-red) 100%);
}

.pm-modal-inner {
  padding: 1.25rem 1.5rem 1.35rem;
}

.pm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.pm-modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dh-text);
}

.pm-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--dh-page);
  color: var(--dh-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pm-modal-close:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--dh-red);
}

.pm-form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pm-form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.pm-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin: 0;
}

.pm-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dh-muted);
  letter-spacing: 0.02em;
}

.pm-req {
  color: var(--dh-red);
}

.pm-input,
.pm-form .pm-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  font-family: var(--dh-font);
  font-size: 0.92rem;
  border: 1px solid var(--dh-border);
  border-radius: 11px;
  background: var(--dh-page);
  color: var(--dh-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pm-input:focus {
  outline: none;
  border-color: var(--dh-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
  background: var(--dh-surface);
}

.pm-form-err {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dh-red);
  background: rgba(220, 38, 38, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.pm-btn-save {
  min-width: 120px;
  font-weight: 600;
  border-radius: 11px;
}

.pm-delete-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  color: var(--dh-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-delete-msg {
  margin: 0 0 1.15rem;
  line-height: 1.55;
  text-align: center;
  color: var(--dh-text);
}

.pm-delete-msg strong {
  color: var(--dh-text);
  font-weight: 700;
}

.pm-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dh-border);
}


.btn-danger {
  background: var(--dh-red);
  color: #fff;
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--dh-font);
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.pm-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  padding: 0.75rem 1.15rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  max-width: 320px;
}

.pm-toast--ok {
  background: var(--dh-green);
  color: #fff;
}

.pm-toast--err {
  background: var(--dh-red);
  color: #fff;
}

@media (max-width: 720px) {
  .pm-form-row2 {
    grid-template-columns: 1fr;
  }
  .pm-filter-field {
    max-width: none;
    flex: 1 1 100%;
  }
  .pm-filter-row {
    flex-wrap: wrap;
  }
  .pm-cell-address,
  .pm-cell-name {
    max-width: none;
  }
}
