:root {
  --bg: #eceff3;
  --bg-soft: #e5e7eb;
  --panel: #f3f4f6;
  --panel-strong: #2bae5e;
  --data-card: #2bae5e;
  --data-card-hover: #2bae5e;
  --line: rgba(43, 174, 94, 0.18);
  --ink: #0f172a;
  --muted: #475569;
  --primary: #2bae5e;
  --primary-dark: #2bae5e;
  --shadow: 0 18px 44px rgba(43, 174, 94, 0.12);
  --radius: 4px;
}

body[data-theme="dark"] {
  --bg: #111827;
  --bg-soft: #1f2937;
  --panel: rgba(31, 41, 55, 0.96);
  --panel-strong: #273449;
  --line: rgba(226, 232, 240, 0.16);
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --primary: #2bae5e;
  --primary-dark: #2bae5e;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.08);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(480px, 100%);
}

.login-card {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 30px;
}

.brand-login {
  margin-bottom: 22px;
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
  background:
    linear-gradient(90deg, #0f8a5c 0, #0f8a5c 224px, #eef1f5 224px, #eef1f5 100%);
}

.sidebar {
  position: relative;
  padding: 18px 12px 14px;
  border-right: none;
  background:
    linear-gradient(180deg, #11a36b 0%, #0f8a5c 100%);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #ffffff;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.sidebar-toggle-icon {
  display: block;
  width: 1em;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  transform: translateY(-1px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-card {
  align-items: center;
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.account-meta {
  min-width: 0;
}

.account-meta h1 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 24px;
  box-shadow: var(--shadow);
}

.sidebar-section-title {
  margin: 2px 4px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.avatar-picker {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  cursor: pointer;
}

.avatar-image,
.avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
}

.brand h1, .panel-card h3, .sidebar h2 { margin: 0; }

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.sidebar-block, .panel-card, .stat-card {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar .sidebar-block {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar .account-card {
  order: 2;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.sidebar-block, .panel-card { padding: 18px; }

.main-panel {
  display: grid;
  align-content: start;
  min-width: 0;
  background: #eef1f5;
}

.nav-tabs {
  gap: 6px;
  padding: 4px 0;
}

.nav-tab {
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.nav-tab:hover,
.nav-tab:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-tab.active {
  background: #eef1f5;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.nav-label {
  white-space: nowrap;
}

.sidebar-logout {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.status-bar {
  margin: 12px 14px 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(17, 163, 107, 0.12), rgba(15, 138, 92, 0.06));
  color: #0f6b48;
  border: 1px solid rgba(15, 138, 92, 0.12);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-overlay .block-header {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.modal-overlay .block-header:active {
  cursor: grabbing;
}

.field-label, .hint, .chip-label, .stat-label, .checkout-summary span, .table-meta {
  font-size: 12px;
  color: var(--muted);
}

.text-input, select, textarea, button { font: inherit; }

.text-input {
  width: 100%;
  border: none;
  background: var(--data-card);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.text-input:focus {
  box-shadow: 0 0 0 4px rgba(91, 138, 105, 0.14);
}

#quickProductForm .text-input:focus {
  box-shadow: none;
}

#quickProductForm .text-input,
#quickProductForm .text-input:focus,
#quickProductForm .text-input:valid,
#quickProductForm .text-input:invalid,
#quickProductForm .text-input:user-valid,
#quickProductForm .text-input:user-invalid {
  background: var(--data-card);
  color: var(--ink);
}

#quickProductForm .text-input:-webkit-autofill,
#quickProductForm .text-input:-webkit-autofill:hover,
#quickProductForm .text-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--data-card) inset;
}

.text-area {
  min-height: 88px;
  resize: vertical;
}

.stack-form, .grid-form, .checkout-actions, .nav-tabs {
  display: grid;
  gap: 12px;
}

.grid-form.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form.compact { margin-bottom: 18px; }
.full-span { grid-column: 1 / -1; }

.primary-button, .ghost-button, .nav-tab {
  border: none;
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.primary-button:hover, .ghost-button:hover, .nav-tab:hover { transform: translateY(-1px); }

.primary-button {
  color: white;
  background: var(--primary);
}

.ghost-button {
  color: #111827;
  background: rgba(91, 138, 105, 0.1);
  font-weight: 700;
}

.nav-tabs {
  order: 1;
  margin-top: 36px;
  display: grid;
  gap: 6px;
}

.sidebar-logout {
  order: 3;
  margin-top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 9px 10px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}

.nav-tab.active {
  color: #0f172a;
  background: #ffffff;
}

.nav-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-label {
  min-width: 0;
  white-space: nowrap;
}

.sidebar-logout .nav-icon {
  background: transparent;
  color: #ffffff;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 52px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  align-items: center;
  gap: 8px;
  padding: 46px 6px 10px;
}

body.sidebar-collapsed .sidebar .account-meta,
body.sidebar-collapsed .sidebar .nav-label {
  display: none;
}

body.sidebar-collapsed .sidebar .account-card {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

body.sidebar-collapsed .sidebar .nav-tabs {
  width: 100%;
  gap: 6px;
  margin-top: 0;
}

body.sidebar-collapsed .sidebar .nav-tab,
body.sidebar-collapsed .sidebar .sidebar-logout {
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 4px;
}

body.sidebar-collapsed .sidebar .sidebar-logout {
  margin-top: auto;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar .sidebar-logout::before {
  width: 20px;
  height: 20px;
  margin: 0;
  text-indent: 0;
}

body.sidebar-collapsed .sidebar .nav-icon {
  display: grid;
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}

body.sidebar-collapsed .sidebar .nav-icon svg {
  width: 17px;
  height: 17px;
}

.nav-tab.active {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 22px rgba(91, 138, 105, 0.08);
}

.nav-tab.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-tab:hover {
  color: #2c1d14;
  background: rgba(255, 255, 255, 0.9);
}

.main-panel {
  padding: 0;
  display: grid;
  gap: 0;
  align-content: start;
}

.status-badge, .product-pill { border-radius: 999px; }

.settings-view {
  display: grid;
  gap: 18px;
}

.section-topbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  background: #1fbc84;
  color: #ffffff;
  border-radius: 0;
}

.section-topbar h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.section-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-topbar .ghost-button,
.section-topbar .primary-button,
.topbar-status {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.reports-view,
.settings-view,
.inventory-view {
  min-height: 100dvh;
  background: #eef1f5;
}

.reports-view > :not(.section-topbar),
.settings-view > :not(.section-topbar),
.inventory-view > :not(.section-topbar) {
  margin: 12px;
}

.section-placeholder-card {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.14);
  box-shadow: none;
}

.settings-hero,
.settings-card {
  display: grid;
  align-content: start;
}

.settings-copy {
  margin: 0;
  color: #5b4639;
  line-height: 1.6;
}

.settings-layout {
  align-items: stretch;
}

.settings-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(91, 55, 25, 0.08);
  border-radius: 12px;
}

.status-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-width: 120px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.9);
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  transform: translateX(-50%);
}

.status-bar.error {
  background: rgba(159, 18, 57, 0.92);
}

body[data-theme="dark"] {
  background: #111827;
}

body[data-theme="dark"] .sidebar {
  background: #1fbc84;
  box-shadow: none;
}

body[data-theme="dark"] .login-card,
body[data-theme="dark"] .account-card,
body[data-theme="dark"] .sidebar-block,
body[data-theme="dark"] .panel-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .settings-item,
body[data-theme="dark"] .invoice-detail-lines,
body[data-theme="dark"] .invoice-summary-card,
body[data-theme="dark"] .invoice-detail-note,
body[data-theme="dark"] .detail-row {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow);
  outline: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .products-panel,
body[data-theme="dark"] .invoice-workspace,
body[data-theme="dark"] .product-sale-panel {
  background: #1f2937;
}

body[data-theme="dark"] .settings-item,
body[data-theme="dark"] .detail-row,
body[data-theme="dark"] .invoice-summary-card,
body[data-theme="dark"] .invoice-detail-note,
body[data-theme="dark"] .invoice-detail-lines,
body[data-theme="dark"] .report-stat-card,
body[data-theme="dark"] .report-list-row,
body[data-theme="dark"] .report-table-row {
  background: #29384c;
}

body[data-theme="dark"] .text-input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .search-suggestions,
body[data-theme="dark"] .customer-suggestions,
body[data-theme="dark"] .reference-suggestions,
body[data-theme="dark"] .price-popover,
body[data-theme="dark"] .checkout-summary > div,
body[data-theme="dark"] .payment-workspace .text-input,
body[data-theme="dark"] .payment-workspace select,
body[data-theme="dark"] .payment-workspace textarea {
  background: #273449;
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .text-input:focus {
  box-shadow: 0 0 0 4px rgba(110, 163, 125, 0.2);
}

body[data-theme="dark"] .text-input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #64748b;
}

body[data-theme="dark"] .product-list-row,
body[data-theme="dark"] .invoice-list-item,
body[data-theme="dark"] .list-item,
body[data-theme="dark"] .cart-line,
body[data-theme="dark"] .product-card,
body[data-theme="dark"] .search-suggestion,
body[data-theme="dark"] .customer-suggestion,
body[data-theme="dark"] .invoice-cart-display > .list-stack {
  background: #243244;
  color: var(--ink);
  border: 1px solid rgba(226, 232, 240, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .product-list-row strong,
body[data-theme="dark"] .invoice-list-item strong,
body[data-theme="dark"] .list-item strong,
body[data-theme="dark"] .product-card strong,
body[data-theme="dark"] .cart-line strong,
body[data-theme="dark"] .product-list-row h4,
body[data-theme="dark"] .invoice-list-item h4,
body[data-theme="dark"] .list-item h4,
body[data-theme="dark"] .product-card h4,
body[data-theme="dark"] .cart-line h4,
body[data-theme="dark"] .product-list-row .line-meta,
body[data-theme="dark"] .list-item .line-meta,
body[data-theme="dark"] .product-card .line-meta,
body[data-theme="dark"] .cart-line .line-meta,
body[data-theme="dark"] .product-list-meta,
body[data-theme="dark"] .entity-list-meta {
  color: var(--ink);
}

body[data-theme="dark"] .product-list-row:hover,
body[data-theme="dark"] .invoice-list-item:hover,
body[data-theme="dark"] .product-card-action:hover,
body[data-theme="dark"] .search-suggestion:hover,
body[data-theme="dark"] .customer-suggestion:hover,
body[data-theme="dark"] .line-menu-panel button:hover {
  background: #2f4158;
}

body[data-theme="dark"] .product-list-row,
body[data-theme="dark"] .entity-list-row,
body[data-theme="dark"] .invoice-list-item,
body[data-theme="dark"] .section-placeholder-card {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(17, 24, 39, 0.14);
  box-shadow: none;
}

body[data-theme="dark"] .product-list-row:hover,
body[data-theme="dark"] .entity-list-row:hover,
body[data-theme="dark"] .invoice-list-item:hover {
  background: #ffffff;
}

body[data-theme="dark"] .product-list-row *,
body[data-theme="dark"] .entity-list-row *,
body[data-theme="dark"] .invoice-list-item *,
body[data-theme="dark"] .section-placeholder-card * {
  color: #111827;
}

body[data-theme="dark"] .nav-tab {
  color: #cbd5e1;
  background: rgba(15, 23, 34, 0.82);
  border-color: var(--line);
}

body[data-theme="dark"] .nav-tab.active,
body[data-theme="dark"] .invoice-tab.active {
  color: #c7decd;
  background: #273449;
}

body[data-theme="dark"] .ghost-button {
  color: #c7decd;
  background: rgba(110, 163, 125, 0.18);
}

body[data-theme="dark"] .primary-button {
  background: var(--primary);
}

body[data-theme="dark"] .brand-mark,
body[data-theme="dark"] .product-avatar-fallback,
body[data-theme="dark"] .invoice-tab-count {
  background: #334155;
  color: #c7decd;
}

body[data-theme="dark"] .invoice-detail-hero {
  background: #273449;
  border-color: var(--line);
}

body[data-theme="dark"] .invoice-detail-lines-header {
  background: #273449;
}

body[data-theme="dark"] strong,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] .invoice-list-row strong,
body[data-theme="dark"] .invoice-row-action > strong,
body[data-theme="dark"] .detail-row strong,
body[data-theme="dark"] .invoice-summary-card strong,
body[data-theme="dark"] .invoice-detail-hero h4,
body[data-theme="dark"] .invoice-detail-modal #invoiceDetailTitle,
body[data-theme="dark"] .product-card h4,
body[data-theme="dark"] .cart-line h4,
body[data-theme="dark"] .list-item h4 {
  color: var(--ink);
}

body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .settings-copy,
body[data-theme="dark"] .line-meta,
body[data-theme="dark"] .entity-list-meta,
body[data-theme="dark"] .invoice-detail-label,
body[data-theme="dark"] .invoice-detail-meta,
body[data-theme="dark"] .invoice-line-main span,
body[data-theme="dark"] .stat-card p {
  color: var(--muted);
}

body[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.58);
}

body[data-theme="dark"] .report-stat-card,
body[data-theme="dark"] .report-list-row,
body[data-theme="dark"] .report-table-row {
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .report-filter-card,
body[data-theme="dark"] .report-stat-card,
body[data-theme="dark"] .report-list-row {
  background: #1f2937;
}

body[data-theme="dark"] .report-filters .text-input,
body[data-theme="dark"] .report-filters .import-picker-button,
body[data-theme="dark"] .report-filters .report-date-button {
  background: #273449;
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] .report-table {
  border-color: var(--line);
}

body[data-theme="dark"] .report-table-header {
  background: #1e293b;
  color: #cbd5e1;
}

.status-badge {
  padding: 7px 11px;
  font-size: 11px;
  color: #111827;
  background: rgba(91, 138, 105, 0.12);
}

.status-badge.muted {
  color: var(--muted);
  background: rgba(125, 103, 88, 0.09);
}

.stats-grid, .split-layout, .checkout-layout {
  display: grid;
  gap: 18px;
}

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkout-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.75fr);
  align-items: stretch;
  min-height: calc(100vh - 56px);
}

#dashboardView.active {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: 100dvh;
  padding: 0;
  background: #eef1f5;
}

.dashboard-hero {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #1fbc84 0%, #169768 100%);
  color: #ffffff;
}

.dashboard-hero h2 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-kicker {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.dashboard-cta {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.reports-view.active {
  display: grid;
  row-gap: 0;
  column-gap: 0;
  align-content: start;
}

.report-filter-card {
  position: relative;
  z-index: 12;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 138, 105, 0.08);
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

#reportsView > .report-filter-card {
  margin-bottom: 14px;
}

#reportsView > .report-stats-grid {
  margin-bottom: 14px;
}

.report-filter-card .block-header {
  margin-bottom: 0;
  padding-bottom: 2px;
}

.report-filter-card .block-header h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.report-filter-card .ghost-button {
  min-height: 32px;
  padding: 7px 13px;
  line-height: 1;
  border-radius: 999px;
  color: #111827;
  background: rgba(91, 138, 105, 0.1);
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 8px 10px;
  align-items: end;
}

.report-filters label {
  display: grid;
  grid-template-rows: 14px 32px;
  gap: 2px;
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.report-filters label > span {
  display: flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

.report-filters .import-picker-shell {
  height: 32px;
}

.report-filters .text-input,
.report-filters .import-picker-button {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid rgba(91, 138, 105, 0.08);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  line-height: 32px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.report-filters .report-date-button {
  border: 1px solid rgba(91, 138, 105, 0.12);
  border-radius: var(--radius);
  background: var(--panel);
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
}

.report-filters .report-date-button:focus,
.report-filters .report-date-button[aria-expanded="true"] {
  border-color: rgba(91, 138, 105, 0.28);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 138, 105, 0.12);
}

.report-filters select.text-input {
  appearance: none;
  -webkit-appearance: none;
  text-align-last: center;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.report-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.report-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  grid-template-areas:
    "label marker"
    "value marker"
    "meta marker";
  gap: 3px 8px;
  min-height: 72px;
  padding: 11px 10px 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.report-stat-card::before {
  content: "";
  position: absolute;
  inset: 12px 10px auto auto;
  grid-area: marker;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #d8e8dc;
  box-shadow: inset 0 0 0 1px rgba(91, 138, 105, 0.12);
}

.report-stat-card span {
  grid-area: label;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-stat-card strong {
  grid-area: value;
  color: #111827;
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-stat-card p {
  grid-area: meta;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-stat-card:nth-child(1)::before,
.report-stat-card:nth-child(2)::before,
.report-stat-card:nth-child(3)::before,
.report-stat-card:nth-child(4)::before,
.report-stat-card:nth-child(5)::before,
.report-stat-card:nth-child(6)::before { background: #d8e8dc; }

.report-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
}

.report-layout > .panel-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.report-wide-card {
  grid-column: 1 / -1;
}

.report-list {
  display: grid;
  gap: 6px;
}

.report-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--radius);
  background: var(--panel);
  color: #111827;
}

.report-list-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-list-row span {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.report-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius);
}

.report-table-header,
.report-table-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, minmax(140px, 0.8fr));
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.report-table-header {
  background: #eef2ff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-table-row {
  background: var(--panel);
  border-top: 1px solid rgba(17, 24, 39, 0.07);
  color: #111827;
  font-weight: 700;
}

.report-table-row span,
.report-table-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-layout {
  min-height: 0;
  gap: 12px;
  padding: 0 12px 12px;
}

.dashboard-layout > .panel-card {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.stat-card {
  position: relative;
  min-height: 132px;
  padding: 16px 16px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -24px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(31, 188, 132, 0.14);
}

.stat-card::before {
  content: "";
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: #1fbc84;
}

.stat-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  color: #0f172a;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.accent-blue,
.accent-green,
.accent-amber,
.accent-rose {
  background: rgba(255, 255, 255, 0.72);
}

.accent-blue::before { background: #1fbc84; }
.accent-green::before { background: #169768; }
.accent-amber::before { background: #f59e0b; }
.accent-rose::before { background: #f43f5e; }

#dashboardView .stats-grid {
  gap: 12px;
  padding: 0 12px;
}

#dashboardView .block-header {
  margin-bottom: 10px;
}

#dashboardView .block-header h3 {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

#dashboardView .status-badge {
  border-radius: 999px;
  color: #0f172a;
  background: rgba(31, 188, 132, 0.12);
}

#dashboardView .list-stack {
  gap: 0;
}

#dashboardView .list-item {
  padding: 11px 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 0;
  background: transparent;
  color: #111827;
  box-shadow: none;
}

#dashboardView .list-item:last-child {
  border-bottom: none;
}

#dashboardView .list-item-header {
  align-items: center;
}

#dashboardView .list-item h4,
#dashboardView .list-item strong,
#dashboardView .line-meta,
#dashboardView .line-meta span {
  color: #111827;
}

#dashboardView .list-item h4 {
  font-size: 13px;
}

#dashboardView .line-meta {
  margin-top: 4px;
  color: #64748b;
}

.view { display: none; }
.view.active { display: block; }

.table-shell { overflow: auto; }

.products-view,
.products-panel {
  min-height: calc(100vh - 56px);
}

.products-panel {
  display: flex;
  flex-direction: column;
}

.products-header {
  align-items: center;
}

.products-view .products-panel {
  min-height: 100dvh;
  padding: 0;
  border-radius: 0;
  background: #eef1f5;
  box-shadow: none;
  overflow: hidden;
}

.products-view .products-header {
  min-height: 50px;
  margin: 0;
  padding: 6px 14px;
  background: #1fbc84;
  color: #ffffff;
  border-radius: 0;
}

.products-view .products-header h3 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.product-header-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}

.products-view .product-header-actions .ghost-button,
.products-view .product-header-actions .primary-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.products-view .product-header-actions .primary-button {
  background: rgba(255, 255, 255, 0.16);
}

.products-view .product-header-actions .invoice-search-input {
  height: 36px;
  min-height: 36px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #0f172a;
  box-shadow: none;
}

.products-view .product-header-actions .invoice-search-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.products-view .table-shell {
  margin: 0;
  padding: 12px;
  background: transparent;
}

.invoices-panel .products-header {
  align-items: center;
}

.invoices-panel .product-header-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.product-list {
  display: grid;
  gap: 0;
}

.product-list-header,
.product-list-row {
  display: grid;
  grid-template-columns: 40px 64px minmax(130px, 0.95fr) minmax(180px, 1.45fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) 90px minmax(150px, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
}

.product-list-header {
  padding: 0 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-list-row {
  padding: 14px 8px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #ffffff;
  transition: background 120ms ease, transform 120ms ease;
}

.product-list-row:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.product-check-cell {
  display: grid;
  place-items: center;
}

.product-list-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-list-main strong,
.product-list-meta {
  color: #111827;
}

.product-list-main span {
  color: #111827;
  font-size: 12px;
}

.product-table-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.product-table-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-button {
  justify-self: end;
  width: 44px;
  height: 44px;
}

.entity-list {
  display: grid;
  gap: 0;
}

.entity-list-header,
.entity-list-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 58px;
}

.entity-list-header {
  padding: 0 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.entity-list-row {
  padding: 14px 8px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #ffffff;
  transition: background 120ms ease, transform 120ms ease;
}

.entity-list-row:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.entity-list-main {
  display: grid;
  gap: 4px;
}

.entity-list-main strong,
.entity-list-meta {
  color: #111827;
}

.entity-list-meta {
  overflow-wrap: anywhere;
}

.customer-list-header,
.customer-list-row {
  grid-template-columns: 40px minmax(0, 1.2fr) 120px 140px 140px minmax(0, 1.4fr) 72px;
}

.supplier-list-header,
.supplier-list-row {
  grid-template-columns: 40px minmax(0, 1.2fr) 150px minmax(0, 1fr) minmax(0, 1.5fr) 72px;
}

.import-list-header,
.import-list-row {
  grid-template-columns: 40px 180px minmax(0, 1.2fr) 110px 150px 180px 72px;
}

.invoices-view,
.invoices-panel {
  min-height: calc(100vh - 56px);
}

.invoices-panel {
  display: flex;
  flex-direction: column;
}

.invoice-list {
  display: grid;
  gap: 0;
}

.invoice-list-header {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1fr) minmax(140px, 1.15fr) minmax(100px, 0.9fr) minmax(80px, 0.7fr) minmax(130px, 1.1fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(90px, 0.8fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 0 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.invoice-list-item {
  display: grid;
  gap: 0;
  width: 100%;
  padding: 8px 8px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.14);
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.invoice-list-item:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.table-empty-row,
.table-empty-row:hover {
  transform: none !important;
  cursor: default;
}

.table-empty-row .product-list-main strong,
.table-empty-row .entity-list-main strong,
.table-empty-row .invoice-list-row strong {
  color: #111827;
}

.table-empty-row .product-list-main span,
.table-empty-row .entity-list-meta,
.table-empty-row .invoice-list-row > strong:not(:first-of-type) {
  color: var(--muted);
}

.invoice-list-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1fr) minmax(140px, 1.15fr) minmax(100px, 0.9fr) minmax(80px, 0.7fr) minmax(130px, 1.1fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(90px, 0.8fr) 64px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 0;
  border-bottom: none;
}

.status-complete {
  color: #111827 !important;
}

.status-debt {
  color: #dc2626 !important;
}

.invoice-list-item:last-child {
  border-bottom: none;
}

.invoice-list-row strong,
.invoice-row-action > strong {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.invoice-row-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invoice-detail-cell {
  justify-content: center;
}

.invoice-detail-trigger {
  width: 32px;
  height: 32px;
  color: #111827;
}

.modal-card.invoice-detail-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: min(760px, calc(100vw - 40px));
  height: auto;
  max-height: calc(100vh - 40px);
  padding: 18px 18px;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.invoice-detail-modal .block-header {
  align-items: start;
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(91, 55, 25, 0.1);
}

.invoice-detail-modal #invoiceDetailTitle {
  font-size: 22px;
  font-weight: 800;
  color: #2c1d14;
}

#invoiceDetailContent {
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.invoice-detail-block {
  display: grid;
  margin-top: 10px;
  border-top: 1px solid rgba(17, 24, 39, 0.12);
}

.invoice-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #eef5ef;
  border: 1px solid rgba(91, 138, 105, 0.1);
  border-radius: 14px;
}

.invoice-detail-hero h4 {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.1;
  color: #111827;
  overflow-wrap: anywhere;
}

.invoice-detail-hero-main {
  display: grid;
  gap: 6px;
}

.invoice-detail-label {
  font-size: 12px;
  color: #8b735f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.invoice-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  color: #6b7280;
  font-size: 13px;
}

.invoice-detail-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.invoice-detail-meta strong {
  color: #1f2937;
}

.invoice-detail-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(91, 55, 25, 0.08);
}

.invoice-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.invoice-summary-card {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(91, 55, 25, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(91, 55, 25, 0.05);
}

.invoice-summary-card span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.invoice-summary-card strong {
  font-size: 20px;
  color: #111827;
}

.invoice-detail-note {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(91, 55, 25, 0.08);
  border-radius: 12px;
}

.invoice-detail-note p {
  margin: 0;
  color: #374151;
  line-height: 1.5;
}

.invoice-detail-lines {
  display: grid;
  gap: 0;
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(91, 55, 25, 0.08);
  border-radius: 14px;
}

.invoice-detail-lines.scrollable {
  max-height: 390px;
  overflow-y: auto;
  padding-right: 10px;
}

.invoice-detail-lines-header,
.invoice-line-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 44px 108px 118px;
  gap: 10px;
  align-items: center;
}

.invoice-detail-lines-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 6px 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #8b735f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-line-item {
  padding: 12px 10px;
  border-top: 1px solid rgba(91, 55, 25, 0.1);
  background: rgba(249, 246, 240, 0.96);
  border-radius: 10px;
  margin-top: 8px;
}

.invoice-line-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.invoice-line-main strong {
  color: #111827;
  overflow-wrap: anywhere;
}

.invoice-line-main span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 10px;
  border-bottom: none;
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.empty-state { color: var(--muted); }

.chip-list, .list-stack, .product-picker {
  display: grid;
  gap: 12px;
}

.product-pill, .list-item, .cart-line, .product-card {
  background: var(--data-card);
  border: none;
}

.product-picker .product-card,
.search-suggestion {
  background: var(--data-card);
  color: #111827;
}

.product-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  margin: 0 8px 8px 0;
}

.list-item, .cart-line, .product-card {
  border-radius: var(--radius);
  padding: 14px 15px;
}

.list-item-header, .cart-line-header, .product-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.product-card {
  display: grid;
  gap: 12px;
}

.product-card-action {
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.product-card-action:hover {
  background: var(--data-card-hover);
  transform: translateY(-1px);
}

.product-sale-panel,
.invoice-workspace {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: #e4efe6;
  border: 1px solid rgba(91, 138, 105, 0.1);
}

.cart-workspace {
  padding-top: 18px;
}

.search-shell {
  position: relative;
  margin-bottom: 14px;
}

.checkout-search {
  max-width: none;
  margin-bottom: 0;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(91, 138, 105, 0.08), 0 10px 24px rgba(15, 23, 42, 0.08);
}

.product-sale-panel .product-picker {
  flex: 1;
  overflow: auto;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  gap: 8px;
  padding: 10px;
  max-height: 320px;
  overflow: auto;
  border: none;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.customer-search-shell,
.import-supplier-search-shell {
  position: relative;
}

.payment-workspace .text-input,
.payment-workspace select,
.payment-workspace textarea,
.checkout-summary > div {
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(91, 138, 105, 0.08);
}

.customer-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  gap: 8px;
  padding: 10px;
  max-height: 280px;
  overflow: auto;
  border: none;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.customer-suggestion {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: none;
  border-radius: var(--radius);
  background: var(--data-card);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.customer-suggestion:hover {
  background: var(--data-card-hover);
  transform: translateY(-1px);
}

.add-customer-suggestion {
  font-weight: 700;
}

.customer-suggestion span {
  font-size: 11px;
  color: var(--muted);
}

.search-suggestion {
  border: none;
  border-radius: var(--radius);
  padding: 12px 13px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.search-suggestion:hover {
  background: var(--data-card-hover);
  transform: translateY(-1px);
}

.add-product-suggestion {
  width: 100%;
  font-weight: 700;
}

.invoice-cart-display {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.invoice-tabs {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  padding-bottom: 0;
  margin: 0;
  border-bottom: 0;
  background: transparent;
  border-radius: 8px;
}

.invoice-tab,
.invoice-add-button {
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.invoice-tab {
  padding: 10px 14px;
  font-weight: 700;
}

.invoice-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.invoice-tab-count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #d8e8dc;
  color: #111827;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.invoice-tab-close {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
}

.invoice-tab-close:hover {
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
}

.invoice-tab.active {
  background: #f3f4f6;
  color: #111827;
}

.invoice-add-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.invoice-cart-display > .list-stack {
  flex: 1;
  overflow: auto;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: #f3f4f6;
}

.invoice-cart-display:has(.invoice-tab:first-child.active) > .list-stack {
  border-top-left-radius: 0;
}

.invoice-cart-display .cart-line {
  width: 100%;
  padding: 10px 12px;
  background: #eef5ef;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(91, 138, 105, 0.08), 0 6px 16px rgba(91, 138, 105, 0.08);
}

.invoice-cart-display .cart-line-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.cart-product-info {
  min-width: 0;
}

.invoice-cart-display .cart-line h4 {
  font-size: 14px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-cart-display .line-meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-line-controls {
  display: grid;
  grid-template-columns: 88px 92px minmax(76px, auto) auto;
  gap: 6px;
  align-items: end;
  justify-items: end;
}

.import-line-controls {
  grid-template-columns: 88px 92px minmax(76px, auto) auto;
}

.cart-line-controls label,
.cart-line-total {
  display: grid;
  gap: 4px;
}

.cart-line-controls label span,
.cart-line-total span {
  font-size: 10px;
  color: #111827;
  text-align: right;
}

.cart-line-controls .text-input {
  padding: 7px 8px;
  text-align: right;
  background: var(--panel);
  color: #111827;
}

.price-editor {
  position: relative;
}

.price-input {
  cursor: pointer;
}

.price-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  width: 280px;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel);
  border: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
}

.price-editor:focus-within .price-popover {
  display: grid;
  gap: 8px;
}

.price-popover-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.price-popover span,
.final-price-row span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  text-align: left;
}

.price-popover .text-input {
  width: 100%;
  padding: 8px 9px;
  border: none;
  border-radius: 8px;
  outline: none;
  text-align: right;
}

.price-popover .text-input:focus {
  box-shadow: none;
}

.discount-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px;
}

.final-price-row {
  min-height: 35px;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 28px 44px 28px;
  align-items: center;
  min-height: 35px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  color: #111827;
}

.quantity-input {
  width: 44px;
  height: 35px;
  padding: 0 4px;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #111827;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.quantity-input:focus {
  box-shadow: none;
}

.qty-button {
  height: 35px;
  padding: 0;
  border: none;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.qty-button:hover,
.qty-button:focus {
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
}

.cart-line:hover .qty-button,
.cart-line:focus-within .qty-button {
  opacity: 1;
  pointer-events: auto;
}

.cart-line-total strong {
  display: block;
  min-height: 35px;
  padding: 8px 0;
  white-space: nowrap;
  color: #111827;
}

.icon-button {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.icon-button.danger {
  color: #dc2626;
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  color: #b91c1c;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
}

.modal-card .block-header > .icon-button[aria-label="Đóng"] {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.menu-trigger {
  background: transparent;
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

.cart-line-menu {
  position: relative;
}

.line-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 132px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid rgba(91, 138, 105, 0.12);
  box-shadow: var(--shadow);
}

.cart-line-menu.open .line-menu-panel {
  display: grid;
}

.line-menu-panel button {
  border: none;
  border-radius: var(--radius);
  padding: 9px 10px;
  background: transparent;
  color: #111827;
  text-align: left;
  cursor: pointer;
}

.line-menu-panel button:hover {
  background: #eef5ef;
}

.cart-note-panel {
  margin-top: 10px;
  padding-left: 47px;
}

.cart-note-panel .text-area {
  min-height: 64px;
  padding: 14px 15px;
  line-height: 20px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.34);
}

#customerInvoiceInfoModal.modal-overlay,
#customerAddressModal.modal-overlay {
  z-index: 220;
}

.modal-card {
  width: min(520px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: box-shadow 120ms ease;
  will-change: transform;
}

.modal-card.dragging {
  box-shadow: 0 28px 70px rgba(87, 52, 25, 0.2);
}

.product-create-modal {
  width: min(620px, 100%);
}

#quickProductModal .product-create-modal {
  width: min(680px, calc(100vw - 40px));
  max-height: none;
  overflow: visible;
}

#quickProductForm {
  gap: 10px;
}

#quickProductForm .product-avatar-picker {
  margin-bottom: 0;
}

#quickProductForm .product-avatar-shell,
#quickProductForm .product-avatar-image,
#quickProductForm .product-avatar-fallback {
  width: 88px;
  height: 88px;
}

#quickProductForm .text-area {
  min-height: 66px;
}

.product-detail-modal:not(.invoice-detail-modal) {
  height: auto;
  max-height: none;
  overflow: visible;
}

#customerModal .product-create-modal,
#quickCustomerModal .product-create-modal {
  height: auto;
  max-height: calc(100vh - 48px);
  overflow: visible;
}

.product-avatar-picker {
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.product-avatar-shell {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.product-avatar-image,
.product-avatar-fallback {
  width: 108px;
  height: 108px;
  border-radius: var(--radius);
  object-fit: cover;
}

.product-avatar-fallback {
  display: grid;
  place-items: center;
  background: #e4efe6;
  color: #111827;
  font-size: 34px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.reference-search-shell {
  position: relative;
}

.reference-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px;
  max-height: 280px;
  overflow: auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

#quickProductCategorySuggestions,
#quickProductBrandSuggestions,
#checkoutSalesChannelSuggestions {
  gap: 0;
  padding: 48px 0 10px;
  max-height: 430px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.reference-picker-close {
  position: absolute;
  top: -20px;
  right: -18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.reference-inline-search {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  width: calc(100% - 40px);
  height: 40px;
  padding: 0 12px 0 38px;
  border: 1px solid #21a366;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  outline: none;
  font-size: 14px;
}

#quickProductCategorySuggestions::before,
#quickProductBrandSuggestions::before,
#checkoutSalesChannelSuggestions::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 22px;
  width: 12px;
  height: 12px;
  border: 2px solid #64748b;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

#quickProductCategorySuggestions::after,
#quickProductBrandSuggestions::after,
#checkoutSalesChannelSuggestions::after {
  content: "";
  position: absolute;
  left: 46px;
  top: 34px;
  width: 7px;
  height: 2px;
  background: #64748b;
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
  z-index: 1;
}

.reference-suggestion {
  border: none;
  padding: 10px 12px;
  background: var(--data-card);
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.reference-suggestion:hover {
  background: var(--data-card-hover);
  transform: translateY(-1px);
}

.reference-suggestion strong,
.reference-suggestion span {
  display: block;
}

.reference-suggestion span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

#quickProductCategorySuggestions .reference-suggestion,
#quickProductBrandSuggestions .reference-suggestion,
#checkoutSalesChannelSuggestions .reference-suggestion {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  background: #ffffff;
  box-shadow: none;
  color: #111827;
  font-size: 15px;
  font-weight: 500;
}

#quickProductCategorySuggestions .reference-suggestion strong,
#quickProductBrandSuggestions .reference-suggestion strong,
#checkoutSalesChannelSuggestions .reference-suggestion strong {
  color: #111827;
  font-size: 15px;
  font-weight: 500;
}

#quickProductCategorySuggestions .reference-default-suggestion,
#quickProductBrandSuggestions .reference-default-suggestion,
#checkoutSalesChannelSuggestions .reference-default-suggestion {
  background: #f2fbf5;
  font-weight: 600;
}

#quickProductCategorySuggestions .reference-suggestion.is-child,
#checkoutSalesChannelSuggestions .reference-suggestion.is-child {
  padding-left: 58px;
}

.reference-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  background: #ffffff;
}

.reference-suggestion-row.is-child .reference-suggestion {
  padding-left: 58px;
}

.reference-edit-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.reference-edit-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.reference-edit-button:hover {
  background: #f8fafc;
}

.reference-suggestion.is-disabled,
.reference-suggestion.is-disabled strong {
  color: #94a3b8 !important;
  cursor: default;
}

.reference-suggestion.is-disabled:hover {
  background: #ffffff !important;
  transform: none;
}

.add-reference-suggestion {
  background: var(--data-card);
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
  font-weight: 700;
}

.reference-modal {
  width: min(420px, 100%);
  overflow: visible;
}

.reference-field-label {
  color: #111827;
  font-size: 12px;
  font-weight: 500;
}

.reference-parent-picker {
  position: relative;
  min-width: 0;
}

.reference-parent-button {
  position: relative;
  width: 100%;
  height: 32px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.reference-parent-button::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.reference-parent-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  padding: 10px 0 8px;
  border-radius: 0 0 6px 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.reference-parent-search {
  display: block;
  width: calc(100% - 32px);
  height: 32px;
  margin: 0 16px 8px;
  padding: 0 12px 0 34px;
  border: 1px solid #21a366;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  outline: none;
  font-size: 14px;
}

.reference-parent-panel::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 19px;
  width: 12px;
  height: 12px;
  border: 2px solid #64748b;
  border-radius: 999px;
  pointer-events: none;
}

.reference-parent-panel::after {
  content: "";
  position: absolute;
  left: 40px;
  top: 31px;
  width: 7px;
  height: 2px;
  background: #64748b;
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.reference-parent-list {
  display: grid;
  max-height: 300px;
  overflow: auto;
}

.reference-parent-option {
  min-height: 42px;
  padding: 0 16px;
  border: none;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.reference-parent-option.active {
  background: #f2fbf5;
  font-weight: 600;
}

.reference-parent-option.is-child {
  padding-left: 36px;
}

.reference-parent-option:hover {
  background: #f8fafc;
}

.reference-parent-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  background: #ffffff;
}

.reference-parent-option-row.is-child .reference-parent-option {
  padding-left: 36px;
}

.reference-parent-option-row .reference-edit-button {
  width: 44px;
  height: 42px;
}

#categoryForm .text-input,
#brandForm .text-input,
#customerInvoiceInfoForm .text-input,
#customerInvoiceInfoForm select.text-input,
#customerInvoiceInfoForm textarea.text-input,
#customerAddressForm .text-input,
#customerAddressForm select.text-input,
#customerAddressForm textarea.text-input,
#salesChannelForm .text-input,
#categoryForm .reference-parent-button,
#salesChannelForm .reference-parent-button {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(17, 24, 39, 0.72);
  box-shadow: none;
}

#customerForm .text-input,
#customerForm select.text-input,
#quickCustomerForm .text-input,
#quickCustomerForm select.text-input,
#supplierForm .text-input,
#supplierForm select.text-input,
#quickProductForm .text-input,
#quickProductForm .text-input:focus,
#quickProductForm .text-input:valid,
#quickProductForm .text-input:invalid,
#quickProductForm .text-input:user-valid,
#quickProductForm .text-input:user-invalid,
#quickProductForm select.text-input,
#quickProductForm textarea.text-input {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid rgba(17, 24, 39, 0.72);
  box-shadow: none;
}

#quickProductForm .text-input:-webkit-autofill,
#quickProductForm .text-input:-webkit-autofill:hover,
#quickProductForm .text-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px #ffffff inset;
}

#categoryForm .reference-parent-button,
#salesChannelForm .reference-parent-button {
  height: auto;
  min-height: 42px;
  padding: 13px 34px 13px 14px;
  border-radius: var(--radius);
}

#categoryForm .text-input::placeholder,
#brandForm .text-input::placeholder,
#customerInvoiceInfoForm .text-input::placeholder,
#customerAddressForm .text-input::placeholder,
#salesChannelForm .text-input::placeholder {
  color: #475569;
}

#customerForm .text-input::placeholder,
#quickCustomerForm .text-input::placeholder,
#supplierForm .text-input::placeholder,
#quickProductForm .text-input::placeholder {
  color: #475569;
}

#categoryForm .primary-button,
#brandForm .primary-button,
#customerInvoiceInfoForm .primary-button,
#customerAddressForm .primary-button,
#salesChannelForm .primary-button {
  background: #1fbc84;
  color: #ffffff;
}

.reference-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
}

.reference-action-spacer {
  flex: 1;
}

.reference-modal-actions .ghost-button,
.reference-modal-actions .primary-button,
.reference-delete-button {
  min-width: 80px;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 16px;
}

.reference-delete-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-weight: 700;
}

.reference-delete-button::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 21q-.825 0-1.413-.588T5 19V6H4V4h5V3h6v1h5v2h-1v13q0 .825-.588 1.413T17 21H7Zm2-4h2V8H9v9Zm4 0h2V8h-2v9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.product-detail-content {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(91, 55, 25, 0.08);
  border-radius: 12px;
  align-items: center;
}

.detail-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.detail-row strong {
  color: #111827;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.danger-detail-button {
  width: 100%;
  margin-top: 12px;
  color: #b91c1c;
  background: #fee2e2;
}

.invoice-workspace .grid-form {
  width: 100%;
  min-width: 0;
}

#invoiceMetaForm {
  grid-template-columns: minmax(118px, 136px) minmax(190px, 210px);
  align-items: center;
  justify-content: space-between;
}

#importMetaForm {
  grid-template-columns: minmax(118px, 136px) minmax(190px, 210px);
  align-items: center;
  justify-content: space-between;
}

#importIdInput {
  height: 46px;
  min-height: 46px;
  padding: 13px 14px;
  background: var(--panel);
  text-align: center;
  font-weight: 700;
}

.invoice-no-input {
  min-width: 0;
  max-width: none;
}

#invoiceNoInput {
  height: 46px;
  min-height: 46px;
  padding: 13px 14px;
  text-align: center;
  font-weight: 700;
}

.payment-time-fields {
  display: grid;
  grid-template-columns: minmax(136px, 1fr) minmax(96px, 0.74fr);
  gap: 8px;
  min-width: 0;
}

#importMetaForm .import-time-fields {
  width: 210px;
  max-width: 210px;
  justify-self: end;
  grid-template-columns: 118px 84px;
  align-items: center;
}

#importMetaForm .import-picker-button {
  height: 46px;
  min-height: 46px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  border: none;
  border-radius: var(--radius);
  background: var(--panel);
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

#importSupplierInput {
  height: 46px;
  min-height: 46px;
}

#invoiceMetaForm .import-picker-button {
  height: 46px;
  min-height: 46px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  border: none;
  border-radius: var(--radius);
  background: var(--panel);
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

#customerSearchInput,
#checkoutSalesChannelInput {
  height: 46px;
  min-height: 46px;
}

.checkout-sales-channel-shell {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

#invoiceMetaForm .payment-time-fields {
  width: 210px;
  max-width: 210px;
  justify-self: end;
  grid-template-columns: 118px 84px;
  align-items: center;
}

.import-picker-shell {
  position: relative;
  min-width: 0;
}

.import-picker-button {
  width: 100%;
  height: 42px;
  border: none;
  border-bottom: 2px solid #cfd4dc;
  background: var(--panel);
  color: #111827;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  line-height: 42px;
  text-align: center;
}

.import-picker-button:focus,
.import-picker-button[aria-expanded="true"] {
  border-bottom-color: #1a73e8;
  outline: none;
}

.import-date-picker,
.import-time-picker {
  position: absolute;
  top: calc(100% + 0px);
  right: 0;
  z-index: 35;
  border-radius: 2px;
  background: var(--panel);
  color: #111827;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.22);
}

.import-time-picker {
  width: 68px;
  max-height: 322px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 8px 0;
}

.import-time-picker::-webkit-scrollbar {
  display: none;
}

.import-time-picker button {
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
}

.import-time-picker button:hover,
.import-time-picker button.active {
  background: #eef4ff;
  color: #111827;
}

.import-date-picker {
  width: 342px;
  padding: 14px 30px 16px;
}

.import-picker-nav {
  height: 38px;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
}

.import-picker-nav button,
.import-picker-nav strong {
  border: none;
  background: transparent;
  color: #111827;
  font-size: 18px;
  text-align: center;
}

.import-picker-nav button {
  cursor: pointer;
  color: #5f6b7a;
  font-size: 30px;
  line-height: 1;
}

.import-picker-nav strong {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.import-picker-divider {
  height: 1px;
  margin: 10px 0 12px;
  background: #cdd3dc;
}

.import-week-grid,
.import-day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.import-week-grid span {
  padding: 2px 0 12px;
  color: #111827;
  font-size: 16px;
}

.import-day-grid button,
.import-month-grid button,
.import-year-grid button {
  border: none;
  background: transparent;
  color: #111827;
  cursor: pointer;
  font-size: 16px;
}

.import-day-grid button {
  width: 38px;
  height: 38px;
  justify-self: center;
  border-radius: 999px;
}

.import-day-grid button.muted,
.import-year-grid button.muted {
  color: #9aa1ad;
}

.import-day-grid button.active,
.import-month-grid button.active,
.import-year-grid button.active {
  background: #0b72f0;
  color: #ffffff;
}

.import-month-grid,
.import-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 18px;
  padding: 14px 0 30px;
}

.import-month-grid button,
.import-year-grid button {
  height: 38px;
  border-radius: 999px;
}

.import-picker-footer {
  padding-top: 10px;
  color: #111827;
  font-size: 16px;
  text-align: right;
}

.payment-time-fields .text-input {
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 42px;
  color: #111827;
  text-align: center;
}

.payment-time-fields .text-input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.payment-time-fields .text-input::-webkit-datetime-edit,
.payment-time-fields .text-input::-webkit-date-and-time-value {
  padding: 0;
  color: #111827;
}

.payment-time-fields .text-input::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

.payment-time-fields .text-input::-webkit-datetime-edit-text,
.payment-time-fields .text-input::-webkit-datetime-edit-day-field,
.payment-time-fields .text-input::-webkit-datetime-edit-month-field,
.payment-time-fields .text-input::-webkit-datetime-edit-year-field,
.payment-time-fields .text-input::-webkit-datetime-edit-hour-field,
.payment-time-fields .text-input::-webkit-datetime-edit-minute-field {
  color: #111827;
  padding: 0;
}

.payment-panel {
  width: 100%;
  min-width: 0;
  margin-left: auto;
  margin-top: auto;
}

.payment-breakdown {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  background: #eef5ef;
}

.payment-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--panel);
}

.payment-row > span {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

#importMetaForm .payment-row {
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 10px;
}

#invoiceMetaForm .payment-row {
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 10px;
}

#importMetaForm .payment-row > span,
#invoiceMetaForm .payment-row > span {
  white-space: nowrap;
}

.payment-row > strong,
.payment-row .text-input {
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.payment-row .discount-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
}

.total-due-row strong {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.payment-method-options {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
}

.payment-method-row {
  grid-template-columns: minmax(0, 1fr);
}

.payment-method-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

#checkoutView .product-sale-panel,
#checkoutView .invoice-workspace {
  background: #e4efe6;
  border: none;
  box-shadow: none;
}

#checkoutView .checkout-layout {
  padding: 14px;
  border-radius: var(--radius);
  background: #e4efe6;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

#checkoutView .product-card-action:hover,
#checkoutView .customer-suggestion:hover {
  background: var(--data-card-hover);
}

#checkoutView .search-suggestion:hover {
  background: var(--data-card-hover);
}

#checkoutView .search-shell {
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

#checkoutView .checkout-search,
#checkoutView .payment-workspace .text-input,
#checkoutView .payment-workspace select,
#checkoutView .payment-workspace textarea,
#checkoutView .checkout-summary > div {
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(91, 138, 105, 0.08);
}

#checkoutView .customer-suggestion {
  background: var(--data-card);
}

#checkoutView .search-suggestion,
#checkoutView .product-picker .product-card {
  background: var(--data-card);
}

#checkoutView .invoice-cart-display {
  background: #f3f4f6;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

#checkoutView .invoice-cart-display > .list-stack {
  gap: 6px;
  background: #f3f4f6;
  box-shadow: none;
}

#checkoutView .payment-breakdown {
  gap: 10px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

#checkoutView .payment-row {
  padding: 0 10px;
  border-bottom: none;
  border-radius: 0;
  background: transparent;
}

#checkoutView .payment-row:last-child {
  border-bottom: none;
}

#checkoutView .line-menu-panel,
#checkoutView .price-popover {
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
}

#checkoutView .line-menu-panel button:hover {
  background: #f3f8f4;
}

.payment-workspace {
  position: relative;
  justify-content: flex-start;
  padding-top: 54px;
}

.payment-workspace .checkout-actions {
  margin-top: 16px;
}

.payment-workspace .checkout-actions.import-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-workspace .checkout-actions.import-actions .ghost-button,
.payment-workspace .checkout-actions.import-actions .primary-button {
  width: 100%;
}

.payment-workspace .checkout-actions .primary-button {
  width: 100%;
}

.checkout-settings-button {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  color: #111827;
}

#checkoutView {
  background: #eef1f5;
  height: 100dvh;
  overflow: hidden;
  font-family: "Inter", "Noto Sans", "Segoe UI", sans-serif;
  color: #1f2937;
  --checkout-inline-gutter: 12px;
  --checkout-reference-card-height: 52px;
  --checkout-brand: #1fbc84;
  --checkout-brand-dark: #169768;
  --checkout-surface: #ffffff;
  --checkout-surface-soft: #f8fafc;
  --checkout-border: rgba(148, 163, 184, 0.14);
  --checkout-muted: #64748b;
  --checkout-text: #0f172a;
}

#checkoutView .checkout-layout {
  grid-template-columns: minmax(0, 1fr) clamp(418px, 34.8vw, 504px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 100dvh;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

#checkoutView .product-sale-panel,
#checkoutView .invoice-workspace {
  min-height: 0;
  height: 100%;
  background: transparent;
  border: none;
}

#checkoutView .checkout-sale-stage {
  position: relative;
  padding: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  background: transparent;
  overflow: hidden;
}

#checkoutView .checkout-topbar {
  grid-column: 1 / -1;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--checkout-brand);
  border-radius: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  overflow: visible;
}

#checkoutView .search-shell {
  margin: 0;
  box-shadow: none;
}

#checkoutView .checkout-search {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  color: var(--checkout-text);
  font-size: 14px;
  font-weight: 500;
}

#checkoutView .checkout-search::placeholder {
  color: var(--checkout-muted);
}

#checkoutView .checkout-topbar .invoice-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  align-self: end;
  margin-bottom: -6px;
  position: relative;
  z-index: 2;
}

#checkoutView .checkout-topbar .invoice-tab,
#checkoutView .checkout-topbar .invoice-add-button {
  height: 42px;
  min-height: 42px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

#checkoutView .checkout-topbar .invoice-tab {
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
}

#checkoutView .invoice-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

#checkoutView .checkout-topbar .invoice-tab.active {
  background: #eef1f5;
  color: var(--checkout-text);
  box-shadow: none;
  position: relative;
}

#checkoutView .checkout-topbar .invoice-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: #eef1f5;
}

#checkoutView .checkout-topbar .invoice-tab-count {
  display: none;
}

#checkoutView .checkout-topbar .invoice-tab-close {
  color: #ffffff;
}

#checkoutView .checkout-topbar .invoice-tab:not(.active),
#checkoutView .checkout-topbar .invoice-tab:not(.active) .invoice-tab-label,
#checkoutView .checkout-topbar .invoice-tab:not(.active) .invoice-tab-close {
  color: #ffffff;
}

#checkoutView .checkout-topbar .invoice-tab.active,
#checkoutView .checkout-topbar .invoice-tab.active .invoice-tab-label,
#checkoutView .checkout-topbar .invoice-tab.active .invoice-tab-close {
  color: #111827;
}

#checkoutView .checkout-topbar .invoice-add-button {
  width: 34px;
  color: #ffffff;
  font-size: 26px;
}

#checkoutView .checkout-topbar-action {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

#checkoutView #cartLines {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: auto;
  min-height: 0;
  padding: var(--checkout-inline-gutter) 0 var(--checkout-inline-gutter) var(--checkout-inline-gutter);
  border-radius: 0;
  background: #eef1f5;
  box-shadow: none;
  overflow: auto;
  scrollbar-width: none;
  gap: 0;
}

#checkoutView #cartLines::-webkit-scrollbar {
  display: none;
}

#checkoutView .cart-line {
  background: var(--checkout-surface);
  border: none;
  border-radius: 8px;
  box-shadow: none;
  margin: 0 var(--checkout-inline-gutter) 8px 0;
  min-height: var(--checkout-reference-card-height);
  padding: 12px 14px;
  width: auto;
}

#checkoutView .cart-line-body {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 28px 120px minmax(0, 1fr) 110px 118px 122px 34px;
  align-items: center;
  gap: 12px;
}

#checkoutView .cart-col {
  min-width: 0;
  overflow: hidden;
}

#checkoutView .cart-line-price {
  overflow: visible;
}

#checkoutView .cart-line-order,
#checkoutView .cart-line-model,
#checkoutView .cart-line-qty,
#checkoutView .cart-line-price,
#checkoutView .cart-line-total,
#checkoutView .cart-line-menu {
  text-align: center;
}

#checkoutView .cart-line-name {
  text-align: left;
}

#checkoutView .cart-line-model,
#checkoutView .cart-line-name {
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

#checkoutView .cart-line-order,
#checkoutView .cart-line-model,
#checkoutView .cart-line-name {
  font-size: 14.625px;
  line-height: 22.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#checkoutView .cart-line-order {
  font-weight: 400;
}

#checkoutView .cart-line-name {
  color: var(--checkout-text);
  font-weight: 400;
}

#checkoutView .cart-line-qty label,
#checkoutView .cart-line-price label,
#checkoutView .cart-line-total {
  display: flex;
  align-items: center;
  justify-content: center;
}

#checkoutView .cart-line-qty .quantity-stepper {
  width: 100%;
}

#checkoutView .cart-line-total strong {
  font-size: 14.625px;
  line-height: 22.5px;
  font-weight: 700;
}

#checkoutView .cart-line-price .text-input,
#checkoutView .cart-line-qty .text-input,
#checkoutView .quantity-input {
  min-height: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 14.625px;
  line-height: 22.5px;
  border: 1px solid var(--checkout-border);
  border-radius: 6px;
  background: #ffffff;
}

#checkoutView .cart-line .icon-button,
#checkoutView .qty-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
}

#checkoutView .cart-line .icon-button svg,
#checkoutView .qty-button svg {
  width: 14px;
  height: 14px;
}

#checkoutView .quantity-input {
  min-height: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 14.625px;
  line-height: 22.5px;
}

#checkoutView .cart-line .icon-button.danger {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #0f172a;
}

#checkoutView .cart-line .icon-button.danger:hover,
#checkoutView .cart-line .icon-button.danger:focus-visible {
  background: transparent;
  color: #0f172a;
}

#checkoutView .cart-line,
#checkoutView .cart-line h4,
#checkoutView .cart-line-order,
#checkoutView .cart-line-model,
#checkoutView .cart-line-name,
#checkoutView .cart-line-total strong,
#checkoutView .quantity-input,
#checkoutView .qty-button,
#checkoutView .icon-button,
#checkoutView .menu-trigger {
  color: #111827;
}

#checkoutView .cart-line-model,
#checkoutView .cart-line-name {
  display: block;
}

#checkoutView .cart-line-order,
#checkoutView .cart-line-model,
#checkoutView .cart-line-name,
#checkoutView .cart-line-qty,
#checkoutView .cart-line-price,
#checkoutView .cart-line-total,
#checkoutView .cart-line-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

#checkoutView .cart-line-model,
#checkoutView .cart-line-name {
  justify-content: flex-start;
  text-align: left;
}

#checkoutView .cart-note-panel {
  display: block;
}

#checkoutView .checkout-note-shell {
  margin-top: auto;
  padding: 4px var(--checkout-inline-gutter) 12px;
  background: transparent;
}

#checkoutView #invoiceNoteInput {
  min-height: var(--checkout-reference-card-height);
  height: var(--checkout-reference-card-height);
  resize: none;
  overflow: hidden;
  padding: 15px;
  line-height: 22px;
  border: none;
  border-radius: 8px;
  background: var(--checkout-surface);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
  color: var(--checkout-text);
}

#checkoutView #invoiceNoteInput::placeholder {
  color: #98a2b3;
}

#checkoutView #productPicker {
  position: absolute;
  inset: 60px 12px 62px 0;
  z-index: 8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

#checkoutView .checkout-payment-card {
  min-height: 0;
  height: calc(100% - (var(--checkout-inline-gutter) * 2));
  margin: var(--checkout-inline-gutter) var(--checkout-inline-gutter) var(--checkout-inline-gutter) 0;
  padding: var(--checkout-inline-gutter);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

#checkoutView .payment-workspace {
  padding-top: var(--checkout-inline-gutter);
}

#checkoutView #invoiceMetaForm {
  display: grid;
  grid-template-columns: max-content auto;
  align-content: start;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#checkoutView .customer-search-shell,
#checkoutView .payment-breakdown {
  grid-column: 1 / -1;
}

#checkoutView .customer-search-shell {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

#checkoutView .invoice-no-input {
  order: 1;
  grid-column: 1;
  width: auto;
  min-width: 12ch;
  max-width: 32ch;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: var(--checkout-surface);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  text-align: center;
  line-height: 36px;
  font-size: 14px;
  font-weight: 700;
}

#checkoutView #invoiceMetaForm .payment-time-fields {
  order: 2;
  grid-column: 2;
  grid-template-columns: max-content max-content;
  gap: 6px;
  width: auto;
  justify-self: end;
}

#checkoutView #paymentDateButton,
#checkoutView #paymentTimeButton {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

#checkoutView #paymentDateButton:focus,
#checkoutView #paymentTimeButton:focus,
#checkoutView #paymentDateButton[aria-expanded="true"],
#checkoutView #paymentTimeButton[aria-expanded="true"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  outline: none;
}

#checkoutView .customer-search-shell {
  order: 3;
}

#checkoutView .checkout-sales-channel-shell {
  display: block !important;
  order: 4;
  grid-column: 1 / -1;
  width: 22.222%;
  min-width: 0;
  justify-self: end;
}

#checkoutView #checkoutSalesChannelInput {
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: var(--checkout-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
  font-size: 14px;
  text-align: center;
}

#checkoutView #customerSearchInput {
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: var(--checkout-surface-soft);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

#checkoutView .payment-breakdown {
  order: 5;
  gap: 12px;
  padding: 8px 0 0;
  background: transparent;
}

#checkoutView .payment-row {
  grid-template-columns: 1fr auto;
  min-height: 30px;
  padding: 0;
  background: transparent;
}

#checkoutView .payment-row > span {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

#checkoutView .payment-row > strong,
#checkoutView .payment-row .text-input {
  font-size: 14px;
  font-weight: 700;
  color: var(--checkout-text);
}

#checkoutView .payment-row .text-input {
  height: 28px;
  min-height: 28px;
  padding: 0 0 0 8px;
  border: none;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#checkoutView .payment-row .discount-editor {
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
  align-items: center;
}

#checkoutView #invoiceDiscountTypeInput {
  height: 30px;
  min-height: 30px;
  padding: 0 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  text-align: center;
}

#checkoutView .total-due-row > span,
#checkoutView .total-due-row > strong {
  font-size: 18px;
  font-weight: 800;
}

#checkoutView .total-due-row > strong {
  color: #111827;
}

#checkoutView .payment-method-row {
  margin-top: 10px;
}

#checkoutView .payment-method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#checkoutView .payment-method-options label {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: none;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
  color: var(--checkout-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#checkoutView .payment-method-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#checkoutView .payment-method-options label:has(input:checked) {
  border-color: var(--checkout-brand);
  background: var(--checkout-brand);
  color: #ffffff;
  box-shadow: none;
}

#checkoutView .payment-panel {
  margin-top: auto;
  padding-top: 14px;
}

#checkoutView .checkout-actions {
  display: block;
}

#checkoutView .checkout-actions .primary-button {
  min-height: var(--checkout-reference-card-height);
  height: var(--checkout-reference-card-height);
  border-radius: 8px;
  background: var(--checkout-brand);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: none;
  text-transform: uppercase;
}

#checkoutView .checkout-actions .primary-button:hover {
  background: var(--checkout-brand-dark);
}

@media (max-width: 1400px) {
  #checkoutView .checkout-layout {
    grid-template-columns: minmax(0, 1fr) clamp(408px, 38.4vw, 552px);
  }

  #checkoutView .checkout-topbar {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) auto;
  }
}

@media (max-width: 1100px) {
  #checkoutView .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 432px;
    gap: 0;
  }

  #checkoutView .checkout-topbar {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) auto;
    gap: 10px;
    padding: 6px 10px;
  }

  #checkoutView .checkout-topbar-action {
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  #checkoutView {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  #checkoutView .checkout-layout {
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: visible;
  }

  #checkoutView .product-sale-panel,
  #checkoutView .invoice-workspace,
  #checkoutView .checkout-payment-card {
    height: auto;
    min-height: 0;
  }

  #checkoutView .checkout-sale-stage {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  #checkoutView .checkout-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #checkoutView .checkout-topbar .search-shell {
    grid-column: 1 / -1;
  }
}

.product-card h4, .cart-line h4, .list-item h4 {
  margin: 0;
  font-size: 16px;
}

.product-meta, .line-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.product-actions, .cart-line-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small-button {
  border: none;
  border-radius: var(--radius);
  padding: 9px 12px;
  background: rgba(91, 138, 105, 0.12);
  color: #111827;
  cursor: pointer;
}

.small-button.danger {
  background: rgba(225, 29, 72, 0.12);
  color: #9f1239;
}

.line-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.checkout-summary {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkout-summary > div {
  border-radius: var(--radius);
  padding: 16px;
  background: #eef5ef;
  border: none;
}

.checkout-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.search-input { max-width: 320px; }
.hidden { display: none !important; }

.product-list-row,
.entity-list-row,
.invoice-list-item,
.product-card,
.list-item,
.cart-line,
.search-suggestion,
.customer-suggestion,
.reference-suggestion,
.invoice-cart-display,
.invoice-tab,
.invoice-add-button,
.invoice-tab-count,
.checkout-summary > div {
  color: #ffffff;
}

.product-list-row strong,
.product-list-row span,
.product-list-main strong,
.product-list-main span,
.product-list-meta,
.entity-list-row strong,
.entity-list-row span,
.entity-list-main strong,
.entity-list-meta,
.invoice-list-item strong,
.invoice-list-item span,
.invoice-list-row strong,
.invoice-row-action > strong,
.product-card h4,
.cart-line h4,
.list-item h4,
.product-meta,
.line-meta,
.customer-suggestion span,
.reference-suggestion span,
.invoice-tab-close,
.checkout-summary strong,
.checkout-summary span {
  color: #ffffff;
}

.product-list-row,
.product-list-row strong,
.product-list-row span,
.product-list-main strong,
.product-list-main span,
.product-list-meta,
.entity-list-row,
.entity-list-row strong,
.entity-list-row span,
.entity-list-main strong,
.entity-list-meta,
.invoice-list-item,
.invoice-list-item strong,
.invoice-list-item span,
.invoice-list-row strong,
.invoice-row-action > strong {
  color: #111827;
}

.invoice-filter-shell {
  position: relative;
}

.invoice-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.invoice-filter-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.invoice-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(420px, 86vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.invoice-filter-panel label {
  display: grid;
  gap: 5px;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.invoice-filter-panel .text-input {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(17, 24, 39, 0.16);
  background: #ffffff;
  color: #111827;
  box-shadow: none;
  font-size: 13px;
}

.invoice-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.restored-panel {
  display: grid;
  gap: 18px;
}

.restored-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.restored-placeholder {
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.24);
}

.restored-search-shell {
  margin-bottom: 14px;
}

.restored-picker-group {
  position: relative;
}

.restored-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.restored-summary-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(43, 174, 94, 0.08);
}

.restored-summary-item span {
  font-size: 12px;
  color: var(--muted);
}

.restored-summary-item strong {
  font-size: 18px;
}

.restored-summary-discount,
.restored-full {
  grid-column: 1 / -1;
}

.restored-report-form,
.restored-report-grid {
  margin-bottom: 18px;
}

.restored-report-grid > .restored-inner-panel {
  padding: 18px;
}

.restored-field {
  display: grid;
  gap: 8px;
}

.restored-avatar-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.restored-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.restored-modal-body {
  display: grid;
  gap: 10px;
}

.restored-modal-body .detail-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(43, 174, 94, 0.08);
}

.restored-modal-body .detail-row span {
  color: var(--muted);
  font-size: 13px;
}

.restored-modal-body .detail-row strong {
  word-break: break-word;
}

.kv-checkout-layout {
  gap: 18px;
}

.kv-sale-stage,
.kv-payment-card {
  background: #f7f8fa;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.kv-checkout-topbar {
  margin-bottom: 10px;
}

.kv-search-shell {
  min-width: min(520px, 100%);
}

.kv-topbar-branch {
  background: #e9fff0;
  color: #137a3d;
  border: 1px solid rgba(19, 122, 61, 0.16);
}

.kv-sale-subbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.kv-note-shell {
  margin-top: 12px;
}

.kv-payment-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.kv-payment-header h3 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.kv-panel-kicker,
.kv-field-label {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kv-field-label {
  margin-bottom: 6px;
}

.kv-inline-field {
  display: block;
}

.kv-payment-breakdown {
  margin-top: 8px;
}

.kv-checkout-actions {
  margin-top: 14px;
}

#checkoutView .checkout-sales-channel-shell {
  display: block;
}

#checkoutView .checkout-sales-channel-shell.hidden {
  display: block;
}

#checkoutView .kv-payment-card #invoiceMetaForm {
  gap: 12px;
}

#checkoutView .kv-payment-card .payment-row {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#checkoutView .kv-payment-card .payment-row > span {
  color: #5b6472;
}

#checkoutView .kv-payment-card .payment-row > strong {
  color: #111827;
}

#checkoutView .product-card,
#checkoutView .cart-line,
#checkoutView .product-card h4,
#checkoutView .cart-line h4,
#checkoutView .product-meta,
#checkoutView .line-meta,
#checkoutView .cart-line-total strong,
#checkoutView .quantity-input,
#checkoutView .qty-button,
#checkoutView .icon-button,
#checkoutView .menu-trigger {
  color: #ffffff;
}

#checkoutView .icon-button.danger,
#checkoutView .icon-button.danger:hover,
#checkoutView .icon-button.danger:focus-visible {
  color: #ffffff;
}

#checkoutView .cart-line {
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: box-shadow 120ms ease, transform 120ms ease;
}

#checkoutView .cart-line:hover,
#checkoutView .cart-line:focus-within {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.4);
}

#checkoutView .cart-line,
#checkoutView .cart-line h4,
#checkoutView .line-meta,
#checkoutView .cart-line-total strong,
#checkoutView .quantity-input,
#checkoutView .qty-button,
#checkoutView .icon-button,
#checkoutView .menu-trigger {
  color: #111827;
}

#checkoutView .product-card,
#checkoutView .search-suggestion,
#checkoutView .customer-suggestion {
  background: var(--panel) !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.4) !important;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

#checkoutView .search-suggestion {
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18) !important;
}

#checkoutView .customer-suggestion,
#checkoutView .reference-suggestion {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18) !important;
  color: #111827 !important;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestions {
  left: auto;
  right: 0;
  width: min(320px, 70vw);
  max-height: 380px;
  gap: 0;
  padding: 56px 0 8px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

#quickProductCategorySuggestions {
  width: min(320px, 70vw);
  max-height: 380px;
  padding: 56px 0 8px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

#quickProductCategorySuggestions::-webkit-scrollbar {
  display: none;
}

#quickProductBrandSuggestions {
  width: min(320px, 70vw);
  max-height: 380px;
  padding: 56px 0 8px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

#quickProductBrandSuggestions::-webkit-scrollbar {
  display: none;
}

#quickProductCategorySuggestions .reference-inline-search {
  top: 10px;
  left: 14px;
  right: 14px;
  width: calc(100% - 28px);
  height: 36px;
  padding-left: 36px;
}

#quickProductBrandSuggestions .reference-inline-search {
  top: 10px;
  left: 14px;
  right: 14px;
  width: calc(100% - 28px);
  height: 36px;
  padding-left: 36px;
}

#quickProductCategorySuggestions::before {
  left: 28px;
  top: 22px;
}

#quickProductBrandSuggestions::before {
  left: 28px;
  top: 22px;
}

#quickProductCategorySuggestions::after {
  left: 40px;
  top: 34px;
}

#quickProductBrandSuggestions::after {
  left: 40px;
  top: 34px;
}

#quickProductCategorySuggestions .reference-suggestion {
  min-height: 42px;
  padding: 8px 12px 8px 16px;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none !important;
}

#quickProductBrandSuggestions .reference-suggestion {
  min-height: 42px;
  padding: 8px 12px 8px 16px;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none !important;
}

#quickProductCategorySuggestions .reference-suggestion-row {
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 42px;
  align-items: stretch;
}

#quickProductBrandSuggestions .reference-suggestion strong {
  font-size: 14px;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
}

#quickProductCategorySuggestions .reference-suggestion strong {
  font-size: 14px;
  color: #111827;
  white-space: normal;
  overflow-wrap: anywhere;
}

#quickProductCategorySuggestions .reference-suggestion-row.is-child .reference-suggestion {
  padding-left: 40px;
}

#quickProductCategorySuggestions .reference-edit-button {
  width: 36px;
  height: 42px;
}

#quickProductCategorySuggestions .reference-edit-button svg {
  width: 14px;
  height: 14px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestions::-webkit-scrollbar {
  display: none;
}

#checkoutView .checkout-sales-channel-shell .reference-inline-search {
  top: 10px;
  left: 14px;
  right: 14px;
  width: calc(100% - 28px);
  height: 36px;
  padding-left: 36px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestions::before {
  left: 28px;
  top: 22px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestions::after {
  left: 40px;
  top: 34px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion {
  gap: 0;
  min-height: 42px;
  padding: 8px 12px 8px 16px;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: none !important;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion-row {
  grid-template-columns: minmax(0, 1fr) 36px;
  min-height: 42px;
  align-items: stretch;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion strong,
#checkoutView .checkout-sales-channel-shell .reference-suggestion span {
  color: #111827 !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion span {
  margin-top: 0;
  font-size: 14px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion strong {
  font-size: 14px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion.is-child {
  padding-left: 40px;
}

#checkoutView .checkout-sales-channel-shell .reference-suggestion-row.is-child .reference-suggestion {
  padding-left: 40px;
}

#checkoutView .checkout-sales-channel-shell .reference-edit-button {
  width: 36px;
  height: 42px;
}

#checkoutView .checkout-sales-channel-shell .reference-edit-button svg {
  width: 14px;
  height: 14px;
}

#checkoutView .checkout-sales-channel-shell .reference-default-suggestion {
  background: #f2fbf5 !important;
  font-weight: 600;
}

#checkoutView .product-card:hover,
#checkoutView .search-suggestion:hover,
#checkoutView .customer-suggestion:hover {
  background: var(--panel) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24) !important;
}

#checkoutView .search-suggestion:hover {
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14) !important;
}

#checkoutView .customer-suggestion:hover,
#checkoutView .reference-suggestion:hover {
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14) !important;
}

#checkoutView .product-card,
#checkoutView .search-suggestion,
#checkoutView .customer-suggestion,
#checkoutView .product-card h4,
#checkoutView .search-suggestion h4,
#checkoutView .customer-suggestion h4,
#checkoutView .product-card strong,
#checkoutView .search-suggestion strong,
#checkoutView .customer-suggestion strong,
#checkoutView .product-meta,
#checkoutView .customer-suggestion span,
#checkoutView .reference-suggestion span,
#checkoutView .search-suggestion span {
  color: #111827 !important;
}

#checkoutView .icon-button.danger,
#checkoutView .icon-button.danger:hover,
#checkoutView .icon-button.danger:focus-visible {
  color: #111827;
}

@media (max-width: 1200px) {
  .app-shell, .split-layout, .checkout-layout, .stats-grid, .login-shell,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .report-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #dashboardView.active {
    grid-template-rows: auto auto;
  }

  .checkout-layout,
  .product-sale-panel,
  .invoice-workspace {
    min-height: auto;
  }

  .invoice-workspace .grid-form,
  .payment-panel {
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    border-right: none;
    border-bottom: none;
  }
}

.invoice-search-input {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.14);
  box-shadow: none;
}

.invoice-search-input:focus {
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 720px) {
  .main-panel, .sidebar { padding: 16px; }
  body.sidebar-collapsed .sidebar { padding: 46px 6px 10px; }
  .login-hero, .login-card { padding: 20px; }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  #dashboardView .stats-grid,
  .dashboard-layout {
    padding-inline: 10px;
  }

  .grid-form.two-cols, .line-editor, .checkout-summary,
  .report-table-header,
  .report-table-row {
    grid-template-columns: 1fr;
  }

  .restored-summary-grid,
  .restored-modal-body .detail-row {
    grid-template-columns: 1fr;
  }

  .report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-list-row {
    display: grid;
  }

  .invoice-detail-hero,
  .invoice-detail-summary {
    grid-template-columns: 1fr;
  }

  .modal-card.invoice-detail-modal {
    padding: 16px;
    width: min(100vw - 16px, 100%);
    max-width: min(100vw - 16px, 100%);
    height: auto;
    max-height: calc(100vh - 16px);
  }

  .invoices-panel .products-header {
    align-items: stretch;
  }

  .invoices-panel .product-header-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .invoice-detail-hero h4,
  .invoice-detail-meta span,
  .detail-row strong {
    white-space: normal;
  }

  .invoice-detail-meta {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

#checkoutView #invoiceMetaForm #paymentDateButton.import-picker-button,
#checkoutView #invoiceMetaForm #paymentTimeButton.import-picker-button {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05) !important;
}

#checkoutView #invoiceMetaForm #paymentDateButton.import-picker-button:focus,
#checkoutView #invoiceMetaForm #paymentTimeButton.import-picker-button:focus,
#checkoutView #invoiceMetaForm #paymentDateButton.import-picker-button[aria-expanded="true"],
#checkoutView #invoiceMetaForm #paymentTimeButton.import-picker-button[aria-expanded="true"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
}

/* POS sale screen, matched to the supplied reference image. */
#checkoutView.active {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-width: 0;
  background: #eef0f3;
  overflow: hidden;
}

#checkoutView.active .kv-checkout-layout {
  --pos-green: #10b575;
  --pos-bg: #eef0f3;
  --pos-card: #ffffff;
  --pos-border: rgba(15, 23, 42, 0.1);
  --pos-muted: #7b8492;
  --pos-text: #111827;
  --pos-gutter-x: 16px;
  --pos-gutter-y: 16px;
  --pos-card-pad-x: 12px;
  --pos-panel-pad: 16px;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 442px;
  grid-template-rows: 58px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: var(--pos-bg);
  box-shadow: none;
}

#checkoutView.active .kv-sale-stage {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-rows: minmax(0, 1fr) 72px;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: var(--pos-bg);
  overflow: hidden;
}

#checkoutView.active .kv-checkout-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  z-index: 6;
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(90deg, #07865a 0%, #10b575 48%, #12a86f 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  overflow: visible;
}

#checkoutView.active .checkout-topbar-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

#checkoutView.active .kv-search-shell {
  width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: 12px;
  box-shadow: none;
}

#checkoutView.active .kv-search-shell::before,
#checkoutView.active .customer-search-shell::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: #7c8795;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

#checkoutView.active .kv-search-shell::after,
#checkoutView.active .customer-search-shell::after {
  content: none;
}

#checkoutView.active .kv-search-shell::before {
  -webkit-mask: var(--icon-barcode) center / contain no-repeat;
  mask: var(--icon-barcode) center / contain no-repeat;
}

#checkoutView.active .customer-search-shell::before {
  -webkit-mask: var(--icon-user-add) center / contain no-repeat;
  mask: var(--icon-user-add) center / contain no-repeat;
}

#checkoutView.active #productSearchInput {
  height: 42px;
  min-height: 42px;
  padding: 0 16px 0 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--pos-text);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  font-weight: 700;
}

#checkoutView.active .checkout-topbar .invoice-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  overflow: visible;
}

#checkoutView.active .checkout-topbar .invoice-tab {
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
  font-size: 13px;
}

#checkoutView.active .checkout-topbar .invoice-tab.active {
  background: #ffffff;
  color: #047857;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

#checkoutView.active .checkout-topbar .invoice-tab.active::after {
  content: none;
}

#checkoutView.active .invoice-tab-label {
  gap: 9px;
}

#checkoutView.active .invoice-tab-label::before {
  content: "";
  width: 12px;
  height: 12px;
  display: inline-block;
  background: currentColor;
  clip-path: polygon(8% 28%, 92% 28%, 92% 42%, 8% 42%, 8% 28%, 22% 28%, 22% 8%, 78% 8%, 78% 28%, 66% 28%, 66% 18%, 34% 18%, 34% 28%, 8% 28%, 18% 52%, 82% 52%, 82% 92%, 18% 92%);
}

#checkoutView.active .invoice-tab-count {
  display: none;
}

#checkoutView.active .invoice-tab-close {
  color: inherit !important;
  font-size: 18px;
  font-weight: 500;
}

#checkoutView.active .checkout-topbar .invoice-add-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}

#checkoutView.active .checkout-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#checkoutView.active .checkout-topbar-status {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

#checkoutView.active .checkout-topbar-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #bbf7d0;
  box-shadow: 0 0 0 4px rgba(187, 247, 208, 0.18);
}

#checkoutView.active .kv-topbar-branch {
  height: 34px;
  min-height: 34px;
  padding: 0 14px 0 34px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

#checkoutView.active .kv-topbar-branch::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 2px;
  transform: translateY(-45%);
}

#checkoutView.active .kv-topbar-branch::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 12px;
  width: 8px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 1px 1px 0 0;
}

#checkoutView.active .kv-sale-subbar,
#checkoutView.active .kv-payment-header,
#checkoutView.active .kv-field-label,
#checkoutView.active #clearCartBtn {
  display: none !important;
}

#checkoutView.active #cartLines {
  height: auto;
  min-height: 0;
  padding: var(--pos-gutter-y) var(--pos-gutter-x);
  background: var(--pos-bg);
  overflow: auto;
  gap: 0;
}

#checkoutView.active #cartLines.empty-state {
  color: transparent;
}

#checkoutView.active .cart-line {
  min-height: 52px;
  margin: 0 0 8px;
  padding: 0 var(--pos-card-pad-x);
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

#checkoutView.active .cart-line-body {
  min-height: 52px;
  grid-template-columns: 24px 26px minmax(86px, 0.7fr) minmax(180px, 1.3fr) 88px 92px 92px 30px;
  gap: 10px;
  align-items: center;
}

#checkoutView.active .cart-line-order {
  color: #0b63ce;
  font-size: 13px;
}

#checkoutView.active .cart-line-name,
#checkoutView.active .cart-line-model,
#checkoutView.active .cart-line-total strong,
#checkoutView.active .quantity-input {
  color: var(--pos-text) !important;
  font-size: 13px;
  font-weight: 700;
}

#checkoutView.active .cart-line-name,
#checkoutView.active .cart-line-model {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#checkoutView.active .cart-line-price .text-input,
#checkoutView.active .cart-line-qty .text-input,
#checkoutView.active .quantity-input {
  height: 28px;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid #d2d8e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

#checkoutView.active .qty-button,
#checkoutView.active .cart-line .icon-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#checkoutView.active .cart-note-panel {
  width: min(860px, calc(100% - 48px));
  margin: 8px auto 10px;
  padding-left: 0;
}

#checkoutView.active .cart-note-panel .text-area {
  width: 100%;
  min-height: 68px;
  height: 68px;
  padding: 12px 14px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.32);
  font-size: 13px;
  line-height: 20px;
  resize: none;
}

#checkoutView.active .checkout-note-shell {
  height: 72px;
  margin: 0;
  padding: var(--pos-gutter-y) var(--pos-gutter-x);
  position: relative;
  background: var(--pos-bg);
}

#checkoutView.active #invoiceNoteInput {
  height: 40px;
  min-height: 40px;
  padding: 10px 14px 10px 38px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  color: var(--pos-text);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
  font-size: 13px;
  line-height: 20px;
}

#checkoutView.active .checkout-note-shell::before {
  content: "";
  position: absolute;
  left: calc(var(--pos-gutter-x) + var(--pos-card-pad-x) + 4px);
  top: calc(var(--pos-gutter-y) + 12px);
  width: 12px;
  height: 12px;
  background: #9aa5b1;
  clip-path: polygon(0 74%, 0 100%, 26% 100%, 100% 26%, 74% 0);
  z-index: 1;
}

#checkoutView.active .kv-payment-card {
  grid-column: 2;
  grid-row: 2;
  height: calc(100% - (var(--pos-gutter-y) * 2));
  min-height: 0;
  margin: var(--pos-gutter-y) var(--pos-gutter-x) var(--pos-gutter-y) 0;
  padding: var(--pos-panel-pad);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.05);
  overflow: visible;
}

#checkoutView.active #invoiceMetaForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 62px;
  align-content: start;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: visible;
}

#checkoutView.active #invoiceMetaForm > * {
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

#checkoutView.active #invoiceMetaForm .text-input,
#checkoutView.active #invoiceMetaForm .import-picker-button,
#checkoutView.active #invoiceMetaForm .payment-method-options label {
  box-sizing: border-box;
}

#checkoutView.active .kv-inline-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

#checkoutView.active .kv-inline-field:has(#invoiceNoInput) {
  grid-column: 1;
  justify-self: start;
}

#checkoutView.active #invoiceNoInput {
  width: 12ch;
  min-width: 12ch;
  max-width: 32ch;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 5px;
  background: #f7f8fa;
  color: var(--pos-text);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

#checkoutView.active .kv-inline-field:has(#invoiceNoInput)::after {
  content: none;
}

#checkoutView.active .kv-inline-field:has(#paymentDateButton) {
  grid-column: 2;
}

#checkoutView.active .kv-inline-field:has(#paymentTimeButton) {
  grid-column: 3;
}

#checkoutView.active #paymentDateButton,
#checkoutView.active #paymentTimeButton {
  width: 100%;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.55) !important;
  border-radius: 5px;
  background: #f7f8fa !important;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06) !important;
  color: var(--pos-text);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

#checkoutView.active #paymentDateButton {
  min-width: 112px;
  padding-left: 8px;
  position: relative;
}

#checkoutView.active .kv-inline-field:has(#paymentDateButton)::before {
  content: none;
}

#checkoutView.active .kv-inline-field:has(#paymentTimeButton)::before {
  content: none;
}

#checkoutView.active .customer-search-shell {
  grid-column: 1 / -1;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
}

#checkoutView.active #customerSearchInput {
  height: 40px;
  min-height: 40px;
  padding: 0 38px 0 52px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 5px;
  background: #f6f7f9;
  color: var(--pos-text);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
  font-size: 13px;
}

#checkoutView.active .customer-search-shell::before {
  left: 22px;
}

#checkoutView.active .customer-search-shell::after {
  left: 33px;
}

#checkoutView.active .customer-search-shell::marker {
  display: none;
}

#checkoutView.active .customer-search-shell.restored-full::after {
  background: #9aa5b1;
}

#checkoutView.active .customer-search-shell::selection {
  background: transparent;
}

#checkoutView.active .customer-search-shell .customer-suggestions {
  top: calc(100% + 6px);
}

#checkoutView.active .checkout-sales-channel-shell {
  grid-column: 1 / -1;
  display: block !important;
  position: relative;
  z-index: 40;
  width: min(110px, 24%);
  justify-self: end;
}

#checkoutView.active .checkout-sales-channel-shell #checkoutSalesChannelSuggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 80;
  width: min(320px, 80vw);
}

#checkoutView.active #checkoutSalesChannelInput {
  display: block !important;
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 5px;
  background: #f7f8fa;
  color: var(--pos-text);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

#checkoutView.active .payment-breakdown {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  padding-top: 0;
  background: transparent;
}

#checkoutView.active .payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 76%);
  gap: 16px;
  align-items: center;
  min-height: 24px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#checkoutView.active .payment-row > span {
  color: #334155 !important;
  font-size: 13px;
  font-weight: 500;
}

#checkoutView.active .payment-row > strong,
#checkoutView.active .payment-row .text-input {
  color: var(--pos-text) !important;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  justify-self: stretch;
  max-width: 100%;
}

#checkoutView.active .discount-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: center;
  width: 100%;
  max-width: none;
  justify-self: end;
}

#checkoutView.active .payment-row .text-input,
#checkoutView.active #invoiceDiscountInput,
#checkoutView.active #customerPaidInput {
  height: 28px;
  min-height: 28px;
  width: 100%;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}

#checkoutView.active #invoiceDiscountTypeInput {
  height: 28px;
  min-height: 28px;
  padding: 0 4px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 12px;
  font-weight: 500;
}

#checkoutView.active .total-due-row {
  margin-top: 6px;
}

#checkoutView.active .total-due-row > span {
  color: var(--pos-text) !important;
  font-weight: 800;
}

#checkoutView.active .total-due-row > strong {
  color: var(--pos-green) !important;
  font-size: 17px;
  font-weight: 900;
}

#checkoutView.active .payment-method-row {
  margin-top: 0;
  display: block;
  width: 100%;
}

#checkoutView.active .payment-method-row > span {
  display: none;
}

#checkoutView.active .payment-method-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

#checkoutView.active .payment-method-options label {
  height: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  color: var(--pos-text);
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.07);
  font-size: 13px;
  font-weight: 800;
}

#checkoutView.active .payment-method-options label:has(input:checked) {
  background: var(--pos-green);
  color: #ffffff;
}

#checkoutView.active .kv-checkout-actions {
  margin: 16px 0 0;
  display: block;
}

#checkoutView.active #submitInvoiceBtn {
  width: 100%;
  height: 52px;
  min-height: 52px;
  border: 0;
  border-radius: 5px;
  background: var(--pos-green);
  color: #ffffff;
  box-shadow: none;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

#checkoutView.active #submitInvoiceBtn:hover {
  background: #0ca468;
  transform: none;
}

#checkoutView.active #productPicker {
  inset: 8px 12px 80px 16px;
  border-radius: 6px;
}

@media (max-width: 900px) {
  #checkoutView.active .kv-checkout-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow: auto;
  }

  #checkoutView.active .kv-sale-stage {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    min-height: 50vh;
  }

  #checkoutView.active .kv-payment-card {
    grid-column: 1;
    grid-row: 3;
    height: auto;
    min-height: 50vh;
  }

  #checkoutView.active .kv-payment-card {
    margin: 0 16px 16px;
  }

  #checkoutView.active .kv-checkout-topbar {
    grid-template-columns: 1fr;
    height: auto;
    gap: 8px;
    width: 100%;
  }

  #checkoutView.active .checkout-topbar-main {
    grid-template-columns: 1fr;
  }

  #checkoutView.active .checkout-topbar-actions {
    justify-content: space-between;
  }
}

/* Redesigned overview dashboard. */
#dashboardView.active {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.16), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(245, 158, 11, 0.14), transparent 24%),
    linear-gradient(180deg, #f3f6f8 0%, #edf1f4 100%);
}

#dashboardView.active .dashboard-hero {
  min-height: 156px;
  position: relative;
  overflow: hidden;
  padding: 26px 30px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(6, 95, 70, 0.96), rgba(16, 181, 117, 0.92)),
    radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.3), transparent 28%);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.14);
}

#dashboardView.active .dashboard-hero::before {
  content: "";
  position: absolute;
  right: 150px;
  top: -44px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 28px solid rgba(255, 255, 255, 0.12);
}

#dashboardView.active .dashboard-hero::after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -72px;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

#dashboardView.active .dashboard-hero > * {
  position: relative;
  z-index: 1;
}

#dashboardView.active .dashboard-kicker,
#dashboardView.active .dashboard-panel-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#dashboardView.active .dashboard-hero h2 {
  max-width: 720px;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

#dashboardView.active .dashboard-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 600;
}

#dashboardView.active .dashboard-cta {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: #ffffff;
  color: #047857;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

#dashboardView.active .dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
}

#dashboardView.active .stat-card {
  min-height: 148px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(10px);
}

#dashboardView.active .stat-card::before {
  width: 42px;
  height: 6px;
}

#dashboardView.active .stat-card::after {
  right: -30px;
  top: -30px;
  width: 118px;
  height: 118px;
  opacity: 0.95;
}

#dashboardView.active .stat-label {
  color: #64748b;
}

#dashboardView.active .stat-card strong {
  color: #0f172a;
  font-size: clamp(28px, 3.2vw, 46px);
}

#dashboardView.active .stat-card p {
  color: #64748b;
}

#dashboardView.active .accent-blue::before { background: #2563eb; }
#dashboardView.active .accent-blue::after { background: rgba(37, 99, 235, 0.12); }
#dashboardView.active .accent-green::before { background: #10b575; }
#dashboardView.active .accent-green::after { background: rgba(16, 181, 117, 0.14); }
#dashboardView.active .accent-amber::before { background: #f59e0b; }
#dashboardView.active .accent-amber::after { background: rgba(245, 158, 11, 0.16); }
#dashboardView.active .accent-rose::before { background: #e11d48; }
#dashboardView.active .accent-rose::after { background: rgba(225, 29, 72, 0.13); }

#dashboardView.active .dashboard-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 16px;
  padding: 0;
}

#dashboardView.active .dashboard-panel {
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  overflow: auto;
}

#dashboardView.active .dashboard-panel-kicker {
  margin-bottom: 4px;
  color: #10b575;
}

#dashboardView.active .block-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  letter-spacing: -0.02em;
}

#dashboardView.active .list-stack {
  display: grid;
  gap: 8px;
}

#dashboardView.active .list-item {
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

#dashboardView.active .list-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

#dashboardView.active .list-item h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

#dashboardView.active .list-item strong {
  color: #047857;
  white-space: nowrap;
}

#dashboardView.active .line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1100px) {
  #dashboardView.active .dashboard-stats-grid,
  #dashboardView.active .dashboard-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #dashboardView.active {
    padding: 12px;
  }

  #dashboardView.active .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  #dashboardView.active .dashboard-stats-grid,
  #dashboardView.active .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* App-wide icon pass: CSS masks keep icons lightweight and script-safe. */
:root {
  --icon-dashboard: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 13h7V4H4v9Zm0 7h7v-5H4v5Zm9 0h7v-9h-7v9Zm0-11h7V4h-7v5Z'/%3E%3C/svg%3E");
  --icon-sale: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM6.2 6l.8 4h8.9l1.4-4H6.2ZM5 2H2v2h2l3.2 12H19v-2H8.8l-.5-2H18l2.4-8H6.7L6.2 2Z'/%3E%3C/svg%3E");
  --icon-invoice: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h12a1 1 0 0 1 1 1v19l-3-2-3 2-3-2-3 2-3-2V3a1 1 0 0 1 1-1Zm3 6h6V6H9v2Zm0 4h8v-2H9v2Zm0 4h5v-2H9v2Z'/%3E%3C/svg%3E");
  --icon-box: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 2 9 4.5v11L12 22l-9-4.5v-11L12 2Zm0 2.2L6.3 7 12 9.8 17.7 7 12 4.2ZM5 8.7v7.6l6 3v-7.6l-6-3Zm8 10.6 6-3V8.7l-6 3v7.6Z'/%3E%3C/svg%3E");
  --icon-users: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8.5 1a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM8 13c-3.3 0-6 1.8-6 4v2h12v-2c0-2.2-2.7-4-6-4Zm8.5.5c-.8 0-1.5.1-2.2.4 1.1.9 1.7 2 1.7 3.1v2h6v-1.7c0-2.1-2.5-3.8-5.5-3.8Z'/%3E%3C/svg%3E");
  --icon-import: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v9l3-3 1.4 1.4L12 15.8l-5.4-5.4L8 9l3 3V3ZM5 19h14v-4h2v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5h2v4Z'/%3E%3C/svg%3E");
  --icon-supplier: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7h11v10H3V7Zm13 3h2.5l2.5 3v4h-2a2 2 0 1 1-4 0H9a2 2 0 1 1-4 0H3v-2h11V5h2v5Zm0 2v3h3v-1.3L17.6 12H16Z'/%3E%3C/svg%3E");
  --icon-tax: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h14v18H5V3Zm3 4h8V5H8v2Zm0 4h2V9H8v2Zm4 0h2V9h-2v2Zm4 0h2V9h-2v2Zm-8 4h2v-2H8v2Zm4 0h2v-2h-2v2Zm4 0h2v-2h-2v2Zm-8 4h8v-2H8v2Z'/%3E%3C/svg%3E");
  --icon-warehouse: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 9 5v13h-4v-7H7v7H3V8l9-5Zm-5 7h10V8.9l-5-2.8-5 2.8V10Zm2 6v2h6v-2H9Z'/%3E%3C/svg%3E");
  --icon-report: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 3h16v18H4V3Zm4 14h2V9H8v8Zm4 0h2V6h-2v11Zm4 0h2v-5h-2v5Z'/%3E%3C/svg%3E");
  --icon-settings: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2-1.5-2-3.5-2.4 1a7.6 7.6 0 0 0-2.6-1.5L14 2h-4l-.4 2.5C8.7 4.8 7.8 5.3 7 6L4.6 5 2.6 8.5l2 1.5c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2 1.5 2 3.5 2.4-1c.8.7 1.7 1.2 2.6 1.5L10 22h4l.4-2.5c.9-.3 1.8-.8 2.6-1.5l2.4 1 2-3.5-2-1.5ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
  --icon-plus: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
  --icon-refresh: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 0 0 4.3 10H2a10 10 0 0 1 17.1-5.1L21 3v6h-6l2.7-2.7ZM6.3 17.7A8 8 0 0 0 19.7 14H22A10 10 0 0 1 4.9 19.1L3 21v-6h6l-2.7 2.7Z'/%3E%3C/svg%3E");
  --icon-filter: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h18l-7 8v5l-4 2v-7L3 5Z'/%3E%3C/svg%3E");
  --icon-save: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h12l2 2v16H5V3Zm3 2v5h8V5H8Zm0 11v3h8v-3H8Z'/%3E%3C/svg%3E");
  --icon-trash: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3h6l1 2h5v2H3V5h5l1-2Zm-3 6h12l-1 12H7L6 9Z'/%3E%3C/svg%3E");
  --icon-cash: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6h18v12H3V6Zm3 3a2 2 0 0 1-2 2v2a2 2 0 0 1 2 2h12a2 2 0 0 1 2-2v-2a2 2 0 0 1-2-2H6Zm6 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E");
  --icon-card: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm1 4h16V7H4v2Zm2 6h6v-2H6v2Z'/%3E%3C/svg%3E");
  --icon-logout: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 3h9v2H6v14h7v2H4V3Zm12.6 5.4L20.2 12l-3.6 3.6-1.4-1.4 1.2-1.2H10v-2h6.4l-1.2-1.2 1.4-1.4Z'/%3E%3C/svg%3E");
  --icon-barcode: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h2v14H3V5Zm3 0h1v14H6V5Zm3 0h2v14H9V5Zm3 0h1v14h-1V5Zm3 0h3v14h-3V5Zm4 0h1v14h-1V5Z'/%3E%3C/svg%3E");
  --icon-user-add: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-3.3 0-6 1.8-6 4v2h12v-2c0-2.2-2.7-4-6-4Zm10-2V9h-2v3h-3v2h3v3h2v-3h3v-2h-3Z'/%3E%3C/svg%3E");
}

.nav-tab::after,
.sidebar-logout::before,
.dashboard-cta::before,
#dashboardView.active .stat-label::before,
#dashboardView.active .dashboard-panel .block-header h3::before,
.iconized-button::before,
#submitInvoiceBtn::before,
#checkoutView.active .payment-method-options label::before,
#checkoutView.active .payment-row > span::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon, var(--icon-dashboard)) center / contain no-repeat;
  mask: var(--icon, var(--icon-dashboard)) center / contain no-repeat;
}

.nav-tab::after {
  --icon: var(--icon-dashboard);
  order: 0;
  width: 18px;
  height: 18px;
  opacity: 0.95;
}

.nav-tab[data-view="dashboard"]::after { --icon: var(--icon-dashboard); }
.nav-tab[data-view="checkout"]::after { --icon: var(--icon-sale); }
.nav-tab[data-view="invoices"]::after { --icon: var(--icon-invoice); }
.nav-tab[data-view="products"]::after { --icon: var(--icon-box); }
.nav-tab[data-view="customers"]::after { --icon: var(--icon-users); }
.nav-tab[data-view="imports"]::after { --icon: var(--icon-import); }
.nav-tab[data-view="suppliers"]::after { --icon: var(--icon-supplier); }
.nav-tab[data-view="vatInvoices"]::after { --icon: var(--icon-tax); }
.nav-tab[data-view="invoiceInventory"]::after { --icon: var(--icon-warehouse); }
.nav-tab[data-view="reports"]::after { --icon: var(--icon-report); }
.nav-tab[data-view="maps"]::after { --icon: var(--icon-settings); }

.nav-tab .nav-label {
  order: 1;
}

.sidebar-logout::before {
  --icon: var(--icon-logout);
  width: 18px;
  height: 18px;
}

.dashboard-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.dashboard-cta::before {
  --icon: var(--icon-plus);
}

#dashboardView.active .stat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#dashboardView.active .stat-label::before {
  width: 28px;
  height: 28px;
  padding: 7px;
  border-radius: 10px;
  color: #ffffff;
  background-color: #10b575;
  background-origin: content-box;
  background-clip: content-box;
  box-shadow: inset 0 0 0 999px rgba(16, 181, 117, 0.14);
}

#dashboardView.active .accent-blue .stat-label::before { --icon: var(--icon-cash); background-color: #2563eb; }
#dashboardView.active .accent-green .stat-label::before { --icon: var(--icon-invoice); background-color: #10b575; }
#dashboardView.active .accent-amber .stat-label::before { --icon: var(--icon-box); background-color: #f59e0b; }
#dashboardView.active .accent-rose .stat-label::before { --icon: var(--icon-report); background-color: #e11d48; }

#dashboardView.active .dashboard-panel .block-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

#dashboardView.active .dashboard-invoices-panel .block-header h3::before { --icon: var(--icon-invoice); }
#dashboardView.active .dashboard-products-panel .block-header h3::before { --icon: var(--icon-box); }

#dashboardView.active .dashboard-panel .block-header h3::before {
  width: 18px;
  height: 18px;
  color: #10b575;
}

.primary-button,
.ghost-button,
.checkout-topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#openProductModalBtn::before,
#openCustomerModalBtn::before,
#openSupplierModalBtn::before,
#openImportEntryBtn::before,
#openInvoiceImportBtn::before,
#completeImportBtn::before,
#quickProductSubmitBtn::before,
#categorySubmitBtn::before,
#brandSubmitBtn::before,
#salesChannelSubmitBtn::before,
#submitInvoiceBtn::before {
  --icon: var(--icon-plus);
}

#invoiceFilterBtn::before,
#resetReportFiltersBtn::before {
  --icon: var(--icon-filter);
}

#saveDraftImportBtn::before,
#completeImportBtn::before,
#quickProductSubmitBtn::before,
#categorySubmitBtn::before,
#brandSubmitBtn::before,
#salesChannelSubmitBtn::before {
  --icon: var(--icon-save);
}

#clearCartBtn::before,
#clearInvoiceFiltersBtn::before,
#deleteProductBtn::before,
#deleteCategoryReferenceBtn::before,
#deleteSalesChannelReferenceBtn::before {
  --icon: var(--icon-trash);
}

#openProductModalBtn::before,
#openCustomerModalBtn::before,
#openSupplierModalBtn::before,
#openImportEntryBtn::before,
#openInvoiceImportBtn::before,
#invoiceFilterBtn::before,
#resetReportFiltersBtn::before,
#saveDraftImportBtn::before,
#completeImportBtn::before,
#quickProductSubmitBtn::before,
#categorySubmitBtn::before,
#brandSubmitBtn::before,
#salesChannelSubmitBtn::before,
#clearCartBtn::before,
#clearInvoiceFiltersBtn::before,
#deleteProductBtn::before,
#deleteCategoryReferenceBtn::before,
#deleteSalesChannelReferenceBtn::before {
  content: "";
  width: 15px;
  height: 15px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

#submitInvoiceBtn::before {
  --icon: var(--icon-cash);
  width: 18px;
  height: 18px;
}

#checkoutView.active .payment-method-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#checkoutView.active .payment-row > span::before,
#checkoutView.active .payment-method-options label::before,
#checkoutView.active #submitInvoiceBtn::before {
  content: none !important;
}

/* Redesigned sidebar to match the refreshed module surfaces. */
.app-shell {
  background:
    linear-gradient(90deg, #075f43 0, #075f43 224px, #eef1f5 224px, #eef1f5 100%);
}

.sidebar {
  padding: 14px 10px;
  gap: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #07865a 0%, #075f43 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1), 10px 0 28px rgba(15, 23, 42, 0.12);
}

.sidebar-toggle {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.sidebar .account-card {
  order: 3;
  margin-top: auto;
  margin-bottom: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.sidebar .brand-mark,
.sidebar .avatar-image,
.sidebar .avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.sidebar .brand-mark,
.sidebar .avatar-fallback {
  background: #ffffff;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  font-size: 18px;
}

.sidebar .account-meta h1 {
  max-width: 132px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .account-meta .eyebrow {
  max-width: 132px;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar #authStateBadge {
  margin-top: 8px;
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(187, 247, 208, 0.16);
  color: #dcfce7;
  font-size: 10px;
  font-weight: 900;
}

.sidebar .nav-tabs {
  order: 1;
  margin-top: 42px;
  gap: 7px;
}

.sidebar .nav-tab {
  min-height: 42px;
  padding: 0 10px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.sidebar .nav-tab::after {
  width: 18px;
  height: 18px;
  color: currentColor;
  opacity: 0.96;
}

.sidebar .nav-tab:hover,
.sidebar .nav-tab:focus-visible {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar .nav-tab.active {
  border-color: rgba(255, 255, 255, 0.3);
  background: #ffffff;
  color: #047857;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.sidebar .nav-tab.active::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background: #10b575;
}

.sidebar .nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .sidebar-logout {
  order: 4;
  margin-top: 0;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
}

.sidebar .sidebar-logout:hover,
.sidebar .sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(2px);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 64px minmax(0, 1fr);
  background:
    linear-gradient(90deg, #075f43 0, #075f43 64px, #eef1f5 64px, #eef1f5 100%);
}

body.sidebar-collapsed .sidebar {
  padding: 62px 8px 10px;
  align-items: stretch;
}

body.sidebar-collapsed .sidebar-toggle {
  left: 50%;
  top: 12px;
  right: auto;
  transform: translateX(-50%);
}

body.sidebar-collapsed .sidebar .account-card {
  display: none;
}

body.sidebar-collapsed .sidebar .nav-tab,
body.sidebar-collapsed .sidebar .sidebar-logout {
  min-height: 44px;
  width: 100%;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
}

body.sidebar-collapsed .sidebar .nav-tab::after,
body.sidebar-collapsed .sidebar .sidebar-logout::before {
  width: 20px;
  height: 20px;
}

body.sidebar-collapsed .sidebar .nav-label {
  display: none;
}

body.sidebar-collapsed .sidebar .nav-tab.active::before {
  inset: 12px auto 12px 0;
}

body.sidebar-collapsed .sidebar .sidebar-logout {
  margin-top: auto;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
}

body.sidebar-collapsed .sidebar .sidebar-logout::before {
  margin: 0;
  text-indent: 0;
}

/* Redesigned reference modals: category, brand, sales channel. */
#categoryModal.modal-overlay,
#brandModal.modal-overlay,
#salesChannelModal.modal-overlay {
  padding: 22px;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.14), transparent 26%),
    rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
}

#categoryModal .modal-card,
#brandModal .modal-card,
#salesChannelModal .modal-card {
  width: min(620px, calc(100vw - 44px));
  max-height: calc(100dvh - 44px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

#categoryModal .block-header,
#brandModal .block-header,
#salesChannelModal .block-header {
  position: relative;
  min-height: 78px;
  margin: 0;
  padding: 20px 22px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.26), transparent 25%),
    linear-gradient(135deg, #1d4ed8 0%, #10b575 100%);
  color: #ffffff;
}

#categoryModal .block-header::after,
#brandModal .block-header::after,
#salesChannelModal .block-header::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -76px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

#categoryModal .block-header h3,
#brandModal .block-header h3,
#salesChannelModal .block-header h3 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #ffffff;
  font-size: 23px;
  line-height: 1;
  letter-spacing: -0.04em;
}

#categoryModal .block-header h3::before,
#brandModal .block-header h3::before,
#salesChannelModal .block-header h3::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #ffffff;
  -webkit-mask: var(--reference-modal-icon, var(--icon-box)) center / 21px 21px no-repeat;
  mask: var(--reference-modal-icon, var(--icon-box)) center / 21px 21px no-repeat;
}

#categoryModal .block-header h3::before { --reference-modal-icon: var(--icon-warehouse); }
#brandModal .block-header h3::before { --reference-modal-icon: var(--icon-box); }
#salesChannelModal .block-header h3::before { --reference-modal-icon: var(--icon-sale); }

#categoryModal .block-header .icon-button,
#brandModal .block-header .icon-button,
#salesChannelModal .block-header .icon-button {
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
}

#categoryForm,
#brandForm,
#salesChannelForm {
  margin: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-height: calc(100dvh - 122px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.96));
}

#categoryForm .text-input,
#brandForm .text-input,
#salesChannelForm .text-input,
#categoryForm .import-picker-button,
#salesChannelForm .import-picker-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-align: left;
}

#categoryForm .text-input:focus,
#brandForm .text-input:focus,
#salesChannelForm .text-input:focus,
#categoryForm .import-picker-button:focus,
#salesChannelForm .import-picker-button:focus {
  border-color: #10b575;
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 181, 117, 0.13);
}

#categoryForm .import-picker-button,
#salesChannelForm .import-picker-button {
  position: relative;
  padding-right: 42px;
  font-weight: 800;
}

#categoryForm .import-picker-button::after,
#salesChannelForm .import-picker-button::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.6;
}

#categoryParentPanel,
#salesChannelParentPanel {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  display: grid;
  gap: 8px;
  max-height: 260px;
  padding: 12px;
  overflow: auto;
  scrollbar-width: none;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  transform: translateY(-6px) scaleY(0.98);
  transform-origin: top center;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease, max-height 160ms ease;
}

#categoryParentPanel::-webkit-scrollbar,
#salesChannelParentPanel::-webkit-scrollbar {
  display: none;
}

#categoryParentPanel.hidden,
#salesChannelParentPanel.hidden {
  display: none !important;
}

#categoryParentPanel.is-open,
#salesChannelParentPanel.is-open {
  transform: translateY(0) scaleY(1);
  opacity: 1;
}

#categoryParentSearchInput,
#salesChannelParentSearchInput {
  height: 40px;
  min-height: 40px;
}

#categoryParentList,
#salesChannelParentList {
  display: grid;
  gap: 6px;
}

#categoryForm .checkout-actions,
#brandForm .checkout-actions,
#salesChannelForm .checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

#categoryForm .ghost-button,
#brandForm .ghost-button,
#salesChannelForm .ghost-button,
#categoryForm .primary-button,
#brandForm .primary-button,
#salesChannelForm .primary-button {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 900;
}

#categoryForm .primary-button,
#brandForm .primary-button,
#salesChannelForm .primary-button {
  background: #10b575;
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(16, 181, 117, 0.22);
}

#deleteCategoryReferenceBtn,
#deleteSalesChannelReferenceBtn {
  background: rgba(225, 29, 72, 0.1);
  color: #be123c;
}

@media (max-width: 640px) {
  #categoryModal .modal-card,
  #brandModal .modal-card,
  #salesChannelModal .modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  #categoryForm .checkout-actions,
  #brandForm .checkout-actions,
  #salesChannelForm .checkout-actions {
    flex-direction: column-reverse;
  }
}

/* Redesigned create/edit modals: product, customer, supplier. */
#quickProductModal.modal-overlay,
#customerModal.modal-overlay,
#quickCustomerModal.modal-overlay,
#supplierModal.modal-overlay {
  padding: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(16, 181, 117, 0.18), transparent 28%),
    rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
}

#quickProductModal .product-create-modal,
#customerModal .product-create-modal,
#quickCustomerModal .product-create-modal,
#supplierModal .product-create-modal {
  width: min(920px, calc(100vw - 44px));
  max-height: calc(100dvh - 44px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  background: #f8fafc;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

#quickProductModal .block-header,
#customerModal .block-header,
#quickCustomerModal .block-header,
#supplierModal .block-header {
  position: relative;
  min-height: 84px;
  margin: 0;
  padding: 20px 22px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(135deg, #0f8a5c 0%, #10b575 100%);
  color: #ffffff;
}

#quickProductModal .block-header::after,
#customerModal .block-header::after,
#quickCustomerModal .block-header::after,
#supplierModal .block-header::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

#quickProductModal .block-header h3,
#customerModal .block-header h3,
#quickCustomerModal .block-header h3,
#supplierModal .block-header h3 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

#quickProductModal .block-header h3::before,
#customerModal .block-header h3::before,
#quickCustomerModal .block-header h3::before,
#supplierModal .block-header h3::before {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #ffffff;
  -webkit-mask: var(--modal-icon, var(--icon-box)) center / 22px 22px no-repeat, linear-gradient(#000 0 0);
  mask: var(--modal-icon, var(--icon-box)) center / 22px 22px no-repeat;
}

#quickProductModal .block-header h3::before { --modal-icon: var(--icon-box); }
#customerModal .block-header h3::before,
#quickCustomerModal .block-header h3::before { --modal-icon: var(--icon-users); }
#supplierModal .block-header h3::before { --modal-icon: var(--icon-supplier); }

#quickProductModal .block-header .icon-button,
#customerModal .block-header .icon-button,
#quickCustomerModal .block-header .icon-button,
#supplierModal .block-header .icon-button {
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
}

#quickProductForm,
#customerForm,
#quickCustomerForm,
#supplierForm {
  margin: 0;
  padding: 20px;
  max-height: calc(100dvh - 128px);
  overflow: auto;
  scrollbar-width: thin;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.96));
}

#quickProductForm.grid-form.two-cols,
#customerForm.grid-form.two-cols,
#quickCustomerForm.grid-form.two-cols,
#supplierForm.grid-form.two-cols {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

#quickProductForm > *,
#customerForm > *,
#quickCustomerForm > *,
#supplierForm > * {
  grid-column: span 6;
  min-width: 0;
}

#quickProductForm > .restored-full,
#customerForm > .restored-full,
#quickCustomerForm > .restored-full,
#supplierForm > .restored-full,
#quickProductForm > textarea,
#supplierForm > textarea {
  grid-column: 1 / -1;
}

#quickProductForm .restored-avatar-field,
#customerForm .restored-avatar-field,
#quickCustomerForm .restored-avatar-field {
  grid-column: span 4;
  grid-row: span 2;
}

#supplierForm .checkout-actions,
#quickProductForm .checkout-actions,
#customerForm .primary-button.restored-full,
#quickCustomerForm .primary-button.restored-full {
  grid-column: 1 / -1;
}

#quickProductForm .text-input,
#quickProductForm select.text-input,
#quickProductForm textarea.text-input,
#customerForm .text-input,
#customerForm select.text-input,
#customerForm textarea.text-input,
#quickCustomerForm .text-input,
#quickCustomerForm select.text-input,
#quickCustomerForm textarea.text-input,
#supplierForm .text-input,
#supplierForm select.text-input,
#supplierForm textarea.text-input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#quickProductForm textarea.text-input,
#customerForm textarea.text-input,
#quickCustomerForm textarea.text-input,
#supplierForm textarea.text-input {
  min-height: 92px;
  padding: 12px 14px;
  line-height: 1.45;
}

#quickProductForm .text-input:focus,
#customerForm .text-input:focus,
#quickCustomerForm .text-input:focus,
#supplierForm .text-input:focus {
  border-color: #10b575;
  box-shadow: 0 0 0 4px rgba(16, 181, 117, 0.13);
}

#quickProductForm .reference-search-shell,
#customerForm .reference-search-shell,
#quickCustomerForm .reference-search-shell {
  position: relative;
}

#quickProductForm .restored-avatar-field,
#customerForm .restored-avatar-field,
#quickCustomerForm .restored-avatar-field {
  min-height: 116px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px dashed rgba(16, 181, 117, 0.38);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 181, 117, 0.08), rgba(255, 255, 255, 0.78));
}

#quickProductForm .restored-avatar-field::after,
#customerForm .restored-avatar-field::after,
#quickCustomerForm .restored-avatar-field::after {
  content: "Chọn ảnh hoặc kéo thả vào đây";
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#quickProductForm .restored-avatar-field input[type="file"],
#customerForm .restored-avatar-field input[type="file"],
#quickCustomerForm .restored-avatar-field input[type="file"] {
  grid-column: 1 / -1;
  width: 100%;
  font-size: 12px;
  color: #475569;
}

#quickProductForm .restored-avatar-field img,
#customerForm .restored-avatar-field img,
#quickCustomerForm .restored-avatar-field img,
#quickProductForm .restored-avatar-field .avatar-fallback,
#customerForm .restored-avatar-field .avatar-fallback,
#quickCustomerForm .restored-avatar-field .avatar-fallback {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
  background: #e9f8f0;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.18);
}

#customerForm button[data-open-customer-address],
#customerForm button[data-open-customer-invoice-info],
#quickCustomerForm button[data-open-customer-address],
#quickCustomerForm button[data-open-customer-invoice-info],
#supplierForm button[data-open-customer-address],
#supplierForm button[data-open-customer-invoice-info] {
  min-height: 44px;
  border: 1px solid rgba(16, 181, 117, 0.22);
  border-radius: 8px;
  background: #f1fbf6;
  color: #047857;
  box-shadow: none;
}

.info-submodal {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
}

.info-submodal .block-header {
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.info-submodal .block-header > div {
  min-width: 0;
}

.info-submodal .block-header h3 {
  margin: 4px 0 6px;
  color: #111827;
  font-size: 24px;
  line-height: 1.15;
}

.info-submodal .block-header p {
  margin: 0;
  max-width: 440px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.modal-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: #e9f8f0;
  color: #047857;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-info-form.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.modal-field-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.modal-field-card span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.modal-info-form .restored-full,
.modal-info-form .checkout-actions {
  grid-column: 1 / -1;
}

.modal-info-form .text-input,
.modal-info-form select.text-input,
.modal-info-form textarea.text-input {
  min-height: 46px;
  border-radius: 8px;
  border-color: rgba(15, 23, 42, 0.24);
  background: #ffffff;
}

.modal-info-form textarea.text-input {
  min-height: 108px;
  resize: vertical;
}

.modal-info-form .checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-info-form .ghost-button,
.modal-info-form .primary-button {
  min-height: 42px;
  border-radius: 8px;
}

.import-error-modal {
  width: min(500px, calc(100vw - 32px));
}

.import-error-modal .block-header {
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(225, 29, 72, 0.12);
}

.import-error-modal .block-header > div {
  min-width: 0;
}

.import-error-modal .block-header h3 {
  margin: 4px 0 6px;
  color: #111827;
  font-size: 24px;
  line-height: 1.15;
}

.import-error-modal .block-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.modal-kicker.error {
  background: #fff1f2;
  color: #be123c;
}

.import-error-body {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(225, 29, 72, 0.18);
  border-radius: 8px;
  background: #fff7f7;
}

.import-error-body strong {
  color: #991b1b;
  font-size: 15px;
}

.import-error-body p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-line;
}

.import-error-modal .checkout-actions {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.import-error-modal .primary-button {
  min-height: 42px;
  border-radius: 8px;
  background: #e11d48;
  color: #ffffff;
}

#quickProductForm .checkout-actions,
#supplierForm .checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

#customerForm > .primary-button.restored-full,
#quickCustomerForm > .primary-button.restored-full,
#supplierForm .primary-button,
#quickProductForm .primary-button {
  min-height: 46px;
  border-radius: 12px;
  background: #10b575;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(16, 181, 117, 0.22);
}

#quickProductForm #deleteProductBtn {
  min-height: 46px;
  border-radius: 12px;
  background: rgba(225, 29, 72, 0.1);
  color: #be123c;
}

@media (max-width: 760px) {
  #quickProductModal .product-create-modal,
  #customerModal .product-create-modal,
  #quickCustomerModal .product-create-modal,
  #supplierModal .product-create-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  #quickProductForm.grid-form.two-cols,
  #customerForm.grid-form.two-cols,
  #quickCustomerForm.grid-form.two-cols,
  #supplierForm.grid-form.two-cols,
  .modal-info-form.grid-form {
    grid-template-columns: 1fr;
  }

  #quickProductForm > *,
  #customerForm > *,
  #quickCustomerForm > *,
  #supplierForm > *,
  #quickProductForm .restored-avatar-field,
  #customerForm .restored-avatar-field,
  #quickCustomerForm .restored-avatar-field,
  .modal-info-form > * {
    grid-column: 1 / -1;
  }
}

/* Unified module topbars for management pages. */
#productsView.active,
#customersView.active,
#invoicesView.active,
#importsView.active,
#suppliersView.active,
#importEntryView.active,
#vatInvoicesView.active,
#vatInvoiceImportEntryView.active,
#vatInvoiceExportEntryView.active,
#invoiceInventoryView.active,
#reportsView.active,
#mapsView.active {
  min-height: 100dvh;
  padding: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(16, 181, 117, 0.12), transparent 24%),
    linear-gradient(180deg, #f4f7f9 0%, #eef1f5 100%);
}

#productsView.active,
#customersView.active,
#invoicesView.active,
#importsView.active,
#vatInvoicesView.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

#reportsView.active {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

#reportsView.active > * {
  margin: 0;
}

#importsView.active > .products-panel,
#importEntryView.active > .products-panel,
#suppliersView.active > .products-panel,
#vatInvoicesView.active > .products-panel,
#vatInvoiceImportEntryView.active > .products-panel,
#vatInvoiceExportEntryView.active > .products-panel,
#invoiceInventoryView.active > .products-panel,
#mapsView.active > .products-panel {
  min-height: calc(100dvh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#mapsView.active > .products-panel {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

#productsView.active .products-header,
#customersView.active .products-header,
#invoicesView.active .products-header,
#importsView.active .products-header,
#importEntryView.active .products-header,
#suppliersView.active .products-header,
#vatInvoicesView.active .products-header,
#vatInvoiceImportEntryView.active .products-header,
#vatInvoiceExportEntryView.active .products-header,
#invoiceInventoryView.active .products-header,
#reportsView.active .products-header,
#mapsView.active .products-header {
  min-height: 86px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.26), transparent 26%),
    linear-gradient(135deg, #0f8a5c 0%, #10b575 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

#productsView.active .products-header::after,
#customersView.active .products-header::after,
#invoicesView.active .products-header::after,
#importsView.active .products-header::after,
#suppliersView.active .products-header::after,
#vatInvoicesView.active .products-header::after,
#invoiceInventoryView.active .products-header::after,
#reportsView.active .products-header::after,
#mapsView.active .products-header::after {
  content: "";
  position: absolute;
  right: -58px;
  top: -74px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.products-header > div:first-child {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.module-kicker {
  display: inline-flex;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.products-view .products-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.products-view .products-header h3::before {
  content: "";
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f8a5c;
  -webkit-mask: var(--module-icon, var(--icon-dashboard)) center / 20px 20px no-repeat, linear-gradient(#000 0 0);
  -webkit-mask-composite: source-over;
  mask: var(--module-icon, var(--icon-dashboard)) center / 20px 20px no-repeat;
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.14);
}

#productsView .products-header h3::before { --module-icon: var(--icon-box); }
#customersView .products-header h3::before { --module-icon: var(--icon-users); }
#invoicesView .products-header h3::before { --module-icon: var(--icon-invoice); }
#importsView .products-header h3::before { --module-icon: var(--icon-import); }
#suppliersView .products-header h3::before { --module-icon: var(--icon-supplier); }
#vatInvoicesView .products-header h3::before { --module-icon: var(--icon-tax); }
#invoiceInventoryView .products-header h3::before { --module-icon: var(--icon-warehouse); }
#reportsView .products-header h3::before { --module-icon: var(--icon-report); }
#mapsView .products-header h3::before { --module-icon: var(--icon-settings); }

.products-view .products-header .restored-subtitle {
  max-width: 620px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.products-view .product-header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

.products-view .product-header-actions .ghost-button,
.products-view .product-header-actions .primary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.products-view .product-header-actions .primary-button {
  border-color: rgba(255, 255, 255, 0.42);
  background: #ffffff;
  color: #047857;
}

.products-view .product-header-actions .ghost-button:hover,
.products-view .product-header-actions .primary-button:hover {
  transform: translateY(-1px);
}

.products-view .product-header-actions .invoice-search-input {
  width: min(340px, 34vw);
  min-width: 240px;
  height: 38px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: none;
}

.products-view .table-shell,
.products-view .restored-placeholder,
.products-view .report-filter-card,
.products-view #reportStats,
.products-view .restored-report-grid,
.products-view #reportDailyTable {
  border-radius: 16px;
}

#productsView.active > .table-shell,
#customersView.active > .table-shell,
#invoicesView.active > .table-shell,
#vatInvoicesView.active > .table-shell,
#importsView.active .table-shell,
#suppliersView.active .table-shell,
#vatInvoicesView.active .restored-placeholder,
#invoiceInventoryView.active .restored-placeholder {
  min-height: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

#reportsView.active .report-filter-card,
#reportsView.active #reportStats,
#reportsView.active .restored-report-grid,
#reportsView.active #reportDailyTable {
  margin: 0;
}

.invoice-toolbar {
  flex-wrap: nowrap;
}

.invoice-toolbar #invoiceFilterPanel {
  top: calc(100% + 10px);
}

#invoicesView.active .products-header {
  min-height: 43px;
  padding: 7px 12px;
  border-radius: 14px;
}

#invoicesView.active .products-header .module-kicker,
#invoicesView.active .products-header .restored-subtitle {
  display: none;
}

#invoicesView.active .products-header h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

#invoicesView.active .products-header h3::before {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

#invoicesView.active .product-header-actions .ghost-button,
#invoicesView.active .product-header-actions .primary-button,
#invoicesView.active .product-header-actions .invoice-search-input {
  min-height: 32px;
  height: 32px;
}

@media (max-width: 1100px) {
  #productsView.active .products-header,
  #customersView.active .products-header,
  #invoicesView.active .products-header,
  #importsView.active .products-header,
  #suppliersView.active .products-header,
  #vatInvoicesView.active .products-header,
  #invoiceInventoryView.active .products-header,
  #reportsView.active .products-header,
  #mapsView.active .products-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .products-view .product-header-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .products-view .product-header-actions .invoice-search-input {
    width: min(100%, 420px);
  }

  .invoice-toolbar {
    flex-wrap: wrap;
  }
}

/* Compact module bars and refreshed content cards. */
#productsView.active .products-header,
#customersView.active .products-header,
#invoicesView.active .products-header,
#importsView.active .products-header,
#suppliersView.active .products-header,
#vatInvoicesView.active .products-header,
#invoiceInventoryView.active .products-header,
#reportsView.active .products-header,
#mapsView.active .products-header {
  min-height: 43px;
  padding: 7px 12px;
  border-radius: 14px;
}

#productsView.active .products-header .module-kicker,
#customersView.active .products-header .module-kicker,
#invoicesView.active .products-header .module-kicker,
#importsView.active .products-header .module-kicker,
#suppliersView.active .products-header .module-kicker,
#vatInvoicesView.active .products-header .module-kicker,
#invoiceInventoryView.active .products-header .module-kicker,
#reportsView.active .products-header .module-kicker,
#mapsView.active .products-header .module-kicker,
#productsView.active .products-header .restored-subtitle,
#customersView.active .products-header .restored-subtitle,
#invoicesView.active .products-header .restored-subtitle,
#importsView.active .products-header .restored-subtitle,
#suppliersView.active .products-header .restored-subtitle,
#vatInvoicesView.active .products-header .restored-subtitle,
#invoiceInventoryView.active .products-header .restored-subtitle,
#reportsView.active .products-header .restored-subtitle,
#mapsView.active .products-header .restored-subtitle,
#productsView.active .products-header .status-badge,
#customersView.active .products-header .status-badge,
#invoicesView.active .products-header .status-badge,
#importsView.active .products-header .status-badge,
#suppliersView.active .products-header .status-badge,
#vatInvoicesView.active .products-header .status-badge,
#invoiceInventoryView.active .products-header .status-badge,
#reportsView.active .products-header .status-badge,
#mapsView.active .products-header .status-badge {
  display: none !important;
}

#productsView.active .products-header h3,
#customersView.active .products-header h3,
#invoicesView.active .products-header h3,
#importsView.active .products-header h3,
#suppliersView.active .products-header h3,
#vatInvoicesView.active .products-header h3,
#invoiceInventoryView.active .products-header h3,
#reportsView.active .products-header h3,
#mapsView.active .products-header h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

#productsView.active .products-header h3::before,
#customersView.active .products-header h3::before,
#invoicesView.active .products-header h3::before,
#importsView.active .products-header h3::before,
#suppliersView.active .products-header h3::before,
#vatInvoicesView.active .products-header h3::before,
#invoiceInventoryView.active .products-header h3::before,
#reportsView.active .products-header h3::before,
#mapsView.active .products-header h3::before {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}

.products-view .product-header-actions .ghost-button,
.products-view .product-header-actions .primary-button,
.products-view .product-header-actions .invoice-search-input {
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
}

#productsView.active > .table-shell,
#customersView.active > .table-shell,
#invoicesView.active > .table-shell,
#importsView.active .table-shell,
#suppliersView.active .table-shell,
#vatInvoicesView.active .restored-placeholder,
#invoiceInventoryView.active .restored-placeholder,
#reportsView.active .report-filter-card,
#reportsView.active #reportStats,
#reportsView.active .restored-report-grid > *,
#reportsView.active #reportDailyTable {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#productsView.active .product-list-row,
#customersView.active .entity-list-row,
#invoicesView.active .invoice-list-item,
#importsView.active .invoice-list-item,
#importsView.active .entity-list-row,
#vatInvoicesView.active .entity-list-row,
#suppliersView.active .entity-list-row {
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Redesigned report content. */
#reportsView.active .report-filter-card {
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 244, 0.88));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

#reportsView.active .report-filter-card::before {
  content: "Bộ lọc báo cáo";
  display: inline-flex;
  margin-bottom: 12px;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#reportsView.active .report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

#reportsView.active .report-filters label {
  display: grid;
  grid-template-rows: auto 40px;
  gap: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

#reportsView.active .report-filters .text-input,
#reportsView.active .report-filters .import-picker-button {
  height: 40px;
  min-height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background-color: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#reportsView.active .report-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
}

#reportsView.active .report-stat-card {
  min-height: 116px;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px 12px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#reportsView.active .report-stat-card::before {
  inset: 18px 18px auto auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(16, 181, 117, 0.14);
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.18);
}

#reportsView.active .report-stat-card span {
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.08em;
}

#reportsView.active .report-stat-card strong {
  font-size: clamp(22px, 2vw, 34px);
  letter-spacing: -0.04em;
}

#reportsView.active .report-stat-card p {
  color: #64748b;
  font-size: 12px;
}

#reportsView.active .restored-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

#reportsView.active #reportTopProducts,
#reportsView.active #reportTopCustomers {
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#reportsView.active #reportTopProducts::before,
#reportsView.active #reportTopCustomers::before {
  display: block;
  margin-bottom: 12px;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#reportsView.active #reportTopProducts::before {
  content: "Sản phẩm nổi bật";
}

#reportsView.active #reportTopCustomers::before {
  content: "Khách hàng nổi bật";
}

#reportsView.active .report-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: transparent;
}

#reportsView.active .report-list-row:last-child {
  border-bottom: 0;
}

#reportsView.active .report-list-row strong {
  color: #0f172a;
  font-size: 13px;
}

#reportsView.active .report-list-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#reportsView.active #reportDailyTable {
  min-height: 260px;
  padding: 18px;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

#reportsView.active #reportDailyTable::before {
  content: "Dòng tiền theo ngày";
  display: block;
  margin-bottom: 12px;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#reportsView.active .report-table-header,
#reportsView.active .report-table-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(120px, 0.8fr));
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
}

#reportsView.active .report-table-header {
  background: #ecfdf5;
  color: #047857;
}

#reportsView.active .report-table-row {
  margin-top: 8px;
  background: #f8fafc;
}

/* VAT invoice entry uses the same POS-inspired split layout. */

#mapsView.active .restored-map-form::before {
  content: "Tạo điểm bản đồ";
  grid-column: 1 / -1;
  display: block;
}


/* VAT invoice entry uses the same POS-inspired split layout. */
#importsView.active {
  min-height: 100dvh;
  padding: 14px;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.08), transparent 24%),
    linear-gradient(180deg, #f4f7f9 0%, #eef1f5 100%);
}

#importsView.active > .products-panel {
  min-height: calc(100dvh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#importEntryView.active .products-header,
#vatInvoicesView.active .products-header {
  min-height: 43px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(135deg, #0f8a5c 0%, #10b575 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

#vatInvoiceImportEntryView.active .products-header,
#vatInvoiceExportEntryView.active .products-header {
  min-height: 43px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(135deg, #0f8a5c 0%, #10b575 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

#vatInvoiceImportEntryView.active .products-header .module-kicker,
#vatInvoiceImportEntryView.active .products-header .restored-subtitle,
#vatInvoiceImportEntryView.active .products-header .status-badge,
#vatInvoiceExportEntryView.active .products-header .module-kicker,
#vatInvoiceExportEntryView.active .products-header .restored-subtitle,
#vatInvoiceExportEntryView.active .products-header .status-badge {
  display: none !important;
}

#vatInvoiceImportEntryView.active .products-header h3,
#vatInvoiceExportEntryView.active .products-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: -0.02em;
}

#vatInvoiceImportEntryView.active .products-header h3::before,
#vatInvoiceExportEntryView.active .products-header h3::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #ffffff;
  color: #0f8a5c;
  -webkit-mask: var(--icon-import) center / 18px 18px no-repeat;
  mask: var(--icon-import) center / 18px 18px no-repeat;
}

#importEntryView.active .products-header .module-kicker,
#importEntryView.active .products-header .restored-subtitle,
#importEntryView.active .products-header .status-badge,
#vatInvoicesView.active .products-header .module-kicker,
#vatInvoicesView.active .products-header .restored-subtitle,
#vatInvoicesView.active .products-header .status-badge {
  display: none !important;
}

#importEntryView.active .products-header h3,
#vatInvoicesView.active .products-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: -0.02em;
}

#importEntryView.active .products-header h3::before,
#vatInvoicesView.active .products-header h3::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #ffffff;
  color: #0f8a5c;
}

#importEntryView.active .products-header h3::before {
  -webkit-mask: var(--icon-import) center / 18px 18px no-repeat;
  mask: var(--icon-import) center / 18px 18px no-repeat;
}

#vatInvoicesView.active .products-header h3::before {
  -webkit-mask: var(--icon-import) center / 18px 18px no-repeat;
  mask: var(--icon-import) center / 18px 18px no-repeat;
}

#importsView.active .import-entry-layout {
  display: none;
}

#importsView.active.is-entry-open #importTable {
  display: none;
}

#importsView.active.is-entry-open .import-entry-layout {
  min-height: calc(100dvh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 442px;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    #eef1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 28px rgba(15, 23, 42, 0.07);
}

#importEntryView.active .import-entry-layout {
  min-height: calc(100dvh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 442px;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    #eef1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 28px rgba(15, 23, 42, 0.07);
}

#importsView.active #openImportEntryBtn.is-active {
  background: #ffffff;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.24), 0 10px 20px rgba(15, 23, 42, 0.08);
}

#importsView.active .import-entry-stage,
#importEntryView.active .import-entry-stage {
  position: relative;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  min-width: 0;
}

#importsView.active .import-entry-search,
#importEntryView.active .import-entry-search {
  margin: 0;
  padding: 16px;
}

#importsView.active .import-entry-search::before,
#importEntryView.active .import-entry-search::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 37px;
  width: 17px;
  height: 17px;
  background: #7c8795;
  -webkit-mask: var(--icon-barcode) center / contain no-repeat;
  mask: var(--icon-barcode) center / contain no-repeat;
  transform: translateY(-50%);
  z-index: 2;
}

#importsView.active #importProductSearchInput,
#importEntryView.active #importProductSearchInput {
  height: 42px;
  min-height: 42px;
  padding-left: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

#importsView.active #importCartLines,
#importEntryView.active #importCartLines {
  min-height: 0;
  margin: 0 16px 16px;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: transparent;
  scrollbar-width: none;
}

#importsView.active #importCartLines::-webkit-scrollbar,
#importEntryView.active #importCartLines::-webkit-scrollbar,
#importsView.active #importSearchSuggestions::-webkit-scrollbar,
#importEntryView.active #importSearchSuggestions::-webkit-scrollbar,
#importsView.active #importSupplierSuggestions::-webkit-scrollbar {
  display: none;
}

#importEntryView.active #importSupplierSuggestions::-webkit-scrollbar {
  display: none;
}

#importsView.active #importCartLines:empty::before,
#importEntryView.active #importCartLines:empty::before {
  content: "Chưa có dòng hàng trong phiếu nhập.";
  display: grid;
  place-items: center;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-weight: 800;
}

#importsView.active #importCartLines .cart-line {
  min-height: 52px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

#importsView.active #importCartLines .cart-line-body,
#importEntryView.active #importCartLines .cart-line-body {
  min-height: 52px;
  display: grid;
  grid-template-columns: 24px 26px minmax(86px, 0.7fr) minmax(180px, 1.3fr) 88px 92px 92px 30px;
  gap: 10px;
  align-items: center;
}

#importsView.active .cart-line-order,
#importEntryView.active .cart-line-order {
  color: #0f8a5c;
  font-size: 13px;
}

#importsView.active .cart-line-name,
#importEntryView.active .cart-line-name,
#importsView.active .cart-line-model,
#importEntryView.active .cart-line-model,
#importsView.active .cart-line-total strong,
#importEntryView.active .cart-line-total strong,
#importsView.active .quantity-input,
#importEntryView.active .quantity-input,
#importsView.active .qty-button,
#importEntryView.active .qty-button,
#importsView.active .icon-button,
#importEntryView.active .icon-button,
#importsView.active .menu-trigger {
  color: #111827 !important;
  font-size: 13px;
  font-weight: 700;
}

#importsView.active .cart-line-name,
#importsView.active .cart-line-model,
#importEntryView.active .cart-line-name,
#importEntryView.active .cart-line-model {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#importsView.active .cart-line-price .text-input,
#importEntryView.active .cart-line-price .text-input,
#importsView.active .cart-line-qty .text-input,
#importEntryView.active .cart-line-qty .text-input,
#importsView.active .quantity-input {
  height: 28px;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid #d2d8e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

#importsView.active .qty-button,
#importsView.active .cart-line .icon-button,
#importEntryView.active .qty-button,
#importEntryView.active .cart-line .icon-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#importsView.active .cart-note-panel,
#importEntryView.active .cart-note-panel {
  margin: 8px 0 10px;
}

#importsView.active .cart-note-panel .text-area,
#importEntryView.active .cart-note-panel .text-area {
  min-height: 68px;
  height: 68px;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.32);
  resize: none;
}

#importsView.active #importProductPicker,
#importEntryView.active #importProductPicker {
  inset: 72px 16px 16px 16px;
  border-radius: 12px;
}

#vatInvoiceImportEntryView.active #vatImportProductPicker,
#vatInvoiceExportEntryView.active #vatExportProductPicker {
  inset: 72px 16px 16px 16px;
  border-radius: 12px;
}

#importsView.active .import-entry-side,
#importEntryView.active .import-entry-side {
  margin: 16px 16px 16px 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.05);
}

#importsView.active .import-entry-heading,
#importEntryView.active .import-entry-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
}

#importsView.active .import-entry-heading span,
#importEntryView.active .import-entry-heading span {
  color: #047857;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#importsView.active .import-entry-heading h4,
#importEntryView.active .import-entry-heading h4 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

#importsView.active #importMetaForm.import-entry-meta,
#importEntryView.active #importMetaForm.import-entry-meta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 116px 84px;
  gap: 12px;
  margin: 0;
  align-items: start;
}

#importsView.active #importMetaForm.import-entry-meta .restored-full,
#importsView.active #importSupplierInput,
#importsView.active #importSupplierSuggestions,
#importEntryView.active #importMetaForm.import-entry-meta .restored-full,
#importEntryView.active #importSupplierInput,
#importEntryView.active #importSupplierSuggestions {
  grid-column: 1 / -1;
}

#importsView.active #importMetaForm.import-entry-meta .text-input,
#importsView.active #importMetaForm.import-entry-meta .import-picker-button,
#importEntryView.active #importMetaForm.import-entry-meta .text-input,
#importEntryView.active #importMetaForm.import-entry-meta .import-picker-button {
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 6px;
  background: #f7f8fa;
  color: #111827;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

#importsView.active #importIdInput,
#importEntryView.active #importIdInput {
  min-width: 0;
  width: 100%;
}

#importsView.active #importDateButton,
#importsView.active #importTimeButton,
#importEntryView.active #importDateButton,
#importEntryView.active #importTimeButton {
  min-width: 0;
  width: 100%;
}

#importsView.active #importSupplierInput,
#importEntryView.active #importSupplierInput {
  text-align: left;
}

#importsView.active #importSupplierSuggestions,
#importEntryView.active #importSupplierSuggestions {
  position: absolute;
  top: calc(100% - 48px);
  left: 0;
  right: 0;
  z-index: 20;
}

#importsView.active .import-entry-summary,
#importEntryView.active .import-entry-summary {
  align-self: start;
  display: grid;
  gap: 14px;
}

#importsView.active .import-entry-summary > div,
#importEntryView.active .import-entry-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 50%);
  align-items: center;
  gap: 16px;
}

#importsView.active .import-entry-summary span,
#importEntryView.active .import-entry-summary span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

#importsView.active .import-entry-summary strong,
#importsView.active .import-entry-summary .text-input,
#importEntryView.active .import-entry-summary strong,
#importEntryView.active .import-entry-summary .text-input {
  color: #111827;
  text-align: right;
  font-weight: 800;
}

#importsView.active .import-entry-discount-row .discount-editor,
#importEntryView.active .import-entry-discount-row .discount-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 12px;
  align-items: center;
}

#importsView.active #importDiscountInput,
#importEntryView.active #importDiscountInput {
  height: 28px;
  min-height: 28px;
  border: 0;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#importsView.active #importDiscountTypeInput,
#importEntryView.active #importDiscountTypeInput {
  height: 28px;
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
}

#importsView.active .import-entry-summary > div:last-child strong,
#importEntryView.active .import-entry-summary > div:last-child strong {
  color: #10b575;
}

#importsView.active .import-entry-actions,
#importEntryView.active .import-entry-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

#importsView.active .import-entry-actions .ghost-button,
#importsView.active .import-entry-actions .primary-button,
#importEntryView.active .import-entry-actions .ghost-button,
#importEntryView.active .import-entry-actions .primary-button {
  min-height: 48px;
  border-radius: 6px;
  font-weight: 900;
}

#importsView.active .import-entry-actions .primary-button,
#importEntryView.active .import-entry-actions .primary-button {
  background: #10b575;
  color: #ffffff;
}

#importsView.active #importSearchSuggestions,
#importsView.active #importSupplierSuggestions,
#importEntryView.active #importSearchSuggestions,
#importEntryView.active #importSupplierSuggestions {
  z-index: 120;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  scrollbar-width: none;
}

#importsView.active #importSearchSuggestions {
  width: min(520px, calc(100vw - 32px));
  max-height: 390px;
}

#importsView.active .search-suggestion,
#importsView.active .customer-suggestion,
#importsView.active .reference-suggestion {
  position: relative;
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 10px 12px 10px 58px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

#importsView.active .search-suggestion + .search-suggestion,
#importsView.active .customer-suggestion + .customer-suggestion,
#importsView.active .reference-suggestion + .reference-suggestion {
  margin-top: 4px;
}

#importsView.active .search-suggestion::before,
#importsView.active .customer-suggestion::before,
#importsView.active .reference-suggestion::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e9f8f0, #d5f5e7);
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.18);
  transform: translateY(-50%);
}

#importsView.active .search-suggestion::after,
#importsView.active .customer-suggestion::after,
#importsView.active .reference-suggestion::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #059669;
  transform: translateY(-50%);
}

#importsView.active .search-suggestion::after {
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}

#importsView.active .customer-suggestion::after,
#importsView.active .reference-suggestion::after {
  -webkit-mask: var(--icon-users) center / contain no-repeat;
  mask: var(--icon-users) center / contain no-repeat;
}

#importsView.active .add-product-suggestion::before,
#importsView.active .add-customer-suggestion::before {
  background: linear-gradient(135deg, #10b575, #0f9f6d);
  box-shadow: 0 10px 22px rgba(16, 181, 117, 0.24);
}

#importsView.active .add-product-suggestion::after,
#importsView.active .add-customer-suggestion::after {
  background: #ffffff;
  -webkit-mask-image: var(--icon-plus);
  mask-image: var(--icon-plus);
}

#importsView.active .search-suggestion:hover,
#importsView.active .customer-suggestion:hover,
#importsView.active .reference-suggestion:hover {
  border-color: rgba(16, 181, 117, 0.2);
  background: linear-gradient(135deg, rgba(233, 248, 240, 0.86), rgba(255, 255, 255, 0.94));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#importsView.active .search-suggestion .product-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

#importsView.active .search-suggestion strong,
#importsView.active .customer-suggestion strong,
#importsView.active .reference-suggestion strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

#importsView.active .search-suggestion .product-card-header > strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  white-space: nowrap;
}

#importsView.active .product-meta,
#importsView.active .customer-suggestion span,
#importsView.active .reference-suggestion span {
  margin-top: 4px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
}

#importsView.active .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#importsView.active .product-meta span {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
}

#importsView.active .add-product-suggestion,
#importEntryView.active .add-product-suggestion,
#importsView.active .add-customer-suggestion {
  min-height: 50px;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  #importsView.active.is-entry-open .import-entry-layout,
  #importEntryView.active .import-entry-layout {
    grid-template-columns: 1fr;
  }

  #importsView.active .import-entry-side,
  #importEntryView.active .import-entry-side {
    margin: 0 16px 16px;
  }
}

@media (max-width: 760px) {
  #importsView.active,
  #importEntryView.active {
    padding: 10px;
  }

  #importsView.active > .products-panel,
  #importEntryView.active > .products-panel {
    min-height: calc(100dvh - 20px);
  }

  #importsView.active.is-entry-open .import-entry-layout,
  #importEntryView.active .import-entry-layout {
    min-height: auto;
  }

  #importsView.active .import-entry-stage,
  #importEntryView.active .import-entry-stage {
    grid-template-rows: 72px minmax(320px, auto);
  }

  #importsView.active #importCartLines .cart-line-body,
  #importEntryView.active #importCartLines .cart-line-body {
    grid-template-columns: 24px 26px minmax(72px, 0.7fr) minmax(120px, 1fr) 74px 84px 84px 28px;
    gap: 8px;
  }

  #importsView.active .import-entry-summary > div,
  #importsView.active .import-entry-actions,
  #importEntryView.active .import-entry-summary > div,
  #importEntryView.active .import-entry-actions {
    grid-template-columns: 1fr;
  }

  #importsView.active #importMetaForm.import-entry-meta,
  #importEntryView.active #importMetaForm.import-entry-meta {
    grid-template-columns: 1fr;
  }
}

#vatInvoicesView.active > .products-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

#vatInvoicesView.active .vat-entry-layout {
  min-height: calc(100dvh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 442px;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    #eef1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 28px rgba(15, 23, 42, 0.07);
}

#vatInvoiceImportEntryView.active .vat-entry-layout,
#vatInvoiceExportEntryView.active .vat-entry-layout {
  min-height: calc(100dvh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 442px;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    #eef1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 28px rgba(15, 23, 42, 0.07);
}

#vatInvoicesView.active .vat-entry-stage,
#vatInvoiceImportEntryView.active .vat-entry-stage,
#vatInvoiceExportEntryView.active .vat-entry-stage {
  position: relative;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  min-width: 0;
}

#vatInvoicesView.active .vat-entry-search,
#vatInvoiceImportEntryView.active .vat-entry-search,
#vatInvoiceExportEntryView.active .vat-entry-search {
  margin: 0;
  padding: 16px;
}

#vatInvoicesView.active .vat-entry-search::before,
#vatInvoiceImportEntryView.active .vat-entry-search::before,
#vatInvoiceExportEntryView.active .vat-entry-search::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 37px;
  width: 17px;
  height: 17px;
  background: #7c8795;
  -webkit-mask: var(--icon-barcode) center / contain no-repeat;
  mask: var(--icon-barcode) center / contain no-repeat;
  transform: translateY(-50%);
  z-index: 2;
}

#vatInvoicesView.active .vat-entry-search .text-input,
#vatInvoiceImportEntryView.active .vat-entry-search .text-input,
#vatInvoiceExportEntryView.active .vat-entry-search .text-input {
  height: 42px;
  min-height: 42px;
  padding-left: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

#vatInvoicesView.active .vat-entry-lines,
#vatInvoiceImportEntryView.active .vat-entry-lines,
#vatInvoiceExportEntryView.active .vat-entry-lines {
  min-height: 0;
  margin: 0 16px 16px;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  scrollbar-width: none;
}

#vatInvoiceImportEntryView.active #vatImportEntryLines .cart-line {
  min-height: 52px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

#vatInvoiceImportEntryView.active #vatImportEntryLines .cart-line-body {
  min-height: 52px;
  display: grid;
  grid-template-columns: 24px 26px minmax(86px, 0.7fr) minmax(170px, 1.35fr) 90px 110px 72px 118px;
  gap: 10px;
  align-items: center;
}

#vatInvoiceImportEntryView.active .cart-line-order {
  color: #0f8a5c;
  font-size: 13px;
}

#vatInvoiceImportEntryView.active .cart-line-name,
#vatInvoiceImportEntryView.active .cart-line-model,
#vatInvoiceImportEntryView.active .cart-line-total strong,
#vatInvoiceImportEntryView.active .quantity-input,
#vatInvoiceImportEntryView.active .qty-button,
#vatInvoiceImportEntryView.active .icon-button {
  color: #111827 !important;
  font-size: 13px;
  font-weight: 700;
}

#vatInvoiceImportEntryView.active .cart-line-name,
#vatInvoiceImportEntryView.active .cart-line-model {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#vatInvoiceImportEntryView.active .cart-line-price .text-input,
#vatInvoiceImportEntryView.active .cart-line-vat .text-input,
#vatInvoiceImportEntryView.active .quantity-input {
  height: 28px;
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  border-bottom: 1px solid #d2d8e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

#vatInvoiceImportEntryView.active .qty-button,
#vatInvoiceImportEntryView.active .cart-line .icon-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#vatInvoicesView.active .vat-entry-lines::-webkit-scrollbar,
#vatInvoiceImportEntryView.active .vat-entry-lines::-webkit-scrollbar,
#vatInvoiceExportEntryView.active .vat-entry-lines::-webkit-scrollbar {
  display: none;
}

#vatInvoicesView.active .vat-entry-side,
#vatInvoiceImportEntryView.active .vat-entry-side,
#vatInvoiceExportEntryView.active .vat-entry-side {
  margin: 16px 16px 16px 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.05);
}

#vatInvoicesView.active .vat-entry-meta,
#vatInvoiceImportEntryView.active .vat-entry-meta,
#vatInvoiceExportEntryView.active .vat-entry-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 116px 84px;
  gap: 12px;
  align-items: start;
}

#vatInvoicesView.active .vat-entry-meta .restored-full,
#vatInvoiceImportEntryView.active .vat-entry-meta .restored-full,
#vatInvoiceExportEntryView.active .vat-entry-meta .restored-full {
  grid-column: 1 / -1;
}

#vatInvoicesView.active .vat-entry-meta .text-input,
#vatInvoiceImportEntryView.active .vat-entry-meta .text-input,
#vatInvoiceExportEntryView.active .vat-entry-meta .text-input {
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 6px;
  background: #f7f8fa;
  color: #111827;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.05);
  font-size: 13px;
  font-weight: 800;
}

#vatInvoicesView.active .vat-entry-meta .text-input[type="date"],
#vatInvoiceImportEntryView.active .vat-entry-meta .text-input[type="date"],
#vatInvoiceExportEntryView.active .vat-entry-meta .text-input[type="date"] {
  min-width: 0;
}

#vatInvoicesView.active .vat-entry-meta > :nth-child(4),
#vatInvoiceImportEntryView.active .vat-entry-meta > :nth-child(4),
#vatInvoiceExportEntryView.active .vat-entry-meta > :nth-child(4) {
  grid-column: 1 / -1;
}

#vatInvoicesView.active .vat-entry-summary,
#vatInvoiceImportEntryView.active .vat-entry-summary,
#vatInvoiceExportEntryView.active .vat-entry-summary {
  align-self: start;
  display: grid;
  gap: 14px;
}

#vatInvoicesView.active .vat-entry-summary > div,
#vatInvoiceImportEntryView.active .vat-entry-summary > div,
#vatInvoiceExportEntryView.active .vat-entry-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 50%);
  align-items: center;
  gap: 16px;
}

#vatInvoicesView.active .vat-entry-summary span,
#vatInvoiceImportEntryView.active .vat-entry-summary span,
#vatInvoiceExportEntryView.active .vat-entry-summary span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

#vatInvoicesView.active .vat-entry-summary strong,
#vatInvoiceImportEntryView.active .vat-entry-summary strong,
#vatInvoiceExportEntryView.active .vat-entry-summary strong {
  color: #111827;
  text-align: right;
  font-weight: 800;
}

#vatInvoicesView.active .vat-entry-summary > div:last-child strong,
#vatInvoiceImportEntryView.active .vat-entry-summary > div:last-child strong,
#vatInvoiceExportEntryView.active .vat-entry-summary > div:last-child strong {
  color: #10b575;
}

#vatInvoicesView.active .vat-entry-side .primary-button,
#vatInvoiceImportEntryView.active .vat-entry-side .primary-button,
#vatInvoiceExportEntryView.active .vat-entry-side .primary-button {
  min-height: 48px;
  border-radius: 6px;
  background: #10b575;
  color: #ffffff;
  font-weight: 900;
}

@media (max-width: 1100px) {
  #reportsView.active .report-filters,
  #reportsView.active .report-stats-grid,
  #reportsView.active .restored-report-grid {
    grid-template-columns: 1fr;
  }

  #vatInvoicesView.active .vat-entry-layout,
  #vatInvoiceImportEntryView.active .vat-entry-layout,
  #vatInvoiceExportEntryView.active .vat-entry-layout {
    grid-template-columns: 1fr;
  }

  #vatInvoicesView.active .vat-entry-side,
  #vatInvoiceImportEntryView.active .vat-entry-side,
  #vatInvoiceExportEntryView.active .vat-entry-side {
    margin: 0 16px 16px;
  }

  #vatInvoicesView.active .vat-entry-meta,
  #vatInvoiceImportEntryView.active .vat-entry-meta,
  #vatInvoiceExportEntryView.active .vat-entry-meta {
    grid-template-columns: 1fr;
  }

  #vatInvoiceImportEntryView.active #vatImportEntryLines .cart-line-body {
    grid-template-columns: 24px 26px minmax(72px, 0.7fr) minmax(130px, 1fr) 80px 96px 62px 102px;
    gap: 8px;
  }
}

/* Refined POS search dropdowns, avatars and customer sub-modals */
:root {
  --icon-location: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E");
}

#checkoutView.active #searchSuggestions,
#checkoutView.active #customerSuggestions,
#vatInvoiceImportEntryView.active #vatImportSearchSuggestions {
  z-index: 120;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  scrollbar-width: none;
}

#checkoutView.active #searchSuggestions::-webkit-scrollbar,
#checkoutView.active #customerSuggestions::-webkit-scrollbar,
#vatInvoiceImportEntryView.active #vatImportSearchSuggestions::-webkit-scrollbar {
  display: none;
}

#checkoutView.active #searchSuggestions,
#vatInvoiceImportEntryView.active #vatImportSearchSuggestions {
  width: min(520px, calc(100vw - 32px));
  max-height: 390px;
}

#checkoutView.active #customerSuggestions {
  width: 100%;
  max-height: 320px;
}

#checkoutView.active .search-suggestion,
#checkoutView.active .customer-suggestion,
#vatInvoiceImportEntryView.active .search-suggestion {
  position: relative;
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 10px 12px 10px 58px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

#checkoutView.active .search-suggestion + .search-suggestion,
#checkoutView.active .customer-suggestion + .customer-suggestion,
#vatInvoiceImportEntryView.active .search-suggestion + .search-suggestion {
  margin-top: 4px;
}

#checkoutView.active .search-suggestion::before,
#checkoutView.active .customer-suggestion::before,
#vatInvoiceImportEntryView.active .search-suggestion::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e9f8f0, #d5f5e7);
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.18);
  transform: translateY(-50%);
}

#checkoutView.active .search-suggestion::after,
#checkoutView.active .customer-suggestion::after,
#vatInvoiceImportEntryView.active .search-suggestion::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 50%;
  width: 16px;
  height: 16px;
  background: #059669;
  transform: translateY(-50%);
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}

#checkoutView.active .customer-suggestion::after {
  -webkit-mask-image: var(--icon-users);
  mask-image: var(--icon-users);
}

#checkoutView.active .add-product-suggestion::before,
#checkoutView.active .add-customer-suggestion::before,
#vatInvoiceImportEntryView.active .add-product-suggestion::before {
  background: linear-gradient(135deg, #10b575, #0f9f6d);
  box-shadow: 0 10px 22px rgba(16, 181, 117, 0.24);
}

#checkoutView.active .add-product-suggestion::after,
#checkoutView.active .add-customer-suggestion::after,
#vatInvoiceImportEntryView.active .add-product-suggestion::after {
  background: #ffffff;
  -webkit-mask-image: var(--icon-plus);
  mask-image: var(--icon-plus);
}

#checkoutView.active .search-suggestion:hover,
#checkoutView.active .customer-suggestion:hover,
#vatInvoiceImportEntryView.active .search-suggestion:hover {
  border-color: rgba(16, 181, 117, 0.2);
  background: linear-gradient(135deg, rgba(233, 248, 240, 0.86), rgba(255, 255, 255, 0.94));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#checkoutView.active .search-suggestion .product-card-header,
#vatInvoiceImportEntryView.active .search-suggestion .product-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

#checkoutView.active .search-suggestion strong,
#checkoutView.active .customer-suggestion strong,
#vatInvoiceImportEntryView.active .search-suggestion strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

#checkoutView.active .search-suggestion .product-card-header > strong,
#vatInvoiceImportEntryView.active .search-suggestion .product-card-header > strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  white-space: nowrap;
}

#checkoutView.active .product-meta,
#checkoutView.active .customer-suggestion span,
#vatInvoiceImportEntryView.active .product-meta {
  margin-top: 4px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
}

#checkoutView.active .product-meta,
#vatInvoiceImportEntryView.active .product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#checkoutView.active .product-meta span,
#vatInvoiceImportEntryView.active .product-meta span {
  min-width: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
}

#checkoutView.active .add-product-suggestion,
#checkoutView.active .add-customer-suggestion {
  min-height: 50px;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}

#quickProductAvatarFallback,
#customerAvatarFallback,
#quickCustomerAvatarFallback {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 0 !important;
}

#quickProductAvatarFallback::before,
#customerAvatarFallback::before,
#quickCustomerAvatarFallback::before {
  content: "";
  width: 34px;
  height: 34px;
  background: #059669;
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}

#customerAvatarFallback::before,
#quickCustomerAvatarFallback::before {
  -webkit-mask-image: var(--icon-users);
  mask-image: var(--icon-users);
}

#customerInvoiceInfoModal .modal-card,
#customerAddressModal .modal-card {
  width: min(620px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

#customerInvoiceInfoModal .block-header,
#customerAddressModal .block-header {
  min-height: 74px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.2), transparent 32%),
    linear-gradient(135deg, #f8fafc, #ffffff);
}

#customerInvoiceInfoModal .block-header h3,
#customerAddressModal .block-header h3 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

#customerInvoiceInfoModal .block-header h3::before,
#customerAddressModal .block-header h3::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, #10b575, #0f9f6d);
  box-shadow: 0 12px 26px rgba(16, 181, 117, 0.22);
}

#customerInvoiceInfoModal .block-header h3::after,
#customerAddressModal .block-header h3::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 17px;
  height: 17px;
  background: #ffffff;
  transform: translateY(-50%);
  -webkit-mask: var(--icon-invoice) center / contain no-repeat;
  mask: var(--icon-invoice) center / contain no-repeat;
}

#customerAddressModal .block-header h3::after {
  -webkit-mask-image: var(--icon-location);
  mask-image: var(--icon-location);
}

#customerInvoiceInfoForm,
#customerAddressForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 22px 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

#customerInvoiceInfoForm .text-input,
#customerAddressForm .text-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

#customerInvoiceInfoForm .text-input:focus,
#customerAddressForm .text-input:focus {
  border-color: rgba(16, 181, 117, 0.55);
  box-shadow: 0 0 0 4px rgba(16, 181, 117, 0.12);
}

#customerInvoiceInfoForm textarea,
#customerAddressForm textarea {
  grid-column: 1 / -1;
  min-height: 104px;
  resize: vertical;
}

#customerInvoiceInfoForm .checkout-actions,
#customerAddressForm .checkout-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

#customerInvoiceInfoForm .checkout-actions button,
#customerAddressForm .checkout-actions button {
  min-width: 118px;
  min-height: 42px;
  border-radius: 14px;
  font-weight: 900;
}

#customerInvoiceInfoForm .primary-button,
#customerAddressForm .primary-button {
  background: linear-gradient(135deg, #10b575, #0f9f6d);
  box-shadow: 0 14px 28px rgba(16, 181, 117, 0.2);
}

@media (max-width: 640px) {
  #customerInvoiceInfoForm,
  #customerAddressForm {
    grid-template-columns: 1fr;
  }

  #checkoutView.active #searchSuggestions {
    width: calc(100vw - 32px);
  }
}

/* Invoice filter visibility, VAT entry gate and redesigned detail modals */
#invoicesView.active .invoice-toolbar {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

#invoicesView.active .invoice-filter-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 300;
  width: min(520px, calc(100vw - 56px));
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(14px);
}

#invoicesView.active .invoice-filter-panel.hidden {
  display: none !important;
}

#invoicesView.active .invoice-filter-panel .text-input,
#invoicesView.active .invoice-filter-panel select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

#invoicesView.active #clearInvoiceFiltersBtn {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 120px;
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

#vatInvoicesView.active .product-header-actions {
  gap: 8px;
}

#vatInvoicesView.active #openInvoiceImportBtn,
#vatInvoicesView.active #openInvoiceExportBtn {
  min-width: 132px;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
}

#vatInvoicesView.active #openInvoiceImportBtn.is-active,
#vatInvoicesView.active #openInvoiceExportBtn.is-active {
  background: #ffffff;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.24), 0 10px 20px rgba(15, 23, 42, 0.08);
}

#vatInvoicesView.active #openInvoiceExportBtn {
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

#vatInvoicesView.active .vat-entry-layout {
  display: none;
}

#vatInvoicesView.active.is-entry-open #vatInvoiceTable {
  display: none;
}

#vatInvoicesView.active.is-entry-open .vat-entry-layout {
  display: grid;
}

#vatInvoicesView.active.is-entry-open .vat-entry-layout {
  position: relative;
  overflow: hidden;
}

#vatInvoicesView.active.is-export-mode .vat-entry-layout {
  background:
    radial-gradient(circle at 16% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    #eef1f5;
}

#vatInvoicesView.active .vat-entry-heading,
#vatInvoiceImportEntryView.active .vat-entry-heading,
#vatInvoiceExportEntryView.active .vat-entry-heading {
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
}

#vatInvoicesView.active .vat-entry-heading span,
#vatInvoiceImportEntryView.active .vat-entry-heading span,
#vatInvoiceExportEntryView.active .vat-entry-heading span {
  color: #047857;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#vatInvoicesView.active.is-export-mode .vat-entry-heading span {
  color: #047857;
}

#vatInvoicesView.active .vat-entry-heading h4,
#vatInvoiceImportEntryView.active .vat-entry-heading h4,
#vatInvoiceExportEntryView.active .vat-entry-heading h4 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

#vatInvoicesView.active .vat-entry-actions,
#vatInvoiceImportEntryView.active .vat-entry-actions,
#vatInvoiceExportEntryView.active .vat-entry-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

#vatInvoicesView.active.is-export-mode .vat-entry-side .primary-button {
  background: #10b575;
}

#vatInvoicesView.active.is-export-mode .vat-entry-search::before {
  background: #7c8795;
}

#vatInvoicesView.active.is-export-mode .vat-entry-lines {
  border-color: transparent;
}

#productDetailModal.modal-overlay,
#invoiceDetailModal.modal-overlay {
  background:
    radial-gradient(circle at 18% 12%, rgba(16, 181, 117, 0.16), transparent 28%),
    rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(9px);
}

#productDetailModal .modal-card,
#invoiceDetailModal .modal-card {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.26);
}

#productDetailModal .modal-card {
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
}

#invoiceDetailModal .modal-card.invoice-detail-modal {
  width: min(900px, calc(100vw - 36px));
  max-width: min(900px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
}

#productDetailModal .block-header,
#invoiceDetailModal .block-header {
  min-height: 72px;
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 181, 117, 0.18), transparent 34%),
    linear-gradient(135deg, #f8fafc, #ffffff);
}

#productDetailModal .block-header h3,
#invoiceDetailModal .block-header h3,
#invoiceDetailModal .invoice-detail-modal #invoiceDetailTitle {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

#productDetailModal .entity-detail-content,
#invoiceDetailModal .redesigned-invoice-detail {
  padding: 18px 22px 22px;
  overflow: auto;
  scrollbar-width: thin;
}

.entity-detail-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(16, 181, 117, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.supplier-detail-hero {
  grid-template-columns: 52px minmax(0, 1fr);
}

.entity-detail-icon {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: linear-gradient(135deg, #10b575, #0f9f6d);
  box-shadow: 0 14px 28px rgba(16, 181, 117, 0.24);
}

.entity-detail-icon::before {
  content: "";
  position: absolute;
  inset: 15px;
  background: #ffffff;
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}

.supplier-detail-hero .entity-detail-icon::before {
  -webkit-mask-image: var(--icon-supplier);
  mask-image: var(--icon-supplier);
}

.entity-detail-hero span,
.entity-detail-grid .detail-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entity-detail-hero h4 {
  margin: 3px 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.entity-detail-hero p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.entity-detail-hero > strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #047857;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(16, 181, 117, 0.14);
}

.entity-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.entity-detail-grid .detail-row {
  display: grid;
  gap: 7px;
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 16px;
  background: #f8fafc;
}

.entity-detail-grid .detail-row strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.entity-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.entity-detail-actions .danger-detail-button {
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

#invoiceDetailModal .invoice-detail-hero {
  padding: 18px;
  border: 1px solid rgba(16, 181, 117, 0.14);
  border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

#invoiceDetailModal .invoice-detail-label {
  color: #64748b;
}

#invoiceDetailModal .invoice-detail-summary {
  gap: 12px;
}

#invoiceDetailModal .invoice-summary-card,
#invoiceDetailModal .invoice-detail-note,
#invoiceDetailModal .invoice-detail-lines {
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: none;
}

#invoiceDetailModal .invoice-line-item {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

@media (max-width: 720px) {
  #invoicesView.active .invoice-filter-panel,
  .entity-detail-grid,
  #invoiceDetailModal .invoice-detail-summary,
  #invoiceDetailModal .invoice-detail-meta {
    grid-template-columns: 1fr;
  }

  .entity-detail-hero {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .entity-detail-hero > strong {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Product detail popup and invoice-stock product column */
#productsView.active .product-list-header,
#productsView.active .product-list-row {
  grid-template-columns: 40px 58px minmax(96px, 0.72fr) minmax(184px, 1.48fr) minmax(96px, 0.72fr) minmax(96px, 0.72fr) minmax(92px, 0.68fr) minmax(106px, 0.76fr) minmax(138px, 0.95fr) 58px;
}

#invoiceInventoryView.active .product-list-header,
#invoiceInventoryView.active .product-list-row {
  grid-template-columns: minmax(120px, 0.9fr) minmax(220px, 1.5fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.list-pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-pagination-actions .ghost-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
}

.list-pagination-actions .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.list-pagination-actions strong {
  min-width: 92px;
  color: #0f172a;
  text-align: center;
}

@media (max-width: 640px) {
  .list-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .list-pagination-actions {
    justify-content: space-between;
  }
}

#productsView.active .product-list-header span {
  line-height: 1.2;
}

#productsView.active .product-table-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(16, 181, 117, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.95), transparent 28%),
    linear-gradient(135deg, #e9f8f0, #d7f7e9);
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68), 0 8px 18px rgba(15, 23, 42, 0.07);
}

#productsView.active .product-table-avatar .product-avatar-icon,
#quickProductAvatarFallback::before,
.catalog-product-avatar .product-avatar-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: #059669;
  -webkit-mask: var(--icon-box) center / contain no-repeat;
  mask: var(--icon-box) center / contain no-repeat;
}

#quickProductAvatarFallback::before {
  width: 38px;
  height: 38px;
}

#productsView.active .product-detail-button {
  width: 34px;
  height: 34px;
  justify-self: center;
  border: 1px solid rgba(16, 181, 117, 0.14);
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
}

.catalog-product-detail-content {
  display: grid;
  gap: 14px;
}

.catalog-product-detail-hero {
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

.catalog-product-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(16, 181, 117, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(135deg, #e9f8f0, #d7f7e9);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.catalog-product-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-product-avatar .product-avatar-icon {
  width: 34px;
  height: 34px;
}

.product-stock-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-stock-split article {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.product-stock-split span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-stock-split strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 950;
}

.catalog-product-detail-content .entity-detail-actions .primary-button {
  min-width: 132px;
  min-height: 42px;
  border-radius: 13px;
  background: #10b575;
  color: #ffffff;
  font-weight: 950;
}

@media (max-width: 980px) {
  #productsView.active .product-list-header,
  #productsView.active .product-list-row {
    grid-template-columns: 40px 54px minmax(96px, 0.86fr) minmax(174px, 1.54fr) minmax(88px, 0.8fr) minmax(88px, 0.8fr) minmax(88px, 0.7fr) minmax(96px, 0.8fr) 54px;
  }

  #productsView.active .product-list-header span:nth-last-child(2),
  #productsView.active .product-list-row > .product-list-meta:nth-last-child(2) {
    display: none;
  }
}

@media (max-width: 720px) {
  .catalog-product-detail-hero,
  .product-stock-split {
    grid-template-columns: 1fr;
  }
}

/* Data import cards and redesigned settings page */
.data-import-card {
  margin: 0 0 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 181, 117, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.data-import-copy {
  display: grid;
  gap: 4px;
}

.data-import-kicker {
  color: #047857;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-import-copy h4 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.data-import-copy p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.data-import-actions {
  min-width: 220px;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.data-import-actions .ghost-button {
  min-width: 124px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 900;
}

.data-import-hint {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

#mapsView.active > .products-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

#mapsView.active .settings-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

#mapsView.active .settings-kicker {
  color: #047857;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#mapsView.active .settings-card-head h4 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

#mapsView.active .settings-note {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

#mapsView.active .settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(380px, 1.24fr);
  gap: 20px;
  margin: 0;
  align-items: start;
}

#mapsView.active .settings-card {
  padding: 22px;
  display: grid;
  gap: 16px;
  min-height: 100%;
}

#mapsView.active .settings-card-head {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
}

#mapsView.active .settings-card-head h4 {
  font-size: 20px;
  margin: 0;
}

#mapsView.active .settings-import-list {
  display: grid;
  gap: 12px;
}

#mapsView.active .product-import-template {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(16, 181, 117, 0.14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#mapsView.active .product-import-template-head {
  display: grid;
  gap: 4px;
}

#mapsView.active .product-import-template-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

#mapsView.active .product-import-template-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

#mapsView.active .product-import-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

#mapsView.active .product-import-columns > div {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

#mapsView.active .product-import-columns strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #10b575;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

#mapsView.active .product-import-columns span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
}

#mapsView.active .product-import-columns em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

#mapsView.active .product-import-example {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 181, 117, 0.08);
  color: #047857;
}

#mapsView.active .product-import-example span {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#mapsView.active .product-import-example code {
  white-space: normal;
  color: #0f172a;
  font-family: "Noto Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

#mapsView.active .product-import-actions {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(140px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

#mapsView.active .product-import-actions .primary-button,
#mapsView.active .product-import-actions .ghost-button {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 950;
}

#mapsView.active .product-import-actions .data-import-hint {
  text-align: left;
}

#mapsView.active .settings-import-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(16, 181, 117, 0.08), transparent 34%),
    #f8fafc;
}

#mapsView.active .settings-import-list strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

#mapsView.active .settings-import-list span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

#mapsView.active .restored-field .text-input {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  width: 100%;
}

#mapsView.active .data-import-actions {
  min-width: 0;
  justify-items: stretch;
  align-content: start;
}

#mapsView.active .data-import-actions .ghost-button {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
}

#mapsView.active .data-import-hint {
  text-align: center;
}

@media (max-width: 980px) {
  .data-import-card,
  #mapsView.active .settings-grid {
    grid-template-columns: 1fr;
  }

  #mapsView.active .product-import-columns,
  #mapsView.active .product-import-actions {
    grid-template-columns: 1fr;
  }

  .data-import-actions {
    justify-items: start;
    min-width: 0;
  }
}

