/* AccounTrack dashboard — matches accountrack.html mockup, scoped to .dash-app */

.dash-app *,
.dash-app *::before,
.dash-app *::after {
  box-sizing: border-box;
}

.dash-app {
  /* Match light forms + white inputs; avoids dark native date picker when OS theme is dark. */
  color-scheme: light;
  --ink: #0f1117;
  --ink2: #374151;
  --ink3: #6b7280;
  --ink4: #9ca3af;
  --surface: #ffffff;
  --surface2: #f8f9fb;
  --surface3: #f1f3f7;
  --border: #e5e8ef;
  --border2: #d1d5db;
  /* AccounTrack logo “Accoun” blue + hover/dark companion */
  --accent: #0080ff;
  --accent2: #006ae6;
  --accent-light: #e8f4ff;
  --accent-pale: #cce8ff;
  --green: #059669;
  --green-light: #ecfdf5;
  --red: #dc2626;
  --red-light: #fef2f2;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --teal: #0d9488;
  --teal-light: #f0fdfa;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --r: 10px;
  --r-lg: 16px;
  --font: 'Sora', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  /* Narrower rail = more room for main content; still fits nav + logo. */
  --dash-sidebar-col: 228px;
  /* Shared header height (sidebar brand + main top bar). */
  --dash-topbar-h: 56px;
  /* Initials fallback (square mark). */
  --dash-sidebar-logo-size: 40px;
  /* Uploaded image: cap both dimensions so wide marks don’t dominate the rail. */
  --dash-sidebar-logo-img-max-h: 48px;
  --dash-sidebar-logo-img-max-w: 172px;

  font-family: var(--font);
  background: var(--surface2);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.dash-app .dash-shell {
  display: grid;
  grid-template-columns: var(--dash-sidebar-col) 1fr;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  min-height: 100%;
}

.dash-app .dash-main-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface2);
}

.dash-app .dash-top-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  height: var(--dash-topbar-h);
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.dash-app .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .logo-icon svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Uploaded logo: no faux “card” frame (was white bg + border). */
.dash-app .logo-icon--image {
  background: transparent;
  border: none;
  box-shadow: none;
}

.dash-app .logo-icon--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Sidebar: constrain width + height (avoid full-rail width: 100% blow-up). */
.dash-app .sidebar-brand .logo-icon--image img {
  width: auto;
  height: auto;
  max-height: var(--dash-sidebar-logo-img-max-h);
  max-width: var(--dash-sidebar-logo-img-max-w);
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.dash-app .logo-icon__initials {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Sidebar brand: initials = square; uploaded image = full row width so wide marks read large. */
.dash-app .sidebar-brand .logo-icon:not(.logo-icon--image) {
  width: var(--dash-sidebar-logo-size);
  height: var(--dash-sidebar-logo-size);
  min-width: var(--dash-sidebar-logo-size);
  min-height: var(--dash-sidebar-logo-size);
  border-radius: 10px;
}

.dash-app .sidebar-brand .logo-icon--image {
  background: transparent;
  border: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .sidebar-brand .logo-icon__initials {
  font-size: 14px;
}

.dash-app .logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.dash-app .logo-text span {
  color: var(--accent);
}

.dash-app .dash-top-nav__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
}

.dash-app .dash-top-nav__profile--link {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 4px 8px 4px 4px;
  margin: -4px -8px -4px -4px;
  transition: background 0.15s ease;
}

.dash-app .dash-top-nav__profile--link:hover {
  background: var(--surface3);
}

.dash-app .dash-top-nav__profile--link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dash-app .profile-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-app .dash-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dash-app .dash-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-align: right;
}

.dash-app .dash-profile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.dash-app .dash-profile-role {
  font-size: 11px;
  color: var(--ink4);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.dash-app .sidebar-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--dash-topbar-h);
  height: var(--dash-topbar-h);
  margin: 0;
  padding: 4px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
}

.dash-app .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0 10px 20px;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dash-app .sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 0 -4px;
  padding: 8px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

/* Scrollbars — sidebar nav + main (thin, rounded, design tokens) */
.dash-app .sidebar-nav::-webkit-scrollbar,
.dash-app .dash-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dash-app .sidebar-nav::-webkit-scrollbar-track,
.dash-app .dash-main::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

.dash-app .sidebar-nav::-webkit-scrollbar-thumb,
.dash-app .dash-main::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 100px;
}

.dash-app .sidebar-nav::-webkit-scrollbar-thumb:hover,
.dash-app .dash-main::-webkit-scrollbar-thumb:hover {
  background: var(--ink4);
}

.dash-app .sidebar-nav::-webkit-scrollbar-corner,
.dash-app .dash-main::-webkit-scrollbar-corner {
  background: transparent;
}

.dash-app .sidebar-section {
  margin-bottom: 16px;
}

.dash-app .sidebar-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink4);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0 10px;
  margin-bottom: 6px;
}

.dash-app .sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  min-width: 0;
  text-align: left;
  margin-bottom: 0;
  font-family: inherit;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    font-size 0.2s ease,
    font-weight 0.2s ease,
    box-shadow 0.2s ease;
}

/* Keep label on one line when hover bumps font-size (avoids “Expense” / “Categories” wrap) */
.dash-app .sidebar-item__label {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-app .sidebar-item:hover {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(26, 86, 219, 0.12);
}

.dash-app .sidebar-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-app .sidebar-item.active:hover {
  color: var(--accent2);
  background: var(--accent-pale);
  font-size: 14px;
  font-weight: 600;
}

.dash-app .sidebar-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dash-app .sidebar-item.sidebar-sign-out:focus-visible {
  outline-color: var(--red);
}

.dash-app .sidebar-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  transition: width 0.2s ease, height 0.2s ease;
}

.dash-app .sidebar-item:hover svg,
.dash-app .sidebar-item.active:hover svg {
  width: 18px;
  height: 18px;
}

.dash-app .sidebar-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .sidebar-badge.warn {
  background: var(--amber);
}

.dash-app .sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.dash-app .sidebar-item.sidebar-sign-out:hover {
  color: var(--red);
  background: var(--red-light);
  box-shadow: none;
}

.dash-app .sidebar-item.sidebar-sign-out:hover svg {
  color: var(--red);
}

@media (prefers-reduced-motion: reduce) {
  .dash-app .sidebar-item,
  .dash-app .sidebar-item svg {
    transition: background 0.2s ease, color 0.2s ease;
  }

  .dash-app .sidebar-item:hover,
  .dash-app .sidebar-item.active:hover {
    font-size: 13.5px;
    font-weight: 600;
  }

  .dash-app .sidebar-item:hover svg,
  .dash-app .sidebar-item.active:hover svg {
    width: 17px;
    height: 17px;
  }
}

.dash-app .dash-main {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--surface2);
  padding: 20px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.dash-app .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-app .page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.dash-app .page-sub {
  font-size: 13.5px;
  color: var(--ink3);
  margin-top: 3px;
}

.dash-app .header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-app .btn-sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
  border: none;
}

.dash-app .btn-sm.outline {
  background: var(--surface);
  border: 1.5px solid var(--border2);
  color: var(--ink2);
}

.dash-app .btn-sm.outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dash-app .btn-sm.fill {
  background: var(--accent);
  color: #fff;
}

.dash-app .btn-sm.fill:hover {
  background: var(--accent2);
}

.dash-app .btn-sm svg {
  width: 15px;
  height: 15px;
}

.dash-app .alert-bar {
  background: var(--amber-light);
  border: 1px solid #fcd34d;
  border-radius: var(--r);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: #92400e;
  flex-wrap: wrap;
}

.dash-app .alert-bar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dash-app .alert-bar strong {
  font-weight: 700;
}

.dash-app .alert-bar__action {
  margin-left: auto;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.dash-app .alert-bar__action:hover {
  filter: brightness(1.05);
}

.dash-app .stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.dash-app .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}

.dash-app .stat-card:hover {
  box-shadow: var(--shadow-md);
}

.dash-app .stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dash-app .stat-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .stat-icon-box svg {
  width: 20px;
  height: 20px;
}

.dash-app .stat-icon-box.blue {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-app .stat-icon-box.green {
  background: var(--green-light);
  color: var(--green);
}

.dash-app .stat-icon-box.red {
  background: var(--red-light);
  color: var(--red);
}

.dash-app .stat-icon-box.purple {
  background: var(--purple-light);
  color: var(--purple);
}

.dash-app .stat-icon-box.amber {
  background: var(--amber-light);
  color: var(--amber);
}

.dash-app .stat-icon-box.teal {
  background: var(--teal-light);
  color: var(--teal);
}

.dash-app .stat-change {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
}

.dash-app .stat-change.up {
  color: var(--green);
}

.dash-app .stat-change.down {
  color: var(--red);
}

.dash-app .stat-change svg {
  width: 13px;
  height: 13px;
}

.dash-app .stat-label {
  font-size: 12px;
  color: var(--ink4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}

.dash-app .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  font-family: var(--mono);
}

.dash-app .quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.dash-app .quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.dash-app .quick-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dash-app .quick-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}

.dash-app .quick-icon svg {
  width: 22px;
  height: 22px;
  transition: color 0.15s;
}

.dash-app .quick-icon--accent {
  background-color: var(--accent-light);
}

.dash-app .quick-icon--accent svg {
  color: var(--accent);
}

.dash-app .quick-icon--purple {
  background-color: var(--purple-light);
}

.dash-app .quick-icon--purple svg {
  color: var(--purple);
}

.dash-app .quick-icon--green {
  background-color: var(--green-light);
}

.dash-app .quick-icon--green svg {
  color: var(--green);
}

.dash-app .quick-icon--amber {
  background-color: var(--amber-light);
}

.dash-app .quick-icon--amber svg {
  color: var(--amber);
}

.dash-app .quick-card:hover .quick-icon--accent {
  background-color: var(--accent);
}

.dash-app .quick-card:hover .quick-icon--purple {
  background-color: var(--purple);
}

.dash-app .quick-card:hover .quick-icon--green {
  background-color: var(--green);
}

.dash-app .quick-card:hover .quick-icon--amber {
  background-color: var(--amber);
}

.dash-app .quick-card:hover .quick-icon svg {
  color: #fff;
}

.dash-app .quick-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  text-align: center;
}

.dash-app .charts-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  margin-bottom: 24px;
}

.dash-app .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.dash-app .card--flush-bottom {
  padding-bottom: 0;
}

.dash-app .card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.dash-app .card-sub {
  font-size: 12.5px;
  color: var(--ink4);
  margin-bottom: 20px;
}

.dash-app .card-sub--tight {
  margin-bottom: 0;
}

.dash-app .chart-legend-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dash-app .chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink3);
}

.dash-app .chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.dash-app .chart-legend-swatch--accent {
  background: var(--accent);
}

.dash-app .chart-legend-swatch--pale {
  background: var(--accent-pale);
}

.dash-app .bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding-bottom: 4px;
}

.dash-app .bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dash-app .bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 120px;
}

.dash-app .bar {
  border-radius: 5px 5px 0 0;
  transition: opacity 0.15s;
  cursor: pointer;
  width: 18px;
}

.dash-app .bar.income {
  background: var(--accent);
}

.dash-app .bar.expense {
  background: var(--accent-pale);
}

.dash-app .bar:hover {
  opacity: 0.8;
}

.dash-app .bar-month {
  font-size: 10.5px;
  color: var(--ink4);
  font-weight: 500;
}

.dash-app .donut-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
}

.dash-app .donut-wrap svg {
  transform: rotate(-90deg);
}

.dash-app .donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dash-app .donut-center-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--mono);
}

.dash-app .donut-center-label {
  font-size: 10px;
  color: var(--ink4);
  font-weight: 500;
}

.dash-app .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 9px;
}

.dash-app .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dash-app .legend-name {
  color: var(--ink3);
  flex: 1;
}

.dash-app .legend-val {
  font-weight: 700;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
}

.dash-app .tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.dash-app .table-wrap {
  overflow-x: auto;
}

.dash-app table {
  width: 100%;
  border-collapse: collapse;
}

.dash-app thead th {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink4);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 8px 11px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.dash-app tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.dash-app tbody tr:last-child {
  border-bottom: none;
}

.dash-app tbody tr:hover {
  background: var(--surface2);
}

.dash-app tbody td {
  padding: 9px 11px;
  font-size: 13.5px;
  color: var(--ink2);
}

.dash-app .td-name {
  font-weight: 600;
  color: var(--ink);
}

.dash-app .td-mono {
  font-family: var(--mono);
}

.dash-app .badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.dash-app .badge.paid {
  background: var(--green-light);
  color: var(--green);
}

.dash-app .badge.pending {
  background: var(--amber-light);
  color: var(--amber);
}

.dash-app .badge.overdue {
  background: var(--red-light);
  color: var(--red);
}

.dash-app .badge.draft {
  background: var(--surface3);
  color: var(--ink3);
}

.dash-app .badge.sent {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-app .section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-app .view-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
}

.dash-app .view-all:hover {
  text-decoration: underline;
}

.dash-app .activity-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.dash-app .activity-item:last-child {
  border-bottom: none;
}

.dash-app .activity-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.dash-app .activity-dot svg {
  width: 16px;
  height: 16px;
}

.dash-app .activity-dot.green {
  background: var(--green-light);
  color: var(--green);
}

.dash-app .activity-dot.blue {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-app .activity-dot.red {
  background: var(--red-light);
  color: var(--red);
}

.dash-app .activity-dot.amber {
  background: var(--amber-light);
  color: var(--amber);
}

.dash-app .activity-body {
  flex: 1;
}

.dash-app .activity-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.dash-app .activity-desc {
  font-size: 12px;
  color: var(--ink3);
  margin-top: 2px;
}

.dash-app .activity-time {
  font-size: 11.5px;
  color: var(--ink4);
  margin-top: 3px;
}

.dash-app .activity-amount {
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--mono);
  white-space: nowrap;
}

.dash-app .activity-amount.green {
  color: var(--green);
}

.dash-app .activity-amount.red {
  color: var(--red);
}

.dash-app .activity-amount.muted {
  color: var(--ink3);
}

@media (max-width: 1200px) {
  .dash-app .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-app .charts-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dash-app .dash-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 100svh;
  }

  .dash-app .dash-main-stack {
    order: -1;
    flex: 0 0 auto;
    overflow: visible;
  }

  .dash-app .dash-main {
    flex: 1 1 auto;
    min-height: 0;
  }

  .dash-app .dash-top-nav {
    padding: 0 16px;
  }

  .dash-app .sidebar-brand {
    flex: 1 1 100%;
    height: auto;
    min-height: var(--dash-topbar-h);
    margin-bottom: 12px;
  }

  .dash-app .sidebar {
    position: relative;
    top: 0;
    height: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .dash-app .sidebar-nav {
    display: contents;
  }

  .dash-app .sidebar-section {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 140px;
  }

  .dash-app .sidebar-footer {
    width: 100%;
    flex-shrink: 0;
    margin-top: 12px;
    padding-top: 12px;
  }

  .dash-app .tables-row {
    grid-template-columns: 1fr;
  }

  .dash-app .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .dash-app .stat-grid {
    grid-template-columns: 1fr;
  }

  .dash-app .quick-grid {
    grid-template-columns: 1fr;
  }

  .dash-app .dash-main {
    padding: 20px 16px;
  }

  .dash-app .alert-bar__action {
    margin-left: 0;
    width: 100%;
  }
}

/* —— Modals & confirm (reusable, scoped to .dash-app) —— */
.dash-app .dash-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.dash-app .dash-modal-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 17, 23, 0.48);
  cursor: pointer;
}

.dash-app .dash-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), 0 24px 48px rgba(15, 17, 23, 0.12);
  border: 1px solid var(--border);
  overflow: hidden;
}

.dash-app .dash-modal--lg {
  max-width: 520px;
}

.dash-app .dash-modal--xl {
  max-width: min(680px, calc(100vw - 32px));
  max-height: min(92vh, 800px);
}

.dash-app .dash-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dash-app .dash-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.dash-app .dash-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--ink3);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-app .dash-modal__close:hover {
  background: var(--surface3);
  color: var(--ink);
}

.dash-app .dash-modal__close svg {
  width: 18px;
  height: 18px;
}

.dash-app .dash-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.dash-app .dash-modal__footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

/* Invoice view + record payment — compact chrome for more content space */
.dash-app .invoice-detail-modal .dash-modal__header,
.dash-app .record-payment-modal .dash-modal__header,
.dash-app .payment-detail-modal .dash-modal__header,
.dash-app .expense-detail-modal .dash-modal__header,
.dash-app .expense-form-modal .dash-modal__header,
.dash-app .catalog-detail-modal .dash-modal__header,
.dash-app .catalog-form-modal .dash-modal__header {
  padding: 10px 16px;
  gap: 10px;
}

.dash-app .invoice-detail-modal .dash-modal__title,
.dash-app .record-payment-modal .dash-modal__title,
.dash-app .payment-detail-modal .dash-modal__title,
.dash-app .expense-detail-modal .dash-modal__title,
.dash-app .expense-form-modal .dash-modal__title,
.dash-app .catalog-detail-modal .dash-modal__title,
.dash-app .catalog-form-modal .dash-modal__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.dash-app .invoice-detail-modal .dash-modal__close,
.dash-app .record-payment-modal .dash-modal__close,
.dash-app .payment-detail-modal .dash-modal__close,
.dash-app .expense-detail-modal .dash-modal__close,
.dash-app .expense-form-modal .dash-modal__close,
.dash-app .catalog-detail-modal .dash-modal__close,
.dash-app .catalog-form-modal .dash-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.dash-app .invoice-detail-modal .dash-modal__close svg,
.dash-app .record-payment-modal .dash-modal__close svg,
.dash-app .payment-detail-modal .dash-modal__close svg,
.dash-app .expense-detail-modal .dash-modal__close svg,
.dash-app .expense-form-modal .dash-modal__close svg,
.dash-app .catalog-detail-modal .dash-modal__close svg,
.dash-app .catalog-form-modal .dash-modal__close svg {
  width: 16px;
  height: 16px;
}

.dash-app .invoice-detail-modal .dash-modal__body,
.dash-app .record-payment-modal .dash-modal__body,
.dash-app .payment-detail-modal .dash-modal__body,
.dash-app .expense-detail-modal .dash-modal__body,
.dash-app .expense-form-modal .dash-modal__body,
.dash-app .catalog-detail-modal .dash-modal__body,
.dash-app .catalog-form-modal .dash-modal__body {
  padding: 16px 18px 18px;
}

.dash-app .invoice-detail-modal .dash-modal__footer,
.dash-app .record-payment-modal .dash-modal__footer,
.dash-app .payment-detail-modal .dash-modal__footer,
.dash-app .expense-detail-modal .dash-modal__footer,
.dash-app .expense-form-modal .dash-modal__footer,
.dash-app .catalog-detail-modal .dash-modal__footer,
.dash-app .catalog-form-modal .dash-modal__footer {
  padding: 10px 16px 14px;
}

/* Quotation view — same compact chrome as invoice modal */
.dash-app .quotation-detail-modal .dash-modal__header {
  padding: 10px 16px;
  gap: 10px;
}

.dash-app .quotation-detail-modal .dash-modal__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.dash-app .quotation-detail-modal .dash-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.dash-app .quotation-detail-modal .dash-modal__close svg {
  width: 16px;
  height: 16px;
}

.dash-app .quotation-detail-modal .dash-modal__body {
  padding: 16px 18px 18px;
}

.dash-app .quotation-detail-modal .dash-modal__footer {
  padding: 10px 16px 14px;
}

/* In-page invoice + quotation view — one shared card size and chrome */
.dash-app .invoice-page-view.dash-modal-root,
.dash-app .quotation-page-view.dash-modal-root {
  position: static;
  inset: auto;
  z-index: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin-top: 20px;
}

/* Fill .dash-main like .dt-card on list pages — no max-width + auto margin (that left a wide gap beside the sidebar) */
.dash-app .invoice-page-view .dash-modal,
.dash-app .quotation-page-view .dash-modal {
  max-width: none;
  width: 100%;
  max-height: none;
  min-height: 0;
  margin: 0;
}

/* Tighter chrome on invoice/quotation view pages — more room for line items */
.dash-app .invoice-page-view .dash-modal__body,
.dash-app .quotation-page-view .dash-modal__body {
  padding: 16px 12px 18px;
}

.dash-app .invoice-page-view .dash-modal__footer,
.dash-app .quotation-page-view .dash-modal__footer {
  padding: 10px 12px 14px;
}

/* Full width of card; match inner padding on invoice + quotation view */
.dash-app .invoice-page-view .doc-view--invoice-receipt,
.dash-app .quotation-page-view .doc-view--quotation {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 4px 8px;
}

.dash-app .invoice-page-view .doc-view__receipt-head {
  padding-left: 4px;
  padding-right: 4px;
}

/* Line-item tables: full card width, shared corner radius with receipt-style items block */
.dash-app .invoice-page-view .doc-view__lines-wrap,
.dash-app .quotation-page-view .doc-view__lines-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
}

.dash-app .invoice-page-view .doc-view__lines {
  width: 100%;
  table-layout: fixed;
}

/* Quotation view: items table — 50% product, Qty/Unit/Unit price 10% each, Item total 20% */
.dash-app .quotation-page-view .doc-view__lines {
  width: 100%;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print {
  table-layout: fixed;
}

.dash-app .invoice-page-view .doc-view__lines th:first-child,
.dash-app .invoice-page-view .doc-view__lines td:first-child,
.dash-app .quotation-page-view .doc-view__lines th:first-child,
.dash-app .quotation-page-view .doc-view__lines td:first-child {
  min-width: 0;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(1),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(1) {
  width: 50%;
  max-width: 50%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(2),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(2),
.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(3),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(3),
.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(4),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(4) {
  width: 10%;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(5),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(5) {
  width: 20%;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(2),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(2) {
  white-space: nowrap;
  text-align: center;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(2).doc-view__mono {
  text-align: center;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(3),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(3) {
  word-break: break-word;
  text-align: center;
}

.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(4),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(4),
.dash-app .quotation-page-view .doc-view__lines--quot-print th:nth-child(5),
.dash-app .quotation-page-view .doc-view__lines--quot-print td:nth-child(5) {
  white-space: nowrap;
  text-align: right;
}

.dash-app .invoice-page-view .doc-view__payments-table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dash-app .invoice-page-view .doc-view__payments-table {
  width: 100%;
  table-layout: fixed;
}

/* Totals / summary: same width as tables above (full content column) */
.dash-app .invoice-page-view .doc-view__summary--receipt {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  box-sizing: border-box;
}

.dash-app .quotation-page-view .doc-view__section--quot-summary {
  display: block;
}

.dash-app .quotation-page-view .doc-view__summary--quot-print {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  box-sizing: border-box;
}

.dash-app .dash-form__field {
  margin-bottom: 16px;
}

.dash-app .dash-form__field:last-of-type {
  margin-bottom: 0;
}

.dash-app .dash-form__label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 6px;
}

.dash-app .dash-form__input,
.dash-app .dash-form__textarea,
.dash-app .dash-form__select {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1.5px solid var(--border2);
  background: #ffffff;
  color: var(--ink);
  color-scheme: light;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-app .dash-form__textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

.dash-app .dash-form__select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%),
    linear-gradient(135deg, var(--ink3) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
  cursor: pointer;
}

.dash-app .dash-form__input:focus,
.dash-app .dash-form__textarea:focus,
.dash-app .dash-form__select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
}

.dash-app .dash-form__input:disabled,
.dash-app .dash-form__textarea:disabled,
.dash-app .dash-form__select:disabled {
  background: var(--surface3);
  color: var(--ink3);
  cursor: not-allowed;
}

.dash-app .dash-form__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 0 0;
  font-size: 14px;
  color: var(--ink2);
  cursor: pointer;
}

.dash-app .dash-form__checkbox input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  cursor: pointer;
}

.dash-app .dash-form__checkbox input[type='checkbox']::before {
  content: '';
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform 120ms ease-in-out;
  box-shadow: inset 1em 1em #fff;
  clip-path: polygon(14% 44%, 0 59%, 44% 100%, 100% 20%, 84% 6%, 43% 62%);
}

.dash-app .dash-form__checkbox input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.dash-app .dash-form__checkbox input[type='checkbox']:checked::before {
  transform: scale(1);
}

.dash-app .dash-form__checkbox input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-pale);
}

.dash-app .dash-form__checkbox input[type='checkbox']:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.dash-app .dash-form__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.45;
}

.dash-app .dash-form__error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.dash-app .dash-form__meta {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.dash-app .dash-form__meta dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink4);
}

.dash-app .dash-form__meta dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink2);
}

.dash-app .dash-inline-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 13.5px;
}

.dash-app .dash-inline-alert--error {
  background: var(--red-light);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.dash-app .dash-table-placeholder {
  margin: 0;
  padding: 20px 16px;
  text-align: center;
  color: var(--ink3);
  font-size: 14px;
}

.dash-app .th-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.dash-app .td-muted {
  color: var(--ink3);
  font-size: 13.5px;
  max-width: 280px;
}

.dash-app .dash-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dash-app .dash-btn-danger:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

.dash-app .dash-confirm-root {
  z-index: 2100;
}

.dash-app .dash-confirm {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 24px 22px 20px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md), 0 24px 48px rgba(15, 17, 23, 0.12);
  border: 1px solid var(--border);
  text-align: center;
}

.dash-app .dash-confirm__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--amber-light);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .dash-confirm__icon svg {
  width: 26px;
  height: 26px;
}

.dash-app .dash-confirm__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.dash-app .dash-confirm__message {
  text-align: left;
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.55;
  margin-bottom: 20px;
}

.dash-app .dash-confirm__message p {
  margin: 0 0 8px;
}

.dash-app .dash-confirm__message p:last-child {
  margin-bottom: 0;
}

.dash-app .dash-confirm__note {
  color: var(--ink3);
  font-size: 13px;
}

.dash-app .dash-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.dash-app .dash-confirm__confirm--danger {
  background: var(--red);
}

.dash-app .dash-confirm__confirm--danger:hover:not(:disabled) {
  background: #b91c1c;
}

/* —— Data table shell (invoice-style list + toolbar + pagination) —— */
.dash-app .dt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dash-app .dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dash-app .dt-toolbar__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  min-width: 0;
  flex: 1 1 280px;
}

.dash-app .dt-toolbar__trailing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dash-app .dt-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 220px;
  max-width: 360px;
}

.dash-app .dt-search__icon {
  position: absolute;
  left: 12px;
  display: flex;
  color: var(--ink4);
  pointer-events: none;
}

.dash-app .dt-search__icon svg {
  width: 18px;
  height: 18px;
}

.dash-app .dt-search__input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface2);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-app .dt-search__input::placeholder {
  color: var(--ink4);
}

.dash-app .dt-search__input:hover {
  border-color: var(--border);
}

.dash-app .dt-search__input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-pale);
}

.dash-app .dt-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dash-app .dt-tab {
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink3);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-app .dt-tab:hover {
  color: var(--ink2);
  background: var(--surface3);
}

.dash-app .dt-tab.is-active {
  color: var(--ink);
  background: var(--surface3);
  box-shadow: inset 0 0 0 1px var(--border);
}

.dash-app .dt-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dash-app .dt-select {
  appearance: none;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  background: var(--surface);
  cursor: pointer;
  min-width: 140px;
  transition: border-color 0.15s;
}

.dash-app .dt-select:hover,
.dash-app .dt-select:focus {
  border-color: var(--accent);
  outline: none;
}

.dash-app .dt-select__chev {
  position: absolute;
  right: 10px;
  display: flex;
  color: var(--ink4);
  pointer-events: none;
}

.dash-app .dt-select__chev svg {
  width: 16px;
  height: 16px;
}

.dash-app .lang-switcher--custom .dt-select {
  width: 100%;
  min-width: 180px;
  height: auto;
  min-height: 38px;
  padding: 5px 34px 5px 10px;
  text-align: left;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-app .lang-switcher--custom .dt-select__chev {
  top: 50%;
  transform: translateY(-50%);
}

.dash-app .lang-switcher--custom .dt-select__chev svg {
  transition: transform 0.15s ease;
}

.dash-app .lang-switcher--custom .dt-select__chev.is-open svg {
  transform: rotate(180deg);
}

.dash-app .lang-switcher__flag {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.dash-app .lang-switcher__flag-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dash-app .lang-switcher__trigger-text,
.dash-app .lang-switcher__option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.dash-app .lang-switcher__lang {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: inherit;
}

.dash-app .lang-switcher__country {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink4);
  line-height: 1.2;
}

.dash-app .lang-switcher__country--compact {
  font-size: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-app .lang-switcher__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.dash-app .lang-switcher__menu::-webkit-scrollbar {
  width: 8px;
}

.dash-app .lang-switcher__menu::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.dash-app .lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 0;
  font: inherit;
  text-align: left;
  color: var(--ink2);
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.dash-app .lang-switcher__option:hover,
.dash-app .lang-switcher__option:focus-visible {
  background: var(--surface3);
  outline: none;
}

.dash-app .lang-switcher__option.is-selected .lang-switcher__lang {
  color: var(--accent);
  font-weight: 600;
}

.dash-app .lang-switcher__option.is-selected .lang-switcher__country {
  color: var(--accent);
  opacity: 0.88;
}

/* Portaled to document.body — outside .dash-app; keep same look + dim overlay */
.lang-switcher__backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.1);
}

.lang-switcher__menu.lang-switcher__menu--fixed {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border2, #d1d5db);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  scrollbar-width: thin;
  scrollbar-color: var(--border2, #d1d5db) transparent;
  font-family: var(--font, system-ui, sans-serif);
}

.lang-switcher__menu.lang-switcher__menu--fixed::-webkit-scrollbar {
  width: 8px;
}

.lang-switcher__menu.lang-switcher__menu--fixed::-webkit-scrollbar-thumb {
  background: var(--border2, #d1d5db);
  border-radius: 4px;
}

.lang-switcher__menu--fixed .lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 0;
  font: inherit;
  text-align: left;
  color: var(--ink2, #374151);
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.lang-switcher__menu--fixed .lang-switcher__option:hover,
.lang-switcher__menu--fixed .lang-switcher__option:focus-visible {
  background: var(--surface3, #f1f3f7);
  outline: none;
}

.lang-switcher__menu--fixed .lang-switcher__option.is-selected .lang-switcher__lang {
  color: var(--accent, #0080ff);
  font-weight: 600;
}

.lang-switcher__menu--fixed .lang-switcher__option.is-selected .lang-switcher__country {
  color: var(--accent, #0080ff);
  opacity: 0.88;
}

.lang-switcher__menu--fixed .lang-switcher__flag {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}

.lang-switcher__menu--fixed .lang-switcher__flag-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-switcher__menu--fixed .lang-switcher__option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.lang-switcher__menu--fixed .lang-switcher__lang {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: inherit;
}

.lang-switcher__menu--fixed .lang-switcher__country {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink4, #9ca3af);
  line-height: 1.2;
}

.dash-app .dt-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dash-app .dt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.dash-app .dt-table thead th {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
  white-space: nowrap;
}

.dash-app .dt-th-check {
  width: 44px;
  padding-left: 14px !important;
  text-align: center;
}

.dash-app .dt-th-actions {
  width: 1%;
  text-align: right;
  padding-right: 14px !important;
}

.dash-app .dt-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  color: var(--ink2);
}

.dash-app .dt-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-app .dt-table tbody tr:hover {
  background: #fafbfc;
}

.dash-app .dt-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--accent);
}

.dash-app .dt-link {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.dash-app .dt-link:hover {
  text-decoration: underline;
  color: var(--accent2);
}

.dash-app .dt-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 320px;
}

.dash-app .dt-cell-stack__primary {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.dash-app .dt-cell-stack__secondary {
  font-size: 12.5px;
  color: var(--ink4);
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-app .dt-nowrap {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dash-app .dt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.dash-app .dt-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-app .dt-badge--accent {
  background: var(--accent-light);
  color: var(--accent);
}

.dash-app .dt-badge--accent .dt-badge__dot {
  background: var(--accent);
}

.dash-app .dt-badge--muted {
  background: var(--surface3);
  color: var(--ink3);
}

.dash-app .dt-badge--muted .dt-badge__dot {
  background: var(--ink4);
}

.dash-app .dt-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.dash-app .dt-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink3);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dash-app .dt-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.dash-app .dt-icon-btn--danger:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

.dash-app .dt-icon-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.dash-app .dt-empty {
  text-align: center;
  padding: 24px 16px !important;
  color: var(--ink3);
  font-size: 14px;
}

.dash-app .dt-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
}

.dash-app .dt-pagination__summary {
  margin: 0;
  font-size: 13px;
  color: var(--ink3);
}

.dash-app .dt-pagination__summary strong {
  color: var(--ink2);
  font-weight: 600;
}

.dash-app .dt-pagination__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dash-app .dt-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dash-app .dt-page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--accent);
  color: var(--accent);
}

.dash-app .dt-page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
}

.dash-app .dt-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dash-app .dt-page-btn--icon {
  min-width: 36px;
  padding: 0;
}

.dash-app .dt-page-btn--icon svg {
  width: 18px;
  height: 18px;
}

.dash-app .dt-page-ellipsis {
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink4);
  user-select: none;
}

.dash-app .dt-selection-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink3);
}

/* —— Settings (org) —— */
.dash-app .settings-page {
  max-width: 960px;
}

.dash-app .settings-tabrow {
  margin-bottom: 4px;
}

.dash-app .settings-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-app .settings-block {
  margin-bottom: 0;
}

.dash-app .settings-block__head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dash-app .settings-block__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.dash-app .settings-block__desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.45;
}

.dash-app .settings-block__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

/* Company: name + contact grid, logo card, full-width address */
.dash-app .settings-company-shell {
  grid-column: 1 / -1;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.dash-app .settings-company__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  align-content: start;
}

.dash-app .settings-company__form .settings-field--full {
  grid-column: 1 / -1;
}

.dash-app .settings-company__logo {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface2);
}

.dash-app .settings-company__logo .dash-form__label {
  display: block;
  margin-bottom: 2px;
}

.dash-app .settings-company__logo .dash-form__hint {
  margin-top: 0;
  margin-bottom: 10px;
}

.dash-app .settings-company__address {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .dash-app .settings-company-shell {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    grid-template-rows: auto auto;
    align-items: start;
  }

  .dash-app .settings-company__form {
    grid-column: 1;
    grid-row: 1;
  }

  .dash-app .settings-company__logo {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .dash-app .settings-company__address {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 640px) {
  .dash-app .settings-company__form {
    grid-template-columns: 1fr;
  }
}

.dash-app .settings-field--full {
  grid-column: 1 / -1;
}

.dash-app .settings-quot-notes-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  align-items: start;
}

.dash-app .settings-quot-notes-pair__textarea {
  min-height: 140px;
}

@media (max-width: 720px) {
  .dash-app .settings-quot-notes-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dash-app .settings-block__grid {
    grid-template-columns: 1fr;
  }
}

.dash-app .settings-field .dash-form__textarea {
  min-height: 72px;
}

.dash-app .settings-select {
  cursor: pointer;
  appearance: auto;
}

.dash-app .settings-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-app .settings-color-swatch {
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--surface3);
}

.dash-app .settings-color-swatch:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.dash-app .settings-color-hex {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
}

.dash-app .settings-loading {
  margin: 0;
  padding: 24px 0;
  color: var(--ink3);
  font-size: 14px;
}

.dash-app .settings-readonly-banner {
  background: var(--accent-light);
  color: var(--accent2);
  border-color: rgba(26, 86, 219, 0.25);
}

.dash-app .settings-saved-banner {
  background: var(--green-light);
  color: #047857;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.dash-app .settings-logo-preview {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px dashed var(--border2);
  border-radius: var(--r);
  background: var(--surface2);
  display: inline-block;
  max-width: 100%;
}

.dash-app .settings-logo-preview img {
  display: block;
  max-height: 72px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dash-app .settings-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Activity log — view modal layout */
.dash-app .activity-log-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-app .activity-log-detail__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface) 100%);
}

.dash-app .activity-log-detail__event {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent2);
  background: var(--accent-light);
  border: 1px solid rgba(26, 86, 219, 0.2);
  max-width: 100%;
  word-break: break-word;
}

.dash-app .activity-log-detail__when {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}

.dash-app .activity-log-detail__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.dash-app .activity-log-detail__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 20px;
  margin: 0;
}

.dash-app .activity-log-detail__meta-item {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface2);
}

.dash-app .activity-log-detail__meta-item dt {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.dash-app .activity-log-detail__meta-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

.dash-app .activity-log-detail__subject-type {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
}

.dash-app .activity-log-detail__subject-id {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent2);
  font-weight: 600;
}

.dash-app .activity-log-detail__user-email {
  color: var(--ink3);
  font-weight: 400;
}

.dash-app .activity-log-detail__panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 0;
}

@media (max-width: 720px) {
  .dash-app .activity-log-detail__panels {
    grid-template-columns: 1fr;
  }
}

.dash-app .activity-log-detail__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  overflow: hidden;
  background: var(--surface);
}

.dash-app .activity-log-detail__panel--old {
  border-top: 3px solid rgba(220, 38, 38, 0.35);
}

.dash-app .activity-log-detail__panel--new {
  border-top: 3px solid rgba(5, 150, 105, 0.45);
}

.dash-app .activity-log-detail__panel-head {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink2);
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
}

.dash-app .activity-log-detail__json {
  margin: 0;
  padding: 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface2);
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.dash-app .activity-log-detail__tech {
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px dashed var(--border2);
  background: var(--surface2);
}

.dash-app .activity-log-detail__tech-row {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink3);
}

.dash-app .activity-log-detail__tech-row:last-child {
  margin-bottom: 0;
}

.dash-app .activity-log-detail__tech-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink4);
  margin-bottom: 4px;
}

.dash-app .activity-log-detail__tech-value {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink2);
  word-break: break-all;
}

/* Tax management — view modal layout */
.dash-app .tax-detail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-app .tax-detail__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 55%, var(--accent-light) 160%);
}

.dash-app .tax-detail__hero-text {
  flex: 1 1 200px;
  min-width: 0;
}

.dash-app .tax-detail__name {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.3;
}

.dash-app .tax-detail__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dash-app .tax-detail__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.dash-app .tax-detail__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-app .tax-detail__badge--active {
  color: #047857;
  background: var(--green-light);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.dash-app .tax-detail__badge--active .tax-detail__badge-dot {
  background: #059669;
}

.dash-app .tax-detail__badge--inactive {
  color: var(--ink2);
  background: var(--surface3);
  border: 1px solid var(--border2);
}

.dash-app .tax-detail__badge--inactive .tax-detail__badge-dot {
  background: var(--ink4);
}

.dash-app .tax-detail__rate-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 17, 23, 0.04);
}

.dash-app .tax-detail__rate-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
}

.dash-app .tax-detail__rate-kind {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-app .tax-detail__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
}

.dash-app .tax-detail__meta-item {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface2);
}

.dash-app .tax-detail__meta-item dt {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.dash-app .tax-detail__meta-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
}

.dash-app .tax-detail__description {
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border2);
  background: var(--surface2);
}

.dash-app .tax-detail__description-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.dash-app .tax-detail__description-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
}

.dash-app .tax-detail__description-empty {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: var(--ink4);
}

.dash-app .tax-detail__timestamps {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding-top: 4px;
  border-top: 1px dashed var(--border2);
}

.dash-app .tax-detail__time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-app .tax-detail__time-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink4);
}

.dash-app .tax-detail__time time {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
}

/* Full-page forms (new quotation / new invoice) */
.dash-app .page-header__back {
  margin-bottom: 10px;
}

.dash-app .form-page-card {
  max-width: 720px;
}

.dash-app .form-page-card--wide {
  max-width: min(1100px, 100%);
}

.dash-app .invoice-line-items {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dash-app .invoice-line-items__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-app .invoice-line-items__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.dash-app .invoice-line-items__title--solo {
  margin-bottom: 4px;
}

.dash-app .invoice-line-items__hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ink2);
}

.dash-app .invoice-line-items__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface2, rgba(0, 0, 0, 0.02));
  align-items: flex-end;
}

.dash-app .invoice-line-items__row .dash-form__field {
  flex: 1 1 140px;
  margin-bottom: 0;
  min-width: 0;
}

.dash-app .invoice-line-items__row .il-name {
  flex: 1 1 100%;
}

@media (min-width: 900px) {
  .dash-app .invoice-line-items__row .il-name {
    flex: 2 1 220px;
  }
}

.dash-app .invoice-line-items__row-head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink2);
  margin-bottom: 4px;
}

.dash-app .invoice-line-items__remove {
  align-self: end;
  justify-self: end;
}

.dash-app .form-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* —— Add invoice (reference layout: cards + sidebar summary) —— */
/* Full width of .dash-main (like .dt-card lists) — no auto margins that add gap beside the sidebar */
.dash-app .inv-add-page {
  max-width: 100%;
  margin: 0;
  padding: 0 0 28px;
}

.dash-app .inv-add-head {
  margin-bottom: 22px;
}

.dash-app .inv-add-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.dash-app .inv-add-head__start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.dash-app .inv-add-head__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  flex-shrink: 0;
}

.dash-app .inv-add-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-light, #eff6ff);
  color: var(--accent, #0080ff);
  text-transform: capitalize;
}

.dash-app .inv-add-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
  min-width: 0;
}

.dash-app .inv-add-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.5;
}

.dash-app .inv-add-page__inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 320px);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .dash-app .inv-add-page__inner {
    grid-template-columns: 1fr;
  }
}

.dash-app .inv-add-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.dash-app .inv-fcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.dash-app .inv-fcard-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
}

.dash-app .inv-fcard-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-app .inv-fcard-icon svg {
  width: 18px;
  height: 18px;
}

.dash-app .inv-fcard-icon--blue {
  background: var(--accent-light, #eff6ff);
  color: var(--accent, #0080ff);
}

.dash-app .inv-fcard-icon--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.dash-app .inv-fcard-icon--green {
  background: #ecfdf5;
  color: #059669;
}

.dash-app .inv-fcard-icon--amber {
  background: #fffbeb;
  color: #d97706;
}

.dash-app .inv-fcard-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.dash-app .inv-fcard-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.4;
}

.dash-app .inv-fcard-body {
  padding: 12px;
}

.dash-app .inv-fgrid {
  display: grid;
  gap: 16px;
}

.dash-app .inv-fgrid--2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .dash-app .inv-fgrid--2 {
    grid-template-columns: 1fr;
  }
}

.dash-app .inv-fgrid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .dash-app .inv-fgrid--3 {
    grid-template-columns: 1fr;
  }
}

.dash-app .inv-readonly-field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius, 8px);
  font-size: 13.5px;
  color: var(--ink2);
  background: var(--surface2, #f8f9fb);
  line-height: 1.45;
}

.dash-app .inv-li-card .inv-fcard-body {
  padding: 0;
}

.dash-app .inv-li-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 12px 12px;
}

.dash-app .inv-li-row {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.dash-app .inv-li-row:hover {
  border-color: color-mix(in srgb, var(--accent, #0080ff) 22%, var(--border));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 6px 16px rgba(26, 86, 219, 0.07);
}

.dash-app .inv-li-row-catalog {
  padding: 12px 12px;
  margin: 0;
  background: linear-gradient(180deg, var(--surface2, #f8f9fb) 0%, color-mix(in srgb, var(--surface2, #f8f9fb) 88%, var(--surface)) 100%);
  border-bottom: 1px solid var(--border);
}

.dash-app .inv-li-amounts {
  padding: 12px 12px 6px;
}

.dash-app .inv-li-amounts .inv-li-desc-field {
  margin-top: 10px;
  margin-bottom: 0;
}

.dash-app .inv-li-amounts-grid {
  display: grid;
  grid-template-columns:
    minmax(120px, 2fr)
    minmax(88px, 1fr)
    minmax(72px, 0.8fr)
    minmax(84px, 0.95fr)
    minmax(76px, 0.9fr)
    38px;
  gap: 8px 10px;
  align-items: end;
}

.dash-app .inv-li-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.dash-app .inv-li-cell__lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.dash-app .inv-li-cell__lbl--right {
  text-align: right;
}

.dash-app .inv-li-cell__lbl--ghost {
  visibility: hidden;
  height: 12px;
  user-select: none;
}

.dash-app .inv-li-cell--btn {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.dash-app .inv-li-cell--btn .inv-li-del {
  align-self: flex-end;
}

@media (max-width: 768px) {
  .dash-app .inv-li-amounts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dash-app .inv-li-cell--desc {
    grid-column: 1 / -1;
  }

  .dash-app .inv-li-cell--tax {
    grid-column: 1 / -1;
  }

  .dash-app .inv-li-cell--total {
    grid-column: 1 / -1;
  }

  .dash-app .inv-li-cell--btn {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    padding-top: 4px;
  }

  .dash-app .inv-li-cell--btn .inv-li-cell__lbl--ghost {
    display: none;
  }
}

.dash-app .inv-li-inp {
  width: 100%;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  background: #ffffff;
  color-scheme: light;
  outline: none;
}

.dash-app .inv-li-inp:focus {
  border-color: var(--accent, #0080ff);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.07);
}

.dash-app .inv-li-inp--mono {
  font-family: ui-monospace, 'DM Mono', monospace;
  text-align: right;
}

.dash-app .inv-li-inp--result {
  font-weight: 600;
  background: #ffffff;
  border-color: transparent;
  cursor: default;
}

.dash-app .inv-li-row-sub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 4px 12px 12px;
  border-top: none;
}

.dash-app .inv-li-row-sub__meta {
  display: grid;
  gap: 10px;
  align-items: start;
}

.dash-app .inv-li-row-sub__meta--two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dash-app .inv-li-row-sub__meta > .dash-form__field {
  min-width: 0;
}

/* Catalog row: uneven .dash-form__field margins + align-items:end pushed the 2nd column down */
.dash-app .inv-li-row-catalog .dash-form__field {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .dash-app .inv-li-row-sub__meta--two {
    grid-template-columns: 1fr;
  }
}

.dash-app .inv-li-taxes-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2, #f8f9fb);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dash-app .inv-li-taxes-inline__label {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
  padding-top: 2px;
}

.dash-app .inv-li-tax-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.dash-app .inv-li-tax-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface2, #f8f9fb);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink);
}

.dash-app .inv-li-taxes-inline .inv-li-tax-chip {
  background: var(--surface);
}

.dash-app .inv-li-tax-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.dash-app .inv-li-tax-chip-remove:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.dash-app .inv-li-tax-add {
  flex: 0 0 auto;
  width: min(200px, 100%);
  min-width: 140px;
  max-width: 220px;
}

.dash-app .inv-li-row-sub .dash-form__field {
  margin-bottom: 0;
}

.dash-app .inv-li-add {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent, #0080ff);
  cursor: pointer;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  text-align: left;
  transition: opacity 0.15s;
}

.dash-app .inv-li-add:hover {
  opacity: 0.8;
}

.dash-app .inv-li-add svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dash-app .inv-li-del {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink2);
  transition: background 0.12s, color 0.12s;
}

.dash-app .inv-li-del:hover:not(:disabled) {
  background: #fef2f2;
  color: #dc2626;
}

.dash-app .inv-li-del:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dash-app .inv-add-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 16px;
}

@media (max-width: 1024px) {
  .dash-app .inv-add-sidebar {
    position: static;
  }
}

.dash-app .inv-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.dash-app .inv-summary-head {
  padding: 12px 12px;
  background: linear-gradient(135deg, var(--accent, #0080ff), var(--accent2, #006ae6));
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-app .inv-summary-head-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-app .inv-summary-head-icon svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
}

.dash-app .inv-summary-head-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.dash-app .inv-summary-head-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.dash-app .inv-summary-body {
  padding: 12px 12px;
}

.dash-app .inv-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}

.dash-app .inv-sum-row:last-of-type {
  border-bottom: none;
}

.dash-app .inv-sum-label {
  color: var(--ink2);
  font-weight: 500;
}

.dash-app .inv-sum-val {
  font-family: ui-monospace, 'DM Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.dash-app .inv-sum-grand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px;
  background: var(--accent-light, #eff6ff);
  border-top: 2px solid var(--accent-pale, #dbeafe);
}

.dash-app .inv-sum-grand-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent2);
}

.dash-app .inv-sum-grand-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent, #0080ff);
  font-family: ui-monospace, 'DM Mono', monospace;
}

.dash-app .inv-summary-note {
  padding: 12px 12px;
  font-size: 12px;
  color: var(--ink2);
  border-top: 1px solid var(--border);
  line-height: 1.6;
  background: var(--surface2, #f8f9fb);
}

.dash-app .inv-summary-note strong {
  color: var(--ink);
  font-weight: 600;
}

.dash-app .inv-info-block {
  background: var(--accent-light, #eff6ff);
  border: 1px solid var(--accent-pale, #dbeafe);
  border-radius: var(--radius, 8px);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--accent2);
  line-height: 1.55;
}

.dash-app .inv-info-block svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--accent, #0080ff);
  fill: none;
  stroke-width: 2;
}

.dash-app .inv-add-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dash-app .inv-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-app .inv-sidebar-actions .btn-sm {
  width: 100%;
  justify-content: center;
}

.dash-app .inv-fcard .dash-form__label {
  font-size: 12px;
  font-weight: 600;
}

.dash-app .inv-fcard .dash-form__hint {
  font-size: 11.5px;
}

/* Add quotation — purple summary (reference: accountrack-add-quotation.html) */
.dash-app .inv-add-tag--quot {
  background: #f5f3ff;
  color: #7c3aed;
}

.dash-app .quot-summary .inv-summary-head {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

.dash-app .quot-summary .inv-sum-grand {
  background: #f5f3ff;
  border-top: 2px solid #e9d5ff;
}

.dash-app .quot-summary .inv-sum-grand-label {
  color: #6d28d9;
}

.dash-app .quot-summary .inv-sum-grand-val {
  color: #7c3aed;
}

.dash-app .quot-info-block {
  background: #f5f3ff;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius, 8px);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #5b21b6;
  line-height: 1.55;
}

.dash-app .quot-info-block svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #7c3aed;
  fill: none;
  stroke-width: 2;
}

/* Invoice / quotation — view modal (read-only detail) */
.dash-app .doc-view {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}

.dash-app .doc-view__loading {
  text-align: center;
  padding: 28px 12px;
  color: var(--ink2);
  font-size: 14px;
}

.dash-app .doc-view__alert {
  margin-bottom: 16px;
}

.dash-app .doc-view__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px 18px;
  border-radius: var(--radius, 8px);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.dash-app .doc-view--invoice .doc-view__hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.04));
  border-color: rgba(37, 99, 235, 0.22);
}

.dash-app .doc-view--quotation .doc-view__hero {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(124, 58, 237, 0.04));
  border-color: rgba(109, 40, 217, 0.22);
}

.dash-app .doc-view--payment .doc-view__hero {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.04));
  border-color: rgba(5, 150, 105, 0.22);
}

.dash-app .doc-view--expense .doc-view__hero {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.09), rgba(245, 158, 11, 0.05));
  border-color: rgba(217, 119, 6, 0.24);
}

/* Catalog / master-data — shared read-only view modal */
.dash-app .doc-view--catalog .doc-view__hero {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.09), rgba(100, 116, 139, 0.05));
  border-color: rgba(71, 85, 105, 0.22);
}

.dash-app .doc-view__hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 0;
}

.dash-app .doc-view__hero-meta .doc-view__invoice-link {
  font-size: 13px;
  font-weight: 600;
}

.dash-app .doc-view__field--full {
  grid-column: 1 / -1;
}

.dash-app .doc-view__notes {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
}

.dash-app .doc-view__hero-main {
  min-width: 0;
}

.dash-app .doc-view__number {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}

.dash-app .doc-view__hero-total {
  text-align: right;
}

.dash-app .doc-view__hero-total-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink2);
  margin-bottom: 4px;
}

.dash-app .doc-view__hero-total-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dash-app .doc-view__section {
  margin-bottom: 18px;
}

.dash-app .doc-view__section:last-child {
  margin-bottom: 0;
}

.dash-app .doc-view__section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-app .doc-view__section-title svg {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.dash-app .doc-view__panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 14px 16px;
}

.dash-app .doc-view__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}

@media (max-width: 520px) {
  .dash-app .doc-view__grid {
    grid-template-columns: 1fr;
  }
}

.dash-app .doc-view__field dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink2);
  margin: 0 0 4px;
}

.dash-app .doc-view__field dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}

.dash-app .doc-view__customer-name {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--ink);
}

.dash-app .doc-view__customer-meta {
  font-size: 13px;
  color: var(--ink2);
  margin: 0;
  line-height: 1.5;
}

.dash-app .doc-view__lines-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
}

.dash-app .doc-view__lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.dash-app .doc-view__lines th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink2);
  padding: 10px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dash-app .doc-view__lines td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.dash-app .doc-view__lines tr:last-child td {
  border-bottom: none;
}

.dash-app .doc-view__lines .doc-view__mono {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dash-app .doc-view__lines-desc {
  font-weight: 500;
  color: var(--ink);
}

.dash-app .doc-view__lines-desc-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink2);
  margin-top: 4px;
}

.dash-app .doc-view__lines-empty {
  padding: 20px;
  text-align: center;
  color: var(--ink2);
  font-size: 13px;
}

.dash-app .doc-view__summary {
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  overflow: hidden;
  max-width: 360px;
  margin-left: auto;
}

.dash-app .doc-view__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.dash-app .doc-view__summary-row:last-child {
  border-bottom: none;
}

.dash-app .doc-view__summary-row--emph {
  background: var(--surface2);
  font-weight: 600;
}

.dash-app .doc-view__summary-row--grand {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.06));
  font-weight: 700;
  font-size: 14px;
}

.dash-app .doc-view--quotation .doc-view__summary-row--grand {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.1), rgba(124, 58, 237, 0.06));
}

.dash-app .doc-view__summary-label {
  color: var(--ink2);
}

.dash-app .doc-view__summary-val {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.dash-app .doc-view__summary-sublabel {
  font-weight: 500;
  color: var(--ink2);
}

.dash-app .doc-view__section--quot-subject-before-items {
  margin-bottom: 14px;
}

.dash-app .doc-view__section--quot-subject-before-items .doc-view__quot-subject {
  margin: 0;
  text-align: left;
}

.dash-app .doc-view__quot-subject {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.45;
}

.dash-app .doc-view__quot-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .dash-app .doc-view__quot-columns {
    grid-template-columns: 1fr;
  }
}

.dash-app .doc-view__quot-col .doc-view__section-title {
  margin-bottom: 8px;
}

.dash-app .doc-view__panel--plain {
  padding: 12px 14px;
}

.dash-app .doc-view__kv-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}

.dash-app .doc-view__kv-line:last-child {
  margin-bottom: 0;
}

.dash-app .doc-view__kv-line--strong {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 8px;
  color: var(--ink);
}

.dash-app .doc-view__kv-line--block {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.dash-app .doc-view__kv-line--status .doc-view__kv-v {
  line-height: 1.2;
}

.dash-app .doc-view__kv-k {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--ink2);
  min-width: 6.5rem;
}

.dash-app .doc-view__kv-v {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.dash-app .doc-view__kv-v--multiline {
  white-space: pre-wrap;
}

.dash-app .doc-view__meta-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 18px;
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.4;
}

/* Right-align price columns only; Qty/Unit use nth-child center rules (col-num was overriding them) */
.dash-app .doc-view__lines--quot-print th:nth-child(4).doc-view__col-num,
.dash-app .doc-view__lines--quot-print td:nth-child(4).doc-view__col-num,
.dash-app .doc-view__lines--quot-print th:nth-child(5).doc-view__col-num,
.dash-app .doc-view__lines--quot-print td:nth-child(5).doc-view__col-num {
  text-align: right;
}

.dash-app .doc-view__lines-product-title {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.35;
}

.dash-app .doc-view__lines-desc-sub--body {
  white-space: pre-wrap;
  line-height: 1.45;
}

.dash-app .doc-view__section--quot-summary {
  display: flex;
  justify-content: flex-end;
}

.dash-app .doc-view__summary--quot-print {
  width: 100%;
  max-width: 380px;
}

.dash-app .doc-view__summary--quot-print .doc-view__summary-label {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-app .doc-view__notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .dash-app .doc-view__notes-grid {
    grid-template-columns: 1fr;
  }
}

.dash-app .doc-view__note-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 12px 14px;
  min-height: 72px;
}

.dash-app .doc-view__note-block p {
  margin: 0;
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

.dash-app .doc-view__note-empty {
  color: var(--ink2);
  font-style: italic;
}

.dash-app .doc-view-modal-footer {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dash-app .doc-view-modal-footer--receipt {
  gap: 12px;
}

.dash-app .doc-view-modal-footer--receipt .doc-view-btn-print {
  min-width: 88px;
}

/* Invoice view modal — receipt-style layout */
.dash-app .doc-view--invoice-receipt {
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 8px 8px;
}

.dash-app .doc-view__receipt-head {
  text-align: center;
  padding: 8px 8px 14px;
}

.dash-app .doc-view__inv-receipt-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 10px;
}

.dash-app .doc-view__inv-receipt-logo {
  display: block;
  max-height: 72px;
  width: auto;
  max-width: min(360px, 100%);
  object-fit: contain;
}

.dash-app .doc-view__receipt-meta-line {
  margin: 0;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}

.dash-app .doc-view__receipt-rule {
  height: 0;
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 14px;
}

.dash-app .doc-view__receipt-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .dash-app .doc-view__receipt-columns {
    grid-template-columns: 1fr;
  }
}

.dash-app .doc-view__receipt-col--end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.dash-app .doc-view__receipt-kv {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 0 0 10px;
}

.dash-app .doc-view__receipt-kv:last-child {
  margin-bottom: 0;
}

.dash-app .doc-view__receipt-kv dt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink2);
  margin: 0;
}

.dash-app .doc-view__receipt-kv dt::after {
  content: ':';
  margin-left: 1px;
  margin-right: 2px;
  font-weight: 600;
  color: var(--ink2);
}

.dash-app .doc-view__receipt-kv dd {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* Right column: small gap between label & value; shared value column; block flush right */
.dash-app .doc-view__receipt-kv.doc-view__receipt-kv--grid {
  display: grid;
  grid-template-columns: auto max-content;
  column-gap: 6px;
  row-gap: 10px;
  align-items: baseline;
  justify-items: start;
  width: max-content;
  max-width: 100%;
}

.dash-app .doc-view__receipt-kv.doc-view__receipt-kv--grid dd {
  text-align: right;
  justify-self: stretch;
}

.dash-app .doc-view__receipt-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.dash-app .doc-view__receipt-due {
  font-size: 12.5px;
  color: var(--ink2);
}

.dash-app .doc-view__lines-wrap--receipt {
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

.dash-app .doc-view__lines--receipt {
  font-size: 13px;
  width: 100%;
  table-layout: fixed;
}

.dash-app .doc-view__lines--receipt th {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

/* Item 60%; QTY, UNIT, RATE, AMOUNT share remaining 40% (10% each). */
.dash-app .doc-view__lines--receipt .doc-view__col-item {
  width: 60%;
  min-width: 0;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dash-app .doc-view__lines--receipt .doc-view__col-qty {
  text-align: center;
  width: 10%;
  min-width: 0;
}

.dash-app .doc-view__lines--receipt .doc-view__col-uom {
  text-align: center;
  vertical-align: top;
  width: 10%;
  min-width: 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.dash-app .doc-view__lines--receipt td.doc-view__col-uom {
  color: var(--ink2);
}

.dash-app .doc-view__lines--receipt .doc-view__col-num {
  text-align: right;
  width: 10%;
  min-width: 0;
}

.dash-app .doc-view__lines--receipt td.doc-view__col-qty {
  text-align: center;
}

.dash-app .doc-view__lines--receipt td.doc-view__col-num {
  text-align: right;
}

.dash-app .doc-view__summary--receipt {
  max-width: 280px;
  margin-left: auto;
  margin-bottom: 18px;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  padding: 4px 0;
}

.dash-app .doc-view__summary--receipt .doc-view__summary-label {
  flex: 1 1 auto;
  min-width: 0;
}

.dash-app .doc-view__summary--receipt .doc-view__summary-row {
  padding: 8px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-app .doc-view__summary--receipt .doc-view__summary-row:last-child {
  border-bottom: none;
}

.dash-app .doc-view__summary-row--receipt-total {
  background: transparent !important;
  font-size: 15px;
  font-weight: 700;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.dash-app .doc-view__summary-row--receipt-total .doc-view__summary-label,
.dash-app .doc-view__summary-row--receipt-total .doc-view__summary-val {
  color: var(--accent, #0080ff);
}

.dash-app .doc-view__summary-row--receipt-pay {
  font-size: 12.5px;
  background: transparent !important;
}

.dash-app .doc-view__summary-row--receipt-pay .doc-view__summary-val {
  font-weight: 500;
  text-align: right;
}

.dash-app .doc-view__summary-balance {
  color: var(--ink2);
  font-weight: 500;
}

.dash-app .doc-view__pay-status {
  text-transform: capitalize;
}

.dash-app .doc-view__pay-print {
  display: none;
}

.dash-app .doc-view__payments-block {
  margin-bottom: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.dash-app .doc-view__payments-heading {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
}

.dash-app .doc-view__payments-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ink2);
  font-style: italic;
}

.dash-app .doc-view__payments-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.dash-app .doc-view__payments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.dash-app .doc-view__payments-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink2);
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dash-app .doc-view__payments-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink);
}

.dash-app .doc-view__payments-table tr:last-child td {
  border-bottom: none;
}

.dash-app .doc-view__payments-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dash-app .doc-view__payments-ref {
  max-width: 140px;
  word-break: break-word;
}

.dash-app .doc-view__payments-sub {
  display: block;
  font-size: 11px;
  color: var(--ink2);
  margin-top: 2px;
}

.dash-app .doc-view__pay-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.dash-app .doc-view__pay-pill--ok {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.dash-app .doc-view__pay-pill--muted {
  background: var(--surface2, #f1f5f9);
  color: var(--ink2);
}

.dash-app .doc-view__pay-pill--warn {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.dash-app .doc-view__payments-foot {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink2);
  text-align: right;
}

.dash-app .doc-view__receipt-thanks {
  margin-top: 4px;
  margin-bottom: 16px;
}

.dash-app .doc-view__receipt-thanks-rule {
  border: none;
  border-top: 2px dotted var(--border);
  margin: 0 0 14px;
}

.dash-app .doc-view__receipt-thanks-text {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent, #0080ff);
}

.dash-app .doc-view__section--inv-notes-print {
  margin-top: 6px;
}

.dash-app .doc-view__receipt-notes {
  margin-bottom: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.dash-app .doc-view__receipt-note-line {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.45;
}

.dash-app .doc-view__receipt-note-block {
  margin-bottom: 12px;
}

.dash-app .doc-view__receipt-note-block:last-child {
  margin-bottom: 0;
}

.dash-app .doc-view__receipt-note-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
  margin-bottom: 6px;
}

.dash-app .doc-view__receipt-note-block p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.5;
}

.dash-app .doc-view__receipt-more {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface2, #f8f9fb);
  font-size: 12.5px;
}

.dash-app .doc-view__receipt-more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink2);
  user-select: none;
}

.dash-app .doc-view__receipt-more--inline .doc-view__receipt-more-inner {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.dash-app .doc-view__receipt-more-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

@media (max-width: 520px) {
  .dash-app .doc-view__receipt-more-inner {
    grid-template-columns: 1fr;
  }
}

.dash-app .doc-view__print-brand {
  display: none;
}

.dash-app .doc-view__print-doc-head {
  display: none;
}

/* Quotation view page: show print-style header (logo + quotation/date bar) on screen */
.dash-app .quotation-page-view .doc-view__print-doc-head {
  display: block;
  margin-bottom: 14px;
}

.dash-app .quotation-page-view .doc-view__quot-print-frame {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.dash-app .quotation-page-view .doc-view__quot-print-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.dash-app .quotation-page-view .doc-view__quot-print-logo {
  max-height: 72px;
  width: auto;
  max-width: min(360px, 100%);
  object-fit: contain;
}

.dash-app .quotation-page-view .doc-view__quot-print-infobar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 16px;
  background: #eef6ff;
  border-top: 1px solid #d0e3ff;
  font-size: 13px;
  color: var(--ink);
}

.dash-app .quotation-page-view .doc-view__quot-print-infobar-k {
  font-weight: 400;
  color: var(--ink);
}

.dash-app .quotation-page-view .doc-view__quot-print-infobar strong {
  font-weight: 700;
  color: var(--ink);
}

/*
 * Outer sheet must use real table display (not display:block on td). Block cells break nested
 * line-items table layout so columns no longer line up with headers.
 */
.dash-app .quotation-page-view .doc-view__quot-print-sheet {
  display: table;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

.dash-app .quotation-page-view .doc-view__quot-print-sheet thead,
.dash-app .quotation-page-view .doc-view__quot-print-sheet tbody {
  display: table-row-group;
  width: 100%;
}

.dash-app .quotation-page-view .doc-view__quot-print-sheet tr {
  display: table-row;
  width: 100%;
}

.dash-app .quotation-page-view .doc-view__quot-print-sheet-head-cell,
.dash-app .quotation-page-view .doc-view__quot-print-sheet-body-cell {
  display: table-cell;
  width: 100%;
  padding: 0;
  vertical-align: top;
  border: none;
}

/* Quotation view: print header (logo bar + meta + subject) hidden on screen; shown when printing */
.dash-app .quotation-page-view .doc-view__quot-print-sheet thead {
  display: none;
}

/* Invoice view: company header + rule hidden on screen; shown when printing */
.dash-app .invoice-page-view .doc-view--invoice-receipt > .doc-view__receipt-head,
.dash-app .invoice-page-view .doc-view--invoice-receipt > .doc-view__receipt-rule {
  display: none;
}

.dash-app .doc-view__quot-print-footer {
  display: none;
}

@media print {
  @page {
    margin: 4mm 6mm;
  }

  body.invoice-printing,
  body.quotation-printing {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }

  html:has(body.invoice-printing),
  html:has(body.quotation-printing) {
    height: auto !important;
    overflow: visible !important;
  }

  /* Dashboard shell uses overflow:hidden + fixed height; print must expand to full document. */
  body.invoice-printing #root,
  body.quotation-printing #root {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.invoice-printing .dash-app,
  body.quotation-printing .dash-app {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }

  body.invoice-printing .dash-shell,
  body.quotation-printing .dash-shell {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.invoice-printing .sidebar,
  body.invoice-printing .dash-top-nav,
  body.invoice-printing .page-header,
  body.invoice-printing .inv-add-head,
  body.invoice-printing .dash-inline-alert,
  body.invoice-printing .dt-card,
  body.quotation-printing .sidebar,
  body.quotation-printing .dash-top-nav,
  body.quotation-printing .page-header,
  body.quotation-printing .inv-add-head,
  body.quotation-printing .dash-inline-alert,
  body.quotation-printing .dt-card {
    display: none !important;
  }

  body.invoice-printing .dash-modal-root:not(.invoice-detail-modal),
  body.invoice-printing .dash-confirm-root,
  body.quotation-printing .dash-modal-root:not(.quotation-detail-modal),
  body.quotation-printing .dash-confirm-root {
    display: none !important;
  }

  body.invoice-printing .dash-main-stack,
  body.quotation-printing .dash-main-stack {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body.invoice-printing .dash-main,
  body.quotation-printing .dash-main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  body.invoice-printing .invoice-detail-modal,
  body.quotation-printing .quotation-detail-modal {
    position: static !important;
    display: block !important;
  }

  body.invoice-printing .invoice-detail-modal .dash-modal-backdrop,
  body.quotation-printing .quotation-detail-modal .dash-modal-backdrop {
    display: none !important;
  }

  body.invoice-printing .invoice-detail-modal.dash-modal-root,
  body.quotation-printing .quotation-detail-modal.dash-modal-root {
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    padding: 0 !important;
    inset: auto !important;
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.invoice-printing .invoice-detail-modal .dash-modal,
  body.quotation-printing .quotation-detail-modal .dash-modal {
    box-shadow: none !important;
    border: none !important;
    max-width: none !important;
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    display: block !important;
  }

  body.invoice-printing .invoice-detail-modal .dash-modal__header,
  body.invoice-printing .invoice-detail-modal .dash-modal__footer,
  body.quotation-printing .quotation-detail-modal .dash-modal__header,
  body.quotation-printing .quotation-detail-modal .dash-modal__footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  body.invoice-printing .invoice-detail-modal .dash-modal__body,
  body.quotation-printing .quotation-detail-modal .dash-modal__body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-height: none !important;
    flex: none !important;
    min-height: auto !important;
  }

  body.invoice-printing .invoice-page-view .doc-view--invoice-receipt > .doc-view__receipt-head {
    display: block !important;
  }

  body.invoice-printing .invoice-page-view .doc-view--invoice-receipt > .doc-view__receipt-rule {
    display: block !important;
  }

  body.invoice-printing .doc-view--invoice-receipt {
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__receipt-head {
    padding: 4px 0 10px !important;
    text-align: center !important;
  }

  body.invoice-printing .doc-view__inv-receipt-brand {
    margin: 0 0 8px !important;
  }

  body.invoice-printing .doc-view__inv-receipt-logo {
    max-height: 56pt !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.invoice-printing .doc-view__receipt-meta-line {
    font-size: 10pt !important;
    color: #64748b !important;
  }

  /* Dotted rule under header (receipt template) */
  body.invoice-printing .doc-view__receipt-rule {
    margin-bottom: 10px !important;
    border-top: 1px dotted #94a3b8 !important;
  }

  body.invoice-printing .doc-view__receipt-columns {
    gap: 8px 20px !important;
    margin-bottom: 12px !important;
  }

  body.invoice-printing .doc-view__receipt-kv {
    margin-bottom: 6px !important;
  }

  /* Labels regular, values bold (template) */
  body.invoice-printing .doc-view__receipt-kv dt {
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 10pt !important;
    color: #334155 !important;
  }

  body.invoice-printing .doc-view__receipt-kv dt::after {
    font-weight: 400 !important;
    color: #334155 !important;
  }

  body.invoice-printing .doc-view__receipt-kv dd {
    font-weight: 700 !important;
    font-size: 10.5pt !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__receipt-status {
    display: none !important;
  }

  body.invoice-printing .doc-view__lines-wrap--receipt {
    margin-bottom: 12px !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  body.invoice-printing .doc-view__lines--receipt {
    font-size: 10pt !important;
    border-collapse: collapse !important;
  }

  body.invoice-printing .doc-view__lines--receipt thead th {
    padding: 8px 10px !important;
    border-top: 1px solid #cbd5e1 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    background: #fff !important;
    font-weight: 600 !important;
    color: #334155 !important;
  }

  body.invoice-printing .doc-view__lines--receipt tbody td {
    padding: 7px 10px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__lines--receipt .doc-view__col-uom {
    white-space: normal !important;
    max-width: none !important;
    font-size: 9pt !important;
    color: #334155 !important;
  }

  body.invoice-printing .doc-view__lines--receipt tbody tr:last-child td {
    border-bottom: 1px solid #e2e8f0 !important;
  }

  body.invoice-printing .doc-view__lines--receipt .doc-view__lines-desc-sub {
    color: #64748b !important;
  }

  body.invoice-printing .doc-view__summary--receipt {
    max-width: 280px !important;
    margin-left: auto !important;
    margin-bottom: 14px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.invoice-printing .doc-view__summary--receipt .doc-view__summary-row {
    padding: 5px 0 !important;
    border-bottom: none !important;
    font-size: 10pt !important;
  }

  body.invoice-printing .doc-view__summary--receipt .doc-view__summary-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: #334155 !important;
    font-weight: 400 !important;
  }

  body.invoice-printing .doc-view__summary--receipt .doc-view__summary-val {
    color: #0f172a !important;
    font-weight: 500 !important;
  }

  body.invoice-printing .doc-view__summary-row--receipt-total {
    margin-top: 4px !important;
    padding-top: 8px !important;
    border-top: 1px solid #cbd5e1 !important;
    font-size: 11pt !important;
  }

  body.invoice-printing .doc-view__summary-row--receipt-total .doc-view__summary-label {
    font-weight: 700 !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__summary-row--receipt-total .doc-view__summary-val {
    font-weight: 700 !important;
    color: #1d4ed8 !important;
  }

  body.invoice-printing .doc-view__summary-row--receipt-pay {
    padding-top: 6px !important;
    font-size: 10pt !important;
  }

  body.invoice-printing .doc-view__summary-row--receipt-pay .doc-view__summary-label {
    font-weight: 400 !important;
  }

  body.invoice-printing .doc-view__pay-screen {
    display: none !important;
  }

  body.invoice-printing .doc-view__pay-print {
    display: inline !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__payments-block,
  body.invoice-printing .doc-view__receipt-more {
    display: none !important;
  }

  /* Invoice notes & terms on a new page (same as quotation .doc-view__section--quot-notes-newpage) */
  body.invoice-printing .doc-view__section--inv-notes-print {
    page-break-before: always !important;
    break-before: page !important;
    padding-top: 4px !important;
    margin-top: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.invoice-printing .doc-view__receipt-notes {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    padding-top: 8px !important;
    border-top: 1px solid #cbd5e1 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.invoice-printing .doc-view__receipt-note-line {
    font-size: 10pt !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view__receipt-note-title {
    font-size: 8.5pt !important;
    letter-spacing: 0.05em !important;
    color: #334155 !important;
  }

  body.invoice-printing .doc-view__receipt-note-block p {
    font-size: 10pt !important;
    line-height: 1.45 !important;
    color: #0f172a !important;
  }

  body.invoice-printing .doc-view--invoice-receipt .doc-view__receipt-head {
    color: #000;
  }

  /* Footer: dotted rule + centered thank-you (template) */
  body.invoice-printing .doc-view__receipt-thanks {
    display: block !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
  }

  body.invoice-printing .doc-view__receipt-thanks-rule {
    border-top: 1px dotted #94a3b8 !important;
    margin-bottom: 12px !important;
  }

  body.invoice-printing .doc-view__receipt-thanks-text {
    font-size: 10pt !important;
    font-weight: 400 !important;
    color: #64748b !important;
  }
}
