:root {
  --bg: #f5f7f6;
  --panel: #fbfcfb;
  --ink: #18211f;
  --muted: #687672;
  --line: #dce4e1;
  --accent: #176c5f;
  --active-nav-color: #35d6ff;
  --active-nav-rgb: 53,214,255;
  --soft: #e8f2ef;
  --add: #2563eb;
  --add-dark: #1d4ed8;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  --sidebar-track: 250px;
  --header-parallax-offset: 0px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  display: block;
  min-height: 100vh;
  transition: background-color .22s ease;
}
body.sidebar-collapsed {
  --sidebar-track: 94px;
}
body.pdf-body {
  display: block;
  background: #fff;
}

body.auth-mode {
  display: block;
}

body.auth-mode .sidebar {
  display: none;
}
body.auth-mode main,
body.pdf-body main {
  margin-left: 0;
  padding: 0;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(23,108,95,.08), transparent 34%),
    linear-gradient(rgba(18,35,31,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18,35,31,.05) 1px, transparent 1px);
  background-size: auto, 34px 34px, 34px 34px;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(23,108,95,.08);
  transform: rotate(-5deg);
  pointer-events: none;
}

.auth-card {
  width: min(920px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 70px rgba(18,35,31,.10);
}

.auth-card h1 {
  font-size: 34px;
}

.auth-language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.auth-language-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(23,108,95,.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(23,108,95,.05));
  color: var(--muted);
  text-align: left;
  box-shadow: 0 10px 28px rgba(18,35,31,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}

.auth-language-card strong {
  font-size: 14px;
  letter-spacing: .08em;
}

.auth-language-card span {
  font-size: 12px;
}

.auth-language-card:hover {
  transform: translateY(-1px);
  border-color: rgba(23,108,95,.28);
  color: var(--ink);
}

.auth-language-card.active {
  color: var(--ink);
  border-color: rgba(37,99,235,.34);
  background: linear-gradient(180deg, rgba(37,99,235,.16), rgba(23,108,95,.06));
  box-shadow: 0 14px 32px rgba(37,99,235,.14);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.auth-provider-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 999px;
  background: #fff;
  color: #17211d;
  box-shadow: 0 12px 28px rgba(18,35,31,.08);
}

.google-login-button::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0 100%);
}

.google-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(18,35,31,.12);
}

.link-button {
  border: 1px solid rgba(23,108,95,.18);
  background: rgba(23,108,95,.06);
  color: var(--accent);
  font-weight: 700;
}

.link-button:hover {
  background: rgba(23,108,95,.12);
}

.auth-reset-form {
  margin-top: 18px;
}

.auth-reset-form .muted {
  margin: 0 0 12px;
}

.password-reset-confirm-fields {
  display: grid;
  gap: 10px;
}

.price-box {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 6px;
  background: var(--soft);
}

.price-box b {
  font-size: 30px;
  color: var(--accent);
}

.sidebar {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.08), transparent 36%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.055) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(65deg, rgba(255,255,255,.035) 0 1px, transparent 1px 28px),
    linear-gradient(145deg, #10231f 0%, #152d28 48%, #0d1d1a 100%);
  color: #fff;
  padding: 16px 18px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-track);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
  transition: width .22s ease, padding .22s ease;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: -20% -45%;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,.11), transparent 58%),
    repeating-linear-gradient(95deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px);
  opacity: .35;
  transform: perspective(540px) rotateX(58deg) rotateZ(-16deg) translateY(8%);
  transform-origin: center bottom;
  pointer-events: none;
}
.sidebar > * {
  position: relative;
  z-index: 1;
}
.sidebar-topline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-bottom-color: rgba(255,255,255,.24);
  border-radius: 16px;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 10px 22px rgba(4,10,9,.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: 0 0 auto;
}
.sidebar-topline::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -15px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform-origin: center;
  pointer-events: none;
}
body:not(.sidebar-collapsed) .sidebar-topline::after {
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.30), rgba(45,212,191,.30), transparent);
  animation: sidebarCenterLine 3.8s ease-in-out infinite;
}
@keyframes sidebarCenterLine {
  0%, 100% { opacity: .14; transform: scaleX(.06); }
  48%, 56% { opacity: .30; transform: scaleX(1); }
}
.brand { display: flex; gap: 9px; align-items: center; min-width: 0; }
.brand > div { min-width: 0; }
.brand strong { display: block; font-size: 15px; line-height: 1.05; }
.brand span { display: block; color: #b7c8c3; font-size: 11px; margin-top: 2px; }
.brand-support-icons {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.brand-support-icons a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.08);
  font-size: 15px;
}
.mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: #e53935;
  position: relative;
  flex: 0 0 auto;
}
.mark::before,
.mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 1px;
}
.mark::before {
  width: 17px;
  height: 5px;
}
.mark::after {
  width: 5px;
  height: 17px;
}
nav { display: grid; gap: 0; }
#tabs {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 50px;
  padding-right: 1px;
  scrollbar-width: none;
}
#tabs::-webkit-scrollbar { width: 0; height: 0; }
nav button {
  text-align: left; border: 0; border-radius: 11px; padding: 5px 6px;
  background: transparent; color: #d9e5e2; cursor: pointer; font-size: 13px;
  overflow: visible;
}
nav button.active, nav button:hover {
  background: rgba(var(--menu-rgb, 255,255,255), .12);
  color: #fff;
}
#tabs button {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  position: relative;
}
.nav-main-button,
.mobile-menu-main {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}
.nav-main-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nav-expand-indicator {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  opacity: .7;
  transform: rotate(45deg);
  transition: transform .18s ease, opacity .18s ease;
  flex: 0 0 auto;
  margin-right: 2px;
}
.nav-expand-indicator.open {
  opacity: 1;
  transform: rotate(225deg);
}
.nav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
}
.nav-group-settings {
  margin-top: auto;
  margin-bottom: clamp(58px, 8vh, 84px);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.13);
}
.nav-group-dashboard-shortcut {
  margin-top: auto;
  margin-bottom: 8px;
}
.nav-group-dashboard-shortcut + .nav-group-settings {
  margin-top: 0;
}
.sidebar-dashboard-shortcut {
  color: #dffdfa;
}
.nav-submenu {
  display: none;
  gap: 3px;
  padding-left: 7px;
}
.nav-group-open > .nav-submenu {
  display: grid;
}
.nav-main-button {
  width: 100%;
}
.nav-main-button:hover,
.nav-main-button.active {
  background:
    linear-gradient(90deg, rgba(var(--menu-rgb, 255,255,255), .18), rgba(255,255,255,.07));
}
.nav-subbutton {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 10px;
  color: #c8d7d3;
  background: rgba(255,255,255,.04);
  font-size: 11.5px;
}
.nav-subbutton:hover,
.nav-subbutton.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.nav-subdot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: .72;
  flex: 0 0 7px;
}
.nav-sublabel {
  white-space: nowrap;
}
.nav-icon {
  --nav-icon-accent: #eef7f3;
  --nav-icon-scale: 1;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--nav-icon-accent) 18%, rgba(255,255,255,.12));
  background:
    radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--nav-icon-accent) 18%, transparent), rgba(255,255,255,.06) 58%, rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 18px rgba(4,10,9,.16), 0 0 0 1px color-mix(in srgb, var(--nav-icon-accent) 10%, transparent);
  color: var(--nav-icon-accent);
  transform: scale(var(--nav-icon-scale));
  transform-origin: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
#tabs button:hover .nav-icon,
#tabs button.active .nav-icon {
  transform: translateY(-1px) scale(var(--nav-icon-scale));
  border-color: color-mix(in srgb, var(--nav-icon-accent) 42%, rgba(255,255,255,.22));
  background:
    radial-gradient(circle at 32% 20%, color-mix(in srgb, var(--nav-icon-accent) 34%, transparent), rgba(255,255,255,.10) 60%, rgba(255,255,255,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 24px rgba(4,10,9,.22), 0 0 18px color-mix(in srgb, var(--nav-icon-accent) 24%, transparent);
}
.nav-icon,
.nav-icon::before,
.nav-icon::after,
.nav-icon-core,
.nav-icon-core::before,
.nav-icon-core::after {
  box-sizing: border-box;
}
.nav-icon::before,
.nav-icon::after,
.nav-icon-core::before,
.nav-icon-core::after {
  content: "";
  position: absolute;
  display: block;
}
.nav-icon-core {
  position: absolute;
  inset: 0;
  display: block;
}
.nav-icon-dashboard { --nav-icon-accent: #35d6ff; }
.nav-icon-central { --nav-icon-accent: #2fd6b6; }
.nav-icon-calendar { --nav-icon-accent: #22c55e; }
.nav-icon-invoices { --nav-icon-accent: #ffb03a; }
.nav-icon-offers { --nav-icon-accent: #e879ff; }
.nav-icon-customers { --nav-icon-accent: #34e7a2; }
.nav-icon-catalog { --nav-icon-accent: #ffc052; }
.nav-icon-stock { --nav-icon-accent: #ff8f35; }
.nav-icon-payroll { --nav-icon-accent: #ff9b7a; }
.nav-icon-accounting { --nav-icon-accent: #76bdff; }
.nav-icon-users { --nav-icon-accent: #a6e85d; }
.nav-icon-trash { --nav-icon-accent: #94a3b8; }
.nav-icon-admin { --nav-icon-accent: #f2bd55; }
.nav-icon-settings { --nav-icon-accent: #ddfbf1; }
.nav-icon-dashboard::before {
  left: 7px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}
.nav-icon-dashboard::after {
  right: 7px;
  top: 7px;
  width: 8px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}
.nav-icon-dashboard .nav-icon-core {
  left: 7px;
  right: 7px;
  top: 16px;
  bottom: 7px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}
.nav-icon-central::before {
  left: 7px;
  top: 8px;
  width: 16px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.nav-icon-central::after {
  left: 6px;
  top: 13px;
  width: 18px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.nav-icon-central .nav-icon-core::before {
  left: 10px;
  top: 16px;
  width: 2px;
  height: 5px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor;
}
.nav-icon-central .nav-icon-core::after {
  left: 9px;
  top: 25px;
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}
.nav-icon-calendar::before {
  left: 7px;
  top: 7px;
  width: 16px;
  height: 16px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.nav-icon-calendar::after {
  left: 7px;
  top: 11px;
  width: 16px;
  height: 1.7px;
  background: currentColor;
  border-radius: 999px;
}
.nav-icon-calendar .nav-icon-core::before {
  left: 10px;
  top: 5px;
  width: 2px;
  height: 5px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 8px 0 0 currentColor;
}
.nav-icon-calendar .nav-icon-core::after {
  left: 10px;
  top: 15px;
  width: 2.5px;
  height: 2.5px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor;
}
.nav-icon-invoices::before {
  left: 9px;
  top: 6px;
  width: 13px;
  height: 17px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
  background: linear-gradient(135deg, transparent 0 54%, currentColor 54% 58%, transparent 58%) top right / 6px 6px no-repeat;
}
.nav-icon-invoices::after {
  left: 12px;
  top: 11px;
  width: 7px;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
}
.nav-icon-offers::before {
  left: 8px;
  top: 6px;
  width: 14px;
  height: 18px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
  transform: rotate(-2deg);
}
.nav-icon-offers::after {
  right: 7px;
  top: 8px;
  width: 8px;
  height: 8px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  background: rgba(16,35,31,.8);
}
.nav-icon-offers .nav-icon-core::before {
  left: 11px;
  top: 12px;
  width: 7px;
  height: 1.7px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 4px 0 currentColor;
}
.nav-icon-offers .nav-icon-core::after {
  left: 14px;
  top: 20px;
  width: 8px;
  height: 1.7px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(-28deg);
}
.nav-icon-customers::before {
  left: 7px;
  top: 8px;
  width: 16px;
  height: 14px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.nav-icon-customers::after {
  left: 10px;
  top: 11px;
  width: 5px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}
.nav-icon-customers .nav-icon-core::before {
  left: 17px;
  top: 11px;
  width: 5px;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}
.nav-icon-customers .nav-icon-core::after {
  left: 9px;
  top: 17px;
  width: 7px;
  height: 4px;
  border: 1.7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}
.nav-icon-catalog::before {
  left: 7px;
  top: 9px;
  width: 16px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.nav-icon-catalog::after {
  left: 8px;
  top: 12px;
  width: 14px;
  height: 10px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}
.nav-icon-catalog .nav-icon-core::before {
  left: 15px;
  top: 12px;
  width: 0;
  height: 10px;
  border-left: 1.7px solid currentColor;
}
.nav-icon-catalog .nav-icon-core::after {
  left: 11px;
  top: 9px;
  width: 8px;
  height: 0;
  border-top: 1.7px solid currentColor;
  opacity: .86;
}
.nav-icon-stock::before {
  left: 7px;
  top: 5px;
  width: 16px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 5px;
}
.nav-icon-stock::after {
  left: 6px;
  top: 11px;
  width: 18px;
  height: 6px;
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: repeating-linear-gradient(90deg, transparent 0 4px, currentColor 4px 4.8px, transparent 4.8px 8px);
  background-clip: padding-box;
}
.nav-icon-stock .nav-icon-core {
  left: 8px;
  top: 16px;
  width: 14px;
  height: 8px;
  border: 1.7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}
.nav-icon-stock .nav-icon-core::before {
  left: 1px;
  top: 1px;
  width: 5px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 2px;
}
.nav-icon-stock .nav-icon-core::after {
  right: 1px;
  top: -1px;
  width: 4px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 2px;
}
.nav-icon-payroll::before {
  left: 7px;
  top: 11px;
  width: 16px;
  height: 10px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.nav-icon-payroll::after {
  left: 16px;
  top: 13px;
  width: 7px;
  height: 6px;
  border: 1.7px solid currentColor;
  border-left: 0;
  border-radius: 0 3px 3px 0;
}
.nav-icon-payroll .nav-icon-core::before {
  left: 9px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}
.nav-icon-payroll .nav-icon-core::after {
  left: 12px;
  top: 14px;
  width: 2px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}
.nav-icon-accounting::before {
  left: 8px;
  top: 6px;
  width: 14px;
  height: 18px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.nav-icon-accounting::after {
  left: 11px;
  top: 9px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.nav-icon-accounting .nav-icon-core::before {
  left: 11px;
  top: 15px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor, 0 4px 0 currentColor, 4px 4px 0 currentColor, 8px 4px 0 currentColor;
}
.nav-icon-trash::before {
  left: 8px;
  top: 10px;
  width: 14px;
  height: 15px;
  border: 1.7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}
.nav-icon-trash::after {
  left: 6px;
  top: 7px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.nav-icon-trash .nav-icon-core::before {
  left: 11px;
  top: 12px;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 5px 0 0 currentColor;
  opacity: .82;
}
.nav-icon-trash .nav-icon-core::after {
  left: 12px;
  top: 4px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.nav-icon-users::before {
  left: 8px;
  top: 10px;
  width: 6px;
  height: 6px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  opacity: .72;
}
.nav-icon-users::after {
  left: 15px;
  top: 8px;
  width: 7px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}
.nav-icon-users .nav-icon-core::before {
  left: 7px;
  top: 16px;
  width: 9px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  opacity: .72;
}
.nav-icon-users .nav-icon-core::after {
  left: 13px;
  top: 15px;
  width: 10px;
  height: 6px;
  border: 1.7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 7px 7px;
}
.nav-icon-admin::before {
  left: 10px;
  top: 6px;
  width: 10px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}
.nav-icon-admin::after {
  left: 8px;
  top: 12px;
  width: 14px;
  height: 10px;
  border: 1.7px solid currentColor;
  border-radius: 4px;
}
.nav-icon-admin .nav-icon-core::before {
  left: 13px;
  top: 15px;
  width: 4px;
  height: 4px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}
.nav-icon-admin .nav-icon-core::after {
  left: 15px;
  top: 18px;
  width: 0;
  height: 4px;
  border-left: 1.7px solid currentColor;
}
.nav-icon-settings::before {
  left: 8px;
  top: 10px;
  width: 14px;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}
.nav-icon-settings::after {
  left: 9px;
  top: 7px;
  width: 5px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  background: rgba(16,35,31,.92);
}
.nav-icon-settings .nav-icon-core::before {
  left: 17px;
  top: 13px;
  width: 5px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  background: rgba(16,35,31,.92);
}
.nav-icon-settings .nav-icon-core::after {
  left: 12px;
  top: 19px;
  width: 5px;
  height: 5px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  background: rgba(16,35,31,.92);
}
.nav-label {
  white-space: nowrap;
}
.sidebar-toggle {
  width: 34px;
  height: 34px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 16px;
  flex: 0 0 auto;
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}
.sidebar-arrow::before {
  content: "‹";
  display: block;
  font-size: 28px;
  line-height: 1;
  transform: translateX(-1px);
}
body.sidebar-collapsed .sidebar-arrow::before {
  content: "›";
  transform: translateX(1px);
}
body.sidebar-collapsed .sidebar {
  padding-inline: 10px;
  overflow: hidden;
}
body.sidebar-collapsed .sidebar-topline {
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
}
body.sidebar-collapsed .brand strong,
body.sidebar-collapsed .brand span {
  display: none;
}
body.sidebar-collapsed .brand {
  justify-content: center;
  margin: 0;
}
body.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  right: -3px;
  top: 50%;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(9px, -50%) scale(.92);
}
body.sidebar-collapsed .sidebar-topline:hover .sidebar-toggle,
body.sidebar-collapsed .sidebar-toggle:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%) scale(.92);
}
body.sidebar-collapsed nav,
body.sidebar-collapsed #tabs,
body.sidebar-collapsed .nav-group {
  gap: clamp(2px, .75vh, 7px);
}
body.sidebar-collapsed #tabs {
  padding-top: clamp(20px, 4.8vh, 42px);
  padding-right: 0;
  overflow: hidden;
}
body.sidebar-collapsed #tabs button {
  width: 100%;
  min-width: 0;
  height: clamp(44px, 5.55vh, 58px);
  min-height: clamp(44px, 5.55vh, 58px);
  justify-content: center;
  padding: clamp(2px, .55vh, 5px);
  border-radius: clamp(14px, 1.8vh, 19px);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
body.sidebar-collapsed #tabs button:hover,
body.sidebar-collapsed #tabs button.active {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
}
.sidebar-arrow::before {
  content: "" !important;
  display: none !important;
}
.sidebar-arrow {
  width: 0;
  height: 0;
  display: block;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 10px solid currentColor;
  transform: translateX(-1px);
}
body.sidebar-collapsed .sidebar-arrow {
  border-right: 0;
  border-left: 10px solid currentColor;
  transform: translateX(1px);
}
body.sidebar-collapsed #tabs .nav-label {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translate(10px, -50%);
  opacity: 0;
  pointer-events: none;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(16,35,31,.98);
  box-shadow: 0 18px 34px rgba(18,35,31,.28);
  color: #fff;
  z-index: 4;
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}
body.sidebar-collapsed #tabs .nav-submenu {
  display: none !important;
}
body.sidebar-collapsed #tabs .nav-sublabel {
  position: absolute;
  left: 62px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  padding: 5px 7px;
  border-radius: 0 10px 10px 0;
  background: #10231f;
  box-shadow: 0 12px 30px rgba(18,35,31,.22);
  color: #fff;
  z-index: 4;
}
body.sidebar-collapsed #tabs .nav-subbutton:hover .nav-sublabel {
  opacity: 1;
}
body.sidebar-collapsed #tabs .nav-main-button {
  justify-content: center;
}
body.sidebar-collapsed #tabs .nav-main-copy {
  width: 100%;
  justify-content: center;
  gap: 0;
}
body.sidebar-collapsed #tabs .nav-icon {
  --nav-icon-scale: clamp(1.08, 1.7vh, 1.22);
  width: clamp(31px, 3.75vh, 38px);
  height: clamp(31px, 3.75vh, 38px);
  flex-basis: clamp(31px, 3.75vh, 38px);
  border-radius: clamp(11px, 1.35vh, 14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 12px rgba(4,10,9,.18);
}
body.sidebar-collapsed #tabs .nav-expand-indicator {
  display: none;
}
body.sidebar-collapsed #tabs .nav-main-button:hover .nav-label {
  opacity: 0;
  transform: translate(10px, -50%);
}
body.sidebar-collapsed .sidebar-version {
  display: none;
}
body.sidebar-collapsed .sidebar-footer {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.16);
}

@media (min-height: 920px) and (min-width: 901px) {
  #tabs {
    gap: 10px;
  }
  .nav-group {
    gap: 5px;
    margin-bottom: 10px;
  }
  #tabs button {
    min-height: 40px;
  }
  body.sidebar-collapsed nav,
  body.sidebar-collapsed #tabs,
  body.sidebar-collapsed .nav-group {
    gap: 7px;
  }
  body.sidebar-collapsed #tabs button {
    height: 58px;
    min-height: 58px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  #tabs {
    gap: 4px;
    padding-top: 34px;
  }
  .nav-group {
    gap: 2px;
    margin-bottom: 4px;
  }
  .nav-group-settings {
    margin-bottom: 36px;
  }
  nav button {
    padding-block: 3px;
  }
  #tabs button {
    min-height: 31px;
  }
  .nav-subbutton {
    min-height: 20px;
    padding-block: 2px;
  }
  body.sidebar-collapsed nav,
  body.sidebar-collapsed #tabs,
  body.sidebar-collapsed .nav-group {
    gap: 2px;
  }
  body.sidebar-collapsed #tabs {
    padding-top: 20px;
  }
  body.sidebar-collapsed #tabs button {
    height: 43px;
    min-height: 43px;
  }
  body.sidebar-collapsed #tabs .nav-icon {
    --nav-icon-scale: 1.04;
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }
}

@media (max-height: 650px) and (min-width: 901px) {
  #tabs,
  body.sidebar-collapsed #tabs {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.34) transparent;
  }

  #tabs::-webkit-scrollbar,
  body.sidebar-collapsed #tabs::-webkit-scrollbar {
    width: 5px;
  }

  #tabs::-webkit-scrollbar-thumb,
  body.sidebar-collapsed #tabs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.34);
    border-radius: 999px;
  }
}
body.sidebar-collapsed .brand-support-icons,
body.sidebar-collapsed .kw-brand span {
  display: none;
}
body.sidebar-collapsed .kw-brand {
  gap: 0;
}
body.sidebar-collapsed .kw-brand .kw-logo {
  width: 20px;
  max-height: 11px;
}
#tabs button.settings-tab {
  margin-top: 0;
}
.sidebar-version {
  color: rgba(255,255,255,.62);
  font-size: 11px;
  letter-spacing: .08em;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 0;
  border-top: 1px solid rgba(255,255,255,.16);
  display: grid;
  justify-items: center;
  gap: 14px;
}
.kw-brand {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.kw-brand-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sidebar-hover-flyout {
  --flyout-left: 0px;
  --flyout-top: 0px;
  position: fixed;
  left: var(--flyout-left);
  top: var(--flyout-top);
  z-index: 120;
  width: max-content;
  max-width: min(320px, calc(100vw - 120px));
  pointer-events: none;
}
.sidebar-hover-flyout.open {
  pointer-events: auto;
}
.sidebar-hover-card {
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.1), transparent 40%),
    linear-gradient(145deg, rgba(16,35,31,.98), rgba(13,29,26,.98));
  box-shadow: 0 22px 44px rgba(6, 14, 12, .34);
}
.sidebar-hover-title,
.sidebar-hover-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.sidebar-hover-title {
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-hover-submenu {
  display: grid;
  gap: 6px;
}
.sidebar-hover-item {
  color: #dbe5e2;
  font-weight: 500;
}
.sidebar-hover-title:hover,
.sidebar-hover-item:hover,
.sidebar-hover-item.active {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.kw-brand .kw-logo {
  width: 46px;
  max-height: 23px;
  object-fit: contain;
  filter: invert(1) brightness(2) drop-shadow(0 8px 18px rgba(0,0,0,.22));
}
.support-links {
  display: flex;
  gap: 8px;
}
.support-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,.08);
}
.mobile-app-footer { display: none !important; }
.mobile-quick-add,
.mobile-voice-button { display: none; }
.app-brand-badge { display: none; }
.mobile-menu-button,
.mobile-menu-panel { display: none; }
.desktop-logo-badge {
  align-self: start;
  justify-self: center;
  min-width: 228px;
  min-height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid rgba(220,228,225,.92);
  border-radius: 20px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 14px 30px rgba(18,35,31,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  transition: min-width .22s ease, min-height .22s ease, padding .22s ease, font-size .22s ease, border-radius .22s ease, box-shadow .22s ease;
}
.desktop-logo-badge img {
  max-width: 142px;
  max-height: 52px;
  object-fit: contain;
  transition: max-width .22s ease, max-height .22s ease;
}
.desktop-logo-badge .mark {
  width: 41px;
  height: 41px;
  border-radius: 12px;
  transition: width .22s ease, height .22s ease, border-radius .22s ease;
}
.desktop-logo-badge .mark::before { width: 22px; height: 8px; }
.desktop-logo-badge .mark::after { width: 8px; height: 22px; }
.desktop-wordmark {
  display: grid;
  gap: 1px;
  line-height: 1.05;
  text-align: left;
}
.mini-swiss-flag {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  border-radius: 3px;
  background: #ef3340;
  position: relative;
  vertical-align: -2px;
}
.mini-swiss-flag::before,
.mini-swiss-flag::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 1px;
}
.mini-swiss-flag::before { width: 9px; height: 3px; }
.mini-swiss-flag::after { width: 3px; height: 9px; }
.mobile-bottom-nav { display: none; }
.mobile-only { display: none; }

main {
  margin-left: var(--sidebar-track);
  padding: 0 28px 28px;
  min-width: 0;
  position: relative;
  z-index: 1;
  transition: margin-left .22s ease;
}
.app-footer-shell {
  position: static;
  width: min(940px, 100%);
  margin: 34px auto 0;
}
.topbar {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: clamp(136px, 18vw, 182px);
  margin: 0 0 14px;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  z-index: 0;
}
.topbar::before {
  content: "";
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-track) + 28px);
  right: 28px;
  height: clamp(148px, 19vw, 216px);
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, rgba(var(--active-nav-rgb), .05), rgba(var(--active-nav-rgb), .025)),
    radial-gradient(circle at 82% 30%, rgba(var(--active-nav-rgb), .11), transparent 24%),
    linear-gradient(116deg, transparent 0 52%, rgba(var(--active-nav-rgb), .10) 52% 52.18%, transparent 52.18% 100%),
    linear-gradient(180deg, rgba(12,26,23,.34), rgba(12,26,23,.12)),
    linear-gradient(125deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 38%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 520'%3E%3Crect width='1600' height='520' fill='%23d8e4df'/%3E%3Cg stroke='%2393a7a0' stroke-width='2' fill='none' opacity='.72'%3E%3Cpath d='M82 390h1436'/%3E%3Cpath d='M120 330h420l94-120h308l70 84h410'/%3E%3Crect x='188' y='118' width='230' height='126' rx='18'/%3E%3Crect x='468' y='146' width='182' height='92' rx='16'/%3E%3Ccircle cx='1190' cy='188' r='78'/%3E%3Cpath d='M1040 308h290v120h-290z'/%3E%3Cpath d='M114 94l110-40 140 32 108-46 154 34 132-46 160 34 176-48 170 42 172-50 188 56'/%3E%3C/g%3E%3Cg stroke='%23ffffff' stroke-width='1' opacity='.56'%3E%3Cpath d='M0 52h1600M0 104h1600M0 156h1600M0 208h1600M0 260h1600M0 312h1600M0 364h1600M0 416h1600M0 468h1600'/%3E%3Cpath d='M80 0v520M200 0v520M320 0v520M440 0v520M560 0v520M680 0v520M800 0v520M920 0v520M1040 0v520M1160 0v520M1280 0v520M1400 0v520M1520 0v520'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, cover, cover, cover, cover, cover;
  background-position: center top, center top, center top, center top, center top, center top;
  box-shadow: 0 18px 44px rgba(18,35,31,.12);
  pointer-events: none;
  z-index: -2;
}
.topbar::after {
  content: "";
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-track) + 28px);
  right: 28px;
  height: clamp(148px, 19vw, 216px);
  border-radius: 0 0 28px 28px;
  background:
    repeating-linear-gradient(90deg, rgba(var(--active-nav-rgb), .12) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(var(--active-nav-rgb), .08) 0 1px, transparent 1px 52px),
    linear-gradient(24deg, transparent 0 58%, rgba(var(--active-nav-rgb), .11) 58% 58.16%, transparent 58.16% 100%);
  opacity: .55;
  mix-blend-mode: multiply;
  box-shadow: inset 0 -1px 0 rgba(var(--active-nav-rgb), .10);
  pointer-events: none;
  z-index: -1;
}
body[data-active-tab="dashboard"] .topbar {
  min-height: clamp(82px, 11vw, 110px);
  margin-bottom: 8px;
}
body[data-active-tab="dashboard"] .topbar::before,
body[data-active-tab="dashboard"] .topbar::after {
  height: clamp(90px, 11.5vw, 130px);
  border-radius: 0 0 22px 22px;
}
.topbar > * {
  position: relative;
  z-index: 2;
}
.topbar-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 760px;
  padding-top: 68px;
  padding-right: clamp(250px, 34vw, 460px);
  z-index: 1;
}
body:not([data-active-tab="dashboard"]) .topbar-copy {
  width: fit-content;
  max-width: min(560px, calc(100% - 32px));
  margin-top: 58px;
  padding: 12px 18px 14px;
  border: 1px solid rgba(var(--active-nav-rgb, 23,108,95), .18);
  border-left: 5px solid rgba(var(--active-nav-rgb, 23,108,95), .48);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(var(--active-nav-rgb, 23,108,95), .11)),
    rgba(255,255,255,.44);
  box-shadow: 0 18px 45px rgba(18,35,31,.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topbar-status {
  position: absolute;
  top: 58px;
  right: clamp(18px, 2.4vw, 36px);
  display: flex;
  justify-content: flex-end;
  width: min(420px, calc(100% - 24px));
  pointer-events: auto;
  z-index: 260;
}
.topbar-sticky-shell {
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-track) + 18px);
  right: 18px;
  z-index: 250;
  min-height: 86px;
  pointer-events: none;
}
.topbar-sticky-shell::before {
  display: none;
}
h1, h2, h3 { margin: 0; }
p { margin: 6px 0 0; color: var(--muted); }
.topbar h1 {
  color: #fff;
  font-size: clamp(29px, 3.2vw, 40px);
  line-height: 1.04;
  text-shadow: 0 16px 28px rgba(18,35,31,.24);
}
body:not([data-active-tab="dashboard"]) .topbar h1 {
  color: #112c27;
  font-size: clamp(31px, 3.1vw, 44px);
  letter-spacing: -.045em;
  text-shadow: none;
}
.topbar-copy > p {
  margin: 0;
  color: rgba(255,255,255,.82);
  text-shadow: 0 10px 24px rgba(18,35,31,.18);
}
body:not([data-active-tab="dashboard"]) .topbar-copy > p {
  color: rgba(17,44,39,.72);
  font-weight: 760;
  text-shadow: none;
}
.topbar-status .badge {
  border: 1px solid rgba(220,228,225,.92);
  background: rgba(255,255,255,.72);
  color: #23403a;
  box-shadow: 0 12px 26px rgba(18,35,31,.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.actions { display: flex; gap: 10px; align-items: center; }
.topbar .actions {
  position: absolute;
  top: 10px;
  right: clamp(18px, 2.4vw, 36px);
  justify-content: flex-end;
  flex-wrap: nowrap;
  pointer-events: auto;
  z-index: 265;
}
.top-add {
  position: relative;
}
.add-badge,
.voice-button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
}
.voice-button {
  background: rgba(255,255,255,.68);
  color: var(--accent);
  position: relative;
  overflow: visible;
  border-color: rgba(220,228,225,.92);
  box-shadow: 0 12px 26px rgba(18,35,31,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar .add-badge,
.topbar #logoutBtn,
.topbar #mobileSettingsBtn {
  background: rgba(255,255,255,.68);
  border-color: rgba(220,228,225,.92);
  box-shadow: 0 12px 26px rgba(18,35,31,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar .add-badge {
  color: #1d4ed8;
}
.toolbar-save-button {
  flex: 0 0 auto;
}
.mic-glyph {
  position: relative;
  width: 15px;
  height: 22px;
  display: inline-block;
}
.mic-glyph::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 7px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 10px;
}
.mic-glyph::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 11px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 5px 8px 0 -3px currentColor;
}
.voice-button.voice-listening .mic-glyph,
.mobile-voice-button.voice-listening .mic-glyph {
  animation: micPulse .82s ease-in-out infinite;
}
.voice-button.voice-listening::before,
.mobile-voice-button.voice-listening::before,
.voice-button.voice-listening::after,
.mobile-voice-button.voice-listening::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid currentColor;
  opacity: .42;
  animation: voiceRing 1.15s ease-out infinite;
  pointer-events: none;
}
.voice-button.voice-listening::after,
.mobile-voice-button.voice-listening::after {
  inset: -14px;
  animation-delay: .28s;
}
@keyframes voiceRing {
  from { transform: scale(.86); opacity: .45; }
  to { transform: scale(1.45); opacity: 0; }
}
@keyframes micPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.08); opacity: 1; }
}
body.voice-assistant-open {
  overflow: hidden;
}
.voice-assistant-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
}
.voice-assistant-overlay.open {
  display: block;
}
.voice-assistant-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 14, 20, .22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.voice-assistant-dialog {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(217, 225, 230, .92);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, .16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,250,252,.96));
  box-shadow: 0 32px 80px rgba(15, 23, 42, .18);
}
.voice-assistant-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  font-size: 24px;
  line-height: 1;
  color: #20303c;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(208,216,222,.92);
  box-shadow: 0 14px 28px rgba(15,23,42,.1);
}
.voice-assistant-head {
  display: grid;
  gap: 10px;
  padding-right: 52px;
}
.voice-assistant-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(29,78,216,.08);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.voice-assistant-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: #12231f;
}
.voice-assistant-head p {
  margin: 0;
  font-size: 16px;
  color: #4c6460;
}
.voice-assistant-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.voice-step {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(214,221,226,.96);
  background: rgba(255,255,255,.74);
  color: #71828d;
}
.voice-step span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #64748b;
  background: rgba(148,163,184,.14);
}
.voice-step small {
  font-size: 12px;
  line-height: 1.35;
}
.voice-step.active {
  border-color: rgba(29,78,216,.26);
  color: #17386d;
  background: rgba(219,234,254,.56);
}
.voice-step.active span {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.voice-step.done {
  border-color: rgba(5,150,105,.2);
  color: #065f46;
  background: rgba(236,253,245,.76);
}
.voice-step.done span {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
}
.voice-assistant-stage {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(214,221,226,.96);
  background: linear-gradient(145deg, rgba(248,250,252,.94), rgba(255,255,255,.98));
}
.voice-assistant-orb {
  position: relative;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c86b14;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.96), rgba(255,247,237,.92) 62%, rgba(254,215,170,.7));
  border: 1px solid rgba(251,191,36,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 18px 36px rgba(245, 158, 11, .15);
}
.voice-assistant-orb .mic-glyph {
  width: 24px;
  height: 34px;
}
.voice-assistant-orb .mic-glyph::before {
  left: 7px;
  width: 10px;
  height: 19px;
}
.voice-assistant-orb .mic-glyph::after {
  left: 4px;
  top: 13px;
  width: 16px;
  height: 13px;
  box-shadow: 7px 10px 0 -4px currentColor;
}
.voice-assistant-stage.is-listening .voice-assistant-orb::before,
.voice-assistant-stage.is-listening .voice-assistant-orb::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(251,146,60,.4);
  animation: assistantWave 1.25s ease-out infinite;
}
.voice-assistant-stage.is-listening .voice-assistant-orb::after {
  inset: -22px;
  animation-delay: .25s;
}
.voice-assistant-stage.is-listening .voice-assistant-orb {
  animation: assistantPulse .9s ease-in-out infinite;
}
.voice-assistant-stage-copy {
  display: grid;
  gap: 10px;
}
.voice-assistant-mode {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.05);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.voice-assistant-stage-copy strong {
  font-size: clamp(18px, 2.3vw, 24px);
  color: #12231f;
}
.voice-assistant-transcript {
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(191,199,206,.96);
  background: rgba(255,255,255,.76);
  color: #3f5652;
  font-size: 15px;
  line-height: 1.55;
}
.voice-assistant-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 18px;
  margin-top: 20px;
}
.voice-assistant-manual,
.voice-assistant-summary {
  border-radius: 22px;
  border: 1px solid rgba(214,221,226,.96);
  background: rgba(255,255,255,.88);
  padding: 18px;
}
.voice-assistant-manual {
  display: grid;
  gap: 16px;
}
.voice-assistant-manual label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.voice-assistant-manual input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(191,199,206,.96);
  background: #fff;
  font-size: 15px;
}
.voice-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.voice-assistant-summary {
  display: grid;
  gap: 16px;
  align-content: start;
}
.voice-assistant-summary > span {
  color: #526a66;
  font-size: 14px;
  line-height: 1.5;
}
.voice-summary-grid {
  display: grid;
  gap: 10px;
}
.voice-summary-grid em {
  color: #71828d;
  font-style: normal;
}
.voice-summary-chip {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248,250,252,.94);
  border: 1px solid rgba(226,232,240,.95);
}
.voice-summary-chip span {
  color: #71828d;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.voice-summary-chip b {
  color: #12231f;
  font-size: 15px;
}
@keyframes assistantWave {
  from { transform: scale(.88); opacity: .46; }
  to { transform: scale(1.26); opacity: 0; }
}
@keyframes assistantPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.top-add-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18,35,31,.15);
}
.top-add-menu.open {
  display: grid;
  gap: 6px;
}
.top-add-menu button {
  justify-content: flex-start;
  background: var(--soft);
  color: var(--ink);
}
.editable-field .edit-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: stretch;
}
.editable-field input:disabled,
.editable-field select:disabled,
.editable-field textarea:disabled {
  opacity: .78;
  background: #f4f7f5;
  color: var(--muted);
}
.editable-field .save-icon {
  background: rgba(16,185,129,.14);
  color: #047857;
  border-color: rgba(16,185,129,.28);
}
.stock-edit-cell {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 34px;
  gap: 6px;
  align-items: center;
}
.stock-edit-cell input:disabled {
  opacity: .76;
  background: #f4f7f5;
  color: var(--muted);
}
.settings-extra {
  margin-top: 16px;
}
.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}
.invoice-layout-settings-panel {
  display: grid;
  gap: 16px;
}
.invoice-layout-settings-grid {
  align-items: stretch;
}
.invoice-layout-card {
  display: grid;
  gap: 12px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 0%, rgba(23,108,95,.08), transparent 34%),
    rgba(255,255,255,.96);
}
.invoice-layout-card h3 {
  color: #10231f;
}
.invoice-visual-builder {
  display: grid;
  gap: 14px;
}
.invoice-preset-deck {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.invoice-preset-card {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 118px;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  color: #17342e;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.invoice-preset-card.active {
  border-color: color-mix(in srgb, var(--accent) 78%, #d9eeea);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(234,255,249,.96));
  box-shadow: 0 20px 42px rgba(18,35,31,.16);
  transform: translateY(-2px);
}
.invoice-preset-card.active b {
  color: #0f4f45;
}
.preset-active-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, #ffffff);
  color: color-mix(in srgb, var(--accent) 84%, #0f172a);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.invoice-preset-card.active .preset-swatch {
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.82), 0 10px 22px rgba(18,35,31,.12);
}
.invoice-preset-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.preset-swatch {
  height: 30px;
  border-radius: 12px;
  background: linear-gradient(135deg, #111, #fff);
}
.preset-classic { background: linear-gradient(135deg, #111 0 32%, #fff 32%); border: 1px solid rgba(0,0,0,.16); }
.preset-modern { background: linear-gradient(135deg, #176c5f, #eafff8); }
.preset-compact { background: repeating-linear-gradient(135deg, #2b6cb0 0 8px, #eaf3ff 8px 16px); }
.preset-minimal { background: linear-gradient(135deg, #f8fafc, #d1d5db); }
.preset-editorial { background: linear-gradient(135deg, #d97706 0 45%, #fff7ed 45%); }
.preset-block { background: linear-gradient(135deg, #0f172a 0 55%, #94a3b8 55%); }
.preset-logoHero { background: radial-gradient(circle at 50% 28%, #0f766e 0 20%, #e6fffa 21%); }
.preset-sideLogo { background: linear-gradient(90deg, #2563eb 0 24%, #eff6ff 24%); }
.preset-stamp { background: radial-gradient(circle at 80% 34%, #be123c 0 22%, #fff1f2 23%); }
.preset-corporate { background: linear-gradient(135deg, #1e3a8a 0 58%, #dbeafe 58%); }
.preset-premium { background: linear-gradient(135deg, #92400e 0 28%, #fffbeb 28% 72%, #f59e0b 72%); }
.preset-service { background: linear-gradient(135deg, #0891b2 0 34%, #ecfeff 34%); }
.invoice-builder-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 14px;
  align-items: start;
}
.invoice-builder-canvas-wrap,
.invoice-builder-inspector {
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(23,108,95,.08), transparent 32%),
    rgba(255,255,255,.92);
  box-shadow: 0 22px 52px rgba(18,35,31,.08);
}
.invoice-builder-canvas-wrap {
  padding: 16px;
  overflow: auto;
}
.invoice-builder-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #14352f;
  font-weight: 900;
}
.invoice-builder-toolbar small {
  color: var(--muted);
  font-weight: 700;
}
.invoice-builder-canvas {
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
  min-height: 880px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(16,35,31,.12);
  border-top: 10px solid var(--invoice-accent, #176c5f);
  border-radius: 18px;
  background: #fff;
  color: #111;
}
.invoice-builder-module {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px dashed rgba(16,35,31,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  color: var(--module-text-color, #111);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.invoice-builder-module:hover,
.invoice-builder-module.selected {
  border-color: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 70%, transparent);
  box-shadow: 0 14px 30px rgba(18,35,31,.10);
}
.invoice-builder-module.selected {
  transform: translateY(-1px);
}
.invoice-builder-module.hidden-module {
  opacity: .45;
  filter: grayscale(.25);
}
.invoice-builder-module b,
.invoice-builder-module strong,
.invoice-builder-module small,
.invoice-builder-module .builder-text-demo,
.invoice-builder-module .builder-header-demo,
.invoice-builder-module .builder-address-demo,
.invoice-builder-module .builder-payment-demo,
.invoice-builder-module .builder-total-demo {
  color: var(--module-text-color, currentColor);
}
.module-kebab {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  font-size: 20px;
  line-height: 1;
}
.module-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 70%, #10231f);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.module-label span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(239,68,68,.10);
  color: #b91c1c;
  letter-spacing: 0;
  text-transform: none;
}
.module-tone-soft { background: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 9%, #fff); }
.module-tone-filled { background: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 18%, #fff); border-style: solid; }
.module-tone-line { border-style: solid; border-width: 0 0 0 5px; border-left-color: var(--module-color, var(--invoice-accent)); }
.module-tone-dark { background: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 82%, #0f172a); color: var(--module-text-color, #fff); }
.module-tone-dark .module-label,
.module-tone-dark small,
.module-tone-dark .builder-text-demo {
  color: var(--module-text-color, rgba(255,255,255,.86));
}
.module-size-small { padding: 9px; font-size: 12px; }
.module-size-large { padding: 18px; font-size: 16px; }
.module-align-center { text-align: center; justify-items: center; }
.module-align-right { text-align: right; justify-items: end; }
.module-align-split .builder-header-demo,
.module-align-split .builder-address-demo {
  grid-template-columns: minmax(0, 1fr) minmax(150px, .6fr);
}
.builder-header-demo,
.builder-address-demo {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(150px, .6fr);
  gap: 12px;
  align-items: center;
}
.builder-logo-demo {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--module-color, var(--invoice-accent)) 18%, #fff);
  font-weight: 950;
}
.invoice-logo-size-small .builder-logo-demo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.invoice-logo-size-large .builder-logo-demo {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  font-size: 18px;
}
.builder-header-demo small,
.builder-address-demo span,
.builder-text-demo,
.builder-payment-demo span {
  color: #667a72;
}
.builder-lines-demo {
  display: grid;
  gap: 7px;
}
.builder-lines-demo i {
  height: 18px;
  border-radius: 8px;
  background: rgba(16,35,31,.08);
}
.builder-total-demo {
  justify-self: end;
  display: grid;
  grid-template-columns: auto auto;
  gap: 7px 16px;
  min-width: 230px;
}
.builder-total-demo b {
  text-align: right;
}
.builder-payment-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.builder-payment-demo span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(16,35,31,.06);
}
.builder-footer-demo {
  display: grid;
  gap: 8px;
}
.builder-footer-demo small {
  display: block;
  padding-top: 8px;
  border-top: 1px solid rgba(16,35,31,.14);
  color: #667a72;
  font-size: 11px;
}
.builder-slip-demo {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  gap: 12px;
  align-items: center;
}
.builder-slip-demo span,
.builder-slip-demo b {
  min-height: 56px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(16,35,31,.18);
  border-radius: 14px;
}
.invoice-builder-inspector {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 11px;
  padding: 14px;
}
.inspector-head {
  display: grid;
  gap: 3px;
}
.inspector-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.inspector-head b {
  color: #10231f;
  font-size: 20px;
}
.invoice-builder-inspector label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.invoice-block-inspector {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(16,35,31,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.64);
}
.invoice-block-inspector > b {
  color: #10231f;
}
.invoice-block-control {
  display: grid;
  gap: 7px;
  padding: 9px;
  border-radius: 13px;
  background: rgba(232,242,239,.66);
}
.invoice-block-control > span {
  color: #10231f;
  font-size: 12px;
  font-weight: 950;
}
.inspector-toggle {
  display: flex !important;
}
.inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 1220px) {
  .invoice-preset-deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .invoice-builder-workbench {
    grid-template-columns: 1fr;
  }
  .invoice-builder-inspector {
    position: static;
  }
}
@media (max-width: 900px) {
  .invoice-preset-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .invoice-builder-canvas {
    width: 680px;
    min-height: 760px;
    margin: 0;
  }
  .invoice-layout-toggle-grid {
    grid-template-columns: 1fr;
  }
}
.invoice-layout-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.invoice-layout-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 13px;
  background: rgba(241,248,245,.68);
  color: #24423b;
  font-weight: 760;
}
.invoice-layout-toggle input {
  width: 17px;
  height: 17px;
}
.invoice-layout-text-card textarea {
  min-height: 94px;
  resize: vertical;
}
.invoice-layout-mini-preview {
  display: grid;
  gap: 10px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(16,35,31,.12);
  border-top: 7px solid var(--invoice-accent, #176c5f);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72);
}
.mini-preview-head,
.mini-preview-addresses {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, .45fr);
  gap: 10px;
}
.mini-preview-head span,
.mini-preview-addresses span,
.mini-preview-lines i,
.mini-preview-total,
.mini-preview-slip {
  display: block;
  border-radius: 9px;
  background: rgba(16,35,31,.08);
}
.mini-preview-head span {
  height: 34px;
  width: 58%;
  background: color-mix(in srgb, var(--invoice-accent, #176c5f) 24%, rgba(16,35,31,.08));
}
.mini-preview-head b {
  justify-self: end;
  color: #10231f;
}
.mini-preview-addresses span {
  height: 58px;
}
.mini-preview-lines {
  display: grid;
  gap: 7px;
}
.mini-preview-lines i {
  height: 18px;
}
.mini-preview-total {
  justify-self: end;
  width: 42%;
  height: 44px;
  background: color-mix(in srgb, var(--invoice-accent, #176c5f) 18%, rgba(16,35,31,.08));
}
.mini-preview-slip {
  height: 46px;
  border: 1px dashed color-mix(in srgb, var(--invoice-accent, #176c5f) 48%, transparent);
  background: rgba(255,255,255,.92);
}
@media (max-width: 900px) {
  .invoice-layout-toggle-grid {
    grid-template-columns: 1fr;
  }
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}
.chip button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 50%;
  background: rgba(23,108,95,.12);
  color: var(--accent);
}
.offer-image-preview {
  max-width: min(360px, 100%);
  max-height: 180px;
  object-fit: contain;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.invoice-vat-mode-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.invoice-customer-field {
  min-width: 0;
}
.invoice-customer-combobox {
  display: grid;
}
.invoice-customer-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.invoice-customer-combobox input[list] {
  width: 100%;
}
.invoice-customer-add {
  white-space: nowrap;
  padding-inline: 12px;
  border-color: rgba(23,108,95,.22);
  background: rgba(232,246,242,.82);
  color: var(--accent);
  font-size: 12px;
}
.invoice-issuer-preview {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(232,246,242,.82), rgba(255,255,255,.94));
  color: var(--ink);
  font-size: 13px;
}
.invoice-issuer-preview b {
  font-size: 14px;
}
.invoice-issuer-preview span,
.invoice-issuer-preview small {
  color: var(--muted);
}
.invoice-lock-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(34,197,94,.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(255,255,255,.98));
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}
.invoice-draft-summary {
  margin-top: 12px;
}
.invoice-draft-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.invoice-summary-card {
  position: relative;
  overflow: hidden;
}
.invoice-summary-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -24px auto;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  pointer-events: none;
}
.invoice-summary-card-total {
  background: linear-gradient(135deg, rgba(59,130,246,.16), rgba(255,255,255,.98));
  border-color: rgba(59,130,246,.26);
}
.invoice-summary-card-paid {
  background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(255,255,255,.98));
  border-color: rgba(34,197,94,.28);
}
.invoice-summary-card-open {
  background: linear-gradient(135deg, rgba(239,68,68,.16), rgba(255,255,255,.98));
  border-color: rgba(239,68,68,.26);
}
.invoice-payment-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}
.invoice-payment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
}
.invoice-payment-summary span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}
.invoice-payment-summary b {
  color: var(--ink);
}
.invoice-payment-chip-paid {
  background: rgba(34,197,94,.12) !important;
  color: #166534 !important;
  border: 1px solid rgba(34,197,94,.2);
}
.invoice-payment-chip-open {
  background: rgba(239,68,68,.10) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(239,68,68,.18);
}
.invoice-payments-list {
  display: grid;
  gap: 10px;
}
.invoice-payment-row {
  display: grid;
  grid-template-columns: 140px 140px minmax(150px, 1fr) minmax(170px, 1.1fr) 36px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.invoice-payments-empty {
  margin: 0;
}
.invoice-status-timeline {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248,251,250,.9), rgba(255,255,255,.98));
}
.invoice-status-timeline-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.invoice-status-step {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 12px 12px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.invoice-status-step.is-current {
  border-color: rgba(23,108,95,.3);
  box-shadow: 0 10px 24px rgba(18,35,31,.08);
}
.invoice-status-step-dot {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(23,108,95,.12);
}
.invoice-status-step b {
  font-size: 13px;
  line-height: 1.3;
}
.invoice-status-step small {
  color: var(--muted);
  font-size: 12px;
}
.invoice-payment-history {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
}
.invoice-payment-history ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.customer-notes-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.84);
}
.customer-notes-list {
  display: grid;
  gap: 10px;
}
.customer-note-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.customer-note-row textarea {
  min-height: 86px;
  resize: vertical;
}
.customer-notes-summary {
  display: inline-grid;
  gap: 2px;
}
.customer-notes-summary small,
.invoice-balance-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.invoice-detail-table {
  min-width: 1380px;
  table-layout: fixed;
}

/* V2.220: one-time release notes popup shown after a successful update. */
.release-notes-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: transparent;
  color: #10231f;
  box-shadow: 0 30px 90px rgba(5, 35, 29, .34);
}

.release-notes-dialog::backdrop {
  background: rgba(4, 20, 17, .64);
  backdrop-filter: blur(8px);
}

.release-notes-dialog-card {
  width: 100%;
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .20), transparent 34%),
    linear-gradient(145deg, #ffffff, #effaf6);
}

.release-notes-hero {
  display: grid;
  gap: 9px;
  padding: 30px 32px 24px;
  border-bottom: 1px solid rgba(16, 88, 75, .10);
}

.release-notes-kicker {
  width: max-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .13);
  color: #087c6b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.release-notes-hero h2,
.release-note-item h3,
.release-notes-hero p,
.release-note-item p {
  margin: 0;
}

.release-notes-hero h2 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
}

.release-notes-hero p {
  color: rgba(16, 35, 31, .70);
  line-height: 1.5;
}

.release-notes-hero small {
  color: rgba(16, 35, 31, .55);
}

.release-notes-list {
  display: grid;
  gap: 10px;
  padding: 22px 32px;
}

.release-note-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 15px;
  border: 1px solid rgba(16, 88, 75, .10);
  border-radius: 17px;
  background: rgba(255, 255, 255, .74);
}

.release-note-item > span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  color: #2764c4;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.release-note-new > span {
  background: rgba(16, 185, 129, .14);
  color: #087a56;
}

.release-note-fixed > span {
  background: rgba(249, 115, 22, .13);
  color: #c05113;
}

.release-note-item div {
  display: grid;
  gap: 5px;
}

.release-note-item h3 {
  font-size: 15px;
}

.release-note-item p {
  color: rgba(16, 35, 31, .66);
  font-size: 13px;
  line-height: 1.45;
}

.release-notes-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 32px 28px;
}

.release-notes-actions button {
  min-width: 150px;
}

body.theme-dark:not(.pdf-body) .release-notes-dialog-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, .17), transparent 34%),
    linear-gradient(145deg, #0b2a24, #061915);
  color: #effff9;
}

body.theme-dark:not(.pdf-body) .release-notes-hero,
body.theme-dark:not(.pdf-body) .release-note-item {
  border-color: rgba(164, 255, 233, .13);
}

body.theme-dark:not(.pdf-body) .release-note-item {
  background: rgba(4, 24, 20, .72);
}

body.theme-dark:not(.pdf-body) .release-notes-hero p,
body.theme-dark:not(.pdf-body) .release-notes-hero small,
body.theme-dark:not(.pdf-body) .release-note-item p {
  color: rgba(229, 255, 248, .70);
}

@media (max-width: 600px) {
  .release-notes-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    border-radius: 22px;
  }

  .release-notes-hero,
  .release-notes-list {
    padding-left: 19px;
    padding-right: 19px;
  }

  .release-note-item {
    grid-template-columns: 1fr;
  }

  .release-note-item > span {
    width: max-content;
  }

  .release-notes-actions {
    padding: 0 19px 20px;
  }

  .release-notes-actions button {
    width: 100%;
  }
}
.invoice-detail-table th,
.invoice-detail-table td {
  vertical-align: top;
}
.invoice-detail-row td {
  padding-top: 14px;
  padding-bottom: 14px;
}
.invoice-detail-row b,
.invoice-detail-row small {
  display: block;
}
.invoice-detail-row b {
  color: #142823;
  font-size: 14px;
  line-height: 1.25;
}
.invoice-detail-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.invoice-number-cell .status-badge {
  margin-top: 7px;
}
.invoice-status-cell {
  width: 148px;
  min-width: 148px;
}
.invoice-status-cell .status-badge {
  width: fit-content;
}
.invoice-date-stack-cell {
  width: 190px;
  min-width: 190px;
}
.invoice-details-cell {
  width: 250px;
  min-width: 250px;
}
.invoice-details-cell small:last-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invoice-customer-cell,
.invoice-issued-cell {
  width: 176px;
  min-width: 176px;
}
.invoice-customer-cell b,
.invoice-issued-cell b,
.invoice-status-cell .status-badge,
.invoice-date-stack-cell b,
.invoice-number-cell b {
  white-space: nowrap;
}
.invoice-amount-cell {
  width: 150px;
  min-width: 150px;
}
.invoice-amount-cell b,
.invoice-amount-cell small {
  overflow-wrap: normal;
  word-break: normal;
}
.invoice-number-cell {
  width: 182px;
  min-width: 182px;
}
.invoice-amount-cell b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.invoice-action-col,
.invoice-row-actions {
  width: 168px;
  min-width: 168px;
}
.invoice-row-action-menu {
  display: inline-grid;
  justify-items: stretch;
  min-width: 144px;
  text-align: left;
}
.invoice-row-action-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(23,108,95,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.86);
  color: #12352f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}
.invoice-row-action-menu summary::-webkit-details-marker {
  display: none;
}
.invoice-row-action-menu[open] summary {
  border-color: rgba(17,199,167,.32);
  box-shadow: 0 10px 24px rgba(18,35,31,.08);
}
.invoice-row-action-dots {
  color: #11a992;
  font-size: 13px;
  line-height: 1;
}
.invoice-row-action-panel {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,249,246,.92));
  box-shadow: 0 18px 38px rgba(18,35,31,.10);
}
.invoice-row-action-panel button,
.invoice-row-action-panel select {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}
.invoice-row-action-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.invoice-row-status-select:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.offers-panel {
  overflow: hidden;
}
.offers-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.offers-filter-group {
  grid-template-columns: minmax(132px, .58fr) repeat(2, minmax(132px, .58fr)) minmax(220px, 1.08fr) auto minmax(168px, .64fr) auto;
}
.offers-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.offers-tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.offers-tab.active {
  background: var(--soft);
  border-color: rgba(23,108,95,.24);
  color: var(--accent);
}
.offers-search {
  display: grid;
  gap: 4px;
  width: 100%;
}
.offers-status-filter,
.customer-select-filter {
  display: grid;
  gap: 4px;
  width: 100%;
}
.customer-table-search {
  display: grid;
  gap: 4px;
  width: 100%;
}
.offers-date-field {
  display: grid;
  gap: 4px;
}
.offers-date-field span,
.offers-search span,
.offers-status-filter span,
.customer-table-search span,
.customer-select-filter span,
.customer-date-filter-group label,
.customer-io-filter-cell > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.offers-search input,
.offers-status-filter select,
.customer-table-search input,
.customer-select-filter select {
  width: 100%;
}
.offers-status-filter select,
.customer-select-filter select {
  height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
}
.compact-list-filter-panel {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(237,249,245,.72));
}
.customer-filter-rail {
  grid-template-columns: minmax(200px, 1.12fr) minmax(120px, .56fr) minmax(110px, .50fr) minmax(178px, .76fr) auto auto auto minmax(160px, .60fr) auto;
  margin-bottom: 14px;
}
.customer-date-filter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.customer-date-filter-group label {
  display: grid;
  gap: 4px;
}
.customer-date-filter-group input {
  width: 100%;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
}
.customer-io-filter-cell {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.customer-filter-rail .io-toolbar-group {
  margin-left: 0;
  justify-content: flex-start;
}
.list-filter-count {
  align-self: center;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(12,188,226,.12);
  color: #04bfea;
  font-weight: 900;
  white-space: nowrap;
}
.list-action-filter-cell {
  display: grid;
  gap: 4px;
  min-width: 142px;
}
.list-action-filter-cell > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.list-action-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.list-action-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  background: rgba(255,255,255,.86);
  color: #10231f;
  font-weight: 750;
}
.list-action-selected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(12,188,226,.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(12,188,226,.14), rgba(18,199,167,.13));
  color: #04bfea;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.list-import-filter-cell {
  display: grid;
  gap: 4px;
  justify-items: center;
}
.list-import-filter-cell > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.list-import-icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23,108,95,.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.65), transparent 38%),
    linear-gradient(135deg, rgba(53,214,255,.18), rgba(45,212,191,.18));
  color: #0f766e;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}
.list-import-icon-button:hover {
  border-color: rgba(23,108,95,.34);
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
}
.offers-compact-table td,
.offers-compact-table th {
  font-size: 13px;
}
.table-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f7db7;
  font: inherit;
  font-weight: 700;
}
.table-link-button:hover {
  text-decoration: underline;
}
.product-dialog-grid textarea {
  min-height: 88px;
  resize: vertical;
}
.product-dialog-preview {
  display: none;
  margin-top: 12px;
}
.product-dialog-preview.has-image {
  display: block;
}
.product-location-card {
  margin-top: 14px;
}
.product-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.product-location-grid label {
  display: grid;
  gap: 6px;
}
.product-location-grid span {
  font-size: 12px;
  color: var(--muted);
}
.payroll-payout-panel {
  grid-column: auto;
}
.payout-launcher-grid {
  align-items: stretch;
}
.payout-launcher-grid > .panel {
  min-width: 0;
}
.payout-side-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: stretch;
}
.payout-side-stack > .panel {
  min-width: 0;
}
.special-payout-panel {
  background:
    linear-gradient(135deg, rgba(255,248,235,.9), rgba(255,255,255,.98) 58%),
    var(--panel);
  border-color: rgba(255,176,58,.22);
}
.special-payout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.special-payout-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.special-payout-description {
  grid-column: 1 / -1;
}
.special-payout-description textarea {
  min-height: 76px;
  resize: vertical;
}
.special-payout-panel-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}
.special-payout-panel-copy p {
  margin: 0;
  color: #58726b;
  line-height: 1.5;
}
.payout-scan-import-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}
.payout-scan-import-panel .panel-head {
  margin-bottom: 0;
}
.payout-scan-import-panel .panel-head small {
  display: block;
  margin-top: 4px;
}
.payout-scan-import-panel .scanner-box {
  margin-top: 0;
}
.payout-popup-launch {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  font-size: 28px;
  line-height: 1;
}

.accounting-finance-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.accounting-finance-module {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(16, 40, 35, .12);
  border-radius: 28px;
  box-shadow: 0 22px 54px rgba(16, 40, 35, .09);
}

.accounting-finance-income {
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .15), transparent 34%),
    linear-gradient(145deg, rgba(239, 253, 249, .96), rgba(255, 255, 255, .96));
}

.accounting-finance-expense {
  background:
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, .13), transparent 34%),
    linear-gradient(145deg, rgba(255, 247, 237, .96), rgba(255, 255, 255, .96));
}

.accounting-finance-module-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  color: #10231f;
}

.accounting-finance-module-head span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #637872;
}

.accounting-finance-module-head b {
  font-size: clamp(22px, 2vw, 32px);
  line-height: 1;
}

.accounting-finance-stack {
  display: grid;
  gap: 10px;
}

.accounting-finance-card {
  min-height: 74px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(16, 40, 35, .10);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 30px rgba(16, 40, 35, .07);
}

.accounting-finance-income .accounting-finance-card {
  border-left: 5px solid #14b8a6;
}

.accounting-finance-expense .accounting-finance-card {
  border-left: 5px solid #f97316;
}

.accounting-finance-card b,
.accounting-finance-card small {
  display: block;
}

.accounting-finance-card b {
  margin-top: 5px;
}

.accounting-finance-card small {
  margin-top: 4px;
  color: var(--muted);
}

#payouts > .panel:first-child {
  overflow: hidden;
}

#payouts > .panel:first-child .grid.four {
  gap: 12px;
}

#payouts > .panel:first-child .stat {
  min-height: 88px;
  border-radius: 20px;
  border: 1px solid rgba(16, 40, 35, .10);
  background:
    radial-gradient(circle at 94% 16%, rgba(20, 184, 166, .12), transparent 34%),
    rgba(255, 255, 255, .82);
  box-shadow: 0 14px 30px rgba(16, 40, 35, .07);
}

#payouts .payroll-payout-panel,
#payouts .special-payout-panel,
#payouts .payout-scan-import-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(16, 40, 35, .12);
}

#payouts .payroll-payout-panel::before,
#payouts .special-payout-panel::before,
#payouts .payout-scan-import-panel::before {
  content: "";
  position: absolute;
  inset: -46px -36px auto auto;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  opacity: .18;
  pointer-events: none;
}

#payouts .payroll-payout-panel::before {
  background: #14b8a6;
}

#payouts .special-payout-panel::before {
  background: #2563eb;
}

#payouts .payout-scan-import-panel::before {
  background: #f59e0b;
}

#payouts .payroll-payout-panel {
  background:
    linear-gradient(145deg, rgba(238, 253, 249, .96), rgba(255, 255, 255, .94));
}

#payouts .special-payout-panel {
  background:
    linear-gradient(145deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .94));
}

#payouts .payout-scan-import-panel {
  background:
    linear-gradient(145deg, rgba(255, 251, 235, .96), rgba(255, 255, 255, .94));
}

#payouts .payroll-payout-panel .panel-head,
#payouts .special-payout-panel .panel-head,
#payouts .payout-scan-import-panel .panel-head {
  position: relative;
  z-index: 1;
}

#payouts .special-payout-panel-copy .add-button,
#payouts .payroll-payout-panel .add-button,
#payouts .payout-popup-launch {
  box-shadow: 0 14px 26px rgba(20, 184, 166, .22);
}

@media (max-width: 900px) {
  .accounting-finance-overview {
    grid-template-columns: 1fr;
  }
}

/* V2.192: Zentral profile card - counters, actions and contact blocks. */
.central-identity-card.central-visit-card {
  grid-template-columns: 120px minmax(360px, 1fr) minmax(310px, .54fr) !important;
  grid-template-areas:
    "counts counts counts"
    "logo copy metrics"
    "logo copy metrics"
    "logo copy actions" !important;
  align-items: start !important;
  min-height: 300px;
}

.central-identity-logo-stack {
  grid-area: logo;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 13px;
  min-width: 0;
}

.central-identity-logo-stack .central-identity-logo {
  grid-area: auto;
}

.central-identity-logo-stack .central-identity-status-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
}

.central-identity-logo-stack .central-identity-status-actions .status,
.central-identity-logo-stack .central-identity-edit-icon {
  width: 72px;
  min-height: 34px;
  justify-content: center;
}

.central-identity-logo-stack .central-identity-edit-icon {
  width: 48px;
  height: 40px;
  border-radius: 12px;
}

.central-identity-counts {
  display: grid !important;
  grid-area: counts;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 9px !important;
  justify-content: stretch !important;
  margin: 0 86px 8px 122px !important;
  min-height: 0 !important;
}

.central-identity-counts span {
  min-width: 0 !important;
  justify-content: flex-start !important;
  min-height: 48px;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(240,250,247,.74));
  box-shadow: 0 12px 26px rgba(16,40,35,.07);
}

.central-identity-counts b {
  min-width: 32px;
  font-size: 22px !important;
}

.central-identity-copy {
  padding-top: 10px;
}

.central-identity-grid.central-identity-grid-reordered {
  grid-template-columns: minmax(240px, .94fr) minmax(260px, .86fr) !important;
  gap: 18px 36px !important;
  align-items: start;
}

.central-identity-info-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.central-identity-info-column span {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #344944;
}

.central-identity-info-column b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.central-profile-metrics {
  padding-top: 42px;
}

@media (max-width: 1280px) {
  .central-identity-counts {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    margin: 0 84px 8px 0 !important;
  }
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    grid-template-areas:
      "counts counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  .central-identity-grid.central-identity-grid-reordered {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .central-profile-metrics {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
  }

  .central-identity-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 42px 0 8px !important;
  }

  .central-identity-grid.central-identity-grid-reordered {
    grid-template-columns: 1fr !important;
  }
}
.special-payout-dialog-shell {
  max-height: 88vh;
  overflow: auto;
}
.special-payout-dialog-grid label,
.special-payout-dialog-shell textarea {
  min-width: 0;
}
.compact-form {
  align-items: end;
}
.compact-form .stat {
  min-height: 62px;
}
.compact-form .stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.advance-editor {
  display: grid;
  gap: 8px;
}
.advance-summary {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.advance-summary b {
  color: var(--ink);
}
.advance-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.advance-plus-card {
  text-align: left;
  border: 1px solid rgba(16,185,129,.28);
  background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(236,253,245,.9));
  color: var(--ink);
}
.advance-plus-card b {
  color: #047857;
}
.admin-users {
  display: grid;
  gap: 8px;
}
.plan-card-grid {
  align-items: start;
}
.plan-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,246,.92));
  box-shadow: 0 10px 24px rgba(18,35,31,.06);
}
.plan-card-fields,
.plan-limit-grid,
.plan-feature-grid,
.plan-feature-list {
  display: grid;
  gap: 10px;
}
.plan-card-fields label,
.plan-limit-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.plan-card-fields input,
.plan-card-fields textarea,
.plan-limit-grid input {
  min-width: 0;
}
.plan-limit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 4px;
}
.plan-feature-list {
  grid-template-columns: 1fr;
}
.plan-feature-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.72);
}
.plan-usage-grid {
  margin-top: 12px;
}
.admin-roles-panel {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}
.panel-head.compact {
  margin-bottom: 6px;
}
.panel-head.compact h3 {
  margin: 0;
}
.admin-user-permissions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 180px) minmax(260px, 2fr) minmax(96px, auto);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.68);
}
.admin-user-permissions span small {
  display: block;
  color: var(--muted);
}
.admin-user-permissions input:disabled {
  background: #f7faf8;
  color: var(--muted);
}
.admin-user-permissions select:disabled {
  background: #f7faf8;
  color: var(--muted);
}
.admin-user-permissions button:disabled {
  opacity: .55;
  cursor: default;
}
.platform-admin-row {
  grid-template-columns: minmax(150px, 1fr) minmax(340px, 2.2fr) minmax(120px, auto);
}
.admin-platform-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1.3fr .9fr .8fr;
  gap: 8px;
}
.admin-platform-grid input,
.admin-platform-grid select {
  width: 100%;
}
.admin-platform-password-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 8px;
  background: rgba(23,108,95,.055);
}
.admin-platform-password-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.admin-platform-password-fields label > span {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
}
.admin-password-note {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}
.admin-password-note.valid {
  color: #047857;
}
.admin-password-note.invalid {
  color: #b42318;
}
@media (max-width: 1280px) {
  .platform-admin-row {
    grid-template-columns: 1fr;
  }
  .admin-platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.permission-pill {
  width: 24px;
  height: 24px;
  padding: 0;
  margin-left: 8px;
  border-radius: 7px;
  background: #f1f5f3;
  color: var(--muted);
}
.permission-pill.on {
  background: rgba(16,185,129,.16);
  color: #047857;
}
.admin-user-row td {
  background: #fbfcfb;
}
.admin-role-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 999px;
  background: rgba(23,108,95,.08);
  color: #176c5f;
  font-size: 11px;
  font-weight: 750;
}
.topbar-brand-cluster {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  pointer-events: auto;
  z-index: 266;
}
.central-header-badge {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(220,228,225,.92);
  border-radius: 13px;
  background: rgba(255,255,255,.68);
  color: #123b34;
  box-shadow: 0 12px 26px rgba(18,35,31,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}
.central-header-badge[hidden] {
  display: none;
}
.central-header-badge:hover,
.central-header-badge.active {
  border-color: rgba(23,108,95,.34);
  background: rgba(255,255,255,.88);
  color: var(--accent);
  transform: translateY(-1px);
}
.desktop-sticky-active .desktop-logo-badge {
  min-width: 138px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(18,35,31,.12);
  font-size: 10px;
}
.desktop-sticky-active .desktop-logo-badge img {
  max-width: 85px;
  max-height: 31px;
}
.desktop-sticky-active .desktop-logo-badge .mark {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}
.desktop-sticky-active .desktop-logo-badge .mark::before { width: 13px; height: 5px; }
.desktop-sticky-active .desktop-logo-badge .mark::after { width: 5px; height: 13px; }
.desktop-sticky-active .desktop-wordmark {
  gap: 0;
}
.topbar .actions .language-picker {
  display: none;
}
.admin-header-menu {
  position: absolute;
  top: 10px;
  left: auto;
  right: calc(50% + 185px);
  width: max-content;
  max-width: min(520px, calc(50vw - 210px));
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(220,228,225,.62);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.42), rgba(246,251,249,.30));
  box-shadow: 0 14px 30px rgba(18,35,31,.11);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
  z-index: 266;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.admin-header-menu::-webkit-scrollbar {
  display: none;
}
.admin-header-menu.visible {
  display: flex;
}
.admin-header-item {
  min-width: max-content;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #31514a;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.01em;
  box-shadow: none;
  white-space: nowrap;
}
.admin-header-main {
  padding-inline: 14px;
  background: rgba(23,108,95,.10);
  color: #123b34;
}
.admin-header-item:hover {
  border-color: rgba(23,108,95,.18);
  background: rgba(255,255,255,.72);
  transform: translateY(-1px);
}
.admin-header-item.active {
  border-color: rgba(23,108,95,.34);
  background: #fff;
  color: var(--accent);
  box-shadow: 0 9px 18px rgba(18,35,31,.10);
}
.desktop-sticky-active .admin-header-menu {
  right: calc(50% + 145px);
  min-height: 38px;
  padding: 4px;
  border-radius: 14px;
}
.desktop-sticky-active .admin-header-item {
  height: 30px;
  padding-inline: 10px;
  font-size: 11px;
}
.desktop-sticky-active .admin-header-main {
  padding-inline: 12px;
}
.language-picker {
  width: auto;
  display: inline-flex;
  align-items: center;
  height: 44px;
  flex: 0 0 auto;
}
.language-picker select {
  width: auto;
  min-width: 76px;
  height: 44px;
  line-height: 44px;
  padding: 7px 28px 7px 9px;
  border-radius: 13px;
  border-color: rgba(220,228,225,.92);
  background: rgba(255,255,255,.68);
  box-shadow: 0 12px 26px rgba(18,35,31,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.search-box {
  width: min(320px, 28vw);
}
.invoice-customer-filter {
  width: min(280px, 24vw);
}
.search-box input {
  border-color: #cbd8d4;
  background: #fff;
}
.toolbar-search {
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.catalog-location-tabs {
  margin-bottom: 14px;
}
.product-filter-rail {
  margin-bottom: 14px;
}
.product-filter-rail .product-table-search {
  width: min(360px, 28vw);
}
.product-select-filter {
  display: grid;
  gap: 5px;
  min-width: 150px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.product-select-filter select {
  min-height: 38px;
}
.catalog-products-main {
  margin-bottom: 16px;
  overflow: hidden;
}
.catalog-products-main .table-scroll {
  width: 100%;
}
.product-detail-table td b {
  display: block;
}
.product-detail-table td small {
  display: block;
  margin-top: 3px;
  line-height: 1.25;
}
.product-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.product-tag-list i {
  padding: 3px 7px;
  border: 1px solid rgba(23,108,95,.14);
  border-radius: 999px;
  background: rgba(232,246,242,.72);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.catalog-footer-grid {
  align-items: stretch;
}
.catalog-side-grid {
  align-items: stretch;
}
.catalog-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.catalog-side-panel .toolbar {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.catalog-side-panel .pagination {
  margin-top: auto;
}
.catalog-filter input {
  width: min(360px, 38vw);
}
button, input, select, textarea {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.add-button,
.add-button {
  background: linear-gradient(135deg, var(--add), #3b82f6);
  border-color: var(--add);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
button.add-button:hover,
.add-button:hover {
  background: linear-gradient(135deg, var(--add-dark), var(--add));
}
button.danger { color: #a32620; }
button.ghost { background: transparent; }
button.success {
  background: #e3f4eb;
  border-color: #b9dec9;
  color: #17613d;
}
button.info {
  background: #e7efff;
  border-color: #b9ccf6;
  color: #24538f;
}
button.dialog-close {
  background: #f8e1e1;
  border-color: #e7b7b7;
  color: #8f2525;
}
.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
.icon-button.small-icon {
  width: 34px;
  height: 34px;
  font-size: 16px;
  color: var(--accent);
  background: #eef6f4;
}
.logout-button {
  color: #9d241e;
}

.view { display: none; }
.view.active {
  display: block;
  position: relative;
  z-index: 2;
}
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-stack {
  display: grid;
  gap: 14px;
}
.dashboard-range-focus {
  margin-bottom: 2px;
}
.dashboard-range-frame {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,246,244,.94));
  box-shadow: 0 22px 48px rgba(18,35,31,.08);
}
.dashboard-range-grid {
  align-items: stretch;
}
.dashboard-range-note {
  margin: 0;
  padding-top: 4px;
  border-top: 1px dashed rgba(82,98,94,.28);
  color: var(--muted);
  font-size: 13px;
}
.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dashboard-toolbar-shell {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,246,244,.96));
  box-shadow: 0 16px 38px rgba(18,35,31,.08);
}
.dashboard-toolbar-shell .dashboard-toolbar {
  margin-bottom: 0;
}
.dashboard-filter-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dashboard-filter-row label {
  min-width: 0;
}
.dashboard-filter-row input,
.dashboard-filter-row select {
  height: 38px;
  min-width: 0;
}
.dashboard-filter-row input[type="search"] {
  width: min(300px, 28vw);
}
.dashboard-filter-row button {
  height: 38px;
  white-space: nowrap;
}
.dashboard-search-button,
.dashboard-clear-button,
.dashboard-add-toggle {
  width: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.dashboard-filter-row input[type="date"] {
  width: 150px;
}
.dashboard-filter-row select {
  width: 220px;
}
.dashboard-add {
  position: relative;
}
.dashboard-add-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 6;
  display: none;
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 38px rgba(18,35,31,.14);
}
.dashboard-add-menu.open {
  display: grid;
  gap: 7px;
}
.dashboard-add-menu button {
  text-align: left;
}
.edit-dashboard-button {
  background: #eef6f4;
  color: var(--accent);
  border-color: #cfe1dc;
  font-size: 18px;
}
.dashboard-footer-nav {
  margin-top: 0;
}
.dashboard-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.dashboard-footer-panel {
  position: relative;
  min-height: 48px;
}
.dashboard-footer-toggle {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 18px;
  border: 1px solid #d6e2de;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,246,.95));
  box-shadow: 0 14px 28px rgba(15,35,31,.10);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.dashboard-footer-toggle i {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .18s ease;
}
.dashboard-footer-panel-open .dashboard-footer-toggle {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 26%, #d6e2de);
  box-shadow: 0 18px 34px rgba(15,35,31,.16);
}
.dashboard-footer-panel-open .dashboard-footer-toggle i {
  transform: rotate(225deg) translateY(-1px);
}
.dashboard-footer-popover {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 6;
  display: none;
  padding: 10px;
  border: 1px solid rgba(214,226,222,.96);
  border-radius: 18px;
  background: rgba(248,251,250,.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 38px rgba(15,35,31,.18);
}
.dashboard-footer-panel-open .dashboard-footer-popover {
  display: block;
}
.dashboard-footer-links {
  display: grid;
  gap: 6px;
  align-content: start;
  max-height: min(280px, 52vh);
  overflow-y: auto;
}
.dashboard-footer-link {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 9px 10px;
  background: #fff;
  border-color: #d6e2de;
  font-size: 12px;
  line-height: 1.2;
}
.dashboard-footer-link-primary {
  background: linear-gradient(135deg, rgba(23,108,95,.12), rgba(23,108,95,.04));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--accent);
  font-weight: 700;
}
.dashboard-footer-link-secondary {
  background: #f7faf9;
  font-size: 11px;
}
.dashboard-footer-empty {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.check-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.check-card input {
  width: 18px;
  height: 18px;
  padding: 0;
}
.alert-list {
  display: grid;
  gap: 8px;
}
.payroll-overview-list .alert-item {
  align-items: center;
}
.alert-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #fff;
}
.alert-item span {
  display: grid;
  gap: 2px;
}
.alert-item small {
  color: var(--muted);
}
.alert-item.overdue,
tr.overdue {
  background: #fff1f2;
}
.alert-item.soon,
tr.soon {
  background: #fff7ed;
}
.scan-preview {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.scan-error {
  border-color: #fecaca;
  background: #fff1f2;
}
.warn-inline {
  color: #9b4b00;
  font-weight: 700;
}
.panel {
  background: linear-gradient(180deg, #fbfcfb, #f6f8f7);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-grid.compact {
  margin-bottom: 18px;
}
.admin-section-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 14px;
  align-items: start;
}
.admin-analytics-panel {
  border-radius: 20px;
}
.admin-audit-panel {
  margin-top: 14px;
  border-radius: 20px;
  overflow: hidden;
}
.admin-audit-table {
  margin-top: 10px;
}
.admin-audit-table th:nth-child(1) { width: 160px; }
.admin-audit-table th:nth-child(2) { width: 220px; }
.admin-audit-table th:nth-child(3) { width: 170px; }
.admin-audit-table th:nth-child(4) { width: 130px; }
.admin-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-height: 180px;
  align-items: end;
  padding: 12px 0 4px;
}
.admin-timeline-day {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.admin-timeline-day small {
  color: var(--muted);
  font-size: 11px;
}
.admin-timeline-bars {
  height: 140px;
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(23,108,95,.05), rgba(37,99,235,.03));
  border: 1px solid rgba(23,108,95,.08);
}
.admin-timeline-bar {
  width: 18px;
  min-height: 6px;
  border-radius: 999px 999px 8px 8px;
}
.admin-timeline-bar.login {
  background: linear-gradient(180deg, rgba(23,108,95,.98), rgba(17,83,73,.66));
}
.admin-timeline-bar.registration {
  background: linear-gradient(180deg, rgba(37,99,235,.98), rgba(59,130,246,.56));
}
.admin-timeline-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.admin-timeline-legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}
.admin-timeline-legend .swatch.login {
  background: rgba(23,108,95,.98);
}
.admin-timeline-legend .swatch.registration {
  background: rgba(37,99,235,.98);
}
.admin-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-analytics-list {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(23,108,95,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
}
.admin-analytics-list h4 {
  margin: 0;
}
.admin-analytics-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.admin-analytics-item b {
  color: var(--ink);
}
.admin-table td,
.admin-table th {
  vertical-align: top;
}
.admin-audit-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(236,248,244,.72));
}
.admin-audit-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-audit-filters input,
.admin-audit-filters select {
  width: 100%;
  min-width: 0;
}
.admin-audit-search {
  min-width: 220px;
}
.admin-audit-filter-count {
  align-self: center;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(23,108,95,.1);
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}
.admin-quick-links-panel {
  margin-top: 14px;
}
.admin-quick-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.admin-quick-link {
  min-height: 108px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(232,246,242,.68));
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(18,35,31,.06);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.admin-quick-link:hover,
.admin-quick-link:focus {
  transform: translateY(-2px);
  border-color: rgba(23,108,95,.28);
  box-shadow: 0 18px 34px rgba(18,35,31,.1);
  outline: none;
}
.admin-quick-link span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.admin-settings-panel {
  display: grid;
  gap: 16px;
}
.admin-auth-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(23,108,95,.12);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(240,248,245,.76));
}
.admin-auth-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-auth-card-head h3 {
  margin: 0;
}
.admin-auth-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(23,108,95,.14);
  font-weight: 900;
  letter-spacing: .03em;
}
.admin-auth-icon.google {
  color: #1a73e8;
  background: linear-gradient(135deg, #fff, #eaf2ff);
}
.admin-auth-icon.phone {
  color: #176c5f;
  background: linear-gradient(135deg, #f2fbf8, #e0f2ec);
  font-size: 12px;
}
.admin-security-note {
  padding: 10px 12px;
  border: 1px dashed rgba(23,108,95,.24);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
}
.admin-subscriber-table th,
.admin-subscriber-table td {
  padding: 10px 12px;
}
.admin-subscriber-row {
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.admin-subscriber-row:hover,
.admin-subscriber-row:focus {
  background: rgba(23,108,95,.055);
  transform: translateX(2px);
  outline: none;
}
.admin-subscriber-dialog {
  width: min(1120px, 94vw);
  max-height: min(86vh, 900px);
  overflow: auto;
}
.admin-subscriber-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-subscriber-wide {
  grid-column: 1 / -1;
}
.admin-subscriber-kv {
  display: grid;
  grid-template-columns: minmax(90px, .6fr) minmax(0, 1.4fr);
  gap: 8px 12px;
  margin-top: 10px;
}
.admin-subscriber-kv span {
  color: var(--muted);
  font-size: 12px;
}
.admin-subscriber-check {
  margin-top: 12px;
}
.admin-subscriber-usage-compact {
  margin-top: 12px;
}
.admin-subscriber-payments,
.admin-subscriber-profiles {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.admin-subscriber-payments span,
.admin-subscriber-profiles span {
  padding: 8px 10px;
  border: 1px solid rgba(23,108,95,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
}
.admin-subscriber-profiles small {
  display: block;
  color: var(--muted);
}
.admin-subscriber-payment-form {
  grid-template-columns: 1fr .8fr .8fr 1fr;
}
.admin-subscriber-count-note {
  margin: -4px 0 12px;
}
.admin-subscriber-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(237,249,245,.72));
}
.admin-subscriber-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.admin-subscriber-filters input,
.admin-subscriber-filters select {
  width: 100%;
  min-width: 0;
}
.admin-subscriber-filters span {
  align-self: center;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(23,108,95,.1);
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}
.admin-subscriber-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(23,108,95,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.admin-subscriber-bulkbar small {
  display: block;
  color: var(--muted);
}
.admin-subscriber-table th:first-child,
.admin-subscriber-table td:first-child {
  width: 38px;
  text-align: center;
}
.admin-row-number {
  color: var(--muted);
  font-weight: 850;
  white-space: nowrap;
}
.admin-child-count-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23,108,95,.1);
  color: var(--accent);
  font-weight: 800;
}
.admin-child-account-list {
  display: grid;
  gap: 10px;
}
.admin-child-account-card {
  padding: 12px;
  border: 1px solid rgba(23,108,95,.1);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(238,247,244,.72));
}
.admin-child-account-card h4 {
  margin: 0;
}
.admin-child-account-grid {
  display: grid;
  grid-template-columns: minmax(90px, .48fr) minmax(0, 1.52fr);
  gap: 7px 12px;
  margin-top: 8px;
  font-size: 13px;
}
.admin-child-account-grid span {
  color: var(--muted);
}
.admin-child-account-grid b {
  color: var(--ink);
}
.admin-child-account-grid .status {
  font-style: normal;
}
.admin-child-account-profiles .admin-subscriber-profiles {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.admin-central-parent-field {
  display: block;
  margin-top: 12px;
}
.central-panel {
  display: grid;
  gap: 14px;
}
.central-date-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(232,246,242,.72), rgba(255,255,255,.82));
}
.central-date-filter label {
  min-width: 160px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.central-all-accounts-toggle {
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-width: 142px !important;
  padding: 8px 10px;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.62);
  color: var(--ink) !important;
}
.central-all-accounts-toggle input {
  width: 17px;
  height: 17px;
  margin: 0 !important;
}
.central-all-accounts-toggle span {
  flex: 0 0 auto !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 800;
}
.central-date-filter input {
  margin-top: 4px;
}
.central-date-filter span {
  flex: 1 1 280px;
  color: var(--muted);
  font-size: 13px;
}
.central-date-filter button.primary {
  border-color: rgba(23,108,95,.28);
  background: linear-gradient(135deg, rgba(23,108,95,.92), rgba(17,94,89,.88));
  color: #fff;
}
.central-brand-compare {
  border-color: rgba(23,108,95,.12);
  background: linear-gradient(135deg, rgba(248,252,250,.92), rgba(255,255,255,.86));
}
.central-brand-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.central-brand-share-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.central-brand-share-card h4 {
  margin: 2px 0 0;
  color: var(--ink);
}
.central-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}
.central-share-row span,
.central-share-row small {
  color: var(--muted);
  font-size: 12px;
}
.central-share-row b {
  color: var(--accent);
}
.central-share-row i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23,108,95,.08);
}
.central-share-row i::before {
  content: "";
  display: block;
  width: var(--share);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #12b886, #38bdf8);
}
.central-share-row.expense b {
  color: #d97706;
}
.central-share-row.expense i::before {
  background: linear-gradient(90deg, #f59e0b, #fb7185);
}
.central-company-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
}
.central-company-card {
  min-width: 230px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "logo type"
    "logo name"
    "logo mail"
    "logo iban"
    "logo balance";
  align-items: center;
  gap: 5px;
  text-align: left;
  padding: 14px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 10px 24px rgba(18,35,31,.06);
}
.central-company-card.active {
  border-color: rgba(23,108,95,.36);
  background: linear-gradient(135deg, rgba(232,246,242,.96), rgba(255,255,255,.82));
}
.central-company-logo {
  grid-area: logo;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  color: var(--accent);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.74);
}
.central-company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.central-company-logo i {
  font-style: normal;
  font-size: 22px;
}
.central-company-type {
  grid-area: type;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.central-company-card span,
.central-company-card small {
  color: var(--muted);
}
.central-company-card strong {
  grid-area: balance;
  color: var(--accent);
  font-size: 20px;
}
.central-company-card b {
  grid-area: name;
}
.central-company-card .central-company-mail {
  grid-area: mail;
}
.central-company-card .central-company-iban {
  grid-area: iban;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .01em;
  color: rgba(15,65,56,.72);
}
.central-company-logo-editor {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px dashed rgba(23,108,95,.22);
  border-radius: 18px;
  background: rgba(255,255,255,.62);
}
.central-company-logo-preview {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23,108,95,.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(232,246,242,.92), rgba(255,255,255,.9));
  color: var(--accent);
  font-size: 30px;
  font-weight: 900;
}
.central-company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.central-identity-card {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(23,108,95,.10), transparent 36%),
    rgba(255,255,255,.82);
  border-color: rgba(23,108,95,.14);
}
.central-visit-card {
  overflow: hidden;
  border: 1px solid rgba(23,108,95,.16);
  background:
    linear-gradient(120deg, rgba(255,255,255,.86), rgba(232,246,242,.72)),
    radial-gradient(circle at 14% 18%, rgba(56,189,248,.14), transparent 28%);
  box-shadow: 0 18px 44px rgba(18,35,31,.08);
}
.central-visit-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, rgba(23,108,95,.82), rgba(56,189,248,.52));
}
.central-identity-logo {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(232,246,242,.96), rgba(255,255,255,.92));
  color: var(--accent);
  font-size: 34px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 16px 28px rgba(18,35,31,.08);
}
.central-identity-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.central-identity-copy {
  min-width: 0;
}
.central-identity-copy h3 {
  margin: 4px 0 12px;
  font-size: clamp(22px, 3vw, 34px);
}
.central-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
.central-identity-grid span {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #344944;
}
.central-identity-grid b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.central-identity-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.central-company-edit-overlay {
  z-index: 72;
}
.central-company-edit-dialog {
  width: min(920px, 94vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0,0,0,.26);
}
.central-detail-panel {
  border-radius: 22px;
}
.central-money-grid .stat {
  min-height: 112px;
}
.central-count-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.central-count-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 999px;
  background: rgba(244,250,247,.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.central-count-badges b {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}
.central-detail-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 14px;
}
.central-detail-tables table {
  min-width: 100%;
  margin-top: 10px;
}
.central-detail-tables section {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 18px;
  background: rgba(255,255,255,.52);
}
.central-detail-tables .pagination {
  margin-top: 10px;
}
.central-management-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.central-edit-panel {
  background: rgba(248,252,250,.78);
  border-color: rgba(23,108,95,.10);
}
.central-edit-panel .table-scroll {
  overflow-x: auto;
}
.central-edit-panel table {
  min-width: 1080px;
}
.central-edit-panel input,
.central-edit-panel select {
  min-width: 0;
}
.central-user-row[data-editing="true"] {
  background: rgba(232,246,242,.34);
}
.central-user-display {
  display: grid;
  gap: 3px;
  min-width: 130px;
}
.central-user-display small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.central-user-edit-fields {
  display: grid;
  gap: 8px;
  min-width: 160px;
}
.central-user-edit-fields[hidden],
.central-user-display[hidden] {
  display: none;
}
.central-user-edit-fields label {
  font-size: 11px;
  color: var(--muted);
}
.central-user-full-details {
  min-width: 360px;
}
.central-user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.central-users-save[hidden] {
  display: none;
}
.central-permissions-editor {
  min-width: 260px;
}
.central-feature-editor {
  min-width: 280px;
}
.central-user-password + small {
  display: block;
  margin-top: 4px;
}
.central-user-scope {
  display: grid;
  gap: 2px;
  min-width: 140px;
}
.central-user-scope small {
  color: var(--muted);
  font-size: 11px;
}
.central-catalog-row .central-item-name {
  min-width: 170px;
}
.central-catalog-row .central-item-name-display {
  display: block;
  min-width: 170px;
}
.central-catalog-dialog {
  width: min(760px, 92vw);
}
.central-catalog-dialog .wide {
  grid-column: 1 / -1;
}
.central-catalog-dialog textarea {
  min-height: 110px;
  resize: vertical;
}
.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-actions select,
.admin-actions input {
  min-width: 110px;
}
.admin-payments {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}
.admin-payment-form {
  display: grid;
  grid-template-columns: 110px 82px 86px 110px 34px;
  gap: 5px;
  margin-top: 6px;
}
.admin-payment-form input,
.admin-payment-form select {
  min-width: 0;
  padding: 6px;
  font-size: 12px;
}
.stat {
  background: linear-gradient(180deg, #fbfcfb, #f1f5f3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.stat b { display: block; font-size: 28px; margin-top: 8px; }
.dashboard-compare-stat span {
  font-size: 12px;
}
.dashboard-compare-stat small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.dashboard-compare-stat .compare-period {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
}
.dashboard-compare-stat .delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-compare-stat .delta.up {
  color: #0f9f6e;
}
.dashboard-compare-stat .delta.down {
  color: #dc2626;
}
.dashboard-compare-stat.has-compare b {
  font-size: 20px;
  margin-top: 3px;
}
.dashboard-search-panel {
  margin-bottom: 14px;
}
.finance-strip {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.income-strip {
  background: linear-gradient(135deg, rgba(16,185,129,.13), rgba(236,253,245,.9));
}
.expense-strip {
  background: linear-gradient(135deg, rgba(249,115,22,.16), rgba(255,247,237,.94));
  padding-block: 8px;
}
.finance-grid { gap: 10px; }
.finance-strip .stat {
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 10px 22px rgba(18,35,31,.06);
}
.expense-strip .stat {
  padding: 8px 12px;
  min-height: 58px;
}
.expense-strip .stat b {
  font-size: 22px;
  margin-top: 2px;
}
.finance-icon {
  position: relative;
  min-height: 76px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 12px 28px rgba(18,35,31,.08);
}
.expense-strip .finance-icon { min-height: 58px; }
.stat-with-icon {
  position: relative;
  padding-right: 78px;
}
.stat-with-icon::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 12px;
  background-color: rgba(255,255,255,.64);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 36px 36px;
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: 0 8px 18px rgba(18,35,31,.08);
}
.stat-income::after { background-image: url("images/dashboard/einkommen.png"); }
.stat-income-paid::after { background-image: url("images/dashboard/einkommen-bezahlt.png"); }
.stat-open::after { background-image: url("images/dashboard/noch-offen.png"); }
.stat-expense::after { background-image: url("images/dashboard/ausgaben.png"); }
.stat-expense-paid::after { background-image: url("images/dashboard/ausgaben-bezahlt.png"); }
.finance-icon::before {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 17px;
  width: 8px;
  height: 22px;
  border-radius: 3px 3px 0 0;
  background: currentColor;
  box-shadow: 13px -8px 0 currentColor, 26px -15px 0 currentColor;
  opacity: .34;
}
.income-icon { color: #0f9f6e; }
.expense-icon { color: #ea580c; }
.chart {
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(var(--chart-cols, 6), minmax(76px, 1fr));
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  width: max(100%, calc(var(--chart-cols, 6) * 86px));
}
.chart-shell {
  display: grid;
  gap: 12px;
}
.chart-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}
.chart-col {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: 24px 1fr 22px;
  align-items: end;
  gap: 6px;
  padding: 4px 5px 0;
  border-radius: 16px;
  text-align: center;
}
.chart-col::before {
  content: "";
  position: absolute;
  inset: 2px 0 0;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  pointer-events: none;
}
.chart-col-today::before {
  border-color: rgba(37,99,235,.22);
  background: linear-gradient(180deg, rgba(37,99,235,.08), rgba(37,99,235,.02));
}
.chart-col-today span {
  color: #2563eb;
  font-weight: 700;
}
.chart-value {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-value small {
  overflow: hidden;
  text-overflow: ellipsis;
}
.income-label { color: var(--accent); }
.expense-label { color: #b45309; }
.chart-bars {
  position: relative;
  z-index: 1;
  height: 158px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 5px;
}
.chart-bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), #12332d);
}
.income-bar {
  background: linear-gradient(180deg, var(--accent), #12332d);
}
.expense-bar {
  background: linear-gradient(180deg, #f59e0b, #b45309);
}
.chart-legend {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.income-dot { background: var(--accent); }
.expense-dot { background: #d97706; }
.chart-col span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}
.stock-summary-panel,
.stock-location-panel {
  width: 100%;
}
.trend-panel {
  display: grid;
  gap: 14px;
}
.trend-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.trend-metric-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.trend-metric-grid-revenue {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  padding-top: 12px;
}
.trend-metric-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--trend-color) 30%, #dce4e1);
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--trend-color) 12%, #ffffff), #ffffff);
  color: var(--ink);
}
.trend-metric-card input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.trend-metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.trend-metric-card b {
  font-size: 34px;
  line-height: 1;
  color: var(--trend-color);
}
.trend-panel-revenue .trend-metric-card-revenue {
  justify-items: center;
  text-align: center;
  padding: 12px 14px;
}
.trend-panel-revenue .trend-metric-card-revenue span {
  color: #97a39f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
}
.trend-panel-revenue .trend-metric-card-revenue b {
  font-size: 24px;
}
.trend-metric-card-neutral span,
.trend-metric-card-neutral b {
  color: var(--ink);
}
.trend-compare-pill {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -40%);
  z-index: 3;
  min-width: 96px;
  display: inline-grid;
  justify-items: center;
  align-items: center;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid rgba(23,108,95,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,249,248,.96));
  text-align: center;
  box-shadow: 0 14px 26px rgba(18,34,31,.12);
  backdrop-filter: blur(10px);
}
.trend-compare-pill b {
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}
.trend-compare-pill-up {
  border-color: rgba(15,159,110,.32);
  background: linear-gradient(180deg, rgba(15,159,110,.18), rgba(255,255,255,.98));
}
.trend-compare-pill-up b {
  color: #0f9f6e;
  text-shadow: 0 0 10px rgba(15,159,110,.18);
}
.trend-compare-pill-down {
  border-color: rgba(245,158,11,.34);
  background: linear-gradient(180deg, rgba(245,158,11,.18), rgba(255,255,255,.98));
}
.trend-compare-pill-down b {
  color: #d97706;
  text-shadow: 0 0 10px rgba(245,158,11,.16);
}
.trend-compare-pill-flat {
  border-color: rgba(82,98,94,.2);
}
.trend-metric-card:not(.active) {
  opacity: .64;
}
.trend-chart {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,247,246,.94));
}
.trend-chart svg {
  width: 100%;
  height: 240px;
  display: block;
}
.trend-grid line {
  stroke: rgba(104,118,114,.22);
  stroke-width: 1;
}
.trend-chart polyline {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-chart circle {
  fill: var(--line-color);
  stroke: #fff;
  stroke-width: 2;
}
.trend-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.trend-axis span {
  min-width: 0;
  text-align: center;
}
.stock-workbook {
  display: grid;
  gap: 16px;
}
.stock-sheet {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(18,35,31,.06);
}
.stock-sheet.active {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: 0 18px 40px rgba(18,35,31,.10);
}
.stock-sheet-grid {
  display: grid;
  grid-template-columns: minmax(250px, 286px) minmax(0, 1fr) minmax(214px, 244px);
  align-items: stretch;
}
.stock-sheet-location .stock-sheet-grid {
  grid-template-columns: minmax(228px, 258px) minmax(0, 1fr);
}
.stock-sheet-info,
.stock-sheet-summary {
  background: linear-gradient(180deg, rgba(248,251,250,.96), rgba(255,255,255,.98));
}
.stock-sheet-info {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  border-right: 1px solid var(--line);
}
.stock-sheet-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.stock-sheet-info-head strong {
  font-size: 15px;
}
.stock-sheet-info-table,
.stock-sheet-summary-table,
.stock-sheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.stock-sheet-info-table th,
.stock-sheet-info-table td,
.stock-sheet-summary-table th,
.stock-sheet-summary-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.stock-sheet-info-table th,
.stock-sheet-summary-table th {
  width: 42%;
  background: #f8fbfa;
  font-size: 12px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stock-sheet-info-table td small,
.stock-sheet-summary-table td small {
  display: block;
}
.stock-sheet-info-grid {
  display: grid;
  grid-template-columns: minmax(0, .4fr) minmax(0, .6fr);
  gap: 8px;
  padding: 12px;
}
.stock-sheet-info-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  min-width: 0;
}
.stock-sheet-info-card-wide {
  grid-column: 1 / -1;
}
.stock-sheet-info-card-contact,
.stock-sheet-info-card-staff {
  grid-column: 1;
}
.stock-sheet-info-card-phone,
.stock-sheet-info-card-email {
  grid-column: 2;
}
.stock-sheet-info-card span {
  font-size: 10px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stock-sheet-info-card b {
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stock-sheet-info-card small {
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.stock-sheet-location-logo {
  display: grid;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
}
.stock-sheet-location-logo span {
  font-size: 10px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stock-sheet-location-logo-frame {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(248,251,250,.96), rgba(255,255,255,.98));
}
.stock-sheet-location-logo-frame img {
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
}
.stock-location-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}
.accounting-card-grid {
  margin-bottom: 14px;
}
.accounting-summary-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.accounting-filter-box {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(23,108,95,.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.08), transparent 30%),
    linear-gradient(135deg, rgba(23,108,95,.08), rgba(255,255,255,.95));
  box-shadow: 0 14px 30px rgba(18,35,31,.07);
}
.accounting-table-grid {
  align-items: start;
}
.accounting-toolbar {
  flex-wrap: wrap;
  margin-bottom: 0;
}
.accounting-toolbar button {
  min-width: 148px;
}
.invoice-status-tabs {
  margin: 0 0 10px;
}
.invoice-filter-rail {
  display: grid;
  grid-template-columns: minmax(126px, .52fr) minmax(206px, .80fr) minmax(176px, .76fr) minmax(214px, .98fr) auto auto minmax(160px, .60fr) auto;
  gap: 10px;
  align-items: end;
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(237,249,245,.72));
}
.invoice-filter-rail .io-toolbar-group {
  margin-left: 0;
}
.invoice-date-filter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.invoice-date-filter-group label,
.invoice-status-filter,
.invoice-filter-rail .search-box,
.invoice-io-filter-cell,
.invoice-filter-rail .list-action-filter-cell,
.invoice-filter-rail .list-import-filter-cell {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.invoice-filter-rail .search-box {
  width: 100%;
}
.invoice-filter-rail .search-box span,
.invoice-status-filter span,
.invoice-io-filter-cell > span,
.invoice-filter-rail .list-action-filter-cell > span,
.invoice-filter-rail .list-import-filter-cell > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.invoice-status-filter select,
.invoice-date-filter-group input {
  width: 100%;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
}
.invoice-filter-rail .toolbar-search {
  width: 100%;
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}
.invoice-filter-rail .invoice-customer-filter {
  width: 100%;
}
.invoice-io-filter-cell .io-toolbar-group {
  justify-content: flex-start;
}
.invoice-filter-count {
  align-self: center;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(12,188,226,.12);
  color: #04bfea;
  font-weight: 900;
  white-space: nowrap;
}

.reports-filter-rail {
  grid-template-columns: repeat(2, minmax(140px, .72fr)) minmax(220px, 1fr) auto minmax(160px, .62fr);
  margin-bottom: 14px;
}

.reports-filter-rail > label:not(.list-action-filter-cell) {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.reports-filter-rail input,
.reports-filter-rail select {
  width: 100%;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe5e1;
  border-radius: 10px;
  background: rgba(255,255,255,.86);
}

.reports-filter-rail > button {
  min-height: 38px;
  border-radius: 12px;
  white-space: nowrap;
}
.invoice-bulk-add-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.38), transparent 34%),
    linear-gradient(135deg, #11c8f2, #11c7a7 58%, #12a78f);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  box-shadow: 0 12px 22px rgba(17,199,167,.26), 0 5px 10px rgba(18,35,31,.10);
}
.invoice-bulk-add-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(17,199,167,.34), 0 8px 14px rgba(18,35,31,.12);
}
.invoice-bulk-add-badge:active {
  transform: translateY(0) scale(.98);
}
.panel-subtitle {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.user-permissions-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 320px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}
.permission-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.permission-check.readonly {
  opacity: .68;
  background: rgba(246,250,248,.76);
  cursor: not-allowed;
}
.permission-check.readonly input,
.permission-check.readonly span {
  pointer-events: none;
}
.user-permission-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stock-sheet-info-card small {
  color: var(--muted);
}
.stock-sheet-summary {
  border-left: 1px solid var(--line);
}
.stock-sheet-summary-table td {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stock-sheet-center {
  min-width: 0;
  background: #fff;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.stock-sheet-location .stock-sheet-center {
  grid-template-rows: none;
}
.stock-sheet-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}
.stock-sheet-center-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248,251,250,.82), rgba(255,255,255,.96));
}
.stock-sheet-meta-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.stock-sheet-meta-card span {
  font-size: 11px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stock-sheet-meta-card b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.stock-sheet-card-center {
  display: grid;
  gap: 14px;
  padding: 14px;
  align-content: start;
}
.stock-sheet-card-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.stock-sheet-card-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stock-sheet-card-group-head strong {
  font-size: 14px;
}
.stock-item-card-row {
  display: flex;
  gap: 12px;
  width: max-content;
  min-width: 100%;
}
.stock-item-card {
  min-width: 214px;
  max-width: 214px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, #c5d6d0);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  box-shadow: 0 10px 24px rgba(18,35,31,.06);
}
.stock-item-card strong {
  font-size: 15px;
  line-height: 1.35;
  min-height: 40px;
  word-break: break-word;
}
.stock-item-card-kicker {
  font-size: 11px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.stock-item-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stock-item-card-metrics-single {
  grid-template-columns: 1fr;
}
.stock-item-card-metrics span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stock-item-card-metrics b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.stock-item-card-service {
  background: linear-gradient(180deg, #fbfcfb, #f3f8f6);
}
.stock-item-card-service.is-active {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 12px 28px rgba(24,95,78,.12);
}
.stock-item-empty {
  min-width: 220px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfcfb;
  color: var(--muted);
}
.stock-sheet-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}
.stock-sheet-table th,
.stock-sheet-table td {
  min-width: 132px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: center;
  background: #fff;
}
.stock-sheet-rowlabel {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 126px;
  background: #f8fbfa !important;
  text-align: left;
  font-size: 12px;
  color: #52625e;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stock-sheet-heading-cell {
  text-align: left;
  font-weight: 700;
  background: #fbfcfb !important;
}
.stock-sheet-value-cell {
  font-variant-numeric: tabular-nums;
}
.stock-sheet-divider th,
.stock-sheet-divider td {
  height: 10px;
  padding: 0;
  border-bottom: 0;
  background: linear-gradient(180deg, #f8fbfa, #fff) !important;
}
.stock-location-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 20, .48);
}
.stock-location-dialog {
  width: min(1120px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.stock-location-cards {
  margin-bottom: 14px;
}
.stock-location-detail-grid {
  align-items: start;
}
.stock-location-edit-grid {
  margin-bottom: 14px;
}
.stock-location-team-panel {
  margin-bottom: 14px !important;
}
.stock-location-logo-panel {
  margin-bottom: 14px !important;
}
.stock-location-logo-edit {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.stock-location-logo-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfcfb;
  text-align: center;
}
.stock-location-logo-preview.has-image {
  border-style: solid;
  background: #fff;
}
.stock-location-logo-preview img,
.stock-location-logo-stat img {
  max-width: 100%;
  max-height: 132px;
  object-fit: contain;
}
.stock-location-logo-stat {
  gap: 10px;
}
.stock-location-inventory-editor-grid {
  margin-bottom: 14px;
  align-items: start;
}
.stock-location-inventory-panel {
  min-height: 100%;
}
.stock-location-employees-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.stock-location-items-editor {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.stock-location-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(160px, .7fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfb;
}
.stock-location-item-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 42px;
}
.stock-location-item-summary span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}
.stock-location-item-summary small {
  font-size: 12px;
}
.stock-location-employees-empty {
  margin: 0;
}
.stock-location-employee-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
.stock-location-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stock-location-dialog .panel {
  margin: 0;
}
.editable-field .edit-control.editing {
  grid-template-columns: minmax(0, 1fr) auto;
}
.edit-actions,
.admin-user-actions,
.user-profile-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-user-actions {
  justify-content: flex-end;
}

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px;
}
.io-toolbar-group {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.io-import-button,
.io-tools summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.io-import-button {
  min-height: 34px;
}
.io-tools {
  position: relative;
}
.io-tools summary {
  list-style: none;
  min-height: 34px;
}
.io-tools summary::-webkit-details-marker {
  display: none;
}
.io-tools[open] summary {
  color: var(--accent);
  border-color: rgba(23,108,95,.32);
}
.io-actions {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  min-width: 160px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(18,35,31,.14);
}
.io-actions button {
  padding: 7px 9px;
}
.io-tools span {
  color: var(--muted);
  font-size: 12px;
}
.bulk-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}
.bulk-tools span {
  color: var(--muted);
  font-size: 13px;
  margin-right: auto;
}
.bulk-tools button {
  padding: 7px 10px;
}
.bulk-io-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.bulk-io-tools .io-toolbar-group {
  margin-left: 0;
}
.select-col {
  width: 42px;
  text-align: center;
}
.select-col input {
  width: 18px;
  height: 18px;
  padding: 0;
}
.row-number {
  width: 54px;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.page-numbers,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.page-numbers span,
.page-actions label {
  color: var(--muted);
  font-size: 13px;
}
.page-numbers button {
  min-width: 36px;
  padding: 7px 10px;
}
.page-numbers button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-gap {
  padding: 0 2px;
}
.page-actions label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
}
.page-actions select {
  width: auto;
  min-width: 84px;
  padding: 7px 28px 7px 9px;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 76px; resize: vertical; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { background: #edf3f1; font-size: 12px; color: #52625e; text-transform: uppercase; }
.sort-header {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-transform: inherit;
}
.sort-header:hover,
.sort-header.active {
  color: var(--accent);
}
.sort-header span {
  color: var(--muted);
  font-size: 10px;
}
tr:last-child td { border-bottom: 0; }
tbody tr {
  transition: background-color .16s ease, box-shadow .16s ease;
}
tbody tr:hover {
  background: #f2f8f6;
  box-shadow: inset 3px 0 0 var(--accent);
}
.clickable-row {
  cursor: pointer;
}
.row-actions {
  white-space: nowrap;
}
.right { text-align: right; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 4px 8px; border-radius: 99px; background: var(--soft); color: var(--accent); font-size: 12px; }
.status-badge {
  min-width: 76px;
  text-align: center;
  font-weight: 700;
}
.status-draft {
  background: #fde68a;
  color: #1f2937;
}
.status-sent {
  background: #f97316;
  color: #fff;
}
.status-paid {
  background: #16a34a;
  color: #fff;
}
.status-partial {
  background: #0ea5a4;
  color: #fff;
}
.status-reminder {
  background: #7c3aed;
  color: #fff;
}
.search-results {
  margin-bottom: 14px;
}
.search-list {
  display: grid;
  gap: 8px;
}
.search-list button {
  display: grid;
  gap: 3px;
  text-align: left;
}
.search-list span {
  color: var(--muted);
  font-size: 12px;
}
.inner-panel {
  margin-top: 14px;
}
.accounting-print {
  page-break-after: auto;
  width: 100%;
  max-width: none;
}
.accounting-print .panel,
.accounting-print table {
  width: 100%;
  max-width: 100%;
}
.accounting-print table {
  table-layout: fixed;
  font-size: 11px;
}
.accounting-print th,
.accounting-print td {
  overflow-wrap: anywhere;
  padding: 6px;
}
.accounting-print .right {
  white-space: nowrap;
}

dialog {
  width: min(1180px, 94vw);
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.dialog { padding: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.preview-dialog {
  width: min(980px, 96vw);
}
.preview-scroll {
  max-height: 78vh;
  overflow: auto;
  background: #e8ecea;
  padding: 20px;
}
.preview-scroll .invoice-document {
  width: 210mm;
  max-width: 210mm;
  margin: 0 auto;
  transform-origin: top left;
}
.preview-scroll .invoice-page,
.preview-scroll .payment-page {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  box-sizing: border-box;
  overflow: hidden;
  margin-inline: auto;
  box-shadow: 0 12px 32px rgba(18,35,31,.16);
}
.payroll-payout-launcher {
  align-items: stretch;
}
.payroll-payout-dialog-shell {
  max-height: 88vh;
  overflow: auto;
}
.payroll-dialog-grid label,
.payroll-doc-card label {
  min-width: 0;
}
.payroll-doc-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.payroll-doc-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.payroll-doc-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(232,242,239,.72));
  display: grid;
  gap: 10px;
}
.payroll-doc-card strong {
  font-size: 16px;
}
.payroll-doc-card small {
  color: var(--muted);
}
.payroll-doc-card .form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0;
}
.payroll-doc-card .form-actions button {
  min-width: 112px;
}
.line-items { display: grid; gap: 8px; }
.line-row { display: grid; grid-template-columns: 1.2fr 1.5fr .5fr .7fr .5fr 40px; gap: 8px; align-items: end; }
.line-delete {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #8f2525;
  background: #fff7f7;
  border-color: #ecd0d0;
  font-size: 17px;
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

#printArea { display: none; }
.invoice-document {
  --invoice-accent: #111;
  width: 210mm;
  margin: 0 auto;
}
.invoice-page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  color: #111;
  padding: 16mm 16mm 42mm;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  break-after: page;
  page-break-after: always;
}
.invoice-page-content {
  min-height: 0;
  padding-bottom: 8mm;
}
.invoice-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--invoice-accent, #111); padding-bottom: 10mm; }
.invoice-logo { max-width: 48mm; max-height: 25mm; object-fit: contain; }
.invoice-logo-size-small .invoice-logo { max-width: 34mm; max-height: 18mm; }
.invoice-logo-size-normal .invoice-logo { max-width: 48mm; max-height: 25mm; }
.invoice-logo-size-large .invoice-logo { max-width: 68mm; max-height: 34mm; }
.invoice-meta { text-align: right; }
.invoice-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 14mm; margin: 12mm 0; }
.invoice-lines-block table,
.invoice-total {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.invoice-total {
  margin-left: auto;
  width: 78mm;
  max-width: 100%;
}
.invoice-print-totals {
  display: flex;
  justify-content: flex-end;
}
.invoice-print-totals .invoice-total {
  flex: 0 0 78mm;
}
.invoice-lines-block {
  overflow: hidden;
}
.invoice-lines-block th,
.invoice-lines-block td,
.invoice-total td,
.invoice-total th {
  padding: 2.2mm 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.14);
  vertical-align: top;
}
.invoice-lines-block thead th,
.invoice-total th {
  font-size: 8.9pt;
}
.invoice-lines-block td:first-child,
.invoice-lines-block th:first-child {
  padding-right: 4mm;
}
.invoice-total td:first-child,
.invoice-total th:first-child {
  text-align: left;
  padding-right: 8mm;
}
.invoice-total td:last-child,
.invoice-total th:last-child {
  text-align: right;
  white-space: nowrap;
}
.invoice-intro-text {
  margin: -4mm 0 8mm;
  color: #222;
  font-size: 11pt;
  line-height: 1.45;
}
.invoice-logo-right .invoice-head {
  flex-direction: row-reverse;
}
.invoice-logo-right .invoice-meta {
  text-align: left;
}
.invoice-logo-center .invoice-head {
  display: grid;
  justify-items: center;
  text-align: center;
}
.invoice-logo-center .invoice-meta {
  text-align: center;
}
.invoice-logo-none .invoice-logo {
  display: none;
}
.invoice-print-module {
  --module-color: var(--invoice-accent, #111);
  color: var(--module-text-color, #111);
  margin: 5mm 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.invoice-page-content > .invoice-print-module:last-child { margin-bottom: 0; }
.invoice-print-module p,
.invoice-print-module td,
.invoice-print-module th,
.invoice-print-module b,
.invoice-print-module strong,
.invoice-print-module span,
.invoice-print-module h1,
.invoice-print-module h2,
.invoice-print-module h3 {
  color: var(--module-text-color, inherit);
}
.invoice-print-module.module-tone-soft,
.invoice-print-module.module-tone-filled,
.invoice-head.module-tone-soft,
.invoice-head.module-tone-filled {
  padding: 4mm;
  border-radius: 4mm;
}
.invoice-print-module.module-tone-soft,
.invoice-head.module-tone-soft {
  background: color-mix(in srgb, var(--module-color) 8%, #fff);
}
.invoice-print-module.module-tone-filled,
.invoice-head.module-tone-filled {
  background: color-mix(in srgb, var(--module-color) 16%, #fff);
}
.invoice-print-module.module-tone-line,
.invoice-head.module-tone-line {
  padding-left: 4mm;
  border-left: 1.4mm solid var(--module-color);
}
.invoice-print-module.module-tone-dark,
.invoice-head.module-tone-dark {
  padding: 5mm;
  border-radius: 4mm;
  background: color-mix(in srgb, var(--module-color) 86%, #111);
  color: var(--module-text-color, #fff);
}
.invoice-head.module-tone-dark h1,
.invoice-head.module-tone-dark h2,
.invoice-head.module-tone-dark p,
.invoice-print-module.module-tone-dark p,
.invoice-print-module.module-tone-dark td,
.invoice-print-module.module-tone-dark th {
  color: var(--module-text-color, #fff);
}
.invoice-print-module.module-size-small,
.invoice-head.module-size-small {
  font-size: 9.5pt;
}
.invoice-print-module.module-size-large,
.invoice-head.module-size-large {
  font-size: 12.5pt;
}
.invoice-print-module.module-align-center,
.invoice-head.module-align-center {
  text-align: center;
}
.invoice-print-module.module-align-right,
.invoice-head.module-align-right {
  text-align: right;
}
.invoice-print-module.module-align-right .invoice-total,
.invoice-print-module.module-align-right .invoice-payment-history,
.invoice-print-module.module-align-right .invoice-intro-text,
.invoice-print-module.module-align-right > p,
.invoice-print-module.module-align-right > div > p {
  margin-left: auto;
}
.invoice-totals-block {
  width: 100%;
}
.invoice-print-module.module-align-right .invoice-totals-block {
  display: flex;
  justify-content: flex-end;
  text-align: initial;
}
.invoice-print-module.module-align-right .invoice-totals-block .invoice-total {
  margin-left: auto;
}
.invoice-print-module.module-align-right .invoice-lines-block,
.invoice-print-module.module-align-right .invoice-lines-block table,
.invoice-print-module.module-align-right .invoice-lines-block th,
.invoice-print-module.module-align-right .invoice-lines-block td,
.invoice-print-module.module-align-right .invoice-addresses,
.invoice-print-module.module-align-right .invoice-addresses p {
  text-align: left;
}
.invoice-layout-modern .invoice-page {
  border-top: 7mm solid var(--invoice-accent, #176c5f);
}
.invoice-layout-modern .invoice-head {
  border-bottom-width: 1px;
  color: #10231f;
}
.invoice-layout-modern .invoice-meta h1 {
  color: var(--invoice-accent, #176c5f);
}
.invoice-layout-compact .invoice-page {
  padding: 11mm 13mm 28mm;
  font-size: 10.2pt;
}
.invoice-layout-compact .invoice-head {
  padding-bottom: 6mm;
}
.invoice-layout-compact .invoice-addresses {
  margin: 7mm 0;
}
.invoice-layout-compact .payment-page {
  padding: 0;
}
.invoice-layout-minimal .invoice-head {
  border-bottom: 1px solid rgba(17,17,17,.28);
}
.invoice-layout-minimal .invoice-logo,
.invoice-layout-minimal .invoice-page h2 {
  max-height: 16mm;
}
.invoice-layout-editorial .invoice-page {
  padding: 18mm 18mm 28mm;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--invoice-accent) 11%, #fff) 0 34mm, #fff 34mm);
}
.invoice-layout-editorial .invoice-head {
  display: grid;
  justify-items: center;
  text-align: center;
  border-bottom: 0;
}
.invoice-layout-editorial .invoice-meta h1 {
  font-size: 34pt;
  color: var(--invoice-accent);
}
.invoice-layout-block .invoice-page {
  padding: 13mm 13mm 28mm;
}
.invoice-layout-block .invoice-head {
  padding: 7mm;
  border: 0;
  border-radius: 5mm;
  background: var(--invoice-accent);
  color: #fff;
}
.invoice-layout-block .invoice-head h1,
.invoice-layout-block .invoice-head h2,
.invoice-layout-block .invoice-head p {
  color: #fff;
}
.invoice-layout-logoHero .invoice-head {
  display: grid;
  justify-items: center;
  text-align: center;
  border-bottom: 0;
  border-radius: 7mm;
  background: color-mix(in srgb, var(--invoice-accent) 13%, #fff);
  padding: 9mm;
}
.invoice-layout-logoHero .invoice-logo {
  max-width: 62mm;
  max-height: 30mm;
}
.invoice-layout-logoHero.invoice-logo-size-large .invoice-logo {
  max-width: 78mm;
  max-height: 39mm;
}
.invoice-layout-logoHero.invoice-logo-size-small .invoice-logo {
  max-width: 44mm;
  max-height: 22mm;
}
.invoice-layout-sideLogo .invoice-page {
  border-left: 10mm solid color-mix(in srgb, var(--invoice-accent) 88%, #111);
}
.invoice-layout-sideLogo .invoice-head {
  border-bottom: 1px solid color-mix(in srgb, var(--invoice-accent) 36%, #ccc);
}
.invoice-layout-stamp .invoice-head {
  border-bottom: 0;
  padding: 7mm;
  background: linear-gradient(135deg, rgba(255,255,255,.98), color-mix(in srgb, var(--invoice-accent) 7%, #fff));
}
.invoice-layout-stamp .invoice-logo {
  padding: 3mm;
  border: 1px solid color-mix(in srgb, var(--invoice-accent) 45%, #ddd);
  border-radius: 999px;
}
.invoice-layout-corporate .invoice-page {
  border-top: 9mm solid var(--invoice-accent);
}
.invoice-layout-corporate .invoice-head {
  padding: 7mm;
  border: 0;
  background: color-mix(in srgb, var(--invoice-accent) 88%, #111);
  color: #fff;
}
.invoice-layout-corporate .invoice-head h1,
.invoice-layout-corporate .invoice-head h2,
.invoice-layout-corporate .invoice-head p {
  color: #fff;
}
.invoice-layout-premium .invoice-page {
  background:
    radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--invoice-accent) 10%, transparent), transparent 24%),
    #fff;
}
.invoice-layout-premium .invoice-head {
  border-bottom: 1px solid color-mix(in srgb, var(--invoice-accent) 35%, #ddd);
}
.invoice-layout-service .invoice-page {
  border-top: 4mm solid color-mix(in srgb, var(--invoice-accent) 70%, #fff);
}
.invoice-layout-service .invoice-head {
  border-bottom: 1px dashed color-mix(in srgb, var(--invoice-accent) 40%, #ccc);
}
.invoice-no-payment-slip .invoice-page {
  break-after: auto;
  page-break-after: auto;
}
.invoice-page-footer {
  position: absolute;
  left: 16mm;
  right: 16mm;
  bottom: 7mm;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3mm;
  padding-top: 3mm;
  border-top: 1px solid rgba(17,17,17,.22);
  color: var(--module-text-color, #333);
  font-family: Arial, sans-serif;
  font-size: 7pt;
  line-height: 1.25;
}
.invoice-page-footer span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.invoice-page-footer-payment {
  position: absolute;
  left: 16mm;
  right: 16mm;
  bottom: 110mm;
  grid-template-columns: repeat(4, minmax(24mm, 1fr));
  font-size: 6.4pt;
  line-height: 1.15;
  z-index: 2;
}
.invoice-payment-history {
  margin-top: 4mm;
  padding-top: 0;
  page-break-inside: avoid;
  break-inside: avoid;
  max-width: 100%;
  overflow: hidden;
}
.invoice-payment-history ul li {
  overflow-wrap: anywhere;
}
.invoice-payment-history ul li {
  overflow-wrap: anywhere;
}
.invoice-payment-history b {
  display: block;
  margin-bottom: 2mm;
}
.invoice-payment-history ul {
  margin: 0;
  padding-left: 4mm;
}
.letter-text {
  margin-top: 10mm;
  color: #111;
  font-size: 12pt;
  line-height: 1.55;
}
.reminder-total {
  margin-top: 12mm;
}
.payment-page {
  position: relative;
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  background: #fff;
  color: #111;
  padding: 0;
  display: flex;
  align-items: flex-end;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
  break-before: page;
  break-after: auto;
  page-break-before: always;
  page-break-after: auto;
}
.payment-part.swiss-qr-slip {
  border-top: 1px dashed #777;
  display: grid;
  grid-template-columns: 62mm 148mm;
  gap: 0;
  padding: 0;
  width: 210mm;
  height: 105mm;
  min-height: 105mm;
  box-sizing: border-box;
}
.qr-receipt {
  position: relative;
  border-right: 1px dashed #777;
  padding: 5mm 4mm 4mm 5mm;
  display: grid;
  align-content: start;
  gap: 3mm;
  width: 100%;
  min-width: 0;
  justify-self: stretch !important;
  align-self: stretch;
  overflow: hidden;
}
.qr-payment {
  padding: 5mm 5mm 4mm;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 3mm;
  width: 100%;
  min-width: 0;
  justify-self: stretch !important;
  align-self: stretch;
  overflow: hidden;
}
.qr-receipt h3,
.qr-payment h3 {
  margin: 0;
  color: inherit;
  font-size: 10pt;
  line-height: 1.1;
}
.qr-payment-grid {
  display: grid;
  grid-template-columns: 52mm 1fr;
  gap: 7mm;
  align-items: start;
}
.qr-code-column {
  display: grid;
  gap: 4mm;
  align-content: start;
}
.qr-payment-details {
  display: grid;
  gap: 3mm;
  align-content: start;
  min-width: 0;
}
.qr-receipt p,
.qr-payment p,
.qr-slip-block p {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.qr-slip-block b {
  display: block;
  color: inherit;
  font-size: 6.5pt;
  font-weight: 700;
  line-height: 1.1;
}
.qr-slip-block p {
  margin: 1mm 0 0;
  color: inherit;
  font-size: 8pt;
  line-height: 1.18;
  white-space: pre-line;
}
.qr-slip-amount {
  display: flex;
  gap: 8mm;
  align-items: end;
  margin-top: 1mm;
}
.qr-slip-amount span {
  display: grid;
  gap: 1mm;
}
.qr-slip-amount b {
  color: inherit;
  font-size: 6.5pt;
  line-height: 1;
}
.qr-slip-amount strong {
  color: inherit;
  font-size: 8.5pt;
  line-height: 1;
}
.qr-acceptance {
  position: absolute;
  right: 5mm;
  bottom: 5mm;
  color: inherit;
  font-size: 6.5pt;
  font-weight: 700;
}
.qr-wrap { position: relative; width: 46mm; height: 46mm; }
.qr-wrap svg, .qr-wrap img, .qr-wrap canvas { width: 46mm !important; height: 46mm !important; display: block; }
.qr-fallback {
  width: 46mm;
  height: 46mm;
  border: 1px solid #111;
  display: grid;
  place-items: center;
  padding: 4mm;
  font-size: 10px;
  text-align: center;
}
.swiss-cross {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 9mm; height: 9mm; background: #fff; border-radius: .8mm;
  pointer-events: none;
}
.swiss-cross::before, .swiss-cross::after {
  content: ""; position: absolute; background: #111; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.swiss-cross::before { width: 5.4mm; height: 1.8mm; }
.swiss-cross::after { width: 1.8mm; height: 5.4mm; }
.warn { color: #9b4b00; background: #fff5e7; border: 1px solid #ffd9a3; padding: 10px; border-radius: 8px; }

@media (max-width: 1100px) {
  .admin-quick-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-audit-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-audit-search,
  .admin-audit-filter-count {
    grid-column: 1 / -1;
  }
  .admin-audit-filter-count {
    justify-self: start;
  }
  .stock-sheet-grid {
    grid-template-columns: 1fr;
  }
  .stock-sheet-location .stock-sheet-grid {
    grid-template-columns: 1fr;
  }
  .stock-sheet-info {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stock-sheet-summary {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .stock-sheet-info-grid,
  .stock-sheet-center-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-permissions-editor {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .stock-sheet-card-center {
    padding-top: 12px;
  }
  .stock-location-employee-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stock-location-item-row {
    grid-template-columns: 1fr;
  }
  .stock-location-employee-row button {
    width: 100%;
    height: 42px;
  }
  .platform-admin-row {
    grid-template-columns: 1fr;
  }
  .admin-platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-platform-password-fields {
    grid-template-columns: 1fr;
  }
  .admin-password-note {
    grid-column: 1;
  }
  .invoice-payment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customer-note-row {
    grid-template-columns: 1fr;
  }
  .central-identity-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .central-identity-logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }
  .central-identity-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .central-identity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    display: block;
    padding-bottom: 22px;
  }
  .auth-language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-range-frame {
    padding: 14px;
    border-radius: 18px;
  }
  .dashboard-range-note {
    font-size: 12px;
  }
  body.sidebar-collapsed {
    display: block;
  }
  .sidebar {
    display: none;
  }
  main {
    margin-left: 0;
    padding: 0 14px 18px;
  }
  .stock-item-card {
    min-width: 186px;
    max-width: 186px;
  }
  .admin-platform-grid {
    grid-template-columns: 1fr;
  }
  .plan-limit-grid,
  .plan-feature-grid {
    grid-template-columns: 1fr;
  }
  .invoice-payment-row {
    grid-template-columns: 1fr;
  }
  .central-detail-tables {
    grid-template-columns: 1fr;
  }
  .offers-toolbar {
    align-items: stretch;
  }
  .offers-search {
    min-width: 100%;
  }
  body.auth-mode {
    padding-bottom: 0;
  }
  body.auth-mode main {
    padding: 0;
  }
  .mobile-menu-button {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 37;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 13px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 10px 28px rgba(18,35,31,.12);
    backdrop-filter: blur(10px);
    font-size: 24px;
    line-height: 1;
  }
  .mobile-menu-panel {
    position: fixed;
    top: 70px;
    left: 12px;
    z-index: 36;
    width: min(292px, calc(100vw - 24px));
    display: none;
    gap: 7px;
    padding: 10px;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 45px rgba(18,35,31,.20);
    backdrop-filter: blur(12px);
  }
  .mobile-menu-panel.open {
    display: grid;
  }
  .mobile-menu-panel button {
    width: 100%;
    padding: 12px 13px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--ink);
    text-align: left;
  }
  .mobile-menu-panel button.active {
    background: var(--soft);
    color: var(--accent);
    font-weight: 700;
  }
  .mobile-menu-panel .nav-group {
    gap: 1px;
  }
  .mobile-menu-panel .nav-submenu {
    gap: 1px;
    padding-left: 3px;
  }
  .mobile-menu-panel .mobile-menu-sub {
    font-size: 13px;
    color: var(--muted);
  }
  .app-brand-badge {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 266;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 10px 28px rgba(18,35,31,.12);
    backdrop-filter: blur(10px);
    color: var(--ink);
    cursor: pointer;
    max-width: calc(100vw - 128px);
    overflow: hidden;
  }
  .brand-logo-box {
    min-width: 50px;
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 6px 8px;
    border-right: 1px solid var(--line);
  }
  .brand-logo-box img {
    max-width: 74px;
    max-height: 36px;
    object-fit: contain;
  }
  .brand-wordmark {
    display: grid;
    gap: 0;
    padding: 6px 10px;
    line-height: 1.02;
    text-align: left;
    letter-spacing: 0;
  }
  .mini-swiss-flag {
    width: 15px;
    height: 15px;
    display: inline-block;
    position: relative;
    top: 2px;
    margin-left: 4px;
    border-radius: 3px;
    background: #e53935;
  }
  .mini-swiss-flag::before,
  .mini-swiss-flag::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 1px;
  }
  .mini-swiss-flag::before {
    width: 9px;
    height: 3px;
  }
  .mini-swiss-flag::after {
    width: 3px;
    height: 9px;
  }
  .app-brand-badge .mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }
  .app-brand-badge .mark::before { width: 15px; height: 5px; }
  .app-brand-badge .mark::after { width: 5px; height: 15px; }
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 128px;
    margin: 0 0 16px;
    padding: 78px 0 0;
    border-radius: 0;
  }
  .topbar::before {
    left: 8px;
    right: 8px;
    height: 144px;
    border-radius: 0 0 22px 22px;
  }
  .topbar::after {
    left: 8px;
    right: 8px;
    height: 144px;
    border-radius: 0 0 22px 22px;
  }
  body[data-active-tab="dashboard"] .topbar {
    min-height: 78px;
    margin-bottom: 8px;
    padding-top: 48px;
  }
  body[data-active-tab="dashboard"] .topbar::before,
  body[data-active-tab="dashboard"] .topbar::after {
    height: 86px;
    border-radius: 0 0 18px 18px;
  }
  .topbar-copy {
    gap: 5px;
    padding-top: 0;
    padding-right: 0;
  }
  .topbar-status {
    position: fixed;
    top: 64px;
    right: 12px;
    z-index: 255;
    width: calc(100vw - 24px);
  }
  .topbar-sticky-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 250;
    min-height: 74px;
    display: block;
    pointer-events: none;
  }
  .topbar-sticky-shell::before {
    top: 0;
    left: 8px;
    right: 8px;
    height: 68px;
    border-radius: 0 0 18px 18px;
  }
  .desktop-logo-badge {
    display: none;
  }
  .topbar-brand-cluster {
    position: fixed;
    top: 12px;
    left: 64px;
    transform: none;
    z-index: 266;
    gap: 8px;
    align-items: flex-start;
  }
  .central-header-badge {
    height: 44px;
    padding: 0 11px;
    border-radius: 13px;
    font-size: 10px;
    letter-spacing: .06em;
  }
  .platform-admin-mode .topbar-brand-cluster .central-header-badge {
    display: none;
  }
  .admin-header-menu {
    position: fixed;
    top: 64px;
    left: 64px;
    right: 12px;
    width: auto;
    max-width: none;
    min-height: 38px;
    justify-content: flex-start;
    padding: 4px;
    border-radius: 14px;
    background: rgba(255,255,255,.76);
    z-index: 266;
  }
  .platform-admin-mode .topbar-status {
    top: 106px;
  }
  .admin-header-item {
    height: 30px;
    padding-inline: 9px;
    font-size: 10.5px;
    border-radius: 10px;
  }
  .admin-header-main {
    padding-inline: 11px;
  }
  .admin-subscriber-modal-grid {
    grid-template-columns: 1fr;
  }
  .admin-subscriber-payment-form {
    grid-template-columns: 1fr;
  }
  .topbar h1 {
    font-size: 25px;
  }
  .topbar .actions {
    position: fixed;
    top: 12px;
    right: max(18px, env(safe-area-inset-right));
    z-index: 266;
    display: flex;
    gap: 8px;
  }
  .trend-metric-grid-revenue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trend-panel-revenue .trend-metric-card-revenue b {
    font-size: 21px;
  }
  .trend-compare-pill {
    min-width: 74px;
    padding: 5px 7px;
  }
  .trend-compare-pill b {
    font-size: 16px;
  }
  .topbar .actions > :not(#logoutBtn):not(#mobileSettingsBtn) {
    display: none;
  }
  .topbar-status .badge {
    max-width: min(78vw, 320px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .language-picker select {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 13px;
    background-color: rgba(255,255,255,.68);
    box-shadow: 0 10px 28px rgba(18,35,31,.12);
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
    font-size: 13px;
    overflow: hidden;
  }
  .language-picker {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    overflow: hidden;
  }
  .language-picker select option {
    font-size: 14px;
  }
  .finance-strip {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
  }
  .dashboard-toolbar {
    align-items: stretch;
  }
  .dashboard-command-center {
    padding-top: 25px;
  }
  .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy {
    padding-right: min(36vw, 142px);
  }
  .dashboard-mobile-central-badge {
    position: absolute;
    top: 28px;
    right: 26px;
    z-index: 3;
    min-width: 118px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(23,108,95,.18);
    border-radius: 999px;
    background:
      radial-gradient(circle at 18% 18%, rgba(45,212,191,.25), transparent 42%),
      linear-gradient(135deg, rgba(255,255,255,.9), rgba(231,251,244,.82));
    color: #0f3d35;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
    box-shadow: 0 14px 28px rgba(18,35,31,.12);
    backdrop-filter: blur(14px);
  }
  .dashboard-mobile-central-badge:active {
    transform: translateY(1px);
  }
  .app-footer-shell {
    width: min(920px, 100%);
    margin-top: 28px;
  }
  .dashboard-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
    grid-template-rows: repeat(3, 34px);
    gap: 7px;
    align-items: stretch;
  }
  .dashboard-filter-row label {
    display: block;
    min-width: 0;
    height: 34px;
  }
  .dashboard-filter-row label:nth-of-type(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }
  .dashboard-filter-row label:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .dashboard-filter-row label:nth-of-type(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .dashboard-filter-row label:nth-of-type(4) {
    grid-column: 1 / 3;
    grid-row: 3;
  }
  .dashboard-filter-row input,
  .dashboard-filter-row select,
  .dashboard-filter-row input[type="search"],
  .dashboard-filter-row input[type="date"] {
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding-block: 0;
  }
  .dashboard-filter-row button {
    width: auto;
    min-width: 38px;
    height: 34px;
    min-height: 34px;
    padding-block: 0;
  }
  .dashboard-search-button,
  .dashboard-clear-button,
  .dashboard-add-toggle {
    width: 38px;
    min-width: 38px;
  }
  .dashboard-search-button {
    grid-column: 3;
    grid-row: 1;
  }
  .dashboard-clear-button {
    grid-column: 3;
    grid-row: 2;
  }
  .dashboard-add {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    height: 34px;
  }
  .dashboard-compare-stat.has-compare b {
    font-size: 17px;
  }
  .dashboard-compare-stat small {
    font-size: 11px;
  }
  .finance-strip .stat {
    padding: 8px 10px;
    padding-right: 58px;
    min-height: 58px;
  }
  .finance-strip .stat b {
    font-size: 20px;
    margin-top: 2px;
  }
  .expense-strip {
    padding-block: 6px;
  }
  .expense-strip .stat {
    padding: 6px 9px;
    padding-right: 56px;
    min-height: 46px;
  }
  .expense-strip .stat b {
    font-size: 18px;
  }
  .finance-icon,
  .expense-strip .finance-icon {
    min-height: 46px;
    border-radius: 10px;
  }
  .finance-icon::before {
    left: 11px;
    bottom: 12px;
    width: 6px;
    height: 16px;
    box-shadow: 9px -6px 0 currentColor, 18px -10px 0 currentColor;
  }
  .stat-with-icon::after {
    right: 8px;
    width: 40px;
    height: 40px;
    background-size: 30px 30px;
    border-radius: 9px;
  }
  #logoutBtn,
  #mobileSettingsBtn {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(255,255,255,.68);
    box-shadow: 0 10px 28px rgba(18,35,31,.12);
    backdrop-filter: blur(10px);
  }
  #mobileSettingsBtn {
    color: var(--accent);
  }
  .desktop-only { display: none; }
  .mobile-only { display: inline; }
  .mobile-app-footer {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    margin: 18px -14px -18px;
    padding: 9px 14px 10px;
    border-top: 1px solid rgba(255,255,255,.14);
    background: #10231f;
    color: rgba(255,255,255,.86);
  }
  .mobile-app-footer .kw-brand {
    color: #fff;
    gap: 8px;
    font-size: 13px;
  }
  .mobile-app-footer .kw-logo {
    width: 58px;
    max-height: 26px;
    object-fit: contain;
  }
  .mobile-app-footer .support-links a {
    width: 32px;
    height: 32px;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.1);
    color: #fff;
  }
  .mobile-bottom-nav { display: none; }
  .mobile-quick-add {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 34;
    display: grid;
    justify-items: end;
    gap: 10px;
  }
  .mobile-voice-button {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 34;
    width: 62px;
    height: 62px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent);
    background: rgba(255,255,255,.34);
    box-shadow: 0 18px 42px rgba(18,35,31,.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    touch-action: none;
    user-select: none;
  }
  .mobile-voice-button.voice-listening {
    color: #fff;
    background: rgba(23,108,95,.76);
  }
  .quick-add-toggle {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #10b981);
    box-shadow: 0 18px 42px rgba(18,35,31,.28);
    font-size: 36px;
    line-height: 1;
  }
  .quick-add-menu {
    display: grid;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px) scale(.96);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .mobile-quick-add.open .quick-add-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .quick-add-menu button {
    min-width: 176px;
    border: 1px solid rgba(255,255,255,.64);
    border-radius: 14px;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(16px);
    color: var(--ink);
    box-shadow: 0 12px 30px rgba(18,35,31,.16);
    font-weight: 700;
    text-align: left;
  }
  .home-glyph {
    width: 25px;
    height: 21px;
    display: inline-block;
    position: relative;
  }
  .home-glyph::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 19px;
    height: 15px;
    border-radius: 4px 4px 6px 6px;
    background: var(--accent);
  }
  .home-glyph::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 17px;
    height: 17px;
    background: var(--accent);
    transform: rotate(45deg);
    border-radius: 3px;
  }
  .topbar, .grid.two, .grid.three { grid-template-columns: 1fr; display: grid; }
  .app-footer-shell {
    width: 100%;
    margin-top: 22px;
  }
  .dashboard-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-section-grid,
  .admin-signal-grid {
    grid-template-columns: 1fr;
  }
  .admin-timeline {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .payroll-doc-actions,
  .payroll-doc-summary {
    grid-template-columns: 1fr;
  }
  .special-payout-form {
    grid-template-columns: 1fr;
  }
  .line-row { grid-template-columns: 1fr 1fr; }
  .invoice-draft-summary-grid,
  .product-location-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar > button,
  .io-tools {
    width: 100%;
  }
  .toolbar-search {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .invoice-filter-rail {
    justify-content: stretch;
  }
  .invoice-filter-rail .io-toolbar-group,
  .invoice-filter-rail .invoice-status-filter,
  .invoice-filter-rail .invoice-date-filter-group,
  .invoice-filter-rail .search-box,
  .invoice-filter-rail .invoice-customer-filter,
  .invoice-io-filter-cell,
  .invoice-filter-rail .list-import-filter-cell,
  .invoice-filter-rail .list-action-filter-cell,
  .invoice-filter-rail > button,
  .invoice-filter-count {
    width: 100%;
  }
  .invoice-filter-rail {
    grid-template-columns: 1fr;
  }
  .offers-filter-group,
  .customer-filter-rail {
    grid-template-columns: 1fr;
  }
  .customer-date-filter-group {
    grid-template-columns: 1fr;
  }
  .offers-filter-group .list-filter-count,
  .customer-filter-rail .list-filter-count {
    justify-self: stretch;
    text-align: center;
  }
  .list-action-control {
    display: grid;
    grid-template-columns: 1fr;
  }
  .list-action-selected {
    width: 100%;
  }
  .invoice-date-filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: 0;
  }
  .invoice-filter-rail .io-toolbar-group {
    justify-content: flex-start;
  }
  .invoice-filter-rail .toolbar-search {
    border-top: 0;
    padding-top: 0;
  }
  .bulk-io-tools {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
  .invoice-bulk-add-badge {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    font-size: 28px;
  }
  .io-tools {
    margin-left: 0;
  }
  .io-tools summary {
    width: 100%;
    text-align: center;
  }
  #invoiceDialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  #invoiceDialog .dialog {
    min-height: 100dvh;
    padding: 12px 12px 108px;
  }
  #invoiceDialog .dialog-head {
    position: sticky;
    top: 0;
    z-index: 8;
    margin: -12px -12px 14px;
    padding: 12px;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  #invoiceDialog .dialog-close {
    background: rgba(220,38,38,.9);
    border-color: rgba(220,38,38,.24);
    color: #fff;
  }
  #invoiceDialog .form-actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 16px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(18,35,31,.18);
  }
  #invoiceDialog .form-actions button {
    min-height: 46px;
    width: 100%;
  }
  .io-actions {
    position: static;
    margin-top: 8px;
    min-width: 0;
    box-shadow: none;
  }
  .bulk-tools {
    align-items: stretch;
  }
  .bulk-tools span {
    flex: 1 0 100%;
    margin-right: 0;
  }
  .bulk-tools button {
    flex: 1 1 130px;
  }
  .pagination,
  .page-actions {
    align-items: stretch;
  }
  .pagination {
    display: grid;
  }
  .page-actions label,
  .page-actions button {
    flex: 1 1 130px;
  }
  .panel {
    overflow-x: auto;
  }
  table {
    min-width: 720px;
  }
  .widget-grid,
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }
  .voice-assistant-layer {
    padding: 10px;
  }
  .voice-assistant-dialog {
    width: min(100vw - 12px, 1000px);
    max-height: calc(100vh - 12px);
    padding: 20px 16px 16px;
    border-radius: 24px;
  }
  .voice-assistant-progress,
  .voice-assistant-controls {
    grid-template-columns: 1fr;
  }
  .voice-assistant-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .voice-assistant-stage-copy {
    width: 100%;
  }
  .voice-assistant-mode {
    justify-self: center;
  }
  .voice-assistant-actions button {
    flex: 1 1 100%;
  }
  dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}

@media print {
  html,
  body {
    width: 210mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
  }
  body:not(.pdf-body) > *:not(#printArea) { display: none !important; }
  @page { size: A4; margin: 0; }
  #printArea {
    display: block !important;
    width: 210mm;
    margin: 0;
    padding: 0;
  }
  #printArea .invoice-document,
  body.pdf-body .invoice-document {
    width: 210mm;
    margin: 0;
  }
  #printArea .invoice-page,
  body.pdf-body .invoice-page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    box-sizing: border-box;
    overflow: hidden;
    break-after: auto;
    page-break-after: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #printArea .invoice-page .invoice-print-module,
  body.pdf-body .invoice-page .invoice-print-module,
  #printArea .invoice-page .invoice-head,
  body.pdf-body .invoice-page .invoice-head {
    max-width: 100%;
    overflow: hidden;
  }
  #printArea .invoice-no-payment-slip .invoice-page {
    break-after: auto;
    page-break-after: auto;
  }
  #printArea .payment-page,
  body.pdf-body .payment-page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    box-sizing: border-box;
    margin: 0;
    overflow: hidden;
    break-before: page;
    page-break-before: always;
    break-after: auto;
    page-break-after: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  #printArea .payment-page .qr-receipt,
  #printArea .payment-page .qr-payment,
  body.pdf-body .payment-page .qr-receipt,
  body.pdf-body .payment-page .qr-payment {
    width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
  }
  #printArea .payment-page .qr-payment-grid,
  body.pdf-body .payment-page .qr-payment-grid {
    align-items: start;
  }
  #printArea .invoice-page .invoice-print-module.module-align-right,
  body.pdf-body .invoice-page .invoice-print-module.module-align-right {
    text-align: right;
  }
  #printArea .invoice-page .invoice-print-module.module-align-right .invoice-lines-block,
  #printArea .invoice-page .invoice-print-module.module-align-right .invoice-lines-block table,
  #printArea .invoice-page .invoice-print-module.module-align-right .invoice-lines-block th,
  #printArea .invoice-page .invoice-print-module.module-align-right .invoice-lines-block td,
  body.pdf-body .invoice-page .invoice-print-module.module-align-right .invoice-lines-block,
  body.pdf-body .invoice-page .invoice-print-module.module-align-right .invoice-lines-block table,
  body.pdf-body .invoice-page .invoice-print-module.module-align-right .invoice-lines-block th,
  body.pdf-body .invoice-page .invoice-print-module.module-align-right .invoice-lines-block td {
    text-align: left !important;
  }
  #printArea .invoice-document > .payment-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  #printArea .accounting-print {
    width: 277mm;
    min-height: 190mm;
    padding: 10mm;
  }
  #printArea .accounting-print table {
    table-layout: fixed;
    font-size: 9.5px;
  }
  #printArea .accounting-print th,
  #printArea .accounting-print td {
    padding: 4px;
  }
  #printArea .accounting-print .row-number,
  #printArea .accounting-print th:first-child {
    width: 28px;
  }
}

.ocr-debug {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ocr-debug summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.ocr-debug textarea {
  min-height: 160px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}

#dashboard {
  --dashboard-ink: #142520;
  --dashboard-muted: #6b7c76;
  --dashboard-card: rgba(255,255,255,.88);
  --dashboard-line: rgba(34,65,58,.14);
  --dashboard-glow: 0 24px 60px rgba(16,40,35,.11);
  --dashboard-hero-row: clamp(304px, 21vw, 342px);
  --dashboard-flow-row: clamp(520px, 35vw, 620px);
}

.dashboard-modern-shell {
  display: grid;
  gap: 22px;
}

.dashboard-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-overview-main,
.dashboard-overview-sidebar {
  display: grid;
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.dashboard-overview-sidebar {
  align-content: start;
}

.dashboard-command-center {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .86fr) minmax(560px, 1.35fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 34px;
  overflow: visible;
  background:
    radial-gradient(circle at 12% 15%, rgba(39,124,108,.18), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(245,158,11,.16), transparent 30%),
    linear-gradient(135deg, rgba(248,252,250,.96), rgba(235,244,240,.88));
  box-shadow: var(--dashboard-glow);
}

.dashboard-command-center::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24,72,62,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,72,62,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.42), transparent 72%);
}

.dashboard-command-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.dashboard-eyebrow,
.dashboard-panel-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(23,108,95,.16);
  background: rgba(255,255,255,.72);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-command-copy h2 {
  margin: 0;
  color: var(--dashboard-ink);
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: .95;
  letter-spacing: -.055em;
}

.dashboard-command-copy p {
  max-width: 560px;
  margin: 0;
  color: var(--dashboard-muted);
  font-size: 14px;
  line-height: 1.55;
}

.dashboard-period-chip {
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 8px 11px;
  border: 1px dashed rgba(23,108,95,.28);
  border-radius: 14px;
  background: rgba(255,255,255,.66);
  color: #50655f;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-toolbar-modern {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 12px;
  border-color: rgba(255,255,255,.72);
  border-radius: 26px;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68), 0 16px 36px rgba(18,35,31,.08);
  backdrop-filter: blur(18px);
}

.dashboard-toolbar-modern .dashboard-filter-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.dashboard-toolbar-modern .dashboard-filter-row input,
.dashboard-toolbar-modern .dashboard-filter-row select,
.dashboard-toolbar-modern .dashboard-filter-row button {
  border-color: rgba(23,108,95,.14);
  background-color: rgba(255,255,255,.86);
  box-shadow: 0 8px 18px rgba(18,35,31,.06);
}

.dashboard-toolbar-modern .dashboard-search-field input {
  width: min(360px, 28vw);
}

.dashboard-account-scope select {
  min-width: 190px;
  border-color: rgba(15,118,110,.26);
  background:
    linear-gradient(180deg, rgba(236,253,245,.9), rgba(255,255,255,.94));
  color: #12352f;
  font-weight: 800;
}

.dashboard-mobile-central-badge {
  display: none;
}

@media (max-width: 760px) {
  .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-central-badge {
    display: inline-flex;
  }
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 16px;
  align-items: stretch;
}

.dashboard-hero-main,
.dashboard-hero-side,
.dashboard-modern-panel,
.dashboard-modern-stack > .panel,
.dashboard-modern-stack > .grid > .panel {
  border: 1px solid rgba(16,40,35,.12);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(247,251,249,.88));
  box-shadow: 0 24px 58px rgba(16,40,35,.10);
  backdrop-filter: blur(14px);
}

.dashboard-hero-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .34fr);
  gap: 14px;
  padding: 18px;
  overflow: hidden;
}

.dashboard-hero-main::before {
  content: "";
  position: absolute;
  inset: auto -70px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(23,108,95,.16), transparent 68%);
  pointer-events: none;
}

.dashboard-hero-heading {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(246,250,248,.96), rgba(255,255,255,.72));
}

.dashboard-active-profile {
  display: inline-grid;
  justify-self: start;
  gap: 2px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 16px;
  background: rgba(232,246,242,.62);
}
.dashboard-active-profile small {
  color: var(--dashboard-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.dashboard-active-profile b {
  color: var(--dashboard-ink);
  font-size: 14px;
  line-height: 1.05;
}

.dashboard-hero-heading span,
.dashboard-net-card span,
.dashboard-modern-metric span,
.dashboard-signal-card span {
  color: var(--dashboard-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.dashboard-hero-heading strong {
  color: var(--dashboard-ink);
  font-size: clamp(20px, 2vw, 31px);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.dashboard-net-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 13px;
  border-radius: 19px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #15342d, #24584d);
  box-shadow: 0 13px 26px rgba(18,52,45,.16);
}

.dashboard-net-card::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -32px;
  width: 91px;
  height: 91px;
  border-radius: 999px;
  border: 15px solid rgba(255,255,255,.10);
}

.dashboard-net-negative {
  background: linear-gradient(135deg, #5b2a16, #b45309);
}

.dashboard-net-card span {
  color: rgba(255,255,255,.72);
}

.dashboard-net-card b {
  position: relative;
  z-index: 1;
  font-size: clamp(21px, 2.8vw, 36px);
  line-height: .95;
  letter-spacing: -.06em;
}

.dashboard-net-card em,
.dashboard-modern-metric em {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.dashboard-modern-metric em {
  color: #69817a;
}

.dashboard-modern-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-modern-metric {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
}

.dashboard-modern-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--metric-color, var(--accent));
}

.dashboard-modern-metric-income { --metric-color: #08996f; }
.dashboard-modern-metric-expense { --metric-color: #ea580c; }
.dashboard-modern-metric-open { --metric-color: #dc2626; }
.dashboard-modern-metric-paid { --metric-color: #2563eb; }

.dashboard-modern-metric b {
  color: var(--dashboard-ink);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1;
  letter-spacing: -.04em;
}

.dashboard-modern-metric small {
  color: var(--dashboard-muted);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-hero-side {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.dashboard-signal-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(244,249,247,.78));
}

.dashboard-signal-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  opacity: .18;
  background: var(--signal-color, var(--accent));
}

.dashboard-signal-customers { --signal-color: #0f766e; }
.dashboard-signal-invoices { --signal-color: #7c3aed; }
.dashboard-signal-pressure { --signal-color: #f97316; }

.dashboard-signal-card b {
  color: var(--dashboard-ink);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.dashboard-signal-card small {
  max-width: 190px;
  color: var(--dashboard-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-modern-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.dashboard-modern-panel {
  position: relative;
  isolation: isolate;
  padding: 20px;
  overflow: hidden;
}

.dashboard-modern-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,.46), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(20,184,166,.10), transparent 34%);
}

.dashboard-modern-panel h3 {
  margin: 10px 0 14px;
  color: var(--dashboard-ink);
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -.04em;
}

.dashboard-chart-card-revenue {
  background:
    linear-gradient(90deg, rgba(14,165,233,.95) 0 5px, transparent 5px),
    radial-gradient(circle at 16% 0%, rgba(14,165,233,.14), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,249,255,.90));
}

.dashboard-chart-card-growth {
  background:
    linear-gradient(90deg, rgba(124,58,237,.92) 0 5px, transparent 5px),
    radial-gradient(circle at 88% 0%, rgba(124,58,237,.14), transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(15,118,110,.10), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(250,247,255,.90));
}

.dashboard-chart-card-calendar {
  background:
    radial-gradient(circle at 92% 0%, rgba(34,197,94,.12), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(244,253,249,.88));
}

.dashboard-chart-card-growth,
.dashboard-chart-card-calendar {
  overflow: hidden;
}

.dashboard-chart-card-growth .trend-panel {
  min-height: 0;
}

.dashboard-chart-card-growth .trend-chart {
  min-height: 210px;
}

.dashboard-chart-card-growth .trend-chart svg {
  height: 205px;
}

.dashboard-calendar-stream {
  display: grid;
  gap: 12px;
}

.dashboard-calendar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 2px 0 4px;
  border: 1px solid rgba(21,94,73,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.66);
}

.dashboard-calendar-actions button {
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(235,250,245,.78));
  color: #12352e;
  font-weight: 800;
}

.dashboard-calendar-actions button:first-child {
  z-index: 1;
  margin-right: -8px;
  padding-right: 18px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.dashboard-calendar-actions button:last-child {
  padding-left: 18px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  background: linear-gradient(135deg, rgba(236,253,245,.88), rgba(255,255,255,.95));
}

.dashboard-calendar-list {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.dashboard-calendar-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(15,118,110,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: #11251f;
  text-align: left;
}

.dashboard-calendar-item b,
.dashboard-calendar-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-calendar-item small {
  color: #6b7f77;
  font-size: 12px;
}

.calendar-type-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.12);
}

.calendar-type-note { background: #38bdf8; box-shadow: 0 0 0 5px rgba(56,189,248,.13); }
.calendar-type-planning { background: #f59e0b; box-shadow: 0 0 0 5px rgba(245,158,11,.13); }
.calendar-type-reminder { background: #8b5cf6; box-shadow: 0 0 0 5px rgba(139,92,246,.13); }

.calendar-status-pill {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  color: #15803d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-status-postponed { background: rgba(245,158,11,.14); color: #b45309; }
.calendar-status-cancelled { background: rgba(239,68,68,.12); color: #b91c1c; }
.calendar-status-done { background: rgba(15,118,110,.13); color: #0f766e; }

.calendar-page {
  display: grid;
  gap: 16px;
}

.calendar-toolbar {
  align-items: center;
}

.calendar-toolbar h2 {
  margin: 0;
}

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

.calendar-summary-card {
  padding: 16px;
  border: 1px solid rgba(34,197,94,.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 12%, rgba(34,197,94,.14), transparent 36%),
    rgba(255,255,255,.88);
  box-shadow: 0 18px 45px rgba(15,35,31,.06);
}

.calendar-summary-card.postponed {
  border-color: rgba(245,158,11,.18);
  background:
    radial-gradient(circle at 92% 12%, rgba(245,158,11,.14), transparent 36%),
    rgba(255,255,255,.88);
}

.calendar-summary-card.done {
  border-color: rgba(15,118,110,.18);
  background:
    radial-gradient(circle at 92% 12%, rgba(15,118,110,.14), transparent 36%),
    rgba(255,255,255,.88);
}

.calendar-summary-card span {
  display: block;
  color: #6b7f77;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-summary-card b {
  display: block;
  margin-top: 8px;
  color: #10231f;
  font-size: 34px;
  letter-spacing: -.05em;
}

.calendar-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) minmax(150px, auto) auto;
  gap: 10px;
  align-items: center;
}

.calendar-filter-panel input,
.calendar-filter-panel select {
  width: 100%;
}

.calendar-list-panel {
  display: grid;
  gap: 12px;
}

.calendar-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 16px;
  align-items: center;
  border-left: 5px solid #22c55e;
}

.calendar-card-postponed { border-left-color: #f59e0b; }
.calendar-card-cancelled { border-left-color: #ef4444; }
.calendar-card-done { border-left-color: #0f766e; opacity: .82; }

.calendar-card-main {
  min-width: 0;
}

.calendar-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-type-badge.calendar-type-note { background: rgba(56,189,248,.14); color: #0369a1; }
.calendar-type-badge.calendar-type-planning { background: rgba(245,158,11,.14); color: #b45309; }
.calendar-type-badge.calendar-type-reminder { background: rgba(139,92,246,.14); color: #6d28d9; }

.calendar-card h3 {
  margin: 8px 0 6px;
}

.calendar-card p {
  margin: 0;
  color: #63776f;
}

.calendar-card-meta {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.calendar-card-meta strong {
  color: #10231f;
}

.calendar-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-card-actions .danger {
  color: #b91c1c;
  border-color: rgba(185,28,28,.18);
  background: rgba(254,242,242,.8);
}

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

.calendar-dialog-grid .wide {
  grid-column: 1 / -1;
}

.calendar-dialog-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.calendar-empty {
  text-align: center;
}

.calendar-app-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 0;
  align-items: stretch;
}

.calendar-left-rail,
.calendar-side-stack,
.calendar-main-panel,
.calendar-detail-panel {
  border: 1px solid rgba(15,118,110,.10);
  background: rgba(255,255,255,.86);
  box-shadow: 0 24px 70px rgba(15,35,31,.07);
}

.calendar-side-stack {
  grid-column: 2;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  border-left: 0;
  border-radius: 0 28px 28px 0;
  overflow: hidden;
}

.calendar-left-rail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid rgba(15,118,110,.10);
  border-radius: 0;
  box-shadow: none;
}

.calendar-main-panel {
  grid-column: 1;
  border-radius: 28px 0 0 28px;
}

.calendar-detail-panel {
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.calendar-create-button {
  justify-self: start;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15,35,31,.10);
  color: #11251f;
  font-weight: 900;
}

.calendar-mini-month,
.calendar-side-card,
.calendar-summary-mini {
  border-radius: 20px;
  background: rgba(244,250,248,.78);
  padding: 12px;
}

.calendar-mini-head,
.calendar-topbar,
.calendar-nav-actions,
.calendar-view-actions,
.calendar-filter-strip,
.calendar-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-mini-head {
  justify-content: space-between;
}

.calendar-mini-head button,
.calendar-arrow {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
}

.calendar-mini-weekdays,
.calendar-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-mini-weekdays {
  margin: 10px 0 6px;
  color: #74877f;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.calendar-mini-grid button {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #12352e;
  font-size: 12px;
}

.calendar-mini-grid button.muted {
  color: #a2b0aa;
}

.calendar-mini-grid button.today {
  background: rgba(34,197,94,.16);
  color: #15803d;
  font-weight: 900;
}

.calendar-mini-grid button.selected {
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}

.calendar-side-card {
  display: grid;
  gap: 10px;
}

.calendar-side-card h3 {
  margin: 0;
  font-size: 14px;
}

.calendar-side-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #2a3b35;
  font-size: 13px;
}

.calendar-summary-mini {
  display: grid;
  gap: 8px;
}

.calendar-summary-mini span {
  display: flex;
  justify-content: space-between;
  color: #61746d;
  font-size: 12px;
  font-weight: 800;
}

.calendar-summary-mini b {
  color: #10231f;
}

.calendar-main-panel {
  min-width: 0;
  padding: 14px;
}

.calendar-topbar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.calendar-nav-actions h2 {
  margin: 0;
  color: #10231f;
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -.04em;
}

.calendar-view-actions {
  margin-left: auto;
}

.calendar-view-actions input {
  width: min(260px, 34vw);
}

.calendar-filter-strip {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(239,247,244,.72);
}

.calendar-filter-strip select {
  flex: 1 1 calc(50% - 5px);
  min-width: 180px;
}

.calendar-filter-strip button {
  margin-left: auto;
}

.calendar-filter-strip span {
  color: #6b7f77;
  font-size: 12px;
  font-weight: 800;
}

.calendar-month-board {
  overflow: hidden;
  border: 1px solid rgba(16,35,31,.08);
  border-radius: 24px;
  background: #fff;
}

.calendar-month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border-bottom: 1px solid rgba(16,35,31,.08);
  background: rgba(248,252,250,.92);
}

.calendar-month-weekdays span {
  padding: 12px 10px;
  color: #52665f;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-month-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  min-width: 760px;
}

.calendar-month-cell {
  min-height: 142px;
  padding: 10px;
  border-right: 1px solid rgba(16,35,31,.07);
  border-bottom: 1px solid rgba(16,35,31,.07);
  background: rgba(255,255,255,.96);
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.calendar-month-cell:hover {
  background: rgba(240,253,250,.92);
}

.calendar-outside-month {
  background: rgba(246,249,248,.76);
  color: #93a29c;
}

.calendar-selected-cell {
  box-shadow: inset 0 0 0 2px rgba(37,99,235,.36);
}

.calendar-today-cell {
  background:
    radial-gradient(circle at 88% 12%, rgba(37,99,235,.10), transparent 32%),
    rgba(255,255,255,.98);
}

.calendar-cell-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
}

.calendar-cell-date span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #10231f;
  font-size: 13px;
  font-weight: 900;
}

.calendar-today-cell .calendar-cell-date span {
  background: #2563eb;
  color: #fff;
}

.calendar-cell-date b {
  color: #2563eb;
  font-size: 11px;
}

.calendar-cell-events {
  display: grid;
  gap: 5px;
}

.calendar-event-pill,
.calendar-more-pill {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  width: 100%;
  padding: 5px 7px;
  border: 0;
  border-radius: 9px;
  background: rgba(34,197,94,.14);
  color: #14532d;
  font-size: 11px;
  text-align: left;
}

.calendar-event-pill b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-done { opacity: .62; text-decoration: line-through; }
.calendar-event-postponed { background: rgba(245,158,11,.16); color: #92400e; }
.calendar-event-cancelled { background: rgba(239,68,68,.12); color: #991b1b; }
.calendar-event-type-note { background: rgba(56,189,248,.16); color: #075985; }
.calendar-event-type-planning { background: rgba(245,158,11,.16); color: #92400e; }
.calendar-event-type-reminder { background: rgba(139,92,246,.15); color: #5b21b6; }

.calendar-more-pill {
  display: inline-flex;
  width: fit-content;
  color: #4b635b;
  background: rgba(16,35,31,.06);
}

.calendar-week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  min-height: 620px;
  overflow: auto;
  border: 1px solid rgba(16,35,31,.08);
  border-radius: 24px;
  background: #fff;
}

.calendar-week-column {
  min-width: 150px;
  border-right: 1px solid rgba(16,35,31,.07);
  background: rgba(255,255,255,.95);
}

.calendar-week-column.today {
  background: rgba(239,246,255,.72);
}

.calendar-week-column.selected {
  box-shadow: inset 0 0 0 2px rgba(37,99,235,.25);
}

.calendar-week-head {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid rgba(16,35,31,.07);
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.calendar-week-head span {
  color: #61746d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-week-head b {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #10231f;
  font-size: 16px;
}

.calendar-week-column.today .calendar-week-head b {
  background: #2563eb;
  color: #fff;
}

.calendar-week-events {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 540px;
  padding: 10px;
}

.calendar-week-events .calendar-agenda-card {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 15px;
}

.calendar-week-events .calendar-agenda-card h3 {
  margin: 6px 0 4px;
  font-size: 15px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.calendar-week-events .calendar-agenda-card p {
  font-size: 12px;
  line-height: 1.25;
}

.calendar-week-events .calendar-agenda-card aside {
  justify-items: start;
  gap: 6px;
}

.calendar-week-events .calendar-agenda-card aside strong {
  font-size: 12px;
  line-height: 1.2;
}

.calendar-week-events .calendar-type-badge {
  max-width: 100%;
  font-size: 10px;
}

.calendar-empty-slot {
  min-height: 48px;
  padding: 8px;
  border: 1px dashed rgba(15,118,110,.24);
  border-radius: 16px;
  background: rgba(240,253,250,.55);
  color: #0f766e;
  font-weight: 900;
}

.calendar-day-board {
  display: grid;
  gap: 14px;
  min-height: 610px;
  padding: 16px;
  border: 1px solid rgba(16,35,31,.08);
  border-radius: 24px;
  background: #fff;
}

.calendar-day-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(16,35,31,.08);
}

.calendar-day-heading span {
  color: #61746d;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-day-heading b {
  color: #10231f;
  font-size: 24px;
  letter-spacing: -.04em;
}

.calendar-day-heading .primary {
  margin-left: auto;
}

.calendar-day-agenda {
  display: grid;
  align-content: start;
  gap: 10px;
}

.calendar-agenda-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(15,118,110,.12);
  border-left: 5px solid #22c55e;
  border-radius: 18px;
  background: rgba(250,253,252,.9);
  cursor: pointer;
}

.calendar-agenda-card h3 {
  margin: 8px 0 5px;
}

.calendar-agenda-card p {
  margin: 0;
  color: #63776f;
}

.calendar-agenda-card aside {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
}

.calendar-agenda-postponed { border-left-color: #f59e0b; }
.calendar-agenda-cancelled { border-left-color: #ef4444; }
.calendar-agenda-done { border-left-color: #0f766e; opacity: .76; }

.calendar-day-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed rgba(15,118,110,.18);
  border-radius: 22px;
  color: #6b7f77;
  text-align: center;
}

.calendar-detail-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.calendar-detail-head {
  justify-content: space-between;
}

.calendar-detail-head span {
  color: #6b7f77;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.calendar-detail-head b {
  color: #10231f;
}

.calendar-detail-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.calendar-detail-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(244,250,248,.82);
}

.calendar-detail-item button {
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #10231f;
  text-align: left;
}

.calendar-detail-item span {
  color: #6b7f77;
  font-size: 12px;
}

.dashboard-modern-chart-grid .trend-panel {
  min-height: 100%;
}

.dashboard-modern-chart-grid .chart-shell,
.dashboard-modern-chart-grid .chart-scroll {
  border-radius: 22px;
}

.dashboard-modern-chart-grid .chart-shell,
.dashboard-modern-chart-grid .trend-chart {
  border: 1px solid rgba(16,40,35,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,249,.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 18px 34px rgba(16,40,35,.07);
}

.dashboard-chart-card .trend-metric-card {
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(16,40,35,.06);
}

.dashboard-modern-stack {
  gap: 18px;
}

.dashboard-modern-stack .panel {
  padding: 18px;
}

.dashboard-modern-stack h3,
.dashboard-modern-stack .panel-head h3 {
  color: var(--dashboard-ink);
  letter-spacing: -.035em;
}

.dashboard-recent-invoices-spotlight {
  color: #f6fffb;
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 86% 10%, rgba(45,212,191,.22), transparent 32%),
    radial-gradient(circle at 4% 100%, rgba(14,165,233,.16), transparent 36%),
    linear-gradient(135deg, #10231f, #174b40 52%, #0f2e29);
  box-shadow: 0 28px 70px rgba(16,40,35,.22);
}

.dashboard-modern-stack > .panel.dashboard-recent-invoices-spotlight,
.dashboard-modern-stack > .dashboard-recent-invoices-spotlight.dashboard-modern-panel {
  color: #f6fffb;
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 86% 10%, rgba(45,212,191,.22), transparent 32%),
    radial-gradient(circle at 4% 100%, rgba(14,165,233,.16), transparent 36%),
    linear-gradient(135deg, #10231f, #174b40 52%, #0f2e29);
  box-shadow: 0 28px 70px rgba(16,40,35,.22);
}

.dashboard-recent-invoices-spotlight::before {
  background:
    linear-gradient(115deg, rgba(255,255,255,.14), transparent 42%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

.dashboard-recent-invoices-spotlight h3,
.dashboard-recent-invoices-spotlight .panel-head h3,
.dashboard-recent-invoices-spotlight table,
.dashboard-recent-invoices-spotlight th,
.dashboard-recent-invoices-spotlight td,
.dashboard-recent-invoices-spotlight small,
.dashboard-recent-invoices-spotlight .invoice-balance-note,
.dashboard-recent-invoices-spotlight .row-number {
  color: #f6fffb;
}

.dashboard-recent-invoices-spotlight table {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,.06);
}

.dashboard-recent-invoices-spotlight tbody tr {
  background: rgba(255,255,255,.035);
}

.dashboard-recent-invoices-spotlight th {
  background: rgba(255,255,255,.12);
  color: rgba(246,255,251,.72);
}

.dashboard-recent-invoices-spotlight td {
  border-color: rgba(255,255,255,.10);
}

.dashboard-recent-invoices-spotlight tbody tr:nth-child(even) {
  background: rgba(255,255,255,.045);
}

.dashboard-recent-invoices-spotlight tbody tr:hover,
.dashboard-recent-invoices-spotlight tbody tr.clickable-row:hover {
  background: rgba(255,255,255,.92);
}

.dashboard-recent-invoices-spotlight tbody tr:hover td,
.dashboard-recent-invoices-spotlight tbody tr:hover small,
.dashboard-recent-invoices-spotlight tbody tr:hover .invoice-balance-note,
.dashboard-recent-invoices-spotlight tbody tr:hover .row-number {
  color: #10231f;
}

.dashboard-recent-invoices-spotlight tbody tr:hover .badge {
  color: inherit;
}

@media (max-width: 1180px) {
  .catalog-product-filter-row {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, .65fr));
  }
  .catalog-product-filter-row button,
  .catalog-product-filter-row .list-filter-count {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .catalog-product-filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-product-filter-row .product-table-search,
  .catalog-product-filter-row .list-filter-count {
    grid-column: 1 / -1;
  }
}

.topbar-sticky-shell {
  z-index: 9000 !important;
}

.topbar-brand-cluster,
.topbar .actions,
.topbar-status,
.admin-header-menu {
  z-index: 9020 !important;
}

.topbar .actions {
  pointer-events: auto;
}

.topbar .add-badge,
.topbar #logoutBtn,
.topbar #mobileSettingsBtn,
.topbar #navigationGridBtn {
  background: rgba(255,255,255,.72);
  border-color: rgba(220,228,225,.94);
  box-shadow: 0 12px 26px rgba(18,35,31,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-add,
.top-add-menu {
  z-index: 9060 !important;
}

.top-add-menu {
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 58px rgba(18,35,31,.22);
}

@media (max-width: 760px) {
  .topbar .actions > :not(#logoutBtn):not(#mobileSettingsBtn):not(#navigationGridBtn) {
    display: none;
  }
  .topbar .actions #navigationGridBtn {
    display: inline-grid;
  }
}

.dashboard-recent-invoices-spotlight .ghost,
.dashboard-recent-invoices-spotlight button {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.12);
  color: #f6fffb;
}

.dashboard-customer-grid {
  gap: 18px;
  align-items: stretch;
}

.dashboard-customer-table-card {
  background:
    radial-gradient(circle at 92% 8%, rgba(15,118,110,.10), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,249,246,.90));
}

.dashboard-customer-table-card h3 {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(15,118,110,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  color: #12352f;
  font-size: 14px;
  letter-spacing: .02em;
}

.dashboard-customer-table-card table {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
}

.navigation-grid-screen .dashboard-menu-card-section {
  margin-top: 0;
}

.navigation-grid-button {
  color: #123b34;
}

.grid-badge-glyph {
  width: 20px;
  height: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
}

.grid-badge-glyph::before,
.grid-badge-glyph::after,
.grid-badge-glyph {
  border-radius: 4px;
}

.grid-badge-glyph span {
  display: none;
}

.grid-badge-glyph::before,
.grid-badge-glyph::after {
  content: "";
  display: block;
  background: currentColor;
  box-shadow: 12px 0 0 currentColor, 0 12px 0 currentColor, 12px 12px 0 currentColor;
  width: 8px;
  height: 8px;
}

.grid-badge-glyph::after {
  display: none;
}

.catalog-product-filter-row {
  grid-template-columns: minmax(200px, 1.10fr) repeat(3, minmax(120px, .54fr)) auto auto auto minmax(160px, .60fr) auto;
  gap: 8px;
  padding: 10px;
}

.catalog-product-filter-row .product-table-search,
.catalog-product-filter-row .search-box {
  width: auto;
}

.catalog-product-filter-row .product-select-filter {
  min-width: 0;
  gap: 3px;
}

.catalog-product-filter-row button {
  min-height: 38px;
  white-space: nowrap;
}

.product-status-badge {
  font-weight: 900;
}

.product-status-active {
  background: rgba(34,197,94,.14);
  color: #15803d;
}

.product-status-inactive {
  background: rgba(239,68,68,.12);
  color: #b91c1c;
}

.dashboard-menu-card-section {
  display: grid;
  gap: 18px;
  margin: 8px 0 12px;
  padding: 22px;
  border: 1px solid rgba(16,40,35,.12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 8% 0%, rgba(53,214,255,.10), transparent 28%),
    radial-gradient(circle at 94% 8%, rgba(255,176,58,.10), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(238,247,244,.88));
  box-shadow: 0 28px 70px rgba(16,40,35,.10);
}

.dashboard-menu-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-menu-card-head span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #05bfe8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-menu-card-head h3 {
  margin: 0;
  color: #10231f;
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1;
  letter-spacing: -.055em;
}

.dashboard-menu-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-menu-card-section-overview {
  margin-top: 22px;
}

.dashboard-menu-card-section-overview .dashboard-menu-card {
  aspect-ratio: 2.5 / 1;
  min-height: 96px;
}

.dashboard-menu-card {
  --tile-bg: #22c55e;
  --tile-rgb: 34,197,94;
  --tile-ink: #10231f;
  --tile-soft-ink: rgba(16,35,31,.70);
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  aspect-ratio: 2.15 / 1;
  min-height: 112px;
  padding: clamp(12px, 1.2vw, 18px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 16%, rgba(255,255,255,.36), transparent 26%),
    radial-gradient(circle at 8% 92%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--tile-bg) 92%, #fff), color-mix(in srgb, var(--tile-bg) 76%, #10231f));
  color: var(--tile-ink);
  text-align: left;
  box-shadow: 0 24px 50px var(--tile-glow, rgba(var(--tile-rgb),.22));
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.dashboard-menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(135deg, rgba(0,0,0,.42), transparent 74%);
}

.dashboard-menu-card::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 140px;
  height: 140px;
  border: 22px solid rgba(255,255,255,.18);
  border-radius: 999px;
}

.dashboard-menu-card-preview {
  display: none;
}

.navigation-grid-screen .dashboard-menu-card {
  align-content: end;
  padding: 16px;
}

.navigation-grid-screen .dashboard-menu-card::after {
  display: none;
}

.navigation-grid-screen .dashboard-menu-card-preview {
  position: absolute;
  inset: 12px;
  z-index: 0;
  display: block;
  border-radius: 22px;
  background:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(145deg, rgba(var(--tile-rgb),.38), rgba(255,255,255,.24));
  background-size: 26px 26px, 26px 26px, auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32);
  opacity: .72;
  overflow: hidden;
  pointer-events: none;
}

.navigation-grid-screen .dashboard-menu-card-preview::before,
.navigation-grid-screen .dashboard-menu-card-preview::after,
.navigation-grid-screen .dashboard-menu-card-preview i {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
}

.navigation-grid-screen .dashboard-menu-card-preview::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.62), transparent 58%);
  border-radius: inherit;
}

.navigation-grid-screen .dashboard-menu-card-preview::after {
  right: -18px;
  bottom: -20px;
  width: 96px;
  height: 96px;
  border: 18px solid rgba(255,255,255,.22);
}

.navigation-grid-screen .preview-top {
  left: 14px;
  right: 14px;
  top: 14px;
  height: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.62);
}

.navigation-grid-screen .preview-row {
  left: 16px;
  right: 16px;
  height: 11px;
  border-radius: 6px;
  background: rgba(255,255,255,.52);
}

.navigation-grid-screen .preview-row-a { top: 45px; }
.navigation-grid-screen .preview-row-b { top: 64px; right: 42px; }
.navigation-grid-screen .preview-row-c { top: 83px; right: 72px; }

.navigation-grid-screen .preview-avatar {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.64);
}

.navigation-grid-screen .preview-avatar-a {
  left: 16px;
  top: 18px;
}

.navigation-grid-screen .preview-avatar-b {
  right: 26px;
  top: 58px;
  width: 28px;
  height: 28px;
}

.navigation-grid-screen .preview-line {
  left: 58px;
  height: 10px;
  border-radius: 6px;
  background: rgba(255,255,255,.54);
}

.navigation-grid-screen .preview-line-a {
  top: 24px;
  right: 22px;
}

.navigation-grid-screen .preview-line-b {
  top: 43px;
  right: 48px;
}

.navigation-grid-screen .preview-line-c {
  left: 18px;
  right: 66px;
  top: 74px;
}

.navigation-grid-screen .preview-chart {
  bottom: 18px;
  width: 18px;
  border-radius: 9px 9px 4px 4px;
  background: rgba(255,255,255,.66);
}

.navigation-grid-screen .preview-chart-a {
  left: 28px;
  height: 36px;
}

.navigation-grid-screen .preview-chart-b {
  left: 56px;
  height: 62px;
}

.navigation-grid-screen .preview-chart-c {
  left: 84px;
  height: 48px;
}

.navigation-grid-screen .preview-curve {
  right: 22px;
  top: 26px;
  width: 58px;
  height: 58px;
  border: 5px solid rgba(255,255,255,.46);
  border-left-color: transparent;
  transform: rotate(-16deg);
}

.navigation-grid-screen .preview-card {
  width: 48px;
  height: 34px;
  border-radius: 13px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

.navigation-grid-screen .preview-card-a {
  left: 17px;
  top: 18px;
}

.navigation-grid-screen .preview-card-b {
  right: 18px;
  top: 28px;
}

.navigation-grid-screen .preview-card-c {
  left: 46px;
  top: 66px;
}

.navigation-grid-screen .preview-calendar-head {
  left: 16px;
  right: 16px;
  top: 15px;
  height: 22px;
  border-radius: 10px 10px 5px 5px;
  background: rgba(255,255,255,.66);
}

.navigation-grid-screen .preview-calendar-grid {
  left: 20px;
  right: 20px;
  top: 50px;
  height: 54px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255,255,255,.48) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.42) 1px, transparent 1px);
  background-size: 100% 18px, 25% 100%;
}

.navigation-grid-screen .preview-calendar-dot {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,.82);
}

.navigation-grid-screen .preview-calendar-dot-a {
  left: 46px;
  top: 68px;
}

.navigation-grid-screen .preview-calendar-dot-b {
  right: 42px;
  top: 88px;
}

.navigation-grid-screen .dashboard-menu-card-copy {
  max-width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 18px;
  background: rgba(255,255,255,.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dashboard-menu-card:hover,
.dashboard-menu-card:focus-visible {
  transform: translateY(-3px);
  filter: saturate(1.08);
  box-shadow: 0 32px 70px var(--tile-glow, rgba(var(--tile-rgb),.28));
}

.navigation-grid-screen .dashboard-preview-icon {
  color: rgba(255,255,255,.62);
}

.navigation-grid-screen .dashboard-preview-icon .preview-shape {
  background: rgba(255,255,255,.58);
  border-color: currentColor;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.navigation-grid-screen .dashboard-preview-icon-star .preview-shape-a,
.navigation-grid-screen .dashboard-preview-icon-plus .preview-shape-a {
  left: 50%;
  top: 45%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
}

.navigation-grid-screen .dashboard-preview-icon-star .preview-shape-a {
  background: rgba(255,255,255,.48);
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
}

.navigation-grid-screen .dashboard-preview-icon-plus .preview-shape-a {
  background:
    linear-gradient(currentColor 0 0) center / 88% 18% no-repeat,
    linear-gradient(currentColor 0 0) center / 18% 88% no-repeat;
  opacity: .78;
}

.navigation-grid-screen .dashboard-preview-icon-joystick .preview-shape-a {
  left: 36px;
  top: 58px;
  width: 84px;
  height: 46px;
  border: 8px solid currentColor;
  border-radius: 42px 42px 22px 22px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-joystick .preview-shape-b {
  left: 71px;
  top: 22px;
  width: 14px;
  height: 42px;
  background: currentColor;
  border-radius: 999px;
}
.navigation-grid-screen .dashboard-preview-icon-joystick .preview-shape-c {
  left: 49px;
  top: 76px;
  width: 14px;
  height: 14px;
  background: currentColor;
}
.navigation-grid-screen .dashboard-preview-icon-joystick .preview-shape-d {
  left: 94px;
  top: 72px;
  width: 16px;
  height: 16px;
  background: currentColor;
  box-shadow: -20px 16px 0 rgba(255,255,255,.38);
}

.navigation-grid-screen .dashboard-preview-icon-shopping-cart .preview-shape-a {
  left: 36px;
  top: 44px;
  width: 92px;
  height: 50px;
  border: 8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: transparent;
  transform: skewX(-8deg);
}
.navigation-grid-screen .dashboard-preview-icon-shopping-cart .preview-shape-b {
  left: 28px;
  top: 25px;
  width: 32px;
  height: 9px;
  background: currentColor;
  transform: rotate(-18deg);
}
.navigation-grid-screen .dashboard-preview-icon-shopping-cart .preview-shape-c {
  left: 48px;
  top: 102px;
  width: 18px;
  height: 18px;
  border: 6px solid currentColor;
  background: transparent;
  box-shadow: 52px 0 0 -6px transparent, 52px 0 0 0 currentColor;
}
.navigation-grid-screen .dashboard-preview-icon-shopping-cart .preview-shape-d {
  left: 52px;
  top: 60px;
  width: 58px;
  height: 7px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 18px 0 currentColor;
  opacity: .62;
}

.navigation-grid-screen .dashboard-preview-icon-storefront .preview-shape-a {
  left: 24px;
  top: 30px;
  width: 118px;
  height: 34px;
  border: 7px solid currentColor;
  border-radius: 18px 18px 5px 5px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.66) 0 17px, transparent 17px 34px);
}
.navigation-grid-screen .dashboard-preview-icon-storefront .preview-shape-b {
  left: 33px;
  top: 62px;
  width: 100px;
  height: 64px;
  border: 7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-storefront .preview-shape-c {
  left: 54px;
  top: 82px;
  width: 28px;
  height: 43px;
  border: 6px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-storefront .preview-shape-d {
  left: 94px;
  top: 82px;
  width: 25px;
  height: 24px;
  border: 6px solid currentColor;
  border-radius: 8px;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-staff-star .preview-shape-a {
  left: 68px;
  top: 30px;
  width: 34px;
  height: 34px;
  border: 7px solid currentColor;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-staff-star .preview-shape-b {
  left: 46px;
  top: 70px;
  width: 78px;
  height: 48px;
  border: 7px solid currentColor;
  border-top: 0;
  border-radius: 0 0 42px 42px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-staff-star .preview-shape-c {
  left: 16px;
  top: 55px;
  width: 32px;
  height: 32px;
  border: 6px solid currentColor;
  background: transparent;
  opacity: .48;
  box-shadow: 104px 0 0 -6px transparent, 104px 0 0 0 currentColor;
}
.navigation-grid-screen .dashboard-preview-icon-staff-star .preview-shape-d {
  left: 73px;
  top: 78px;
  width: 27px;
  height: 27px;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
}

.navigation-grid-screen .dashboard-preview-icon-calculator .preview-shape-a {
  left: 48px;
  top: 24px;
  width: 72px;
  height: 102px;
  border: 8px solid currentColor;
  border-radius: 18px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-calculator .preview-shape-b {
  left: 63px;
  top: 42px;
  width: 42px;
  height: 18px;
  background: currentColor;
  border-radius: 8px;
}
.navigation-grid-screen .dashboard-preview-icon-calculator .preview-shape-c {
  left: 64px;
  top: 76px;
  width: 11px;
  height: 11px;
  background: currentColor;
  border-radius: 4px;
  box-shadow: 22px 0 0 currentColor, 0 22px 0 currentColor, 22px 22px 0 currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-safe .preview-shape-a {
  left: 32px;
  top: 35px;
  width: 104px;
  height: 78px;
  border: 8px solid currentColor;
  border-radius: 20px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-safe .preview-shape-b {
  left: 68px;
  top: 58px;
  width: 34px;
  height: 34px;
  border: 7px solid currentColor;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-safe .preview-shape-c {
  left: 100px;
  top: 73px;
  width: 25px;
  height: 7px;
  background: currentColor;
}
.navigation-grid-screen .dashboard-preview-icon-safe .preview-shape-d {
  left: 49px;
  top: 101px;
  width: 70px;
  height: 7px;
  background: currentColor;
  opacity: .58;
}

.navigation-grid-screen .dashboard-preview-icon-single-user .preview-shape-a {
  left: 63px;
  top: 28px;
  width: 42px;
  height: 42px;
  border: 8px solid currentColor;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-single-user .preview-shape-b {
  left: 42px;
  top: 80px;
  width: 84px;
  height: 48px;
  border: 8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 48px 48px;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-prohibited .preview-shape-a {
  left: 38px;
  top: 25px;
  width: 88px;
  height: 88px;
  border: 9px solid currentColor;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-prohibited .preview-shape-b {
  left: 50px;
  top: 66px;
  width: 68px;
  height: 10px;
  background: currentColor;
  transform: rotate(-45deg);
}

.navigation-grid-screen .dashboard-preview-icon-gear .preview-shape-a {
  left: 52px;
  top: 37px;
  width: 62px;
  height: 62px;
  border: 10px solid currentColor;
  background: transparent;
  box-shadow: 0 -22px 0 -14px currentColor, 0 22px 0 -14px currentColor, 22px 0 0 -14px currentColor, -22px 0 0 -14px currentColor;
}
.navigation-grid-screen .dashboard-preview-icon-gear .preview-shape-b {
  left: 75px;
  top: 60px;
  width: 17px;
  height: 17px;
  border: 6px solid currentColor;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-gear .preview-shape-c {
  left: 80px;
  top: 14px;
  width: 8px;
  height: 112px;
  background: currentColor;
  opacity: .5;
  transform: rotate(45deg);
}
.navigation-grid-screen .dashboard-preview-icon-gear .preview-shape-d {
  left: 80px;
  top: 14px;
  width: 8px;
  height: 112px;
  background: currentColor;
  opacity: .5;
  transform: rotate(-45deg);
}

.navigation-grid-screen .dashboard-preview-icon-envelope .preview-shape-a {
  left: 28px;
  top: 42px;
  width: 112px;
  height: 70px;
  border: 8px solid currentColor;
  border-radius: 18px;
  background: transparent;
}
.navigation-grid-screen .dashboard-preview-icon-envelope .preview-shape-b {
  left: 43px;
  top: 41px;
  width: 82px;
  height: 57px;
  border-left: 7px solid currentColor;
  border-bottom: 7px solid currentColor;
  background: transparent;
  border-radius: 0;
  transform: rotate(-45deg) skew(9deg, 9deg);
}

.navigation-grid-screen .dashboard-preview-icon-dashboard-grid .preview-shape-a {
  left: 39px;
  top: 31px;
  width: 24px;
  height: 24px;
  background: currentColor;
  box-shadow: 42px 0 0 currentColor, 0 42px 0 currentColor, 42px 42px 0 currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-dashboard-grid .preview-shape-b {
  left: 37px;
  top: 29px;
  width: 70px;
  height: 70px;
  border: 7px solid currentColor;
  background: transparent;
  opacity: .38;
}

.navigation-grid-screen .dashboard-preview-icon-invoice-doc .preview-shape-a {
  left: 46px;
  top: 24px;
  width: 78px;
  height: 96px;
  border: 8px solid currentColor;
  border-radius: 14px;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-invoice-doc .preview-shape-b {
  left: 62px;
  top: 49px;
  width: 48px;
  height: 7px;
  background: currentColor;
  box-shadow: 0 18px 0 currentColor, 0 36px 0 currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-invoice-doc .preview-shape-c {
  left: 93px;
  top: 91px;
  width: 23px;
  height: 23px;
  border: 6px solid currentColor;
  border-left: 0;
  border-top: 0;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-calendar-page .preview-shape-a {
  left: 34px;
  top: 30px;
  width: 102px;
  height: 84px;
  border: 8px solid currentColor;
  border-radius: 18px;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-calendar-page .preview-shape-b {
  left: 34px;
  top: 52px;
  width: 102px;
  height: 8px;
  background: currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-calendar-page .preview-shape-c {
  left: 57px;
  top: 74px;
  width: 12px;
  height: 12px;
  background: currentColor;
  box-shadow: 30px 0 0 currentColor, 60px 0 0 currentColor, 0 24px 0 currentColor, 30px 24px 0 currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-chart .preview-shape-a {
  left: 35px;
  bottom: 29px;
  width: 18px;
  height: 36px;
  border-radius: 9px 9px 4px 4px;
  background: currentColor;
  box-shadow: 32px -22px 0 currentColor, 64px -9px 0 currentColor;
}

.navigation-grid-screen .dashboard-preview-icon-chart .preview-shape-b {
  left: 31px;
  top: 35px;
  width: 102px;
  height: 58px;
  border: 7px solid currentColor;
  border-top: 0;
  border-right: 0;
  border-radius: 0;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-plan-card .preview-shape-a {
  left: 30px;
  top: 36px;
  width: 112px;
  height: 68px;
  border: 8px solid currentColor;
  border-radius: 22px;
  background: transparent;
}

.navigation-grid-screen .dashboard-preview-icon-plan-card .preview-shape-b {
  left: 49px;
  top: 57px;
  width: 72px;
  height: 8px;
  background: currentColor;
  box-shadow: 0 22px 0 rgba(255,255,255,.42);
}

.navigation-grid-screen .dashboard-preview-icon-shield .preview-shape-a {
  left: 51px;
  top: 22px;
  width: 70px;
  height: 92px;
  background: currentColor;
  clip-path: polygon(50% 0, 92% 14%, 85% 62%, 50% 100%, 15% 62%, 8% 14%);
}

.navigation-grid-screen .dashboard-preview-icon-shield .preview-shape-b {
  left: 70px;
  top: 62px;
  width: 34px;
  height: 8px;
  background: rgba(255,255,255,.72);
  transform: rotate(-42deg);
}

.dashboard-menu-card-section-overview .dashboard-menu-card-has-preview-icon::after {
  display: none;
}

.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon {
  position: absolute;
  inset: 8px 10px;
  z-index: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
  border-radius: 18px;
  color: rgba(255,255,255,.58);
  background:
    linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(135deg, rgba(var(--tile-rgb),.24), rgba(255,255,255,.08));
  background-size: 22px 22px, 22px 22px, auto;
  opacity: .78;
  mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 100%);
}

.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::before,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::after,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon i {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  box-sizing: border-box;
}

.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::before {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.36), transparent 64%);
}

.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::after {
  right: -26px;
  bottom: -34px;
  width: 116px;
  height: 116px;
  border: 18px solid rgba(255,255,255,.16);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon .preview-shape {
  background: currentColor;
  border-color: currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-star .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-plus .preview-shape-a {
  right: 20px;
  top: 18px;
  width: 78px;
  height: 78px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-star .preview-shape-a {
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-plus .preview-shape-a {
  background:
    linear-gradient(currentColor 0 0) center / 86% 17% no-repeat,
    linear-gradient(currentColor 0 0) center / 17% 86% no-repeat;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-joystick .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-safe .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-storefront .preview-shape-b,
.dashboard-menu-card-section-overview .dashboard-preview-icon-shopping-cart .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-calculator .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-single-user .preview-shape-b,
.dashboard-menu-card-section-overview .dashboard-preview-icon-envelope .preview-shape-a {
  background: transparent;
  border: 7px solid currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-joystick .preview-shape-a {
  right: 20px;
  top: 46px;
  width: 84px;
  height: 42px;
  border-radius: 40px 40px 20px 20px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-joystick .preview-shape-b {
  right: 55px;
  top: 18px;
  width: 12px;
  height: 34px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-joystick .preview-shape-c {
  right: 80px;
  top: 62px;
  width: 13px;
  height: 13px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-joystick .preview-shape-d {
  right: 29px;
  top: 61px;
  width: 14px;
  height: 14px;
  box-shadow: -18px 12px 0 rgba(255,255,255,.32);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-shopping-cart .preview-shape-a {
  right: 18px;
  top: 35px;
  width: 92px;
  height: 44px;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  transform: skewX(-8deg);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-shopping-cart .preview-shape-b {
  right: 94px;
  top: 22px;
  width: 30px;
  height: 8px;
  transform: rotate(-18deg);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-shopping-cart .preview-shape-c {
  right: 73px;
  top: 78px;
  width: 15px;
  height: 15px;
  border: 5px solid currentColor;
  background: transparent;
  box-shadow: 45px 0 0 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-storefront .preview-shape-a {
  right: 12px;
  top: 20px;
  width: 118px;
  height: 28px;
  border: 6px solid currentColor;
  border-radius: 16px 16px 5px 5px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.62) 0 15px, transparent 15px 30px);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-storefront .preview-shape-b {
  right: 24px;
  top: 47px;
  width: 94px;
  height: 46px;
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-staff-star .preview-shape-a,
.dashboard-menu-card-section-overview .dashboard-preview-icon-single-user .preview-shape-a {
  right: 58px;
  top: 19px;
  width: 34px;
  height: 34px;
  border: 7px solid currentColor;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-staff-star .preview-shape-b,
.dashboard-menu-card-section-overview .dashboard-preview-icon-single-user .preview-shape-b {
  right: 33px;
  top: 58px;
  width: 84px;
  height: 36px;
  border-top: 0;
  border-radius: 0 0 42px 42px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-staff-star .preview-shape-d {
  right: 62px;
  top: 60px;
  width: 24px;
  height: 24px;
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calculator .preview-shape-a {
  right: 36px;
  top: 16px;
  width: 64px;
  height: 82px;
  border-radius: 16px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calculator .preview-shape-b {
  right: 50px;
  top: 31px;
  width: 36px;
  height: 14px;
  border-radius: 7px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calculator .preview-shape-c {
  right: 77px;
  top: 58px;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  box-shadow: 20px 0 0 currentColor, 0 20px 0 currentColor, 20px 20px 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-safe .preview-shape-a {
  right: 18px;
  top: 28px;
  width: 102px;
  height: 62px;
  border-radius: 18px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-safe .preview-shape-b {
  right: 56px;
  top: 46px;
  width: 29px;
  height: 29px;
  border: 6px solid currentColor;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-prohibited .preview-shape-a {
  right: 28px;
  top: 17px;
  width: 76px;
  height: 76px;
  border: 8px solid currentColor;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-prohibited .preview-shape-b {
  right: 39px;
  top: 53px;
  width: 58px;
  height: 8px;
  transform: rotate(-45deg);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-gear .preview-shape-a {
  right: 38px;
  top: 28px;
  width: 58px;
  height: 58px;
  border: 9px solid currentColor;
  background: transparent;
  box-shadow: 0 -18px 0 -12px currentColor, 0 18px 0 -12px currentColor, 18px 0 0 -12px currentColor, -18px 0 0 -12px currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-gear .preview-shape-b {
  right: 59px;
  top: 49px;
  width: 16px;
  height: 16px;
  border: 5px solid currentColor;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-envelope .preview-shape-a {
  right: 14px;
  top: 34px;
  width: 112px;
  height: 54px;
  border-radius: 16px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-envelope .preview-shape-b {
  right: 37px;
  top: 31px;
  width: 72px;
  height: 46px;
  border-left: 6px solid currentColor;
  border-bottom: 6px solid currentColor;
  background: transparent;
  border-radius: 0;
  transform: rotate(-45deg) skew(9deg, 9deg);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-dashboard-grid .preview-shape-a {
  right: 74px;
  top: 24px;
  width: 18px;
  height: 18px;
  box-shadow: 31px 0 0 currentColor, 0 31px 0 currentColor, 31px 31px 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-dashboard-grid .preview-shape-b {
  right: 69px;
  top: 19px;
  width: 58px;
  height: 58px;
  border: 6px solid currentColor;
  background: transparent;
  opacity: .35;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-invoice-doc .preview-shape-a {
  right: 34px;
  top: 15px;
  width: 70px;
  height: 80px;
  border: 7px solid currentColor;
  border-radius: 14px;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-invoice-doc .preview-shape-b {
  right: 48px;
  top: 37px;
  width: 43px;
  height: 6px;
  box-shadow: 0 16px 0 currentColor, 0 32px 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-invoice-doc .preview-shape-c {
  right: 43px;
  top: 70px;
  width: 21px;
  height: 21px;
  border: 5px solid currentColor;
  border-left: 0;
  border-top: 0;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calendar-page .preview-shape-a {
  right: 18px;
  top: 20px;
  width: 100px;
  height: 70px;
  border: 7px solid currentColor;
  border-radius: 18px;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calendar-page .preview-shape-b {
  right: 18px;
  top: 39px;
  width: 100px;
  height: 7px;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-calendar-page .preview-shape-c {
  right: 85px;
  top: 57px;
  width: 10px;
  height: 10px;
  box-shadow: 24px 0 0 currentColor, 48px 0 0 currentColor, 0 20px 0 currentColor, 24px 20px 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-chart .preview-shape-a {
  right: 90px;
  bottom: 23px;
  width: 14px;
  height: 30px;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 28px -20px 0 currentColor, 56px -8px 0 currentColor;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-chart .preview-shape-b {
  right: 28px;
  top: 31px;
  width: 96px;
  height: 52px;
  border: 6px solid currentColor;
  border-top: 0;
  border-right: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-plan-card .preview-shape-a {
  right: 18px;
  top: 29px;
  width: 108px;
  height: 56px;
  border: 7px solid currentColor;
  border-radius: 20px;
  background: transparent;
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-plan-card .preview-shape-b {
  right: 39px;
  top: 47px;
  width: 66px;
  height: 7px;
  box-shadow: 0 18px 0 rgba(255,255,255,.36);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-shield .preview-shape-a {
  right: 42px;
  top: 14px;
  width: 66px;
  height: 82px;
  clip-path: polygon(50% 0, 92% 14%, 85% 62%, 50% 100%, 15% 62%, 8% 14%);
}

.dashboard-menu-card-section-overview .dashboard-preview-icon-shield .preview-shape-b {
  right: 61px;
  top: 52px;
  width: 32px;
  height: 7px;
  background: rgba(255,255,255,.72);
  transform: rotate(-42deg);
}

.dashboard-menu-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  max-width: min(100%, 260px);
}

.dashboard-menu-card-copy em {
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--tile-ink) 18%, rgba(255,255,255,.28));
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: var(--tile-ink);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.dashboard-menu-card-copy strong {
  color: var(--tile-ink);
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: .95;
  letter-spacing: -.055em;
}

.dashboard-menu-card-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--tile-soft-ink);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (min-width: 1221px) {
  .dashboard-overview-main,
  .dashboard-overview-sidebar {
    grid-template-rows: var(--dashboard-hero-row) var(--dashboard-flow-row);
  }

  .dashboard-hero-main,
  .dashboard-hero-side {
    min-height: 0;
    height: 100%;
  }

  .dashboard-hero-side {
    grid-template-rows: repeat(3, minmax(0, 1fr));
    align-content: stretch;
  }

  .dashboard-hero-side .dashboard-signal-card {
    min-height: 0;
    padding: 13px;
  }

  .dashboard-hero-side .dashboard-signal-card b {
    font-size: clamp(23px, 1.75vw, 30px);
  }

  .dashboard-modern-chart-grid-main,
  .dashboard-chart-card-calendar {
    min-height: 0;
    height: 100%;
  }

  .dashboard-modern-chart-grid-main {
    min-width: 0;
  }

  .dashboard-modern-chart-grid-main > .dashboard-chart-card {
    min-height: 0;
    height: 100%;
  }

  .dashboard-chart-card-calendar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 14px;
    align-items: center;
    padding: 18px;
  }

  .dashboard-chart-card-calendar .dashboard-panel-kicker {
    margin: 0;
  }

  .dashboard-chart-card-calendar > h3 {
    margin: 0;
    font-size: clamp(21px, 1.8vw, 28px);
    line-height: 1.02;
  }

  .dashboard-chart-card-calendar .dashboard-calendar-stream {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    height: 100%;
  }

  .dashboard-chart-card-calendar .dashboard-calendar-list {
    max-height: 100%;
    min-height: 0;
    overflow: auto;
  }
}

#central .panel,
#catalog .panel,
#stock .panel,
#accounting .panel,
#payouts .panel,
.central-panel,
.central-identity-card,
.central-visit-card,
.central-detail-panel,
.central-edit-panel,
.catalog-side-panel,
.stock-summary-panel,
.payroll-payout-panel,
.special-payout-panel,
.payout-launcher-grid > .panel {
  border: 1px solid rgba(16,40,35,.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 96% 0%, rgba(23,108,95,.08), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(246,250,248,.90));
  box-shadow: 0 22px 54px rgba(16,40,35,.09);
}

@media (min-width: 901px) {
  .payout-launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-payout-panel,
  .payout-side-stack {
    min-height: 100%;
  }

  .payout-side-stack {
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
}

#central .central-identity-card,
#central .central-visit-card {
  border-color: rgba(15,118,110,.18);
  background:
    radial-gradient(circle at 10% 0%, rgba(20,184,166,.13), transparent 34%),
    radial-gradient(circle at 96% 12%, rgba(245,158,11,.10), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,249,245,.92));
  box-shadow: 0 28px 68px rgba(16,40,35,.12);
}

#central .central-company-card,
#catalog .catalog-side-panel,
#stock .panel,
#accounting .panel,
#payouts .panel {
  box-shadow: 0 20px 48px rgba(16,40,35,.085);
}

@media (max-width: 1220px) {
  .dashboard-command-center,
  .dashboard-hero-grid,
  .dashboard-overview-layout,
  .dashboard-modern-chart-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-menu-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-app-shell {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  }

  .calendar-side-stack {
    grid-column: 2;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    justify-content: stretch;
  }

  .dashboard-toolbar-modern .dashboard-search-field input {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .admin-quick-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-subscriber-search,
  .admin-subscriber-filters button,
  .admin-subscriber-filters span {
    grid-column: 1 / -1;
  }

  .admin-subscriber-bulkbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-summary-grid,
  .calendar-filter-panel,
  .calendar-card,
  .calendar-dialog-grid,
  .calendar-app-shell,
  .calendar-agenda-card {
    grid-template-columns: 1fr;
  }

  .calendar-side-stack {
    grid-column: 1;
    grid-row: 2;
    border-left: 1px solid rgba(15,118,110,.10);
    border-radius: 0 0 28px 28px;
  }

  .calendar-left-rail {
    border-radius: 0;
  }

  .calendar-main-panel {
    grid-column: 1;
    grid-row: 1;
    order: 1;
    border-radius: 28px 28px 0 0;
  }

  .calendar-detail-panel {
    border-top: 0;
    border-radius: 0;
  }

  .dashboard-menu-card-section {
    padding: 16px;
    border-radius: 26px;
  }

  .dashboard-menu-card-head {
    display: grid;
    justify-items: start;
  }

  .dashboard-menu-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-menu-card {
    aspect-ratio: auto;
    min-height: 126px;
  }

  .calendar-month-board,
  .calendar-week-board {
    overflow-x: auto;
  }

  .calendar-topbar,
  .calendar-nav-actions,
  .calendar-view-actions {
    align-items: stretch;
    width: 100%;
  }

  .calendar-nav-actions,
  .calendar-view-actions {
    flex-wrap: wrap;
  }

  .calendar-view-actions input {
    width: 100%;
  }

  .calendar-card-meta {
    justify-items: stretch;
  }

  .calendar-card-actions {
    justify-content: stretch;
  }

  .calendar-card-actions button {
    flex: 1 1 auto;
  }

  .dashboard-account-scope select {
    width: 100%;
  }

  .dashboard-command-center {
    padding: 15px;
    border-radius: 26px;
  }

  .dashboard-command-center::before {
    inset: 8px;
    border-radius: 20px;
  }

  .dashboard-hero-main {
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 24px;
  }

  .dashboard-modern-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero-side {
    grid-template-columns: 1fr;
  }

  .dashboard-modern-panel,
  .dashboard-modern-stack .panel {
    padding: 14px;
    border-radius: 22px;
  }
}

@media (max-width: 620px) {
  .admin-quick-link-grid {
    grid-template-columns: 1fr;
  }
  .admin-audit-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-command-copy h2 {
    font-size: 34px;
  }

  .dashboard-modern-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-net-card b {
    font-size: 24px;
  }

  .dashboard-signal-card {
    min-height: 94px;
  }
}

.topbar #navigationGridBtn.navigation-grid-button {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #10231f;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.topbar #navigationGridBtn.navigation-grid-button:hover,
.topbar #navigationGridBtn.navigation-grid-button.active {
  background: rgba(255, 255, 255, .28) !important;
  border-color: rgba(16, 35, 31, .12) !important;
  box-shadow: 0 12px 28px rgba(15, 35, 30, .12) !important;
}

.grid-badge-glyph {
  position: relative;
  display: block !important;
  width: 28px;
  height: 28px;
  border-radius: 0 !important;
  background: transparent !important;
}

.grid-badge-glyph::before {
  content: "";
  position: absolute;
  inset: 4px auto auto 4px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 12px 0 0 currentColor, 0 12px 0 currentColor, 12px 12px 0 currentColor;
}

.grid-badge-glyph::after {
  display: none !important;
}

.navigation-grid-screen .dashboard-menu-card-head span {
  letter-spacing: .18em;
  text-transform: uppercase;
}

.navigation-grid-screen .dashboard-menu-card-grid {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.navigation-grid-screen .dashboard-menu-card {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.central-date-filter {
  align-items: center;
  gap: 8px;
}

.central-date-input {
  min-width: 160px;
}

.central-date-input input {
  margin-top: 0 !important;
  width: 100%;
}

.central-detail-head {
  align-items: flex-start;
  gap: 16px;
}

.central-detail-heading {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(420px, 1fr);
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.central-count-badges-prominent {
  justify-content: center;
  margin: 0;
  gap: 12px;
}

.central-count-badges-prominent span {
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border-color: rgba(47, 214, 182, .22);
  box-shadow: 0 16px 34px rgba(15, 46, 40, .12);
  font-size: 13px;
}

.central-count-badges-prominent b {
  font-size: 24px;
}

.catalog-product-filter-row {
  display: grid !important;
  grid-template-columns: minmax(200px, 1.10fr) repeat(3, minmax(120px, .54fr)) auto auto auto minmax(160px, .60fr) auto !important;
  align-items: end;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.catalog-product-filter-row > * {
  min-width: 0;
}

.catalog-product-filter-row .product-table-search,
.catalog-product-filter-row .search-box {
  width: auto !important;
}

.catalog-product-filter-row .product-select-filter {
  min-width: 130px;
}

.catalog-product-filter-row input,
.catalog-product-filter-row select,
.catalog-product-filter-row button {
  min-height: 38px;
}

@media (max-width: 980px) {
  .central-detail-heading {
    grid-template-columns: 1fr;
  }

  .central-count-badges-prominent {
    justify-content: flex-start;
  }

  .catalog-product-filter-row {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(132px, .65fr)) auto auto auto minmax(168px, .7fr) auto !important;
  }
}

/* V2.131: header chrome is intentionally outside the parallax header layer. */
.app-chrome.topbar-sticky-shell {
  position: fixed;
  top: 0;
  left: calc(var(--sidebar-track) + 18px);
  right: 18px;
  z-index: 9800 !important;
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  pointer-events: none;
}
.app-chrome > * {
  pointer-events: auto;
}
.chrome-left,
.chrome-right {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}
.chrome-right {
  gap: 10px;
  justify-content: flex-end;
}
.header-clock-widget-inline {
  align-self: flex-start;
  margin-top: 7px;
  margin-right: 6px;
  white-space: nowrap;
}
.app-chrome .desktop-logo-badge {
  min-width: 229px;
  min-height: 66px;
  height: 66px;
  justify-content: flex-start;
  gap: 13px;
  padding: 10px 18px;
  border-radius: 0 !important;
  border-color: rgba(222,232,228,.95);
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 30px rgba(18,35,31,.13);
}
.app-chrome .desktop-logo-badge img {
  max-width: 143px;
  max-height: 55px;
}
.app-chrome .desktop-logo-badge .mark {
  width: 44px;
  height: 44px;
  border-radius: 0;
}
.app-chrome .desktop-wordmark {
  font-size: 18px;
}
.chrome-quick-nav {
  height: 66px;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(222,232,228,.95);
  border-left: 0;
  background: rgba(255,255,255,.58);
  box-shadow: 0 14px 30px rgba(18,35,31,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.chrome-quick-nav button {
  min-width: 153px;
  min-height: 0;
  height: 66px;
  padding: 0 22px;
  border-radius: 0;
  border: 0;
  border-left: 1px solid rgba(16,35,31,.08);
  background: transparent;
  color: #183b35;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -.01em;
  text-align: center;
}
.chrome-quick-nav button:hover,
.chrome-quick-nav button.active {
  background: rgba(var(--active-nav-rgb), .10);
  color: color-mix(in srgb, rgb(var(--active-nav-rgb)) 72%, #10231f);
}
.app-chrome .admin-header-menu {
  position: static;
  top: auto;
  right: auto;
  max-width: min(520px, 34vw);
  align-self: flex-start;
  margin: 0 auto;
}
.app-chrome .language-picker {
  display: inline-flex;
}
.app-chrome .actions {
  position: static;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
}

@media (min-width: 901px) {
  .app-chrome .language-picker,
  .app-chrome .language-picker select,
  .app-chrome .central-header-badge,
  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    height: 57px;
    min-height: 57px;
  }

  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    width: 57px;
    font-size: 26px;
  }

  .app-chrome .language-picker select {
    min-width: 99px;
    padding-inline: 14px 34px;
    font-size: 15px;
  }

  .app-chrome .central-header-badge {
    padding-inline: 20px;
    font-size: 14px;
  }
}
.app-chrome .topbar-status {
  position: absolute;
  top: 68px;
  right: 0;
  width: auto;
  max-width: 360px;
  z-index: 9820 !important;
}
.app-chrome .top-add-menu {
  z-index: 9900 !important;
}
.desktop-sticky-active .app-chrome .desktop-logo-badge {
  min-width: 164px;
  min-height: 40px;
  height: 40px;
  padding: 5px 12px;
  font-size: 12px;
}
.desktop-sticky-active .app-chrome .desktop-logo-badge img {
  max-width: 104px;
  max-height: 36px;
}
.desktop-sticky-active .app-chrome .desktop-logo-badge .mark {
  width: 30px;
  height: 30px;
}
.desktop-sticky-active .chrome-quick-nav,
.desktop-sticky-active .chrome-quick-nav button {
  height: 40px;
}
.desktop-sticky-active .chrome-quick-nav button {
  min-width: 127px;
  padding-inline: 14px;
  font-size: 13px;
}
.desktop-sticky-active .app-chrome .language-picker,
.desktop-sticky-active .app-chrome .language-picker select,
.desktop-sticky-active .app-chrome .central-header-badge,
.desktop-sticky-active .app-chrome .icon-button,
.desktop-sticky-active .app-chrome .add-badge,
.desktop-sticky-active .app-chrome .voice-button {
  height: 40px;
  min-height: 40px;
}
.desktop-sticky-active .app-chrome .icon-button,
.desktop-sticky-active .app-chrome .add-badge,
.desktop-sticky-active .app-chrome .voice-button {
  width: 40px;
}
.desktop-sticky-active .app-chrome .topbar-status {
  top: 47px;
}

@media (max-width: 1480px) and (min-width: 901px) {
  .app-chrome .desktop-logo-badge {
    min-width: 205px;
    padding-inline: 14px;
  }

  .app-chrome .desktop-logo-badge img {
    max-width: 128px;
    max-height: 50px;
  }

  .app-chrome .desktop-wordmark {
    font-size: 16px;
  }

  .chrome-quick-nav button {
    min-width: 128px;
    padding-inline: 16px;
    font-size: 14px;
  }

  .app-chrome .language-picker,
  .app-chrome .language-picker select,
  .app-chrome .central-header-badge,
  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    height: 52px;
    min-height: 52px;
  }

  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    width: 52px;
  }
}
.topbar-copy {
  max-width: min(760px, 72vw);
  margin-inline: auto;
  padding-top: 82px;
  padding-right: 0;
  text-align: center;
}
body:not([data-active-tab="dashboard"]) .topbar-copy {
  margin: 72px auto 0;
  text-align: center;
}
.topbar-copy > p {
  max-width: 64ch;
  margin-inline: auto;
}
.sidebar-topline {
  justify-content: space-between;
  padding: 8px;
}
.sidebar-dashboard-toggle {
  width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #dffdfa;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 20px rgba(4,10,9,.12);
}
.sidebar-dashboard-toggle:hover,
.sidebar-dashboard-toggle.active {
  border-color: rgba(53,214,255,.38);
  background: rgba(53,214,255,.12);
  color: #35d6ff;
}
.grid-nine-glyph {
  width: 28px;
  height: 28px;
  position: relative;
  display: block;
}
.grid-nine-glyph::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  box-shadow:
    10px 0 0 currentColor,
    20px 0 0 currentColor,
    0 10px 0 currentColor,
    10px 10px 0 currentColor,
    20px 10px 0 currentColor,
    0 20px 0 currentColor,
    10px 20px 0 currentColor,
    20px 20px 0 currentColor;
}
.sidebar:not(.sidebar-collapsed) #tabs .nav-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 12px;
}
.sidebar:not(.sidebar-collapsed) #tabs button {
  min-height: 43px;
}
.sidebar:not(.sidebar-collapsed) #tabs .nav-main-copy {
  gap: 11px;
}
body.sidebar-collapsed .sidebar-dashboard-toggle {
  width: 58px;
  height: 54px;
}
.payroll-panel {
  display: grid;
  gap: 14px;
}
.payroll-head {
  align-items: center;
}
.payroll-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(7, minmax(118px, .7fr)) auto auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 0%, rgba(34,211,238,.08), transparent 32%),
    rgba(255,255,255,.74);
  overflow-x: auto;
}
.payroll-filter-card label {
  display: grid;
  gap: 5px;
  color: #667a72;
  font-size: 11px;
  font-weight: 850;
}
.payroll-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.payroll-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.82);
}
.payroll-detail-table {
  min-width: 1320px;
}
.payroll-detail-table td b {
  display: block;
}
.payroll-detail-table td small {
  display: block;
  margin-top: 3px;
}

@media (max-width: 1220px) and (min-width: 901px) {
  .chrome-quick-nav button {
    min-width: 96px;
    padding-inline: 12px;
  }
  .app-chrome .admin-header-menu {
    max-width: 280px;
  }
  .payroll-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-chrome.topbar-sticky-shell {
    left: 0;
    right: 0;
    min-height: 74px;
    padding: 12px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .app-chrome .desktop-logo-badge,
  .chrome-quick-nav {
    display: none;
  }
  .app-chrome .admin-header-menu {
    position: fixed;
    top: 64px;
    left: 64px;
    right: 12px;
    max-width: none;
  }
  .chrome-right {
    margin-left: auto;
  }
  .app-chrome .topbar-status {
    top: 64px;
    right: 12px;
  }
  .payroll-filter-card,
  .payroll-summary-row {
    grid-template-columns: 1fr;
  }
}

/* V2.176: dashboard desktop filter columns match the new search-at-right order. */
@media (min-width: 901px) {
  .dashboard-toolbar-modern .dashboard-filter-row-desktop {
    display: grid !important;
    grid-template-columns:
      minmax(150px, .78fr)
      minmax(150px, .78fr)
      42px
      minmax(160px, .86fr)
      minmax(190px, 1.02fr)
      minmax(220px, 1.18fr)
      44px !important;
    gap: 12px !important;
    align-items: end !important;
    overflow: visible !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop > * {
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: auto !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop label,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-account-scope {
    display: grid !important;
    gap: 6px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop label > span,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-account-scope > span {
    display: block !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop input,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop select {
    height: 42px !important;
    min-height: 42px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-clear-button,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-search-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    justify-self: stretch !important;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .dashboard-toolbar-modern .dashboard-filter-row-desktop {
    grid-template-columns:
      minmax(140px, .72fr)
      minmax(140px, .72fr)
      40px
      minmax(145px, .82fr)
      minmax(160px, .92fr)
      minmax(180px, 1fr)
      42px !important;
    gap: 9px !important;
  }
}

/* V2.194 final cascade guard. */
.topbar .actions #themeToggleBtn {
  display: inline-grid;
}

@media (max-width: 760px) {
  .topbar .actions #themeToggleBtn {
    display: none !important;
  }
}

.accounting-chart-tabs {
  grid-template-columns: 1fr !important;
}

.accounting-chart-tabs button {
  width: 100%;
}

.accounting-finance-overview {
  grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.accounting-finance-chart-module,
.accounting-finance-income,
.accounting-finance-expense {
  max-width: none !important;
  justify-self: stretch !important;
}

@media (max-width: 1180px) {
  .accounting-finance-overview {
    grid-template-columns: 1fr !important;
  }
}

body.theme-dark:not(.pdf-body) {
  --bg: #06110f;
  --panel: #0d1c18;
  --ink: #edfff9;
  --muted: #93aaa4;
  --line: rgba(181,232,220,.16);
  --soft: #102821;
  --accent: #34d399;
  color-scheme: dark;
  background:
    radial-gradient(circle at 10% -10%, rgba(20,184,166,.18), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(56,189,248,.12), transparent 30%),
    linear-gradient(180deg, #06110f 0%, #081512 45%, #050b0a 100%) !important;
  color: var(--ink);
}

body.theme-dark:not(.pdf-body) .panel,
body.theme-dark:not(.pdf-body) .stat,
body.theme-dark:not(.pdf-body) .settings-card,
body.theme-dark:not(.pdf-body) .dialog,
body.theme-dark:not(.pdf-body) .auth-card,
body.theme-dark:not(.pdf-body) .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) .dashboard-hero-main,
body.theme-dark:not(.pdf-body) .dashboard-hero-side,
body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-menu-card,
body.theme-dark:not(.pdf-body) .central-identity-card,
body.theme-dark:not(.pdf-body) .central-company-card,
body.theme-dark:not(.pdf-body) .accounting-finance-module {
  border-color: rgba(181,232,220,.15) !important;
  background:
    radial-gradient(circle at 90% 6%, rgba(52,211,153,.10), transparent 30%),
    linear-gradient(145deg, rgba(15,31,27,.94), rgba(9,22,19,.86)) !important;
  color: var(--ink) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.32) !important;
}

body.theme-dark:not(.pdf-body) h1,
body.theme-dark:not(.pdf-body) h2,
body.theme-dark:not(.pdf-body) h3,
body.theme-dark:not(.pdf-body) b,
body.theme-dark:not(.pdf-body) strong {
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) p,
body.theme-dark:not(.pdf-body) small,
body.theme-dark:not(.pdf-body) .muted {
  color: var(--muted) !important;
}

body.theme-dark:not(.pdf-body) input,
body.theme-dark:not(.pdf-body) select,
body.theme-dark:not(.pdf-body) textarea {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(3,12,10,.72) !important;
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) th {
  background: rgba(28,54,48,.88) !important;
  color: #bfe7dd !important;
}

body.theme-dark:not(.pdf-body) td {
  border-color: rgba(181,232,220,.10) !important;
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) .invoice-print-document,
body.theme-dark:not(.pdf-body) .invoice-page,
body.theme-dark:not(.pdf-body) .qr-payment-slip,
body.theme-dark:not(.pdf-body) .campaign-print-page,
body.theme-dark:not(.pdf-body) .invoice-preview-page {
  background: #fff !important;
  color: #111 !important;
}

/* V2.195 actual EOF guard: readable dark tables, subtle header title and nine-grid chrome icon. */
.topbar #navigationGridBtn .grid-nine-glyph {
  width: 24px;
  height: 24px;
}

.topbar #navigationGridBtn .grid-nine-glyph::before {
  left: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 2px;
  box-shadow:
    8px 0 0 currentColor,
    16px 0 0 currentColor,
    0 8px 0 currentColor,
    8px 8px 0 currentColor,
    16px 8px 0 currentColor,
    0 16px 0 currentColor,
    8px 16px 0 currentColor,
    16px 16px 0 currentColor;
}

.theme-toggle-button {
  --theme-icon-color: #123b34;
}

.theme-glyph {
  width: 23px;
  height: 23px;
  position: relative;
  display: inline-block;
}

.theme-glyph::before,
.theme-glyph::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}

.theme-glyph::before {
  inset: 4px;
  border: 2px solid currentColor;
  background: transparent;
  box-shadow: none;
}

.theme-glyph::after {
  inset: 0;
  opacity: 1;
  background: transparent;
  box-shadow:
    11px 0 0 -9px currentColor,
    -11px 0 0 -9px currentColor,
    0 11px 0 -9px currentColor,
    0 -11px 0 -9px currentColor,
    8px 8px 0 -9px currentColor,
    -8px -8px 0 -9px currentColor,
    8px -8px 0 -9px currentColor,
    -8px 8px 0 -9px currentColor;
}

body.theme-dark .theme-glyph::before {
  inset: 3px;
  border: 0;
  background: currentColor;
  transform: translateX(2px);
}

body.theme-dark .theme-glyph::after {
  inset: 3px 2px 3px 8px;
  background: #0b1d19;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

body.theme-dark:not(.pdf-body) .theme-toggle-button {
  color: #f5f7eb;
}

body.theme-dark:not(.pdf-body):not([data-active-tab="dashboard"]) .topbar-copy,
body.theme-dark:not(.pdf-body) .topbar-copy {
  border: 1px solid rgba(186, 247, 232, .20) !important;
  border-left: 5px solid rgba(52, 211, 153, .55) !important;
  background:
    linear-gradient(135deg, rgba(237,255,249,.09), rgba(52,211,153,.055)),
    rgba(5, 17, 15, .36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 20px 46px rgba(0,0,0,.28) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.theme-dark:not(.pdf-body) .topbar-copy h1,
body.theme-dark:not(.pdf-body) .topbar h1 {
  color: #f6fffb !important;
  text-shadow: 0 12px 30px rgba(0,0,0,.36) !important;
}

body.theme-dark:not(.pdf-body) .topbar-copy > p {
  border-left-color: rgba(186,247,232,.22) !important;
  color: rgba(237,255,249,.72) !important;
  text-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .table-scroll,
body.theme-dark:not(.pdf-body) .table-responsive,
body.theme-dark:not(.pdf-body) .catalog-products-main,
body.theme-dark:not(.pdf-body) .central-detail-tables,
body.theme-dark:not(.pdf-body) .central-edit-panel,
body.theme-dark:not(.pdf-body) .deleted-items-table,
body.theme-dark:not(.pdf-body) .cashbook-table {
  border-color: rgba(181,232,220,.13) !important;
  background: rgba(3, 11, 10, .62) !important;
}

body.theme-dark:not(.pdf-body) table,
body.theme-dark:not(.pdf-body) table:not(.invoice-print-table),
body.theme-dark:not(.pdf-body) .dashboard-customer-table-card table,
body.theme-dark:not(.pdf-body) .dashboard-recent-invoices-spotlight table,
body.theme-dark:not(.pdf-body) .central-detail-tables table,
body.theme-dark:not(.pdf-body) .central-edit-panel table,
body.theme-dark:not(.pdf-body) .cashbook-table {
  border: 1px solid rgba(181,232,220,.12) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: rgba(7, 19, 17, .92) !important;
  color: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) thead,
body.theme-dark:not(.pdf-body) tbody {
  background: transparent !important;
}

body.theme-dark:not(.pdf-body) thead th,
body.theme-dark:not(.pdf-body) table th {
  border-bottom: 1px solid rgba(181,232,220,.16) !important;
  background:
    linear-gradient(180deg, rgba(62,92,84,.88), rgba(35,62,55,.92)) !important;
  color: #f4fffb !important;
  text-shadow: none !important;
}

body.theme-dark:not(.pdf-body) tbody tr,
body.theme-dark:not(.pdf-body) table tbody tr {
  background: rgba(9, 24, 21, .88) !important;
}

body.theme-dark:not(.pdf-body) tbody tr:nth-child(even),
body.theme-dark:not(.pdf-body) table tbody tr:nth-child(even) {
  background: rgba(12, 32, 28, .94) !important;
}

body.theme-dark:not(.pdf-body) tbody tr:hover,
body.theme-dark:not(.pdf-body) table tbody tr:hover,
body.theme-dark:not(.pdf-body) tbody tr.clickable-row:hover {
  background:
    linear-gradient(90deg, rgba(52,211,153,.18), rgba(34,211,238,.08)) !important;
}

body.theme-dark:not(.pdf-body) tbody td,
body.theme-dark:not(.pdf-body) table td {
  border-color: rgba(181,232,220,.09) !important;
  background: transparent !important;
  color: #dffdf5 !important;
}

body.theme-dark:not(.pdf-body) tbody td b,
body.theme-dark:not(.pdf-body) table td b,
body.theme-dark:not(.pdf-body) tbody td strong,
body.theme-dark:not(.pdf-body) table td strong,
body.theme-dark:not(.pdf-body) tbody td a,
body.theme-dark:not(.pdf-body) table td a {
  color: #bdfbea !important;
}

body.theme-dark:not(.pdf-body) tbody td small,
body.theme-dark:not(.pdf-body) table td small,
body.theme-dark:not(.pdf-body) tbody td .muted,
body.theme-dark:not(.pdf-body) table td .muted,
body.theme-dark:not(.pdf-body) .invoice-balance-note {
  color: #9fbab3 !important;
}

body.theme-dark:not(.pdf-body) input[type="checkbox"] {
  accent-color: #34d399;
}

body.theme-dark:not(.pdf-body) .invoice-row-action-menu summary,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel button,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel select,
body.theme-dark:not(.pdf-body) .list-action-control,
body.theme-dark:not(.pdf-body) .list-action-select,
body.theme-dark:not(.pdf-body) .list-action-selected,
body.theme-dark:not(.pdf-body) .page-actions,
body.theme-dark:not(.pdf-body) .pagination,
body.theme-dark:not(.pdf-body) .pagination button,
body.theme-dark:not(.pdf-body) .pagination select {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(12, 30, 26, .94) !important;
  color: #effff9 !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.20) !important;
}

body.theme-dark:not(.pdf-body) .pagination button.active,
body.theme-dark:not(.pdf-body) .page-actions button.primary,
body.theme-dark:not(.pdf-body) .list-action-selected {
  background: linear-gradient(135deg, rgba(52,211,153,.30), rgba(34,211,238,.16)) !important;
  color: #effff9 !important;
}

body.theme-dark:not(.pdf-body) .status-badge,
body.theme-dark:not(.pdf-body) .badge.status,
body.theme-dark:not(.pdf-body) td .badge {
  color: #f4fffb !important;
}

/* V2.196 final override: keep dark panels, filters and popups readable after older guards. */
body.theme-dark:not(.pdf-body) {
  --dark-panel-final: rgba(7, 22, 19, .91);
  --dark-panel-soft-final: rgba(12, 32, 28, .86);
  --dark-field-final: rgba(13, 33, 29, .95);
  --dark-border-final: rgba(181, 232, 220, .17);
  --dark-ink-final: #f4fffb;
  --dark-muted-final: #a8c7bf;
}

body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-shell,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel,
body.theme-dark:not(.pdf-body) .invoice-filter-rail,
body.theme-dark:not(.pdf-body) .customer-filter-rail,
body.theme-dark:not(.pdf-body) .offers-filter-group,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row,
body.theme-dark:not(.pdf-body) .reports-filter-rail,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail,
body.theme-dark:not(.pdf-body) .payroll-filter-card,
body.theme-dark:not(.pdf-body) .bulk-tools,
body.theme-dark:not(.pdf-body) .page-actions {
  border: 1px solid var(--dark-border-final) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(4,15,13,.78) !important;
  color: var(--dark-ink-final) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 40px rgba(0,0,0,.24) !important;
}

body.theme-dark:not(.pdf-body) .search-box,
body.theme-dark:not(.pdf-body) .toolbar-search,
body.theme-dark:not(.pdf-body) .dashboard-search-field,
body.theme-dark:not(.pdf-body) .invoice-customer-filter,
body.theme-dark:not(.pdf-body) .list-action-filter-cell,
body.theme-dark:not(.pdf-body) .list-import-filter-cell,
body.theme-dark:not(.pdf-body) .io-toolbar-group,
body.theme-dark:not(.pdf-body) .dashboard-account-scope,
body.theme-dark:not(.pdf-body) .dashboard-filter-row label,
body.theme-dark:not(.pdf-body) .cashbook-search-filter,
body.theme-dark:not(.pdf-body) .cashbook-type-filter,
body.theme-dark:not(.pdf-body) .cashbook-method-filter,
body.theme-dark:not(.pdf-body) .cashbook-actor-filter,
body.theme-dark:not(.pdf-body) .cashbook-date-filter-group,
body.theme-dark:not(.pdf-body) .cashbook-action-filter {
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern input,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern select,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern button,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel input,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel select,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel button,
body.theme-dark:not(.pdf-body) .invoice-filter-rail input,
body.theme-dark:not(.pdf-body) .invoice-filter-rail select,
body.theme-dark:not(.pdf-body) .invoice-filter-rail button,
body.theme-dark:not(.pdf-body) .customer-filter-rail input,
body.theme-dark:not(.pdf-body) .customer-filter-rail select,
body.theme-dark:not(.pdf-body) .customer-filter-rail button,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row input,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row select,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row button,
body.theme-dark:not(.pdf-body) .reports-filter-rail input,
body.theme-dark:not(.pdf-body) .reports-filter-rail select,
body.theme-dark:not(.pdf-body) .reports-filter-rail button,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail input,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail select,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail button,
body.theme-dark:not(.pdf-body) .payroll-filter-card input,
body.theme-dark:not(.pdf-body) .payroll-filter-card select,
body.theme-dark:not(.pdf-body) .payroll-filter-card button {
  border: 1px solid var(--dark-border-final) !important;
  background: var(--dark-field-final) !important;
  color: var(--dark-ink-final) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .grid > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-revenue,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-growth,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-calendar,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-recent-invoices-spotlight,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-customer-table-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card {
  border: 1px solid var(--dark-border-final) !important;
  background: radial-gradient(circle at 94% 8%, rgba(52,211,153,.11), transparent 32%), linear-gradient(145deg, rgba(11,31,27,.92), rgba(5,16,14,.88)) !important;
  color: var(--dark-ink-final) !important;
  box-shadow: 0 24px 62px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card,
body.theme-dark:not(.pdf-body) #dashboard .trend-metric-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-legend span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-actions button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-panel-kicker,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-active-profile,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-period-chip,
body.theme-dark:not(.pdf-body) #dashboard .chart-shell,
body.theme-dark:not(.pdf-body) #dashboard .chart-scroll,
body.theme-dark:not(.pdf-body) #dashboard .trend-panel,
body.theme-dark:not(.pdf-body) #dashboard .trend-chart {
  border-color: var(--dark-border-final) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.065), rgba(52,211,153,.035)), var(--dark-panel-soft-final) !important;
  color: var(--dark-ink-final) !important;
}

body.theme-dark:not(.pdf-body) #dashboard h2,
body.theme-dark:not(.pdf-body) #dashboard h3,
body.theme-dark:not(.pdf-body) #dashboard h4,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading strong,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card b {
  color: var(--dark-ink-final) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card em,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item small {
  color: var(--dark-muted-final) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs {
  border-color: var(--dark-border-final) !important;
  background: rgba(4,15,13,.72) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button {
  background: transparent !important;
  color: var(--dark-muted-final) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button.active,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button.active {
  background: rgba(40,68,61,.98) !important;
  color: var(--dark-ink-final) !important;
}

body.theme-dark:not(.pdf-body) #calendar .panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-main-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-side-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-mini-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-detail-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-list-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-topbar,
body.theme-dark:not(.pdf-body) #stock .panel,
body.theme-dark:not(.pdf-body) #stock .stock-summary-panel,
body.theme-dark:not(.pdf-body) #stock .stock-location-panel,
body.theme-dark:not(.pdf-body) #stock .stock-workbook,
body.theme-dark:not(.pdf-body) #stock .stock-sheet,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-center,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-card,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-meta-card,
body.theme-dark:not(.pdf-body) #stock .stock-item-card,
body.theme-dark:not(.pdf-body) #stock .stock-location-dialog,
body.theme-dark:not(.pdf-body) #stock .stock-location-inventory-panel {
  border: 1px solid var(--dark-border-final) !important;
  background: linear-gradient(145deg, rgba(13,33,29,.90), rgba(5,16,14,.86)) !important;
  color: var(--dark-ink-final) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-entry,
body.theme-dark:not(.pdf-body) #calendar .calendar-item,
body.theme-dark:not(.pdf-body) #calendar .calendar-day-button,
body.theme-dark:not(.pdf-body) #calendar .calendar-nav-actions button,
body.theme-dark:not(.pdf-body) #calendar .calendar-view-actions button,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-scroll,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary-table,
body.theme-dark:not(.pdf-body) #stock .stock-item-card-row {
  border-color: rgba(181,232,220,.12) !important;
  background: rgba(4,15,13,.78) !important;
  color: var(--dark-ink-final) !important;
}

body.theme-dark:not(.pdf-body) dialog,
body.theme-dark:not(.pdf-body) .dialog,
body.theme-dark:not(.pdf-body) .preview-shell,
body.theme-dark:not(.pdf-body) .voice-assistant-dialog,
body.theme-dark:not(.pdf-body) .admin-subscriber-dialog,
body.theme-dark:not(.pdf-body) .central-company-edit-dialog,
body.theme-dark:not(.pdf-body) .central-catalog-dialog,
body.theme-dark:not(.pdf-body) .stock-location-dialog,
body.theme-dark:not(.pdf-body) .special-payout-dialog-shell,
body.theme-dark:not(.pdf-body) .payroll-payout-dialog-shell,
body.theme-dark:not(.pdf-body) .campaign-dialog-shell {
  border-color: var(--dark-border-final) !important;
  background: linear-gradient(145deg, rgba(13,33,29,.96), rgba(5,16,14,.94)) !important;
  color: var(--dark-ink-final) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.46) !important;
}

body.theme-dark:not(.pdf-body) dialog button,
body.theme-dark:not(.pdf-body) .dialog button,
body.theme-dark:not(.pdf-body) .modal-actions button,
body.theme-dark:not(.pdf-body) .dialog-actions button,
body.theme-dark:not(.pdf-body) .stock-location-modal-actions button {
  border: 1px solid rgba(181,232,220,.20) !important;
  background: linear-gradient(135deg, rgba(52,211,153,.24), rgba(34,211,238,.13)), rgba(12,34,30,.96) !important;
  color: var(--dark-ink-final) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) dialog button.primary,
body.theme-dark:not(.pdf-body) .dialog button.primary,
body.theme-dark:not(.pdf-body) dialog button.success,
body.theme-dark:not(.pdf-body) .dialog button.success {
  border-color: rgba(52,211,153,.45) !important;
  background: linear-gradient(135deg, #16a34a, #06b6d4) !important;
  color: #fff !important;
}

body.theme-dark:not(.pdf-body) dialog button.danger,
body.theme-dark:not(.pdf-body) .dialog button.danger {
  border-color: rgba(248,113,113,.42) !important;
  background: linear-gradient(135deg, #b91c1c, #f97316) !important;
  color: #fff !important;
}

body.theme-dark:not(.pdf-body) dialog button.dialog-close,
body.theme-dark:not(.pdf-body) .dialog button.dialog-close,
body.theme-dark:not(.pdf-body) dialog button.cancel,
body.theme-dark:not(.pdf-body) .dialog button.cancel {
  border-color: rgba(181,232,220,.18) !important;
  background: linear-gradient(135deg, rgba(148,163,184,.30), rgba(52,211,153,.10)), rgba(15,37,33,.98) !important;
  color: #f4fffb !important;
}

/* V2.196 true EOF guard: dark panels, filters, calendar and stock surfaces. */
body.theme-dark:not(.pdf-body) {
  --dark-panel: rgba(7, 22, 19, .90);
  --dark-panel-soft: rgba(11, 31, 27, .84);
  --dark-field: rgba(13, 33, 29, .94);
  --dark-border: rgba(181, 232, 220, .16);
  --dark-ink: #f4fffb;
  --dark-muted: #a8c7bf;
}

body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-shell,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel,
body.theme-dark:not(.pdf-body) .invoice-filter-rail,
body.theme-dark:not(.pdf-body) .customer-filter-rail,
body.theme-dark:not(.pdf-body) .offers-filter-group,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row,
body.theme-dark:not(.pdf-body) .reports-filter-rail,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail,
body.theme-dark:not(.pdf-body) .payroll-filter-card,
body.theme-dark:not(.pdf-body) .bulk-tools,
body.theme-dark:not(.pdf-body) .page-actions {
  border: 1px solid var(--dark-border) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(4,15,13,.78) !important;
  color: var(--dark-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 40px rgba(0,0,0,.24) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.theme-dark:not(.pdf-body) .search-box,
body.theme-dark:not(.pdf-body) .toolbar-search,
body.theme-dark:not(.pdf-body) .dashboard-search-field,
body.theme-dark:not(.pdf-body) .invoice-customer-filter,
body.theme-dark:not(.pdf-body) .list-action-filter-cell,
body.theme-dark:not(.pdf-body) .list-import-filter-cell,
body.theme-dark:not(.pdf-body) .io-toolbar-group,
body.theme-dark:not(.pdf-body) .dashboard-account-scope,
body.theme-dark:not(.pdf-body) .dashboard-filter-row label,
body.theme-dark:not(.pdf-body) .cashbook-search-filter,
body.theme-dark:not(.pdf-body) .cashbook-type-filter,
body.theme-dark:not(.pdf-body) .cashbook-method-filter,
body.theme-dark:not(.pdf-body) .cashbook-actor-filter,
body.theme-dark:not(.pdf-body) .cashbook-date-filter-group,
body.theme-dark:not(.pdf-body) .cashbook-action-filter {
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .dashboard-filter-row label > span,
body.theme-dark:not(.pdf-body) .dashboard-account-scope > span,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel label > span,
body.theme-dark:not(.pdf-body) .invoice-filter-rail label > span,
body.theme-dark:not(.pdf-body) .customer-filter-rail label > span,
body.theme-dark:not(.pdf-body) .list-action-filter-cell > span,
body.theme-dark:not(.pdf-body) .list-import-filter-cell > span,
body.theme-dark:not(.pdf-body) .payroll-filter-card label,
body.theme-dark:not(.pdf-body) .reports-filter-rail label {
  color: var(--dark-muted) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern input,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern select,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern button,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel input,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel select,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel button,
body.theme-dark:not(.pdf-body) .invoice-filter-rail input,
body.theme-dark:not(.pdf-body) .invoice-filter-rail select,
body.theme-dark:not(.pdf-body) .invoice-filter-rail button,
body.theme-dark:not(.pdf-body) .customer-filter-rail input,
body.theme-dark:not(.pdf-body) .customer-filter-rail select,
body.theme-dark:not(.pdf-body) .customer-filter-rail button,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row input,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row select,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row button,
body.theme-dark:not(.pdf-body) .reports-filter-rail input,
body.theme-dark:not(.pdf-body) .reports-filter-rail select,
body.theme-dark:not(.pdf-body) .reports-filter-rail button,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail input,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail select,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail button,
body.theme-dark:not(.pdf-body) .payroll-filter-card input,
body.theme-dark:not(.pdf-body) .payroll-filter-card select,
body.theme-dark:not(.pdf-body) .payroll-filter-card button {
  border: 1px solid var(--dark-border) !important;
  background: var(--dark-field) !important;
  color: var(--dark-ink) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .grid > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-revenue,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-growth,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-calendar,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-recent-invoices-spotlight,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-customer-table-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card {
  border: 1px solid var(--dark-border) !important;
  background: radial-gradient(circle at 94% 8%, rgba(52,211,153,.11), transparent 32%), linear-gradient(145deg, rgba(11,31,27,.92), rgba(5,16,14,.88)) !important;
  color: var(--dark-ink) !important;
  box-shadow: 0 24px 62px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card,
body.theme-dark:not(.pdf-body) #dashboard .trend-metric-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-legend span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-actions button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-panel-kicker,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-active-profile,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-period-chip,
body.theme-dark:not(.pdf-body) #dashboard .chart-shell,
body.theme-dark:not(.pdf-body) #dashboard .chart-scroll,
body.theme-dark:not(.pdf-body) #dashboard .trend-panel,
body.theme-dark:not(.pdf-body) #dashboard .trend-chart {
  border-color: var(--dark-border) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.065), rgba(52,211,153,.035)), var(--dark-panel-soft) !important;
  color: var(--dark-ink) !important;
}

body.theme-dark:not(.pdf-body) #dashboard h2,
body.theme-dark:not(.pdf-body) #dashboard h3,
body.theme-dark:not(.pdf-body) #dashboard h4,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading strong,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card b {
  color: var(--dark-ink) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card em,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item small {
  color: var(--dark-muted) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs {
  border-color: var(--dark-border) !important;
  background: rgba(4,15,13,.72) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button {
  background: transparent !important;
  color: var(--dark-muted) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button.active,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button.active {
  background: rgba(40,68,61,.98) !important;
  color: var(--dark-ink) !important;
}

body.theme-dark:not(.pdf-body) #calendar .panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-main-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-side-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-mini-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-detail-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-list-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-topbar,
body.theme-dark:not(.pdf-body) #stock .panel,
body.theme-dark:not(.pdf-body) #stock .stock-summary-panel,
body.theme-dark:not(.pdf-body) #stock .stock-location-panel,
body.theme-dark:not(.pdf-body) #stock .stock-workbook,
body.theme-dark:not(.pdf-body) #stock .stock-sheet,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-center,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-card,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-meta-card,
body.theme-dark:not(.pdf-body) #stock .stock-item-card,
body.theme-dark:not(.pdf-body) #stock .stock-location-dialog,
body.theme-dark:not(.pdf-body) #stock .stock-location-inventory-panel {
  border: 1px solid var(--dark-border) !important;
  background: linear-gradient(145deg, rgba(13,33,29,.90), rgba(5,16,14,.86)) !important;
  color: var(--dark-ink) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-entry,
body.theme-dark:not(.pdf-body) #calendar .calendar-item,
body.theme-dark:not(.pdf-body) #calendar .calendar-day-button,
body.theme-dark:not(.pdf-body) #calendar .calendar-nav-actions button,
body.theme-dark:not(.pdf-body) #calendar .calendar-view-actions button,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-scroll,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary-table,
body.theme-dark:not(.pdf-body) #stock .stock-item-card-row {
  border-color: rgba(181,232,220,.12) !important;
  background: rgba(4,15,13,.78) !important;
  color: var(--dark-ink) !important;
}

/* V2.196 true EOF guard: dark dashboard panels, filter rails, calendar and stock surfaces. */
body.theme-dark:not(.pdf-body) #dashboard {
  --dashboard-ink: #f1fffb;
  --dashboard-muted: #9fbab3;
  --dashboard-card: rgba(7, 22, 19, .86);
  --dashboard-line: rgba(181, 232, 220, .16);
  --dashboard-glow: 0 26px 64px rgba(0,0,0,.34);
}

body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-shell,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel,
body.theme-dark:not(.pdf-body) .invoice-filter-rail,
body.theme-dark:not(.pdf-body) .customer-filter-rail,
body.theme-dark:not(.pdf-body) .offers-filter-group,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row,
body.theme-dark:not(.pdf-body) .reports-filter-rail,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail,
body.theme-dark:not(.pdf-body) .payroll-filter-card,
body.theme-dark:not(.pdf-body) .admin-subscriber-bulkbar,
body.theme-dark:not(.pdf-body) .page-actions,
body.theme-dark:not(.pdf-body) .bulk-tools {
  border: 1px solid rgba(181,232,220,.14) !important;
  background:
    linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)),
    rgba(4, 15, 13, .74) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    0 18px 40px rgba(0,0,0,.22) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.theme-dark:not(.pdf-body) .search-box,
body.theme-dark:not(.pdf-body) .toolbar-search,
body.theme-dark:not(.pdf-body) .dashboard-search-field,
body.theme-dark:not(.pdf-body) .invoice-customer-filter,
body.theme-dark:not(.pdf-body) .list-action-filter-cell,
body.theme-dark:not(.pdf-body) .list-import-filter-cell,
body.theme-dark:not(.pdf-body) .io-toolbar-group,
body.theme-dark:not(.pdf-body) .dashboard-account-scope,
body.theme-dark:not(.pdf-body) .dashboard-filter-row label,
body.theme-dark:not(.pdf-body) .cashbook-search-filter,
body.theme-dark:not(.pdf-body) .cashbook-type-filter,
body.theme-dark:not(.pdf-body) .cashbook-method-filter,
body.theme-dark:not(.pdf-body) .cashbook-actor-filter,
body.theme-dark:not(.pdf-body) .cashbook-date-filter-group,
body.theme-dark:not(.pdf-body) .cashbook-action-filter {
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .dashboard-filter-row label > span,
body.theme-dark:not(.pdf-body) .dashboard-account-scope > span,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel label > span,
body.theme-dark:not(.pdf-body) .invoice-filter-rail label > span,
body.theme-dark:not(.pdf-body) .customer-filter-rail label > span,
body.theme-dark:not(.pdf-body) .list-action-filter-cell > span,
body.theme-dark:not(.pdf-body) .list-import-filter-cell > span,
body.theme-dark:not(.pdf-body) .payroll-filter-card label,
body.theme-dark:not(.pdf-body) .reports-filter-rail label {
  color: #a8c7bf !important;
}

body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern input,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern select,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern button,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel input,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel select,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel button,
body.theme-dark:not(.pdf-body) .invoice-filter-rail input,
body.theme-dark:not(.pdf-body) .invoice-filter-rail select,
body.theme-dark:not(.pdf-body) .invoice-filter-rail button,
body.theme-dark:not(.pdf-body) .customer-filter-rail input,
body.theme-dark:not(.pdf-body) .customer-filter-rail select,
body.theme-dark:not(.pdf-body) .customer-filter-rail button,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row input,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row select,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row button,
body.theme-dark:not(.pdf-body) .reports-filter-rail input,
body.theme-dark:not(.pdf-body) .reports-filter-rail select,
body.theme-dark:not(.pdf-body) .reports-filter-rail button,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail input,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail select,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail button,
body.theme-dark:not(.pdf-body) .payroll-filter-card input,
body.theme-dark:not(.pdf-body) .payroll-filter-card select,
body.theme-dark:not(.pdf-body) .payroll-filter-card button {
  border: 1px solid rgba(181,232,220,.16) !important;
  background: rgba(13, 33, 29, .92) !important;
  color: #f1fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .grid > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-revenue,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-growth,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-calendar,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-recent-invoices-spotlight,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-customer-table-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card {
  border: 1px solid rgba(181,232,220,.15) !important;
  background:
    radial-gradient(circle at 94% 8%, rgba(52,211,153,.11), transparent 32%),
    linear-gradient(145deg, rgba(11,31,27,.92), rgba(5,16,14,.88)) !important;
  color: #f1fffb !important;
  box-shadow: 0 24px 62px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main::before,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel::before,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card::after,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card::after,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric::before {
  opacity: .32 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card,
body.theme-dark:not(.pdf-body) #dashboard .trend-metric-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-legend span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-actions button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-panel-kicker,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-active-profile,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-period-chip {
  border: 1px solid rgba(181,232,220,.15) !important;
  background:
    linear-gradient(135deg, rgba(237,255,249,.065), rgba(52,211,153,.035)),
    rgba(9, 29, 25, .86) !important;
  color: #f1fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .chart-shell,
body.theme-dark:not(.pdf-body) #dashboard .chart-scroll,
body.theme-dark:not(.pdf-body) #dashboard .trend-panel,
body.theme-dark:not(.pdf-body) #dashboard .trend-chart {
  border-color: rgba(181,232,220,.13) !important;
  background:
    linear-gradient(180deg, rgba(237,255,249,.045), transparent),
    rgba(4, 15, 13, .82) !important;
  color: #f1fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel h3,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack h3,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-recent-invoices-spotlight h3,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading strong,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card b {
  color: #f7fffc !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card em,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item small {
  color: #9fbab3 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs {
  border-color: rgba(181,232,220,.15) !important;
  background: rgba(4, 15, 13, .72) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button {
  background: transparent !important;
  color: #adc9c1 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button.active,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button.active {
  background: rgba(40, 68, 61, .98) !important;
  color: #f6fffb !important;
}

body.theme-dark:not(.pdf-body) #calendar .panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-main-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-side-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-mini-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-detail-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-list-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-topbar {
  border-color: rgba(181,232,220,.14) !important;
  background:
    linear-gradient(145deg, rgba(13,33,29,.90), rgba(5,16,14,.86)) !important;
  color: #f1fffb !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-entry,
body.theme-dark:not(.pdf-body) #calendar .calendar-item,
body.theme-dark:not(.pdf-body) #calendar .calendar-day-button,
body.theme-dark:not(.pdf-body) #calendar .calendar-nav-actions button,
body.theme-dark:not(.pdf-body) #calendar .calendar-view-actions button {
  border-color: rgba(181,232,220,.14) !important;
  background: rgba(9, 29, 25, .88) !important;
  color: #f1fffb !important;
}

body.theme-dark:not(.pdf-body) #stock .panel,
body.theme-dark:not(.pdf-body) #stock .stock-summary-panel,
body.theme-dark:not(.pdf-body) #stock .stock-location-panel,
body.theme-dark:not(.pdf-body) #stock .stock-workbook,
body.theme-dark:not(.pdf-body) #stock .stock-sheet,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-center,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-card,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-meta-card,
body.theme-dark:not(.pdf-body) #stock .stock-item-card,
body.theme-dark:not(.pdf-body) #stock .stock-location-dialog,
body.theme-dark:not(.pdf-body) #stock .stock-location-inventory-panel {
  border-color: rgba(181,232,220,.14) !important;
  background:
    linear-gradient(145deg, rgba(13,33,29,.90), rgba(5,16,14,.86)) !important;
  color: #f1fffb !important;
  box-shadow: 0 20px 48px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) #stock .stock-sheet-scroll,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary-table,
body.theme-dark:not(.pdf-body) #stock .stock-item-card-row {
  border-color: rgba(181,232,220,.12) !important;
  background: rgba(4, 15, 13, .72) !important;
  color: #f1fffb !important;
}

/* V2.193 final guard: Zentral profile card and compact Buchhaltung overview. */
.central-identity-card.central-visit-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 126px minmax(420px, 1fr) minmax(300px, .48fr) !important;
  grid-template-areas:
    "status counts metrics"
    "logo copy metrics"
    "logo copy metrics"
    "logo copy actions" !important;
  gap: 14px 24px !important;
  align-items: start !important;
  min-height: 300px;
  overflow: hidden;
}

.central-identity-card .central-identity-status-badge {
  grid-area: status !important;
  justify-self: start;
  align-self: start;
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid rgba(18, 151, 93, .24);
  border-radius: 999px;
  background: rgba(236, 253, 245, .68);
  color: #0f7a45;
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
}

.central-identity-card .central-identity-status-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.central-identity-card .central-identity-counts {
  grid-area: counts !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px !important;
  align-self: start !important;
  margin: 0 !important;
  max-width: 100% !important;
}

.central-identity-card .central-identity-counts span {
  justify-content: flex-start;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 22px rgba(15, 48, 43, .06);
}

.central-identity-card .central-identity-counts b {
  color: #06b6d4;
  font-size: 22px;
}

.central-identity-card .central-identity-logo-stack {
  grid-area: logo !important;
  align-self: center;
  justify-self: center;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 !important;
}

.central-identity-card .central-identity-copy {
  grid-area: copy !important;
  align-self: center;
  min-width: 0;
}

.central-identity-card .central-identity-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.central-identity-card .central-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(20, 184, 166, .28);
  border-radius: 999px;
  background: rgba(236, 253, 245, .72);
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.central-identity-card .central-identity-grid-reordered {
  display: grid !important;
  grid-template-columns: minmax(230px, .92fr) minmax(230px, 1fr) !important;
  gap: 26px !important;
  margin-top: 18px !important;
}

.central-identity-card .central-identity-info-column {
  display: grid;
  gap: 13px;
  align-content: start;
}

.central-identity-card .central-identity-info-column span {
  display: grid;
  gap: 4px;
  color: #49605b;
  font-size: 15px;
  line-height: 1.22;
}

.central-identity-card .central-identity-info-column b {
  color: #71817d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.central-identity-card .central-profile-metrics {
  grid-area: metrics !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100%;
  margin: 0 !important;
}

.central-identity-card .central-profile-metric {
  min-height: 62px;
  padding: 13px 15px 13px 18px;
  border: 1px solid rgba(15, 48, 43, .10);
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 24px rgba(15, 48, 43, .06);
}

.central-identity-card .central-profile-metric b {
  font-size: clamp(20px, 1.6vw, 27px);
}

.central-identity-card .central-identity-actions {
  grid-area: actions !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
}

.central-identity-card .central-identity-edit-text,
.central-identity-card .central-identity-actions .danger {
  min-width: 142px;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 800;
}

.central-identity-card .central-identity-edit-text {
  border: 1px solid rgba(15, 48, 43, .12);
  background: rgba(255, 255, 255, .84);
  color: #17342e;
}

.accounting-finance-overview {
  display: grid !important;
  grid-template-columns: minmax(280px, .9fr) minmax(260px, .8fr) minmax(260px, .8fr) !important;
  gap: 18px !important;
  align-items: stretch;
  max-width: 1280px;
  margin: 18px auto 24px !important;
}

.accounting-finance-module {
  min-height: auto !important;
  padding: 18px !important;
  border: 1px solid rgba(15, 48, 43, .10);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(239,250,247,.72));
  box-shadow: 0 18px 38px rgba(15, 48, 43, .08);
}

.accounting-finance-income,
.accounting-finance-expense {
  max-width: 360px;
  justify-self: stretch;
}

.accounting-finance-module-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}

.accounting-finance-module-head span {
  color: #6b7d78;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.accounting-finance-module-head b {
  color: #102821;
  font-size: 22px;
}

.accounting-finance-stack {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.accounting-finance-card {
  min-height: 72px !important;
  padding: 13px 15px !important;
  border: 1px solid rgba(15, 48, 43, .10);
  border-left: 4px solid var(--accent, #14b8a6);
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: none !important;
}

.accounting-finance-expense .accounting-finance-card {
  --accent: #f97316;
}

.accounting-finance-card b {
  font-size: 22px !important;
}

.accounting-finance-chart-module {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(20,184,166,.16), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(238,252,249,.84));
}

.accounting-chart-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(20, 184, 166, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .68);
}

.accounting-chart-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #60736f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.accounting-chart-tabs button.active {
  background: linear-gradient(135deg, rgba(20,184,166,.20), rgba(6,182,212,.12));
  color: #0f3f37;
  box-shadow: inset 0 0 0 1px rgba(20,184,166,.22);
}

.accounting-pie-body {
  display: grid;
  grid-template-columns: minmax(130px, .72fr) minmax(150px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 205px;
  padding-top: 16px;
}

.accounting-pie-svg {
  width: min(100%, 190px);
  height: auto;
  justify-self: center;
  overflow: visible;
  filter: drop-shadow(0 14px 18px rgba(15, 48, 43, .12));
}

.accounting-pie-svg circle {
  transition: stroke-dasharray .35s ease, stroke-dashoffset .35s ease;
}

.accounting-pie-svg text:first-of-type {
  fill: #12362f;
  font-size: 16px;
  font-weight: 900;
}

.accounting-pie-svg text:last-of-type {
  fill: #6d817b;
  font-size: 8px;
  font-weight: 800;
}

.accounting-pie-legend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.accounting-pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(15, 48, 43, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
}

.accounting-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pie-color);
}

.accounting-pie-legend b {
  overflow: hidden;
  color: #17342e;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-pie-legend em {
  color: #06b6d4;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.accounting-pie-legend small {
  grid-column: 2 / 4;
  color: #6b7d78;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 110px 1fr !important;
    grid-template-areas:
      "status status"
      "counts counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  .central-identity-card .central-profile-metrics {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }

  .accounting-finance-overview {
    grid-template-columns: 1fr !important;
  }

  .accounting-finance-income,
  .accounting-finance-expense {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "status"
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
    padding: 18px !important;
  }

  .central-identity-card .central-identity-counts,
  .central-identity-card .central-profile-metrics,
  .central-identity-card .central-identity-grid-reordered {
    grid-template-columns: 1fr !important;
  }

  .central-identity-card .central-identity-actions {
    justify-content: stretch !important;
    flex-direction: column;
  }

  .central-identity-card .central-identity-edit-text,
  .central-identity-card .central-identity-actions .danger {
    width: 100%;
  }

  .accounting-pie-body {
    grid-template-columns: 1fr;
  }

  .accounting-pie-svg {
    max-width: 170px;
  }
}

/* V2.194: light/dark theme badge and dark UI layer. */
.theme-toggle-button {
  position: relative;
  overflow: hidden;
}

.theme-glyph {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.theme-glyph::before,
.theme-glyph::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: transform .24s ease, opacity .24s ease, box-shadow .24s ease, background .24s ease;
}

.theme-glyph::before {
  background: #0f3f37;
  box-shadow: inset -7px 0 0 rgba(255,255,255,.86);
  transform: scale(.94) rotate(-18deg);
}

.theme-glyph::after {
  inset: -5px;
  border: 2px solid rgba(15,63,55,.18);
  opacity: 0;
  transform: scale(.72);
}

body.theme-dark .theme-glyph::before {
  background: #facc15;
  box-shadow:
    0 0 0 5px rgba(250,204,21,.14),
    0 0 26px rgba(250,204,21,.35);
  transform: scale(.74);
}

body.theme-dark .theme-glyph::after {
  opacity: 1;
  border-color: rgba(250,204,21,.42);
  box-shadow:
    0 -15px 0 -8px #facc15,
    0 15px 0 -8px #facc15,
    15px 0 0 -8px #facc15,
    -15px 0 0 -8px #facc15,
    11px 11px 0 -8px #facc15,
    -11px -11px 0 -8px #facc15,
    11px -11px 0 -8px #facc15,
    -11px 11px 0 -8px #facc15;
  transform: scale(.82);
}

@media (max-width: 760px) {
  .topbar .actions > #themeToggleBtn {
    display: none !important;
  }
}

body.theme-dark:not(.pdf-body) {
  --bg: #06110f;
  --panel: #0d1c18;
  --ink: #edfff9;
  --muted: #93aaa4;
  --line: rgba(181, 232, 220, .16);
  --soft: #102821;
  --accent: #34d399;
  --add: #22d3ee;
  --add-dark: #0891b2;
  color-scheme: dark;
  background:
    radial-gradient(circle at 10% -10%, rgba(20,184,166,.18), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(56,189,248,.12), transparent 30%),
    linear-gradient(180deg, #06110f 0%, #081512 45%, #050b0a 100%);
  color: var(--ink);
}

body.theme-dark:not(.pdf-body) .topbar::before {
  background:
    linear-gradient(180deg, rgba(var(--active-nav-rgb), .09), rgba(var(--active-nav-rgb), .035)),
    radial-gradient(circle at 82% 30%, rgba(var(--active-nav-rgb), .18), transparent 24%),
    linear-gradient(116deg, transparent 0 52%, rgba(var(--active-nav-rgb), .15) 52% 52.18%, transparent 52.18% 100%),
    linear-gradient(180deg, rgba(3,10,9,.72), rgba(7,18,16,.46)),
    linear-gradient(125deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 38%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 520'%3E%3Crect width='1600' height='520' fill='%230b1b17'/%3E%3Cg stroke='%234b6f66' stroke-width='2' fill='none' opacity='.74'%3E%3Cpath d='M82 390h1436'/%3E%3Cpath d='M120 330h420l94-120h308l70 84h410'/%3E%3Crect x='188' y='118' width='230' height='126' rx='18'/%3E%3Crect x='468' y='146' width='182' height='92' rx='16'/%3E%3Ccircle cx='1190' cy='188' r='78'/%3E%3Cpath d='M1040 308h290v120h-290z'/%3E%3Cpath d='M114 94l110-40 140 32 108-46 154 34 132-46 160 34 176-48 170 42 172-50 188 56'/%3E%3C/g%3E%3Cg stroke='%231f3b35' stroke-width='1' opacity='.72'%3E%3Cpath d='M0 52h1600M0 104h1600M0 156h1600M0 208h1600M0 260h1600M0 312h1600M0 364h1600M0 416h1600M0 468h1600'/%3E%3Cpath d='M80 0v520M200 0v520M320 0v520M440 0v520M560 0v520M680 0v520M800 0v520M920 0v520M1040 0v520M1160 0v520M1280 0v520M1400 0v520M1520 0v520'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: 0 20px 48px rgba(0,0,0,.36);
}

body.theme-dark:not(.pdf-body) .topbar::after {
  opacity: .78;
  mix-blend-mode: screen;
}

body.theme-dark:not(.pdf-body) .sidebar,
body.theme-dark:not(.pdf-body) .mobile-menu-panel {
  background:
    linear-gradient(180deg, rgba(6,17,15,.92), rgba(4,10,9,.98)),
    linear-gradient(120deg, rgba(52,211,153,.08), transparent 44%);
  border-color: rgba(181,232,220,.14);
}

body.theme-dark:not(.pdf-body) .panel,
body.theme-dark:not(.pdf-body) .stat,
body.theme-dark:not(.pdf-body) .settings-card,
body.theme-dark:not(.pdf-body) .dialog,
body.theme-dark:not(.pdf-body) .auth-card,
body.theme-dark:not(.pdf-body) .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) .dashboard-hero-main,
body.theme-dark:not(.pdf-body) .dashboard-hero-side,
body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-menu-card,
body.theme-dark:not(.pdf-body) .central-identity-card,
body.theme-dark:not(.pdf-body) .central-company-card,
body.theme-dark:not(.pdf-body) .accounting-finance-module {
  border-color: rgba(181, 232, 220, .15) !important;
  background:
    radial-gradient(circle at 90% 6%, rgba(52,211,153,.10), transparent 30%),
    linear-gradient(145deg, rgba(15,31,27,.94), rgba(9,22,19,.86)) !important;
  color: var(--ink) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.32) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-recent-invoices-spotlight {
  background:
    radial-gradient(circle at 92% 0%, rgba(20,184,166,.16), transparent 36%),
    linear-gradient(145deg, rgba(8,21,18,.98), rgba(3,12,10,.94)) !important;
}

body.theme-dark:not(.pdf-body) h1,
body.theme-dark:not(.pdf-body) h2,
body.theme-dark:not(.pdf-body) h3,
body.theme-dark:not(.pdf-body) b,
body.theme-dark:not(.pdf-body) strong,
body.theme-dark:not(.pdf-body) .dashboard-command-copy h2,
body.theme-dark:not(.pdf-body) .dashboard-modern-panel h3,
body.theme-dark:not(.pdf-body) .dashboard-modern-stack h3,
body.theme-dark:not(.pdf-body) .dashboard-modern-metric b,
body.theme-dark:not(.pdf-body) .dashboard-signal-card b,
body.theme-dark:not(.pdf-body) .dashboard-net-card b {
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) p,
body.theme-dark:not(.pdf-body) small,
body.theme-dark:not(.pdf-body) .muted,
body.theme-dark:not(.pdf-body) .dashboard-command-copy p,
body.theme-dark:not(.pdf-body) .dashboard-modern-metric small,
body.theme-dark:not(.pdf-body) .dashboard-signal-card small {
  color: var(--muted) !important;
}

body.theme-dark:not(.pdf-body) input,
body.theme-dark:not(.pdf-body) select,
body.theme-dark:not(.pdf-body) textarea,
body.theme-dark:not(.pdf-body) .language-picker select {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(3, 12, 10, .72) !important;
  color: var(--ink) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 10px 24px rgba(0,0,0,.18) !important;
}

body.theme-dark:not(.pdf-body) input::placeholder,
body.theme-dark:not(.pdf-body) textarea::placeholder {
  color: rgba(237,255,249,.45) !important;
}

body.theme-dark:not(.pdf-body) button,
body.theme-dark:not(.pdf-body) .icon-button,
body.theme-dark:not(.pdf-body) .topbar .add-badge,
body.theme-dark:not(.pdf-body) .topbar #logoutBtn,
body.theme-dark:not(.pdf-body) .topbar #mobileSettingsBtn,
body.theme-dark:not(.pdf-body) .topbar #navigationGridBtn,
body.theme-dark:not(.pdf-body) .topbar #themeToggleBtn,
body.theme-dark:not(.pdf-body) .voice-button {
  border-color: rgba(181,232,220,.16);
  background: rgba(13, 31, 27, .78);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(0,0,0,.26);
}

body.theme-dark:not(.pdf-body) button.primary,
body.theme-dark:not(.pdf-body) .primary,
body.theme-dark:not(.pdf-body) .add-badge {
  background: linear-gradient(135deg, #19d3c5, #2563eb) !important;
  color: #f7fffd !important;
}

body.theme-dark:not(.pdf-body) table {
  color: var(--ink);
}

body.theme-dark:not(.pdf-body) th {
  background: rgba(28, 54, 48, .88) !important;
  color: #bfe7dd !important;
}

body.theme-dark:not(.pdf-body) td {
  border-color: rgba(181,232,220,.10) !important;
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) tbody tr:nth-child(even) {
  background: rgba(255,255,255,.025);
}

body.theme-dark:not(.pdf-body) tbody tr:hover {
  background: rgba(52,211,153,.12) !important;
}

body.theme-dark:not(.pdf-body) .badge,
body.theme-dark:not(.pdf-body) .topbar-status .badge,
body.theme-dark:not(.pdf-body) .central-plan-badge,
body.theme-dark:not(.pdf-body) .dashboard-eyebrow,
body.theme-dark:not(.pdf-body) .dashboard-panel-kicker {
  border-color: rgba(52,211,153,.22) !important;
  background: rgba(18, 54, 47, .76) !important;
  color: #baf7e8 !important;
}

body.theme-dark:not(.pdf-body) .top-add-menu,
body.theme-dark:not(.pdf-body) .dashboard-search-popover,
body.theme-dark:not(.pdf-body) .sidebar-hover-flyout {
  border-color: rgba(181,232,220,.16);
  background: rgba(8,20,18,.96) !important;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(0,0,0,.44);
}

body.theme-dark:not(.pdf-body) .invoice-print-document,
body.theme-dark:not(.pdf-body) .invoice-page,
body.theme-dark:not(.pdf-body) .qr-payment-slip,
body.theme-dark:not(.pdf-body) .campaign-print-page,
body.theme-dark:not(.pdf-body) .invoice-preview-page {
  background: #fff !important;
  color: #111 !important;
}

body.theme-dark:not(.pdf-body) .accounting-chart-tabs {
  grid-template-columns: 1fr !important;
  border-color: rgba(52,211,153,.20);
  background: rgba(3,12,10,.44);
}

body.theme-dark:not(.pdf-body) .accounting-chart-tabs button.active {
  background: linear-gradient(135deg, rgba(52,211,153,.24), rgba(34,211,238,.12));
  color: #d9fff5;
}

body.theme-dark:not(.pdf-body) .accounting-pie-legend span,
body.theme-dark:not(.pdf-body) .accounting-finance-card,
body.theme-dark:not(.pdf-body) .central-profile-metric,
body.theme-dark:not(.pdf-body) .central-identity-counts span {
  border-color: rgba(181,232,220,.13) !important;
  background: rgba(255,255,255,.045) !important;
}

body.theme-dark:not(.pdf-body) .accounting-pie-svg text:first-of-type,
body.theme-dark:not(.pdf-body) .accounting-pie-legend b {
  fill: var(--ink);
  color: var(--ink);
}

body.theme-dark:not(.pdf-body) .accounting-pie-svg text:last-of-type,
body.theme-dark:not(.pdf-body) .accounting-pie-legend small {
  fill: var(--muted);
  color: var(--muted);
}

.accounting-chart-tabs {
  grid-template-columns: 1fr !important;
}

.accounting-finance-overview {
  grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  gap: 18px !important;
}

.accounting-finance-chart-module,
.accounting-finance-income,
.accounting-finance-expense {
  max-width: none !important;
  justify-self: stretch !important;
}

/* V2.193 final cascade guard: keep Zentral card and accounting pie layout last. */
.central-identity-card.central-visit-card {
  grid-template-columns: 126px minmax(420px, 1fr) minmax(300px, .48fr) !important;
  grid-template-areas:
    "status counts metrics"
    "logo copy metrics"
    "logo copy metrics"
    "logo copy actions" !important;
  gap: 14px 24px !important;
  align-items: start !important;
  min-height: 300px;
}

.central-identity-status-badge {
  grid-area: status;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(34,197,94,.26);
  border-radius: 999px;
  background: rgba(236,253,245,.58);
  color: #0f5132;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.central-identity-status-badge i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.central-identity-counts {
  grid-area: counts !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(122px, 1fr)) !important;
  gap: 9px !important;
  align-self: start;
  justify-content: stretch !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.central-identity-counts span {
  min-width: 0 !important;
  min-height: 42px !important;
  justify-content: flex-start !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(240,250,247,.74));
  box-shadow: 0 12px 26px rgba(16,40,35,.07);
}

.central-identity-counts b {
  min-width: 32px;
  font-size: 22px !important;
}

.central-identity-logo-stack {
  grid-area: logo !important;
  align-content: start;
  padding-top: 36px;
}

.central-identity-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.central-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.central-identity-grid.central-identity-grid-reordered {
  grid-template-columns: minmax(240px, .94fr) minmax(260px, .86fr) !important;
  gap: 18px 36px !important;
}

.central-profile-metrics {
  grid-area: metrics !important;
  padding-top: 64px !important;
  gap: 8px !important;
}

.central-profile-metric {
  min-height: 48px !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
}

.central-profile-metric b {
  font-size: clamp(17px, 1.45vw, 22px) !important;
}

.central-identity-actions {
  grid-area: actions !important;
  justify-self: end !important;
  align-self: end !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.central-identity-edit-text,
.central-identity-actions .danger {
  min-height: 40px;
  padding: 10px 16px !important;
  border-radius: 12px !important;
}

.central-identity-edit-text {
  border: 1px solid rgba(15,118,110,.16);
  background: rgba(255,255,255,.82);
  color: #0f766e;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(16,40,35,.08);
}

.accounting-finance-overview {
  grid-template-columns: minmax(250px, .72fr) repeat(2, minmax(240px, .82fr)) !important;
  align-items: stretch;
  max-width: 1280px;
  margin: 16px auto 18px !important;
}

.accounting-finance-module {
  padding: 14px !important;
  border-radius: 22px !important;
}

.accounting-finance-module-head b {
  font-size: clamp(18px, 1.7vw, 25px) !important;
}

.accounting-finance-card {
  min-height: 58px !important;
  padding: 10px 13px !important;
  border-radius: 14px !important;
}

.accounting-finance-card b {
  font-size: clamp(17px, 1.45vw, 23px);
}

.accounting-finance-chart-module {
  background:
    radial-gradient(circle at 0% 0%, rgba(59,130,246,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,253,249,.90));
}

.accounting-chart-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.accounting-chart-tabs button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(16,40,35,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #506760;
  font-size: 11px;
  font-weight: 900;
}

.accounting-chart-tabs button.active {
  background: #10231f;
  color: #fff;
  border-color: #10231f;
}

.accounting-pie-body {
  display: grid;
  grid-template-columns: minmax(118px, .7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.accounting-pie-svg {
  width: min(150px, 100%);
  aspect-ratio: 1;
  overflow: visible;
}

.accounting-pie-svg circle {
  transition: stroke-dashoffset .35s ease, stroke-dasharray .35s ease;
}

.accounting-pie-svg text:first-of-type {
  fill: #10231f;
  font-size: 14px;
  font-weight: 900;
}

.accounting-pie-svg text:last-of-type {
  fill: #687874;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .08em;
}

.accounting-pie-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.accounting-pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.accounting-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--pie-color);
}

.accounting-pie-legend b {
  overflow: hidden;
  color: #10231f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-pie-legend em {
  color: #00bdf2;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.accounting-pie-legend small {
  grid-column: 2 / -1;
  margin-top: -4px;
  color: #6b7e78;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 106px minmax(0, 1fr) !important;
    grid-template-areas:
      "status counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  .central-profile-metrics {
    padding-top: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .accounting-finance-overview {
    grid-template-columns: 1fr 1fr !important;
  }

  .accounting-finance-chart-module {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "status"
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
  }

  .central-identity-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .central-identity-logo-stack {
    padding-top: 0;
  }

  .central-identity-actions {
    justify-self: stretch !important;
  }

  .central-identity-edit-text,
  .central-identity-actions .danger {
    flex: 1;
  }

  .accounting-finance-overview {
    grid-template-columns: 1fr !important;
  }

  .accounting-pie-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .accounting-pie-legend {
    width: 100%;
  }
}

/* V2.193: Zentral card action/status placement and compact accounting dashboard. */
.central-identity-card.central-visit-card {
  grid-template-columns: 126px minmax(420px, 1fr) minmax(300px, .48fr) !important;
  grid-template-areas:
    "status counts metrics"
    "logo copy metrics"
    "logo copy metrics"
    "logo copy actions" !important;
  gap: 14px 24px !important;
  min-height: 300px;
}

.central-identity-status-badge {
  grid-area: status;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(34,197,94,.26);
  border-radius: 999px;
  background: rgba(236,253,245,.58);
  color: #0f5132;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.central-identity-status-badge i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.central-identity-counts {
  grid-area: counts !important;
  grid-template-columns: repeat(3, minmax(122px, 1fr)) !important;
  align-self: start;
  margin: 0 !important;
}

.central-identity-counts span {
  min-height: 42px !important;
  border-radius: 10px !important;
}

.central-identity-logo-stack {
  grid-area: logo !important;
  align-content: start;
  padding-top: 36px;
}

.central-identity-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.central-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.central-profile-metrics {
  padding-top: 64px !important;
  gap: 8px !important;
}

.central-profile-metric {
  min-height: 48px !important;
  border-radius: 10px !important;
  padding: 9px 12px !important;
}

.central-profile-metric b {
  font-size: clamp(17px, 1.45vw, 22px) !important;
}

.central-identity-actions {
  grid-area: actions !important;
  justify-self: end !important;
  align-self: end !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.central-identity-edit-text,
.central-identity-actions .danger {
  min-height: 40px;
  padding: 10px 16px !important;
  border-radius: 12px !important;
}

.central-identity-edit-text {
  border: 1px solid rgba(15,118,110,.16);
  background: rgba(255,255,255,.82);
  color: #0f766e;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(16,40,35,.08);
}

.accounting-finance-overview {
  grid-template-columns: minmax(250px, .72fr) repeat(2, minmax(240px, .82fr)) !important;
  align-items: stretch;
  max-width: 1280px;
  margin: 16px auto 18px !important;
}

.accounting-finance-module {
  padding: 14px !important;
  border-radius: 22px !important;
}

.accounting-finance-module-head b {
  font-size: clamp(18px, 1.7vw, 25px) !important;
}

.accounting-finance-card {
  min-height: 58px !important;
  padding: 10px 13px !important;
  border-radius: 14px !important;
}

.accounting-finance-card b {
  font-size: clamp(17px, 1.45vw, 23px);
}

.accounting-finance-chart-module {
  background:
    radial-gradient(circle at 0% 0%, rgba(59,130,246,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,253,249,.90));
}

.accounting-chart-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.accounting-chart-tabs button {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(16,40,35,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #506760;
  font-size: 11px;
  font-weight: 900;
}

.accounting-chart-tabs button.active {
  background: #10231f;
  color: #fff;
  border-color: #10231f;
}

.accounting-pie-body {
  display: grid;
  grid-template-columns: minmax(118px, .7fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.accounting-pie-svg {
  width: min(150px, 100%);
  aspect-ratio: 1;
  overflow: visible;
}

.accounting-pie-svg circle {
  transition: stroke-dashoffset .35s ease, stroke-dasharray .35s ease;
}

.accounting-pie-svg text:first-of-type {
  fill: #10231f;
  font-size: 14px;
  font-weight: 900;
}

.accounting-pie-svg text:last-of-type {
  fill: #687874;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .08em;
}

.accounting-pie-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.accounting-pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.accounting-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--pie-color);
}

.accounting-pie-legend b {
  overflow: hidden;
  color: #10231f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accounting-pie-legend em {
  color: #00bdf2;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.accounting-pie-legend small {
  grid-column: 2 / -1;
  margin-top: -4px;
  color: #6b7e78;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 106px minmax(0, 1fr) !important;
    grid-template-areas:
      "status counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  .central-profile-metrics {
    padding-top: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .accounting-finance-overview {
    grid-template-columns: 1fr 1fr !important;
  }

  .accounting-finance-chart-module {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "status"
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
  }

  .central-identity-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .central-identity-logo-stack {
    padding-top: 0;
  }

  .central-identity-actions {
    justify-self: stretch !important;
  }

  .central-identity-edit-text,
  .central-identity-actions .danger {
    flex: 1;
  }

  .accounting-finance-overview {
    grid-template-columns: 1fr !important;
  }

  .accounting-pie-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .accounting-pie-legend {
    width: 100%;
  }
}

/* V2.192 final override: Zentral visit card layout. */
.central-identity-card.central-visit-card {
  grid-template-columns: 120px minmax(360px, 1fr) minmax(310px, .54fr) !important;
  grid-template-areas:
    "counts counts counts"
    "logo copy metrics"
    "logo copy metrics"
    "logo copy actions" !important;
  align-items: start !important;
  min-height: 300px;
}

.central-identity-logo-stack {
  grid-area: logo;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 13px;
  min-width: 0;
}

.central-identity-logo-stack .central-identity-logo {
  grid-area: auto;
}

.central-identity-logo-stack .central-identity-status-actions {
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
}

.central-identity-logo-stack .central-identity-status-actions .status,
.central-identity-logo-stack .central-identity-edit-icon {
  width: 72px;
  min-height: 34px;
  justify-content: center;
}

.central-identity-logo-stack .central-identity-edit-icon {
  width: 48px;
  height: 40px;
  border-radius: 12px;
}

.central-identity-counts {
  display: grid !important;
  grid-area: counts;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 9px !important;
  justify-content: stretch !important;
  margin: 0 86px 8px 122px !important;
  min-height: 0 !important;
}

.central-identity-counts span {
  min-width: 0 !important;
  justify-content: flex-start !important;
  min-height: 48px;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(240,250,247,.74));
  box-shadow: 0 12px 26px rgba(16,40,35,.07);
}

.central-identity-counts b {
  min-width: 32px;
  font-size: 22px !important;
}

.central-identity-copy {
  padding-top: 10px;
}

.central-identity-grid.central-identity-grid-reordered {
  grid-template-columns: minmax(240px, .94fr) minmax(260px, .86fr) !important;
  gap: 18px 36px !important;
  align-items: start;
}

.central-identity-info-column {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.central-identity-info-column span {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #344944;
}

.central-identity-info-column b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.central-profile-metrics {
  padding-top: 42px;
}

@media (max-width: 1280px) {
  .central-identity-counts {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    margin: 0 84px 8px 0 !important;
  }
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    grid-template-areas:
      "counts counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  .central-identity-grid.central-identity-grid-reordered {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .central-profile-metrics {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
  }

  .central-identity-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 42px 0 8px !important;
  }

  .central-identity-grid.central-identity-grid-reordered {
    grid-template-columns: 1fr !important;
  }
}

/* V2.189: Zentral profile dashboard card composition. */
.central-detail-panel {
  padding-top: 14px !important;
}

.central-detail-panel > .central-profile-metrics {
  margin-bottom: 16px;
}

.central-identity-card.central-visit-card {
  display: grid !important;
  grid-template-columns: 112px minmax(360px, 1.18fr) minmax(260px, .78fr);
  grid-template-areas:
    "counts counts counts"
    "logo copy metrics"
    "logo copy actions";
  gap: 14px 22px !important;
  align-items: center !important;
  padding: 18px 18px 20px !important;
  min-height: 260px;
}

.central-identity-card .central-identity-status-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.central-identity-edit-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 13px;
  background: rgba(255,255,255,.86);
  color: #0f766e;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(16,40,35,.12);
}

.central-identity-edit-icon:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.90));
  border-color: rgba(20,184,166,.36);
}

.central-identity-counts {
  grid-area: counts;
  justify-content: center !important;
  margin: 0 120px 4px 170px !important;
  min-height: 44px;
}

.central-identity-counts span {
  min-width: 128px;
  justify-content: center;
}

.central-identity-logo {
  grid-area: logo;
  align-self: center;
}

.central-identity-copy {
  grid-area: copy;
  align-self: center;
  max-width: 720px;
  padding-left: 4px;
}

.central-identity-copy h3 {
  margin-bottom: 10px !important;
}

.central-identity-grid {
  grid-template-columns: minmax(230px, .95fr) minmax(220px, .72fr) !important;
  gap: 8px 22px !important;
}

.central-profile-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-self: stretch;
}

.central-profile-metric {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 13px 10px 15px;
  border: 1px solid rgba(16,40,35,.10);
  border-left: 4px solid rgba(18,199,167,.72);
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 12px 24px rgba(16,40,35,.06);
}

.central-profile-metric span {
  color: #5c706b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}

.central-profile-metric b {
  color: #10231f;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.05;
}

.central-profile-metric small {
  color: #657a74;
  font-size: 11px;
}

.central-profile-metric.paid {
  border-left-color: rgba(59,130,246,.72);
}

.central-profile-metric.open {
  border-left-color: rgba(239,68,68,.72);
}

.central-profile-metric.expense {
  border-left-color: rgba(249,115,22,.72);
}

.central-identity-actions {
  grid-area: actions;
  justify-self: end;
  align-self: end;
}

.central-identity-actions:empty {
  display: none;
}

.central-identity-actions .danger {
  padding: 10px 14px;
  border-radius: 13px;
}

@media (max-width: 1180px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
      "counts counts"
      "logo copy"
      "metrics metrics"
      "actions actions";
  }

  .central-identity-counts {
    justify-content: flex-start !important;
    margin: 0 98px 4px 0 !important;
  }

  .central-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .central-identity-card.central-visit-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions";
    padding: 16px !important;
  }

  .central-identity-counts {
    margin: 42px 0 8px !important;
  }

  .central-identity-logo {
    width: 82px;
    height: 82px;
  }

  .central-identity-grid,
  .central-profile-metrics {
    grid-template-columns: 1fr !important;
  }
}

/* V2.188: sidebar dashboard relocation, print-safe invoice masks and campaign sheets. */
.sidebar-topline {
  justify-content: center !important;
  min-height: 58px;
}

.sidebar-topline .sidebar-toggle {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  font-size: 19px !important;
}

body.sidebar-collapsed .sidebar-toggle {
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

.sidebar-dashboard-footer-toggle {
  margin: 0 auto 8px !important;
}

.sidebar-footer .sidebar-dashboard-toggle {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 28px rgba(4,10,9,.18);
  color: #fff;
}

.sidebar-footer .sidebar-dashboard-toggle:hover,
.sidebar-footer .sidebar-dashboard-toggle.active {
  transform: translateY(-1px);
  border-color: rgba(34,211,238,.34);
  background: rgba(34,211,238,.13);
}

body.sidebar-collapsed .sidebar-footer .sidebar-dashboard-toggle {
  width: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
}

.product-list-name {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-list-name img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(16,35,31,.12);
  background: #eef6f4;
}

.product-list-name span {
  min-width: 0;
}

@media (min-width: 901px) {
  #tabs {
    overflow-y: auto !important;
    scrollbar-width: none;
  }

  body.sidebar-collapsed #tabs {
    overflow-y: auto !important;
    scrollbar-width: none;
  }

  #tabs::-webkit-scrollbar,
  body.sidebar-collapsed #tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .sidebar-footer {
    flex: 0 0 auto;
  }
}

.invoice-document {
  width: 210mm;
  max-width: 210mm;
  overflow: hidden;
}

.invoice-page {
  --print-safe-x: 18mm;
  --print-safe-top: 16mm;
  --print-safe-bottom: 44mm;
  padding: var(--print-safe-top) var(--print-safe-x) var(--print-safe-bottom) !important;
  overflow: hidden;
}

.invoice-layout-compact .invoice-page,
.invoice-layout-editorial .invoice-page,
.invoice-layout-block .invoice-page,
.invoice-layout-sideLogo .invoice-page,
.invoice-layout-corporate .invoice-page,
.invoice-layout-premium .invoice-page,
.invoice-layout-service .invoice-page,
.invoice-layout-modern .invoice-page {
  padding: var(--print-safe-top) var(--print-safe-x) var(--print-safe-bottom) !important;
}

.invoice-layout-modern .invoice-page,
.invoice-layout-corporate .invoice-page,
.invoice-layout-service .invoice-page {
  border-top: 0 !important;
}

.invoice-layout-sideLogo .invoice-page {
  border-left: 0 !important;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--invoice-accent) 14%, #fff) 0 7mm, transparent 7mm),
    #fff;
}

.invoice-layout-editorial .invoice-page {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--invoice-accent) 8%, #fff) 0 12mm, #fff 12mm);
}

.invoice-page-content,
.invoice-head,
.invoice-addresses,
.invoice-print-module,
.invoice-lines-block,
.invoice-lines-block table,
.invoice-total,
.invoice-payment-history {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.invoice-lines-block table {
  width: 100%;
  table-layout: fixed;
}

.invoice-lines-block th,
.invoice-lines-block td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.invoice-lines-block th.right,
.invoice-lines-block td.right {
  white-space: nowrap;
}

.invoice-line-description-with-image {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.invoice-line-description-with-image b,
.invoice-line-description-with-image small {
  display: block;
}

.invoice-line-description-with-image small {
  margin-top: 3px;
  color: #687874;
  font-size: 7.5pt;
}

.invoice-line-description-text,
.invoice-line-description-text b,
.invoice-line-description-text small {
  display: block;
}

.invoice-line-description-text {
  line-height: 1.35;
}

.invoice-line-description-text small {
  margin-top: 3px;
  color: #687874;
  font-size: 7.5pt;
}

.invoice-line-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(17,17,17,.12);
  background: #f4f8f7;
}

.invoice-lines-block .invoice-image-col,
.invoice-lines-block .invoice-image-cell {
  width: 16mm;
  max-width: 16mm;
  padding-right: 2mm;
  text-align: left;
}

.invoice-line-image-thumb,
.invoice-line-image-placeholder {
  display: block;
  width: 50px;
  height: 50px;
}

.invoice-line-image-placeholder {
  border-radius: 10px;
}

.invoice-lines-block th.right,
.invoice-lines-block td.right {
  width: 21mm;
}

.invoice-page-footer {
  left: var(--print-safe-x, 18mm) !important;
  right: var(--print-safe-x, 18mm) !important;
  bottom: 8mm !important;
}

.invoice-page-footer-payment {
  left: 14mm !important;
  right: 14mm !important;
  bottom: 110mm !important;
}

.campaign-dialog-shell {
  width: min(1180px, calc(100vw - 32px));
}

.campaign-editor-grid {
  display: grid;
  grid-template-columns: minmax(280px, .86fr) minmax(320px, 1.14fr);
  gap: 16px;
}

.campaign-editor-preview {
  overflow: auto;
  background: #eef4f2;
}

.campaign-active-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(20,184,166,.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(236,253,245,.92), rgba(255,255,255,.82));
}

.campaign-active-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #14b8a6;
}

.campaign-active-toggle b,
.campaign-active-toggle small {
  display: block;
}

.campaign-active-toggle small {
  margin-top: 2px;
  color: #657a74;
  font-size: 12px;
}

.campaign-document {
  width: 210mm;
  margin: 0 auto;
}

.campaign-print-page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  box-sizing: border-box;
  padding: 18mm;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(20,184,166,.16), transparent 26%),
    linear-gradient(145deg, #ffffff, #eef7f4);
  color: #10231f;
  font-family: Arial, sans-serif;
}

.campaign-editor-preview .campaign-print-page {
  width: 100%;
  min-height: 640px;
  transform: none;
}

.campaign-print-brand {
  position: absolute;
  top: 14mm;
  left: 18mm;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(16,35,31,.55);
}

.campaign-print-badge {
  position: absolute;
  top: 16mm;
  right: 18mm;
  padding: 8px 14px;
  border-radius: 999px;
  background: #14b8a6;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(20,184,166,.24);
}

.campaign-print-main-image {
  width: 100%;
  height: 118mm;
  margin-top: 22mm;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(16,35,31,.16);
}

.campaign-print-image-placeholder {
  display: block;
  background:
    linear-gradient(135deg, rgba(20,184,166,.22), rgba(59,130,246,.13)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.38) 0 8px, transparent 8px 16px);
}

.campaign-print-copy {
  max-width: 138mm;
  margin-top: 14mm;
}

.campaign-print-copy small {
  display: block;
  margin-bottom: 5mm;
  color: #14b8a6;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.campaign-print-copy h1 {
  margin: 0;
  font-size: 38pt;
  line-height: .96;
}

.campaign-print-copy h2 {
  margin: 7mm 0 0;
  font-size: 20pt;
  color: #0f766e;
}

.campaign-print-copy p {
  margin-top: 7mm;
  font-size: 13pt;
  line-height: 1.45;
}

.campaign-print-secondary-image {
  position: absolute;
  right: 18mm;
  bottom: 18mm;
  width: 45mm;
  height: 45mm;
  object-fit: cover;
  border-radius: 18px;
  border: 5px solid #fff;
  box-shadow: 0 22px 44px rgba(16,35,31,.18);
}

.campaign-layout-split {
  display: grid;
  grid-template-columns: 1fr 72mm;
  gap: 13mm;
  align-items: center;
}

.campaign-layout-split .campaign-print-main-image {
  grid-column: 2;
  grid-row: 1 / span 2;
  height: 200mm;
  margin-top: 20mm;
}

.campaign-layout-split .campaign-print-copy {
  grid-column: 1;
  grid-row: 1;
  margin-top: 32mm;
}

.campaign-layout-poster .campaign-print-main-image {
  position: absolute;
  inset: auto 18mm 18mm 18mm;
  width: auto;
  height: 112mm;
  opacity: .82;
}

.campaign-layout-poster .campaign-print-copy {
  position: relative;
  z-index: 2;
  margin-top: 48mm;
}

@media (max-width: 900px) {
  .campaign-editor-grid {
    grid-template-columns: 1fr;
  }

  .campaign-editor-preview .campaign-print-page {
    min-height: 560px;
  }
}

@media print {
  #printArea .invoice-document,
  body.pdf-body .invoice-document,
  #printArea .campaign-document,
  body.pdf-body .campaign-document {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  #printArea .invoice-page,
  body.pdf-body .invoice-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    padding: var(--print-safe-top, 16mm) var(--print-safe-x, 18mm) var(--print-safe-bottom, 44mm) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #printArea .invoice-lines-block,
  #printArea .invoice-lines-block table,
  #printArea .invoice-total,
  body.pdf-body .invoice-lines-block,
  body.pdf-body .invoice-lines-block table,
  body.pdf-body .invoice-total {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #printArea .campaign-print-page,
  body.pdf-body .campaign-print-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    break-after: auto;
    page-break-after: auto;
  }

  #printArea .invoice-campaign-appendix {
    break-before: page;
    page-break-before: always;
  }
}

/* V2.177: Kasse / Bankkonto ledger screen. */
.cashbook-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(20,184,166,.14), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,250,247,.88));
}

.cashbook-hero h3 {
  margin: 2px 0 8px;
  font-size: clamp(28px, 3vw, 44px);
  color: #10231f;
}

.cashbook-hero p {
  max-width: 760px;
  color: rgba(16,35,31,.68);
}

.cashbook-balance-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 132px;
  padding: 20px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(255,255,255,.18), transparent 32%),
    linear-gradient(135deg, #0f4f43, #082f29);
  box-shadow: 0 24px 48px rgba(9,47,41,.20);
}

.cashbook-balance-card span,
.cashbook-stat span {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(16,35,31,.64);
}

.cashbook-balance-card span {
  color: rgba(255,255,255,.72);
}

.cashbook-balance-card b {
  font-size: clamp(28px, 3vw, 42px);
}

.cashbook-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.cashbook-stat {
  min-height: 120px;
  border-left: 6px solid rgba(20,184,166,.75);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(243,251,248,.86));
}

.cashbook-stat.income {
  border-left-color: #10b981;
}

.cashbook-stat.expense {
  border-left-color: #ef4444;
}

.cashbook-stat.neutral {
  border-left-color: #38bdf8;
}

.cashbook-filter-rail {
  grid-template-columns:
    minmax(220px, 1fr)
    minmax(130px, .5fr)
    minmax(250px, .9fr)
    minmax(160px, .65fr)
    minmax(190px, .75fr)
    auto
    minmax(154px, .56fr) !important;
  margin-bottom: 16px;
}

.cashbook-filter-rail .cashbook-search-filter,
.cashbook-filter-rail .cashbook-type-filter,
.cashbook-filter-rail .cashbook-method-filter,
.cashbook-filter-rail .cashbook-actor-filter,
.cashbook-filter-rail .cashbook-date-filter-group,
.cashbook-filter-rail .cashbook-action-filter {
  min-width: 0;
}

.cashbook-table-panel {
  overflow-x: auto;
}

.cashbook-table {
  min-width: 1120px;
}

.cashbook-table th,
.cashbook-table td {
  vertical-align: middle;
}

.cashbook-table td small {
  display: block;
  margin-top: 4px;
  color: rgba(16,35,31,.55);
  font-size: 11px;
}

.cashbook-row:nth-child(even) {
  background: rgba(236,246,243,.56);
}

.cashbook-row:hover {
  background: rgba(20,184,166,.10);
}

.cashbook-amount {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 116px;
  font-size: 16px;
  font-weight: 950;
}

.cashbook-amount-income {
  color: #059669;
}

.cashbook-amount-expense {
  color: #dc2626;
}

@media (max-width: 900px) {
  .cashbook-hero,
  .cashbook-summary-grid {
    grid-template-columns: 1fr;
  }

  .cashbook-filter-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .cashbook-filter-rail .cashbook-search-filter,
  .cashbook-filter-rail .cashbook-date-filter-group,
  .cashbook-filter-rail .cashbook-action-filter {
    grid-column: 1 / -1;
  }

  .cashbook-table {
    min-width: 940px;
  }
}

/* V2.133: admin navigation lives in the sidebar; the chrome keeps only a compact sticky page title. */
.topbar::before,
.topbar::after {
  left: var(--sidebar-track) !important;
  right: 0 !important;
  border-radius: 0 0 28px 0;
}

.topbar {
  min-height: clamp(104px, 13vw, 148px);
  margin-bottom: 8px;
}

.topbar::before {
  height: clamp(118px, 14vw, 166px);
}

.topbar::after {
  height: clamp(118px, 14vw, 166px);
}

body[data-active-tab="dashboard"] .topbar::before,
body[data-active-tab="dashboard"] .topbar::after {
  border-radius: 0 0 22px 0;
}

.topbar-copy {
  padding-top: 66px;
}

body:not([data-active-tab="dashboard"]) .topbar-copy {
  margin-top: 58px;
}

.app-chrome.topbar-sticky-shell {
  left: var(--sidebar-track) !important;
  right: 0 !important;
  min-height: 66px;
  padding: 0 18px 0 0;
  gap: clamp(12px, 1.8vw, 26px);
  align-items: flex-start;
}

.chrome-left {
  flex: 0 0 auto;
}

.app-chrome .desktop-logo-badge {
  border-left: 0;
  box-shadow: 12px 14px 30px rgba(18,35,31,.12);
}

.sticky-page-title {
  height: 52px;
  display: flex;
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 9810;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: clamp(190px, 21vw, 330px);
  max-width: max(180px, calc(100vw - var(--sidebar-track) - 620px));
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(222,232,228,.86);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--active-nav-rgb), .16), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(var(--active-nav-rgb), .09)),
    rgba(255,255,255,.72);
  color: #112c27;
  box-shadow: 0 16px 34px rgba(18,35,31,.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate(-50%, -10px) scale(.94);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, height .2s ease, font-size .2s ease, box-shadow .2s ease;
}

.desktop-sticky-active .sticky-page-title {
  height: 52px;
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  font-size: clamp(16px, 1.42vw, 21px);
}

.desktop-sticky-active .app-chrome.topbar-sticky-shell {
  min-height: 54px;
}

.nav-group-admin {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.13);
}

.nav-group-admin + .nav-group-settings {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

body.platform-admin-mode .nav-group-settings {
  margin-top: 0;
}

body.platform-admin-mode .nav-group-admin {
  margin-bottom: 7px;
}

body.platform-admin-mode .nav-group-admin .nav-submenu {
  padding-bottom: 2px;
}

@media (max-width: 1220px) and (min-width: 901px) {
  .app-chrome .desktop-logo-badge {
    min-width: 172px;
    gap: 9px;
    padding-inline: 10px;
  }

  .app-chrome .desktop-logo-badge img {
    max-width: 108px;
    max-height: 42px;
  }

  .app-chrome .desktop-wordmark {
    font-size: 14px;
  }

  .chrome-quick-nav button {
    min-width: 100px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .app-chrome .language-picker,
  .app-chrome .language-picker select,
  .app-chrome .central-header-badge,
  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    height: 46px;
    min-height: 46px;
  }

  .app-chrome .icon-button,
  .app-chrome .add-badge,
  .app-chrome .voice-button {
    width: 46px;
    font-size: 22px;
  }

  .app-chrome .central-header-badge {
    padding-inline: 13px;
    font-size: 12px;
  }

  .sticky-page-title {
    width: clamp(150px, 18vw, 230px);
    max-width: max(140px, calc(100vw - var(--sidebar-track) - 430px));
    padding-inline: 10px;
  }

  .desktop-sticky-active .sticky-page-title {
    height: 48px;
    font-size: clamp(14px, 1.35vw, 18px);
  }
}

@media (max-width: 900px) {
  .topbar::before,
  .topbar::after {
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 0 22px 22px;
  }

  .sticky-page-title {
    display: none;
  }
}

/* V2.137: dominant customer logo and inline sticky title in the desktop chrome. */
@media (min-width: 901px) {
  .app-chrome.topbar-sticky-shell {
    min-height: 144px;
    padding-right: 22px;
    gap: 14px;
  }

  .chrome-left {
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    max-width: calc(100% - min(520px, 38vw));
  }

  .chrome-right {
    flex: 0 0 auto;
    align-items: flex-start;
  }

  .app-chrome .desktop-logo-badge {
    position: relative;
    width: clamp(178px, 13vw, 222px);
    min-width: clamp(178px, 13vw, 222px);
    height: 132px;
    min-height: 132px;
    justify-content: center;
    gap: 0;
    padding: 14px;
    overflow: visible;
  }

  .app-chrome .desktop-logo-badge img {
    max-width: calc(100% - 18px);
    max-height: 104px;
  }

  .app-chrome .desktop-logo-badge .mark {
    width: 92px;
    height: 92px;
    border-radius: 0;
  }

  .app-chrome .desktop-wordmark {
    display: none;
  }

  .logo-swiss-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 22px;
    height: 22px;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(239,51,64,.22), 0 0 0 2px rgba(255,255,255,.92);
    z-index: 3;
  }

  .logo-swiss-badge::before {
    width: 14px;
    height: 4px;
  }

  .logo-swiss-badge::after {
    width: 4px;
    height: 14px;
  }

  .sticky-page-title {
    position: static !important;
    top: auto;
    left: auto;
    z-index: auto;
    flex: 0 1 0;
    width: 0;
    max-width: 0;
    height: 0;
    min-width: 0;
    margin: 0 0 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    transform: none;
    box-shadow: none;
    pointer-events: none;
  }

  .desktop-sticky-active .app-chrome.topbar-sticky-shell {
    min-height: 88px;
  }

  .desktop-sticky-active .app-chrome .desktop-logo-badge {
    width: 142px;
    min-width: 142px;
    height: 80px;
    min-height: 80px;
    padding: 8px;
  }

  .desktop-sticky-active .app-chrome .desktop-logo-badge img {
    max-width: 118px;
    max-height: 64px;
  }

  .desktop-sticky-active .app-chrome .desktop-logo-badge .mark {
    width: 58px;
    height: 58px;
  }

  .desktop-sticky-active .logo-swiss-badge {
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
  }

  .desktop-sticky-active .logo-swiss-badge::before {
    width: 12px;
    height: 3px;
  }

  .desktop-sticky-active .logo-swiss-badge::after {
    width: 3px;
    height: 12px;
  }

  .desktop-sticky-active .sticky-page-title {
    flex: 0 1 clamp(160px, 17vw, 260px);
    width: clamp(160px, 17vw, 260px);
    max-width: clamp(160px, 17vw, 260px);
    height: 52px;
    margin-left: 8px;
    padding: 0 14px;
    border: 1px solid rgba(222,232,228,.9);
    border-left: 3px solid rgba(var(--active-nav-rgb), .48);
    border-radius: 0 0 16px 0;
    background:
      linear-gradient(90deg, rgba(var(--active-nav-rgb), .13), rgba(255,255,255,.78) 38%, rgba(255,255,255,.56)),
      rgba(255,255,255,.76);
    box-shadow: 0 12px 26px rgba(18,35,31,.12), inset 0 1px 0 rgba(255,255,255,.9);
    font-size: clamp(16px, 1.35vw, 20px);
    opacity: 1;
  }
}

@media (max-width: 1480px) and (min-width: 901px) {
  .app-chrome.topbar-sticky-shell {
    min-height: 116px;
  }

  .app-chrome .desktop-logo-badge {
    width: 184px;
    min-width: 184px;
    height: 104px;
    min-height: 104px;
  }

  .app-chrome .desktop-logo-badge img {
    max-height: 82px;
  }

  .app-chrome .desktop-logo-badge .mark {
    width: 72px;
    height: 72px;
  }

  .desktop-sticky-active .chrome-quick-nav button {
    min-width: 108px;
    padding-inline: 10px;
  }

  .desktop-sticky-active .sticky-page-title {
    flex-basis: clamp(150px, 15vw, 210px);
    width: clamp(150px, 15vw, 210px);
    max-width: clamp(150px, 15vw, 210px);
  }
}

@media (max-width: 1220px) and (min-width: 901px) {
  .app-chrome.topbar-sticky-shell {
    min-height: 102px;
  }

  .app-chrome .desktop-logo-badge {
    width: 158px;
    min-width: 158px;
    height: 92px;
    min-height: 92px;
  }

  .app-chrome .desktop-logo-badge img {
    max-height: 72px;
  }

  .app-chrome .desktop-logo-badge .mark {
    width: 62px;
    height: 62px;
  }

  .chrome-quick-nav {
    display: none;
  }

  .desktop-sticky-active .sticky-page-title {
    flex-basis: clamp(140px, 20vw, 190px);
    width: clamp(140px, 20vw, 190px);
    max-width: clamp(140px, 20vw, 190px);
    height: 50px;
    font-size: clamp(14px, 1.4vw, 17px);
  }
}

@media (max-width: 1040px) and (min-width: 901px) {
  .desktop-sticky-active .sticky-page-title {
    display: none;
  }
}

/* V2.138: the sticky page title is the attached fourth item of the top quick navigation. */
@media (min-width: 901px) {
  .chrome-left {
    max-width: calc(100% - min(540px, 39vw));
  }

  .chrome-quick-nav {
    flex: 0 1 auto;
    min-width: 0;
    align-items: flex-start;
    overflow: visible;
  }

  .chrome-quick-nav button {
    flex: 0 1 auto;
  }

  .chrome-quick-nav .sticky-page-title {
    position: relative !important;
    top: auto;
    left: auto;
    z-index: 2;
    display: flex;
    flex: 0 1 0;
    width: 0;
    max-width: 0;
    height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    transform: none;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
    transition: opacity .18s ease, flex-basis .18s ease, width .18s ease, max-width .18s ease, height .18s ease, box-shadow .18s ease;
  }

  .desktop-sticky-active .chrome-quick-nav {
    overflow: visible;
  }

  .desktop-sticky-active .chrome-quick-nav .sticky-page-title {
    flex-basis: clamp(174px, 18vw, 270px);
    width: clamp(174px, 18vw, 270px);
    max-width: clamp(174px, 18vw, 270px);
    height: 58px;
    margin-left: 0;
    padding: 0 16px;
    border: 1px solid rgba(222,232,228,.94);
    border-left: 3px solid rgba(var(--active-nav-rgb), .5);
    border-radius: 0 0 18px 0;
    background:
      radial-gradient(circle at 14% 0%, rgba(var(--active-nav-rgb), .18), transparent 44%),
      linear-gradient(115deg, rgba(255,255,255,.92), rgba(var(--active-nav-rgb), .08)),
      rgba(255,255,255,.78);
    color: #10231f;
    box-shadow: 0 16px 34px rgba(18,35,31,.16), inset 0 1px 0 rgba(255,255,255,.96);
    font-size: clamp(16px, 1.28vw, 20px);
    font-weight: 950;
    letter-spacing: -.04em;
    opacity: 1;
    pointer-events: none;
  }
}

@media (max-width: 1480px) and (min-width: 901px) {
  .desktop-sticky-active .chrome-quick-nav button {
    min-width: 96px;
    padding-inline: 9px;
    font-size: 12px;
  }

  .desktop-sticky-active .chrome-quick-nav .sticky-page-title {
    flex-basis: clamp(152px, 15vw, 210px);
    width: clamp(152px, 15vw, 210px);
    max-width: clamp(152px, 15vw, 210px);
    height: 54px;
    padding-inline: 12px;
    font-size: clamp(14px, 1.2vw, 17px);
  }
}

@media (max-width: 1260px) and (min-width: 901px) {
  .chrome-left {
    max-width: calc(100% - 430px);
  }

  .desktop-sticky-active .chrome-quick-nav .sticky-page-title {
    flex-basis: clamp(132px, 18vw, 172px);
    width: clamp(132px, 18vw, 172px);
    max-width: clamp(132px, 18vw, 172px);
  }
}

@media (max-width: 1120px) and (min-width: 901px) {
  .chrome-quick-nav {
    display: none;
  }
}

/* V2.139: mobile header uses a left logo and right-aligned utility badges. */
@media (max-width: 900px) {
  .topbar-sticky-shell {
    z-index: 9300 !important;
  }

  .app-brand-badge {
    left: max(10px, env(safe-area-inset-left));
    top: 10px;
    transform: none;
    width: 118px;
    height: 56px;
    max-width: 34vw;
    z-index: 9340;
    justify-content: center;
    border-radius: 0 0 16px 0;
    overflow: visible;
    transition: width .2s ease, height .2s ease, box-shadow .2s ease;
  }

  .app-brand-badge .brand-wordmark {
    display: none;
  }

  .brand-logo-box {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 8px 12px;
    border-right: 0;
  }

  .brand-logo-box img {
    max-width: 92px;
    max-height: 40px;
  }

  .app-brand-badge .mark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .app-brand-badge::after {
    content: "";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 19px;
    height: 19px;
    border-radius: 5px;
    background:
      linear-gradient(#fff, #fff) center / 12px 3px no-repeat,
      linear-gradient(#fff, #fff) center / 3px 12px no-repeat,
      #ef3340;
    box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 7px 16px rgba(239,51,64,.24);
  }

  body.mobile-sticky-active .app-brand-badge {
    width: 88px;
    height: 44px;
    box-shadow: 0 10px 24px rgba(18,35,31,.14);
  }

  body.mobile-sticky-active .brand-logo-box img {
    max-width: 70px;
    max-height: 30px;
  }

  body.mobile-sticky-active .app-brand-badge .mark {
    width: 28px;
    height: 28px;
  }

  body.mobile-sticky-active .app-brand-badge::after {
    width: 16px;
    height: 16px;
    top: -4px;
    right: -4px;
    border-radius: 4px;
  }

  .mobile-menu-button {
    left: auto;
    right: max(10px, env(safe-area-inset-right));
    top: 10px;
    z-index: 9340;
    order: 5;
  }

  .topbar .actions {
    top: 10px;
    right: calc(max(10px, env(safe-area-inset-right)) + 52px);
    z-index: 9330;
    gap: 7px;
    flex-direction: row-reverse;
  }

  .topbar .actions #logoutBtn,
  .topbar .actions #mobileSettingsBtn,
  .topbar .actions #navigationGridBtn {
    display: inline-grid !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 13px;
  }

  .topbar .actions #logoutBtn { order: 1; }
  .topbar .actions #mobileSettingsBtn { order: 2; }
  .topbar .actions #navigationGridBtn { order: 3; }

  .topbar .actions #voiceInvoiceBtn,
  .topbar .actions .top-add {
    display: none !important;
  }

  .app-chrome .language-picker {
    position: fixed;
    top: 10px;
    right: calc(max(10px, env(safe-area-inset-right)) + 208px);
    z-index: 9330;
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
  }

  .app-chrome .language-picker select {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .app-chrome .central-header-badge {
    display: none !important;
  }

  .topbar-status {
    top: 62px;
    right: max(10px, env(safe-area-inset-right));
    width: min(74vw, 310px);
  }

  .mobile-menu-panel {
    top: 64px;
    left: auto;
    right: max(10px, env(safe-area-inset-right));
  }

  .topbar {
    padding-top: 72px;
  }
}

@media (max-width: 390px) {
  .app-brand-badge {
    width: 102px;
    max-width: 30vw;
  }

  .brand-logo-box img {
    max-width: 78px;
  }

  .topbar .actions {
    gap: 5px;
    right: calc(max(8px, env(safe-area-inset-right)) + 47px);
  }

  .mobile-menu-button,
  .topbar .actions #logoutBtn,
  .topbar .actions #mobileSettingsBtn,
  .topbar .actions #navigationGridBtn,
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .app-chrome .language-picker {
    right: calc(max(8px, env(safe-area-inset-right)) + 188px);
  }
}

@media (max-width: 360px) {
  .app-brand-badge {
    width: 76px;
    max-width: 23vw;
  }

  .brand-logo-box {
    padding-inline: 7px;
  }

  .brand-logo-box img {
    max-width: 58px;
    max-height: 28px;
  }

  body.mobile-sticky-active .app-brand-badge {
    width: 68px;
  }
}

/* V2.141: mobile-only chrome cleanup. Dashboard grid replaces the hamburger,
   while duplicate top voice/add actions stay hidden because mobile has bottom FABs. */
@media (max-width: 900px) {
  #mobileMenuBtn,
  #mobileMenu {
    display: none !important;
  }

  .topbar .actions {
    right: max(10px, env(safe-area-inset-right));
    gap: 7px;
    z-index: 9360;
  }

  .topbar .actions #navigationGridBtn {
    order: 1;
  }

  .topbar .actions #logoutBtn {
    order: 2;
  }

  .topbar .actions #mobileSettingsBtn {
    order: 3;
  }

  .topbar .actions #voiceInvoiceBtn,
  .topbar .actions .top-add {
    display: none !important;
  }

  .app-chrome .language-picker {
    right: calc(max(10px, env(safe-area-inset-right)) + 162px);
    z-index: 9360;
  }

  .navigation-grid-screen {
    padding-inline: 0;
  }

  .dashboard-menu-card-grid-screen {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .navigation-grid-screen .dashboard-menu-card {
    min-height: 130px;
    border-radius: 22px;
  }
}

@media (max-width: 390px) {
  .topbar .actions {
    right: max(8px, env(safe-area-inset-right));
    gap: 5px;
  }

  .app-chrome .language-picker {
    right: calc(max(8px, env(safe-area-inset-right)) + 142px);
  }

  .navigation-grid-screen .dashboard-menu-card {
    min-height: 118px;
  }
}

/* V2.142: mobile header whitelist. Only logout, settings, language, dashboard and logo stay in the header. */
@media (max-width: 900px) {
  #mobileMenuBtn,
  #mobileMenu,
  .app-chrome .central-header-badge,
  #centralHeaderBtn,
  .app-chrome .topbar-status,
  .topbar-status,
  #accountBadge,
  .app-chrome .actions #voiceInvoiceBtn,
  .app-chrome .actions .voice-button,
  .app-chrome .actions .top-add,
  .app-chrome .actions #newInvoiceBtn,
  .app-chrome .actions #topAddMenu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .app-chrome .actions {
    position: fixed;
    top: 10px;
    right: max(10px, env(safe-area-inset-right));
    z-index: 9380;
    display: inline-flex !important;
    flex-direction: row-reverse;
    gap: 7px;
    width: auto;
  }

  .app-chrome .actions #logoutBtn,
  .app-chrome .actions #mobileSettingsBtn {
    display: inline-grid !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .app-chrome .actions #logoutBtn {
    order: 1;
  }

  .app-chrome .actions #mobileSettingsBtn {
    order: 2;
  }

  .app-chrome .actions #navigationGridBtn {
    position: fixed;
    top: 10px;
    right: calc(max(10px, env(safe-area-inset-right)) + 162px);
    z-index: 9380;
    display: inline-grid !important;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .app-chrome .language-picker {
    top: 10px;
    right: calc(max(10px, env(safe-area-inset-right)) + 111px);
    z-index: 9380;
    display: inline-flex !important;
  }

  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

@media (max-width: 390px) {
  .app-chrome .actions {
    top: 10px;
    right: max(8px, env(safe-area-inset-right));
    gap: 5px;
  }

  .app-chrome .actions #logoutBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .app-chrome .actions #navigationGridBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 143px);
  }

  .app-chrome .language-picker {
    right: calc(max(8px, env(safe-area-inset-right)) + 98px);
  }
}

/* V2.143: desktop logo shape, cleaner cockpit filters and no filter result counters. */
@media (min-width: 901px) {
  .app-chrome .desktop-logo-badge {
    border-radius: 0 0 38px 0 !important;
    overflow: visible;
  }

  .desktop-sticky-active .app-chrome .desktop-logo-badge {
    border-radius: 0 0 24px 0 !important;
  }
}

.list-filter-count,
.invoice-filter-count,
.admin-audit-filter-count {
  display: none !important;
}

.dashboard-toolbar-modern {
  padding: 10px;
}

.dashboard-toolbar-modern .dashboard-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 38px minmax(118px, .58fr) minmax(118px, .58fr) 38px minmax(150px, .72fr) minmax(150px, .72fr) minmax(154px, .72fr) 38px;
  align-items: end;
  gap: 8px;
  flex-wrap: nowrap;
}

.dashboard-toolbar-modern .dashboard-filter-row label,
.dashboard-toolbar-modern .dashboard-account-scope {
  min-width: 0;
}

.dashboard-toolbar-modern .dashboard-filter-row input,
.dashboard-toolbar-modern .dashboard-filter-row select,
.dashboard-toolbar-modern .dashboard-search-field input,
.dashboard-account-scope select {
  width: 100%;
  min-width: 0;
}

.dashboard-toolbar-modern .dashboard-filter-row button {
  min-width: 38px;
}

.invoice-filter-rail {
  grid-template-columns: 48px minmax(118px, .50fr) minmax(198px, .78fr) minmax(168px, .70fr) minmax(210px, 1fr) auto auto minmax(154px, .62fr) !important;
  gap: 8px;
}

.invoice-filter-add-badge {
  align-self: end;
  justify-self: start;
}

.customer-filter-rail {
  grid-template-columns: minmax(190px, 1.15fr) minmax(120px, .56fr) minmax(110px, .50fr) minmax(178px, .76fr) auto auto auto minmax(154px, .62fr) !important;
}

.offers-filter-group {
  grid-template-columns: minmax(132px, .58fr) repeat(2, minmax(132px, .58fr)) minmax(220px, 1.08fr) auto minmax(154px, .62fr) !important;
}

.catalog-product-filter-row {
  grid-template-columns: minmax(200px, 1.10fr) repeat(3, minmax(120px, .54fr)) auto auto auto minmax(154px, .62fr) !important;
}

@media (max-width: 1120px) and (min-width: 761px) {
  .dashboard-toolbar-modern .dashboard-filter-row {
    grid-template-columns: minmax(220px, 1fr) 38px repeat(2, minmax(118px, .7fr)) 38px repeat(2, minmax(150px, .8fr)) 38px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

@media (max-width: 760px) {
  .dashboard-command-copy p {
    display: none;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label,
  .dashboard-toolbar-modern .dashboard-account-scope,
  .dashboard-add {
    grid-column: span 2;
  }

  .dashboard-search-button,
  .dashboard-clear-button {
    grid-column: auto;
  }

  .dashboard-add {
    justify-self: end;
  }

  .invoice-filter-rail {
    grid-template-columns: 44px minmax(150px, 1fr) minmax(190px, 1fr) !important;
    overflow-x: auto;
  }

  .customer-filter-rail,
  .offers-filter-group,
  .catalog-product-filter-row {
    grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  }
}

/* V2.144: Dashboard search moves into a popover and the filter toolbar gets stable mobile sizing. */
.dashboard-toolbar-modern {
  width: 100%;
  box-sizing: border-box;
}

.dashboard-toolbar-modern .dashboard-toolbar {
  width: 100%;
}

.dashboard-toolbar-modern .dashboard-filter-row {
  width: 100%;
  grid-template-columns: 42px minmax(128px, .66fr) minmax(128px, .66fr) 42px minmax(152px, .80fr) minmax(166px, .88fr) minmax(160px, .88fr) 42px;
}

.dashboard-toolbar-modern .dashboard-filter-row > * {
  min-width: 0;
}

.dashboard-search-button {
  position: relative;
}

.dashboard-search-button.active::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #12c7a7;
  box-shadow: 0 0 0 3px rgba(18,199,167,.16);
}

.dashboard-search-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 12px;
  z-index: 24;
  width: min(520px, calc(100vw - 42px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(23,108,95,.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(18,199,167,.13), transparent 34%),
    rgba(255,255,255,.96);
  box-shadow: 0 24px 58px rgba(18,35,31,.20);
  backdrop-filter: blur(18px);
}

.dashboard-search-popover-head,
.dashboard-search-popover-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-search-popover-head {
  justify-content: space-between;
}

.dashboard-search-popover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
}

.dashboard-search-popover input {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(23,108,95,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.90);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.dashboard-popup-search-button {
  width: 44px;
  height: 44px;
}

.dashboard-search-popover small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1120px) and (min-width: 761px) {
  .dashboard-toolbar-modern .dashboard-filter-row {
    grid-template-columns: 42px repeat(2, minmax(128px, .74fr)) 42px repeat(3, minmax(150px, .9fr)) 42px;
  }
}

@media (max-width: 760px) {
  .dashboard-toolbar-modern {
    padding: 12px;
    border-radius: 24px;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 10px;
    overflow: visible;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label,
  .dashboard-toolbar-modern .dashboard-account-scope,
  .dashboard-add {
    grid-column: auto !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row input,
  .dashboard-toolbar-modern .dashboard-filter-row select,
  .dashboard-toolbar-modern .dashboard-filter-row button,
  .dashboard-add-toggle {
    width: 100%;
    min-width: 0;
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
    border-radius: 16px;
  }

  .dashboard-toolbar-modern .dashboard-account-scope {
    grid-column: 1 / -1 !important;
  }

  .dashboard-add {
    justify-self: stretch;
  }

  .dashboard-search-popover {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    padding: 12px;
  }

  .dashboard-search-popover-head {
    align-items: flex-start;
  }

  .dashboard-search-popover-row {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .dashboard-popup-search-button,
  .dashboard-search-popover input {
    height: 52px;
  }
}

/* V2.146: mobile viewport guard and ordered Business Cockpit filters. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 900px) {
  html,
  body,
  main,
  .topbar,
  .view,
  .view.active {
    min-width: 0;
    max-width: 100%;
  }

  main {
    width: 100%;
    overflow-x: clip;
  }

  .topbar-sticky-shell,
  .app-chrome.topbar-sticky-shell,
  .dashboard-toolbar-shell,
  .dashboard-toolbar-modern,
  .dashboard-toolbar-modern .dashboard-toolbar {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-toolbar-modern {
    padding: 10px;
    overflow: visible;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 52px !important;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .dashboard-toolbar-modern .dashboard-account-scope {
    order: 1;
    grid-column: 1 / -1 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-from {
    order: 2;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-to {
    order: 3;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-clear-button {
    order: 4;
    grid-column: 3 / 4 !important;
  }

  .dashboard-toolbar-modern .dashboard-quick-range {
    order: 5;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-compare-filter {
    order: 6;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-search-button {
    order: 7;
    grid-column: 3 / 4 !important;
  }

  .dashboard-toolbar-modern .dashboard-add {
    display: none !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label,
  .dashboard-toolbar-modern .dashboard-account-scope {
    width: 100%;
  }

  .dashboard-toolbar-modern .dashboard-filter-row input,
  .dashboard-toolbar-modern .dashboard-filter-row select,
  .dashboard-toolbar-modern .dashboard-filter-row button {
    width: 100%;
    min-width: 0;
    height: 50px;
    min-height: 50px;
    padding-inline: 10px;
    border-radius: 16px;
    font-size: 15px;
  }

  .dashboard-toolbar-modern .dashboard-search-button,
  .dashboard-toolbar-modern .dashboard-clear-button {
    padding: 0;
    font-size: 22px;
  }

  .dashboard-search-popover {
    position: fixed;
    top: max(112px, calc(env(safe-area-inset-top) + 92px));
    left: 12px;
    right: 12px;
    z-index: 9800;
    width: auto;
    max-width: none;
  }
}

/* V2.145: compact shared filters, single-line page title cards and stronger Zentral slider cards. */
body:not([data-active-tab="dashboard"]) .topbar-copy {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  width: min(760px, calc(100vw - var(--sidebar-track) - 520px));
  max-width: calc(100% - 36px);
  min-height: 50px;
  margin: 82px auto 0;
  padding: 8px 18px 9px;
  text-align: left;
  white-space: nowrap;
}

body:not([data-active-tab="dashboard"]) .topbar-copy h1 {
  flex: 0 0 auto;
  font-size: clamp(25px, 2.35vw, 38px);
  line-height: 1;
}

body:not([data-active-tab="dashboard"]) .topbar-copy > p {
  min-width: 0;
  max-width: 48ch;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(var(--active-nav-rgb, 23,108,95), .22);
  overflow: hidden;
  color: rgba(17,44,39,.74);
  font-size: clamp(12px, .95vw, 15px);
  font-weight: 780;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.invoice-filter-rail {
  grid-template-columns: 48px minmax(112px, .46fr) minmax(188px, .72fr) minmax(160px, .66fr) minmax(190px, .92fr) auto 48px minmax(146px, .58fr) !important;
}

.customer-filter-rail {
  grid-template-columns: 48px minmax(180px, 1.04fr) minmax(116px, .52fr) minmax(108px, .48fr) minmax(168px, .68fr) auto 48px minmax(146px, .58fr) !important;
}

.offers-filter-group {
  grid-template-columns: 48px minmax(126px, .54fr) repeat(2, minmax(124px, .52fr)) minmax(220px, 1fr) auto minmax(146px, .58fr) !important;
}

.catalog-product-filter-row {
  grid-template-columns: 48px minmax(190px, 1fr) repeat(3, minmax(116px, .50fr)) auto 48px minmax(146px, .58fr) !important;
}

.invoice-filter-rail,
.customer-filter-rail,
.offers-filter-group,
.catalog-product-filter-row {
  align-items: end;
}

.invoice-filter-add-badge {
  align-self: end;
  justify-self: start;
}

.list-action-filter-cell {
  min-width: 0;
}

.list-action-control {
  display: flex;
  grid-template-columns: none;
}

.list-action-selected {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  border-radius: 12px;
}

.select-all-col {
  text-align: center;
}

.select-all-col input {
  width: 18px;
  height: 18px;
  accent-color: #12c7a7;
  cursor: pointer;
}

.central-company-strip {
  gap: 14px;
  margin: 4px 0 18px;
  padding: 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 0% 0%, rgba(53,214,255,.10), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(238,250,246,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 18px 46px rgba(18,35,31,.08);
  scroll-snap-type: x proximity;
}

.central-company-card {
  position: relative;
  min-width: 248px;
  scroll-snap-align: start;
  background:
    radial-gradient(circle at 92% 12%, rgba(12,188,226,.10), transparent 34%),
    rgba(255,255,255,.78);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.central-company-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23,108,95,.25);
  box-shadow: 0 18px 40px rgba(18,35,31,.12);
}

.central-company-card.active {
  transform: translateY(-3px);
  border-color: rgba(12,188,226,.48);
  background:
    radial-gradient(circle at 88% 8%, rgba(12,188,226,.18), transparent 34%),
    linear-gradient(135deg, rgba(233,250,246,.98), rgba(255,255,255,.90));
  box-shadow: 0 22px 54px rgba(18,35,31,.16), 0 0 0 4px rgba(18,199,167,.10);
}

.central-company-card.active::after {
  content: "";
  position: absolute;
  inset: auto 16px 10px 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #12c7a7, #04bfea);
}

@media (max-width: 1180px) {
  body:not([data-active-tab="dashboard"]) .topbar-copy {
    width: min(680px, calc(100vw - var(--sidebar-track) - 360px));
  }
}

@media (max-width: 900px) {
  body:not([data-active-tab="dashboard"]) .topbar-copy {
    width: calc(100% - 28px);
    min-height: 46px;
    margin-top: 74px;
    padding: 8px 14px;
  }

  body:not([data-active-tab="dashboard"]) .topbar-copy h1 {
    font-size: clamp(24px, 7vw, 34px);
  }

  body:not([data-active-tab="dashboard"]) .topbar-copy > p {
    display: none;
  }

  .invoice-filter-rail,
  .customer-filter-rail,
  .offers-filter-group,
  .catalog-product-filter-row {
    grid-template-columns: 48px minmax(150px, 1fr) minmax(150px, 1fr) !important;
    overflow-x: auto;
  }

  .list-action-control {
    display: flex;
  }
}

/* V2.147: stable mobile chrome and cleaner overview command/filter layout. */
.dashboard-command-center {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.dashboard-command-title-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.dashboard-command-title-line h2 {
  flex: 0 0 auto;
}

.dashboard-command-title-line p {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-period-chip {
  display: none !important;
}

.dashboard-toolbar-modern {
  width: 100%;
}

.dashboard-toolbar-modern .dashboard-filter-row {
  align-items: end;
}

.dashboard-toolbar-modern .dashboard-filter-row label,
.dashboard-toolbar-modern .dashboard-account-scope {
  display: grid;
  gap: 5px;
}

.dashboard-toolbar-modern .dashboard-filter-row label > span,
.dashboard-toolbar-modern .dashboard-account-scope > span {
  color: rgba(17,44,39,.62);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dashboard-toolbar-modern .dashboard-filter-row input,
.dashboard-toolbar-modern .dashboard-filter-row select,
.dashboard-toolbar-modern .dashboard-filter-row button {
  border-radius: 14px;
}

.dashboard-calendar-actions {
  gap: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.dashboard-calendar-actions button,
.dashboard-calendar-actions button:first-child,
.dashboard-calendar-actions button:last-child {
  clip-path: none;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(21,94,73,.16);
  border-radius: 15px;
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.78), transparent 36%),
    linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.92));
  box-shadow: 0 10px 22px rgba(16,40,35,.08);
}

@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    overscroll-behavior-x: none;
  }

  .app-chrome.topbar-sticky-shell {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }

  .app-chrome .chrome-left {
    display: none !important;
  }

  .app-chrome .chrome-right {
    width: 100%;
    min-width: 0;
  }

  .app-brand-badge {
    left: 0 !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    width: min(118px, 31vw) !important;
    max-width: 118px !important;
    min-width: 0 !important;
    height: 56px !important;
    border-radius: 0 0 28px 0 !important;
  }

  body.mobile-sticky-active .app-brand-badge {
    width: min(88px, 25vw) !important;
    height: 44px !important;
    border-radius: 0 0 22px 0 !important;
  }

  .topbar,
  body[data-active-tab="dashboard"] .topbar {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .topbar::before,
  .topbar::after {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  .app-chrome .actions {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    width: auto !important;
    max-width: calc(100vw - 128px) !important;
    display: inline-flex !important;
    flex-direction: row-reverse !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  .app-chrome .actions #navigationGridBtn {
    position: static !important;
    inset: auto !important;
    order: 3 !important;
  }

  .app-chrome .actions #logoutBtn {
    order: 1 !important;
  }

  .app-chrome .actions #mobileSettingsBtn {
    order: 2 !important;
  }

  .app-chrome .language-picker {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    right: calc(max(8px, env(safe-area-inset-right)) + 153px) !important;
    min-width: 44px !important;
    max-width: 44px !important;
    width: 44px !important;
  }

  .dashboard-command-center {
    gap: 14px;
    padding: 18px 14px;
    border-radius: 28px;
  }

  .dashboard-command-copy {
    gap: 10px;
  }

  .dashboard-command-title-line {
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .dashboard-command-title-line h2 {
    font-size: clamp(38px, 12vw, 56px);
    line-height: .92;
  }

  .dashboard-command-title-line p {
    display: block !important;
    font-size: clamp(12px, 3.1vw, 14px);
    line-height: 1.15;
    white-space: nowrap;
  }

  .dashboard-toolbar-modern {
    padding: 14px;
    border-radius: 28px;
    background: rgba(255,255,255,.68);
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label > span,
  .dashboard-toolbar-modern .dashboard-account-scope > span {
    display: none;
  }

  .dashboard-toolbar-modern .dashboard-account-scope {
    order: 1;
    grid-column: 1 / -1 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-from {
    order: 2;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-to {
    order: 3;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-quick-range {
    order: 4;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-compare-filter {
    order: 5;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-search-button,
  .dashboard-toolbar-modern .dashboard-clear-button,
  .dashboard-toolbar-modern .dashboard-add {
    display: none !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row input,
  .dashboard-toolbar-modern .dashboard-filter-row select {
    height: 54px !important;
    min-height: 54px !important;
    border: 1px solid rgba(20,83,72,.18) !important;
    border-radius: 18px !important;
    background:
      linear-gradient(135deg, rgba(255,255,255,.96), rgba(242,250,247,.88)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 20px rgba(16,40,35,.07) !important;
    color: #10231f !important;
    font-size: clamp(15px, 4.15vw, 18px) !important;
    font-weight: 780 !important;
  }

  .dashboard-toolbar-modern .dashboard-quick-range select,
  .dashboard-toolbar-modern .dashboard-compare-filter select {
    border-color: rgba(17,199,167,.28) !important;
    background:
      linear-gradient(135deg, rgba(236,253,245,.95), rgba(255,255,255,.90)) !important;
    font-weight: 900 !important;
  }
}

@media (max-width: 390px) {
  .app-chrome .actions #logoutBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  .app-chrome .language-picker {
    right: calc(max(7px, env(safe-area-inset-right)) + 151px) !important;
  }

  .app-brand-badge {
    width: min(100px, 28vw) !important;
  }

  .dashboard-command-title-line p {
    display: none !important;
  }
}

/* V2.148: explicit four-row mobile overview filters and stronger viewport containment. */
@media (max-width: 900px) {
  html,
  body,
  #appShell,
  main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  main {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .view,
  .view.active,
  #dashboard,
  .dashboard-modern-shell,
  .dashboard-command-center,
  .dashboard-toolbar-shell,
  .dashboard-toolbar-modern,
  .dashboard-toolbar-modern .dashboard-toolbar,
  .dashboard-toolbar-modern .dashboard-filter-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .dashboard-command-center {
    overflow: hidden !important;
  }

  .dashboard-toolbar-modern {
    padding: 12px !important;
    border-radius: 26px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 9px !important;
    align-items: stretch !important;
    overflow: visible !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .dashboard-toolbar-modern .dashboard-account-scope {
    display: grid !important;
    order: 1 !important;
    grid-column: 1 / -1 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-from {
    order: 2 !important;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-date-to {
    order: 3 !important;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-compare-filter {
    order: 4 !important;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-quick-range {
    order: 5 !important;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-search-button {
    display: inline-grid !important;
    order: 6 !important;
    grid-column: 1 / 2 !important;
  }

  .dashboard-toolbar-modern .dashboard-clear-button {
    display: inline-grid !important;
    order: 7 !important;
    grid-column: 2 / 3 !important;
  }

  .dashboard-toolbar-modern .dashboard-add {
    display: none !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label,
  .dashboard-toolbar-modern .dashboard-account-scope {
    gap: 0 !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row label > span,
  .dashboard-toolbar-modern .dashboard-account-scope > span {
    display: none !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row input,
  .dashboard-toolbar-modern .dashboard-filter-row select,
  .dashboard-toolbar-modern .dashboard-filter-row button,
  .dashboard-toolbar-modern .dashboard-search-button,
  .dashboard-toolbar-modern .dashboard-clear-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(20,83,72,.18) !important;
    border-radius: 18px !important;
    background:
      radial-gradient(circle at 24% 8%, rgba(255,255,255,.9), transparent 38%),
      linear-gradient(135deg, rgba(255,255,255,.97), rgba(242,250,247,.90)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 9px 18px rgba(16,40,35,.07) !important;
    color: #10231f !important;
    font-size: clamp(16px, 4vw, 18px) !important;
    font-weight: 820 !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .dashboard-toolbar-modern .dashboard-compare-filter select,
  .dashboard-toolbar-modern .dashboard-quick-range select {
    border-color: rgba(17,199,167,.30) !important;
    background:
      radial-gradient(circle at 22% 8%, rgba(255,255,255,.92), transparent 38%),
      linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.92)) !important;
    font-weight: 950 !important;
  }

  .dashboard-toolbar-modern .dashboard-search-button,
  .dashboard-toolbar-modern .dashboard-clear-button {
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    font-size: 24px !important;
  }

  .topbar,
  body[data-active-tab="dashboard"] .topbar {
    min-height: 104px !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
    width: calc(100% + 24px) !important;
    max-width: calc(100% + 24px) !important;
  }

  .app-brand-badge,
  .app-chrome .actions,
  .app-chrome .language-picker {
    contain: layout paint !important;
  }
}

@media (max-width: 390px) {
  .dashboard-toolbar-modern {
    padding: 10px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row {
    gap: 8px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row input,
  .dashboard-toolbar-modern .dashboard-filter-row select,
  .dashboard-toolbar-modern .dashboard-filter-row button {
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
  }
}

/* V2.149: rebuilt mobile overview filter as a separate component. */
.dashboard-mobile-filter-panel {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  #appShell,
  main,
  .view,
  .view.active,
  #dashboard,
  .dashboard-modern-shell,
  .dashboard-command-center,
  .dashboard-toolbar-shell,
  .dashboard-toolbar-modern,
  .dashboard-toolbar-modern .dashboard-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  main {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .topbar-sticky-shell.app-chrome {
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }

  .topbar,
  body[data-active-tab="dashboard"] .topbar {
    width: calc(100vw + 24px) !important;
    max-width: calc(100vw + 24px) !important;
    min-width: 0 !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
    overflow: hidden !important;
  }

  .app-brand-badge,
  .brand-logo-box {
    contain: none !important;
    overflow: visible !important;
    clip-path: none !important;
  }

  .app-brand-badge {
    z-index: 1300 !important;
  }

  .app-brand-badge::after {
    z-index: 4 !important;
    top: -7px !important;
    right: -7px !important;
  }

  .dashboard-toolbar-modern {
    padding: 12px !important;
    border-radius: 26px !important;
    overflow: visible !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop {
    display: none !important;
  }

  .dashboard-mobile-filter-panel {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .dashboard-mobile-filter-row {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  .dashboard-mobile-filter-row-profile {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mobile-filter-row-dates,
  .dashboard-mobile-filter-row-selects,
  .dashboard-mobile-filter-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-mobile-filter-panel label,
  .dashboard-mobile-filter-panel .dashboard-account-scope {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  .dashboard-mobile-filter-panel label > span,
  .dashboard-mobile-filter-panel .dashboard-account-scope > span {
    display: none !important;
  }

  .dashboard-mobile-filter-panel input,
  .dashboard-mobile-filter-panel select,
  .dashboard-mobile-filter-button {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 13px !important;
    border: 1px solid rgba(20,83,72,.18) !important;
    border-radius: 18px !important;
    background:
      radial-gradient(circle at 24% 8%, rgba(255,255,255,.9), transparent 38%),
      linear-gradient(135deg, rgba(255,255,255,.97), rgba(242,250,247,.90)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 9px 18px rgba(16,40,35,.07) !important;
    color: #10231f !important;
    font-size: 16px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
  }

  .dashboard-mobile-filter-panel select {
    padding-right: 34px !important;
    background-image:
      linear-gradient(45deg, transparent 50%, #103b32 50%),
      linear-gradient(135deg, #103b32 50%, transparent 50%),
      radial-gradient(circle at 24% 8%, rgba(255,255,255,.9), transparent 38%),
      linear-gradient(135deg, rgba(255,255,255,.97), rgba(242,250,247,.90)) !important;
    background-position:
      calc(100% - 18px) 22px,
      calc(100% - 12px) 22px,
      0 0,
      0 0 !important;
    background-size:
      6px 6px,
      6px 6px,
      100% 100%,
      100% 100% !important;
    background-repeat: no-repeat !important;
  }

  .dashboard-mobile-filter-row-selects select,
  .dashboard-mobile-account-scope select {
    border-color: rgba(17,199,167,.30) !important;
    background-color: rgba(236,253,245,.96) !important;
    font-weight: 950 !important;
  }

  .dashboard-mobile-filter-button {
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    cursor: pointer;
    font-size: 24px !important;
  }

  .dashboard-mobile-filter-button.active {
    border-color: rgba(6,182,212,.42) !important;
    color: #067f8f !important;
  }

  .dashboard-search-popover {
    position: fixed !important;
    left: 14px !important;
    right: 14px !important;
    top: calc(max(78px, env(safe-area-inset-top) + 74px)) !important;
    width: auto !important;
    max-width: none !important;
    z-index: 1600 !important;
  }
}

@media (max-width: 430px) {
  main {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .dashboard-command-center {
    padding: 18px 14px !important;
  }

  .dashboard-toolbar-modern {
    padding: 10px !important;
  }

  .dashboard-mobile-filter-panel {
    gap: 9px !important;
  }

  .dashboard-mobile-filter-row {
    gap: 9px !important;
  }

  .dashboard-mobile-filter-panel input,
  .dashboard-mobile-filter-panel select,
  .dashboard-mobile-filter-button {
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 360px) {
  .dashboard-mobile-filter-row-dates,
  .dashboard-mobile-filter-row-selects,
  .dashboard-mobile-filter-row-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dashboard-mobile-clear-button-wide {
    width: 100% !important;
  }
}

/* V2.150: mobile scroll stability and compact sidebar navigation. */
@media (max-width: 900px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  #appShell,
  main,
  .view,
  .view.active,
  #dashboard,
  .dashboard-modern-shell {
    height: auto !important;
    min-height: 0 !important;
    overflow-y: visible !important;
    touch-action: pan-y !important;
  }

  .dashboard-command-center,
  .dashboard-toolbar-shell,
  .dashboard-toolbar-modern {
    overflow-y: visible !important;
    touch-action: pan-y !important;
  }

  .chart-scroll,
  .table-scroll,
  .stock-sheet-scroll,
  .calendar-grid-scroll {
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-voice-button,
  .quick-add-toggle,
  .mobile-quick-add {
    touch-action: manipulation !important;
  }
}

@media (min-width: 901px) {
  .sidebar {
    padding: 12px 12px 14px !important;
  }

  .sidebar-topline {
    margin-bottom: 10px !important;
    padding: 8px !important;
  }

  #tabs {
    padding-top: 28px !important;
    padding-right: 0 !important;
    gap: 1px !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }

  #tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .nav-group {
    gap: 0 !important;
    margin-bottom: 0 !important;
  }

  #tabs .nav-group + .nav-group {
    margin-top: 2px !important;
    padding-top: 2px !important;
    border-top: 1px solid rgba(255,255,255,.075);
  }

  .nav-group-settings {
    margin-top: auto !important;
    margin-bottom: 26px !important;
    padding-top: 8px !important;
  }

  #tabs button {
    min-height: 38px !important;
    height: auto !important;
    padding: 3px 6px !important;
    border-radius: 13px !important;
  }

  .sidebar:not(.sidebar-collapsed) #tabs button {
    min-height: 38px !important;
  }

  .sidebar:not(.sidebar-collapsed) #tabs .nav-icon {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
    border-radius: 11px !important;
  }

  .sidebar:not(.sidebar-collapsed) #tabs .nav-main-copy {
    gap: 9px !important;
  }

  body.sidebar-collapsed .sidebar {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  body.sidebar-collapsed .sidebar-topline {
    margin-bottom: 6px !important;
    padding: 6px !important;
  }

  body.sidebar-collapsed nav,
  body.sidebar-collapsed #tabs,
  body.sidebar-collapsed .nav-group {
    gap: 0 !important;
  }

  body.sidebar-collapsed #tabs {
    padding-top: 18px !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }

  body.sidebar-collapsed #tabs button {
    height: 46px !important;
    min-height: 46px !important;
    padding: 2px !important;
    border: 1px solid transparent !important;
    border-radius: 15px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.sidebar-collapsed #tabs button:hover,
  body.sidebar-collapsed #tabs button.active {
    color: #fff !important;
    background: rgba(var(--menu-rgb, 255,255,255), .13) !important;
    border-color: rgba(var(--menu-rgb, 255,255,255), .22) !important;
  }

  body.sidebar-collapsed #tabs .nav-icon {
    --nav-icon-scale: 1.08 !important;
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 5px 10px rgba(4,10,9,.14) !important;
  }

  body.sidebar-collapsed #tabs button:hover .nav-icon,
  body.sidebar-collapsed #tabs button.active .nav-icon {
    transform: none !important;
    background:
      radial-gradient(circle at 32% 22%, color-mix(in srgb, var(--nav-icon-accent) 38%, transparent), rgba(255,255,255,.10) 60%, rgba(255,255,255,.04)) !important;
  }

  body.sidebar-collapsed .nav-group-settings {
    margin-bottom: 18px !important;
  }

  body.sidebar-collapsed .sidebar-footer {
    padding-top: 6px !important;
  }

  body.sidebar-collapsed .kw-brand .kw-logo {
    width: 16px !important;
    max-height: 9px !important;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  #tabs,
  body.sidebar-collapsed #tabs {
    overflow-y: auto !important;
  }

  #tabs {
    padding-top: 14px !important;
  }

  body.sidebar-collapsed #tabs {
    padding-top: 10px !important;
  }

  #tabs button,
  body.sidebar-collapsed #tabs button {
    min-height: 40px !important;
    height: 40px !important;
  }

  body.sidebar-collapsed #tabs .nav-icon {
    width: 31px !important;
    height: 31px !important;
    flex-basis: 31px !important;
  }
}

@media (max-height: 620px) and (min-width: 901px) {
  #tabs,
  body.sidebar-collapsed #tabs {
    scrollbar-width: thin;
  }

  #tabs::-webkit-scrollbar {
    width: 5px;
  }
}

/* V2.151: stronger large-screen sidebar icons, dashboard insight pies, market and clock widgets. */
@media (min-width: 1280px) and (min-height: 780px) {
  .sidebar:not(.sidebar-collapsed) #tabs .nav-icon {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 13px !important;
  }

  .sidebar:not(.sidebar-collapsed) #tabs button {
    min-height: 44px !important;
  }

  body.sidebar-collapsed #tabs button {
    height: 49px !important;
    min-height: 49px !important;
  }

  body.sidebar-collapsed #tabs .nav-icon {
    --nav-icon-scale: 1.18 !important;
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }
}

.app-chrome .topbar-status {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.header-clock-widget {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(16,35,31,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #35544d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(18,35,31,.08);
  backdrop-filter: blur(12px);
}
.dashboard-mobile-hero-stats {
  display: none;
}
.desktop-sticky-active .header-clock-widget-inline {
  margin-top: 0;
}

.dashboard-insight-side {
  min-height: 100%;
}

.dashboard-insight-card {
  display: grid;
  gap: 10px;
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
  height: 100%;
  min-height: 100%;
  padding: 13px;
  border: 1px solid rgba(16,40,35,.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 0%, rgba(20,184,166,.14), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(242,250,247,.86));
  box-shadow: 0 24px 58px rgba(16,40,35,.10);
}

.dashboard-insight-head {
  display: none;
  gap: 3px;
}

.dashboard-insight-head span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dashboard-insight-head b {
  color: var(--dashboard-ink);
  font-size: 18px;
  line-height: 1.1;
}

.dashboard-insight-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.dashboard-mini-metric {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px 8px 13px;
  border: 1px solid rgba(23,108,95,.10);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--metric-dot) 10%, transparent), transparent 48%),
    rgba(255,255,255,.78);
}

.dashboard-mini-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  border-radius: 0;
  background: var(--metric-dot);
  box-shadow: 0 0 18px color-mix(in srgb, var(--metric-dot) 28%, transparent);
}

.dashboard-mini-metric span {
  color: var(--dashboard-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dashboard-mini-metric b {
  min-width: 0;
  overflow: hidden;
  color: var(--dashboard-ink);
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pie-wrap {
  display: grid;
  grid-template-columns: minmax(84px, .48fr) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 0;
}

.dashboard-pie {
  position: relative;
  width: min(104px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 9px rgba(255,255,255,.68), 0 12px 24px rgba(16,40,35,.10);
}

.dashboard-pie::after {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.dashboard-pie span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #12352f;
  font-size: 13px;
  font-weight: 950;
}

.dashboard-pie-muted {
  opacity: .72;
}

.dashboard-pie-legend {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-pie-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  color: var(--dashboard-muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slice);
}

.dashboard-pie-legend b {
  min-width: 0;
  overflow: hidden;
  color: #17352f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pie-legend em {
  color: var(--accent);
  font-style: normal;
}

.dashboard-market-widget {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background:
    linear-gradient(90deg, rgba(16,76,64,.90), rgba(26,92,78,.78), rgba(16,76,64,.90));
}

.dashboard-market-widget::before {
  display: none !important;
}

.dashboard-market-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.dashboard-market-label {
  color: rgba(236,253,245,.74);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dashboard-market-head h3 {
  margin: 8px 0 0;
}

.dashboard-market-head small {
  color: #6f817a;
  font-size: 11px;
  font-weight: 850;
}

.dashboard-market-grid {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dashboard-market-grid::-webkit-scrollbar {
  display: none;
}

.dashboard-market-tile {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-market-tile span {
  color: rgba(236,253,245,.72);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dashboard-market-tile b {
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.dashboard-market-tile em {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.dashboard-market-widget small {
  color: rgba(236,253,245,.62);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-market-up em { background: rgba(16,185,129,.20); color: #bbf7d0; }
.dashboard-market-down em { background: rgba(249,115,22,.22); color: #fed7aa; }
.dashboard-market-flat em { background: rgba(226,232,240,.16); color: #e2e8f0; }

@media (max-width: 900px) {
  .header-clock-widget {
    display: none;
  }

  .header-clock-widget-inline {
    display: none !important;
  }

  .dashboard-mobile-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
  }

  .dashboard-mobile-hero-stat {
    min-height: 72px;
    padding: 12px 10px;
    border: 1px solid rgba(20,83,72,.14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(239,248,245,.86));
    box-shadow: 0 10px 24px rgba(16,40,35,.08);
    display: grid;
    gap: 6px;
    align-content: center;
  }

  .dashboard-mobile-hero-stat span {
    font-size: 11px;
    font-weight: 900;
    color: #5a726c;
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  .dashboard-mobile-hero-stat b {
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.05;
    color: #122a25;
  }

  .dashboard-mobile-hero-stat-income {
    border-left: 4px solid #14b8a6;
  }

  .dashboard-mobile-hero-stat-paid {
    border-left: 4px solid #3b82f6;
  }

  .dashboard-mobile-hero-stat-expense {
    border-left: 4px solid #f97316;
  }

  .dashboard-mobile-clear-button-wide {
    width: 100% !important;
  }

  .dashboard-mobile-filter-panel input[type="date"] {
    text-align: center;
  }

  .dashboard-mobile-filter-panel input[type="date"]::-webkit-date-and-time-value {
    text-align: center;
  }

  .dashboard-mobile-filter-panel input[type="date"]::-webkit-datetime-edit {
    display: inline-flex;
    width: 100%;
    min-height: 100%;
    justify-content: center;
    align-items: center;
  }

  .dashboard-pie-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-market-widget {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-market-widget small {
    display: none;
  }
}

/* V2.152: compact dashboard insights and mobile scroll guard. */
@media (max-width: 900px) {
  html,
  body {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    overscroll-behavior-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
  }

  #appShell,
  main,
  .view,
  .view.active,
  #dashboard,
  .dashboard-modern-shell,
  .dashboard-overview-layout,
  .dashboard-overview-main,
  .dashboard-overview-sidebar {
    overflow: visible !important;
    overscroll-behavior: auto !important;
    touch-action: pan-y pinch-zoom !important;
  }

  .topbar,
  .topbar::before,
  .topbar::after,
  .dashboard-command-center::before,
  .dashboard-hero-main::before {
    pointer-events: none !important;
  }

  .app-chrome,
  .app-chrome *,
  .dashboard-command-center > *,
  .mobile-quick-add,
  .mobile-voice-button {
    pointer-events: auto;
  }

  .mobile-quick-add,
  .mobile-voice-button,
  .quick-add-toggle,
  .quick-add-menu button,
  button,
  select,
  input {
    touch-action: manipulation !important;
  }

  .chart-scroll,
  .table-scroll,
  .calendar-grid-scroll,
  .stock-sheet-scroll,
  .dashboard-market-grid {
    overscroll-behavior: contain;
    touch-action: pan-x pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* V2.153: growth axis alignment, tabbed insight pies and richer market ticker. */
.dashboard-modern-chart-grid-main {
  align-items: stretch;
}

.dashboard-modern-chart-grid-main > .dashboard-chart-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: clamp(520px, 34vw, 610px);
}

.dashboard-modern-chart-grid-main .trend-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 0;
}

.dashboard-modern-chart-grid-main .trend-metric-grid.compact {
  min-height: 124px;
  align-items: stretch;
}

.dashboard-modern-chart-grid-main .trend-metric-card {
  min-height: 112px;
}

.trend-panel-growth .trend-chart {
  min-height: 0 !important;
  height: 100%;
}

.trend-panel-growth .trend-chart svg {
  height: 100% !important;
  min-height: 230px;
}

.trend-panel-growth .trend-axis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  min-height: 24px;
  margin-top: -2px;
  padding: 0 8px 2px;
  color: #74857f;
  font-size: 12px;
  font-weight: 750;
}

.trend-panel-growth .trend-axis span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-insight-card {
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 10px !important;
  overflow: hidden;
}

.dashboard-insight-metrics {
  display: none !important;
}

.dashboard-insight-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(232,248,243,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 10px 20px rgba(17,42,35,.05);
}

.dashboard-insight-tabs button {
  position: relative;
  min-height: 44px;
  justify-content: center;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: transparent;
  color: #5f736c;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-insight-tabs button.active {
  background:
    radial-gradient(circle at 80% 0%, rgba(20,184,166,.26), transparent 44%),
    linear-gradient(135deg, rgba(236,253,245,.98), rgba(255,255,255,.96));
  border-color: rgba(23,108,95,.16);
  color: #102f28;
  box-shadow: 0 16px 30px rgba(18,35,31,.12);
  transform: translateY(7px);
}

.dashboard-insight-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 9px;
  background: inherit;
}

.dashboard-insight-tabs button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.dashboard-pie-wrap-svg {
  height: 100%;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-height: 0;
  padding: 14px 12px 12px;
  border: 1px solid rgba(23,108,95,.14);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 86% 0%, rgba(20,184,166,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(244,252,249,.78));
}

.dashboard-pie-svg-box {
  min-height: 0;
  display: grid;
  place-items: center;
}

.dashboard-pie-svg {
  width: min(100%, 238px);
  max-height: 100%;
  overflow: visible;
}

.dashboard-pie-track {
  fill: none;
  stroke: rgba(219,231,227,.78);
  stroke-width: 24;
}

.dashboard-pie-slice path {
  fill: var(--slice);
  stroke: rgba(255,255,255,.94);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

.dashboard-pie-slice:hover path,
.dashboard-pie-slice:focus path {
  transform: scale(1.035);
  filter: drop-shadow(0 8px 10px rgba(16,40,35,.16));
}

.dashboard-pie-hole {
  fill: rgba(255,255,255,.92);
  filter: drop-shadow(0 2px 8px rgba(16,40,35,.08));
}

.dashboard-pie-svg text {
  fill: #12352f;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.04em;
  pointer-events: none;
}

.dashboard-pie-svg text + text {
  fill: #71857e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-pie-wrap-svg .dashboard-pie-legend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.dashboard-pie-wrap-svg .dashboard-pie-legend span {
  font-size: 10px;
}

.dashboard-market-widget {
  min-height: 32px !important;
}

.dashboard-market-grid {
  gap: 16px !important;
}

/* V2.154: keep the overview intro on one line and make the right pie fully visible. */
.dashboard-command-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.dashboard-command-copy .dashboard-eyebrow {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  white-space: nowrap;
}

.dashboard-command-title-line {
  grid-column: 1;
  grid-row: 1;
  align-items: baseline;
}

.dashboard-command-title-line h2,
.dashboard-command-title-line p {
  margin: 0;
}

.dashboard-command-title-line p {
  max-width: none;
}

.dashboard-insight-card {
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 100%;
  overflow: visible !important;
  padding: 13px !important;
}

.dashboard-insight-side,
.dashboard-insight-side.dashboard-hero-side {
  overflow: visible;
}

.dashboard-pie-wrap-svg {
  height: auto !important;
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 6px !important;
  overflow: visible;
}

.dashboard-pie-svg-box {
  height: 100%;
  min-height: 180px;
  overflow: visible;
}

.dashboard-pie-svg {
  width: min(100%, 250px) !important;
  height: min(100%, 250px) !important;
  min-height: 178px;
  max-height: none !important;
  display: block;
}

.dashboard-pie-wrap-svg .dashboard-pie-legend {
  max-height: 58px;
  overflow: auto;
  padding-right: 2px;
}

@media (min-width: 901px) {
  .dashboard-command-copy {
    display: grid;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .dashboard-modern-chart-grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-command-copy {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-command-copy .dashboard-eyebrow,
  .dashboard-command-title-line {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .dashboard-modern-chart-grid-main > .dashboard-chart-card {
    min-height: auto;
  }

  .dashboard-modern-chart-grid-main .trend-panel {
    grid-template-rows: auto auto auto;
  }

  .trend-panel-growth .trend-chart {
    min-height: 230px !important;
  }

  .dashboard-pie-wrap-svg {
    grid-template-rows: minmax(180px, auto) auto;
  }
}

/* V2.155: balance the overview pie and polish customer tables. */
.dashboard-pie-wrap-svg {
  height: 100% !important;
  align-content: center;
  padding-top: 12px;
}

.dashboard-pie-svg-box {
  align-self: center;
  min-height: 205px;
  transform: translateY(14px);
}

.dashboard-pie-svg {
  height: min(100%, 260px) !important;
}

.dashboard-pie-wrap-svg .dashboard-pie-legend {
  margin-top: 10px;
}

.dashboard-customer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-customer-card-head h3 {
  margin: 0;
}

.dashboard-customer-card-head button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border-color: rgba(15,118,110,.16);
  background: linear-gradient(135deg, rgba(236,253,245,.94), rgba(255,255,255,.9));
  color: #12352f;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(16,40,35,.07);
}

.dashboard-customer-table-card table {
  table-layout: fixed;
}

.dashboard-customer-table-card thead th {
  background: rgba(229,240,236,.92);
  color: #536861;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
}

.dashboard-customer-table-card thead th:last-child {
  white-space: nowrap;
  word-break: keep-all;
  hyphens: none;
}

.dashboard-customer-table-card tbody tr:nth-child(odd) {
  background: rgba(255,255,255,.82);
}

.dashboard-customer-table-card tbody tr:nth-child(even) {
  background: rgba(235,247,243,.46);
}

.dashboard-customer-table-card tbody tr:hover {
  background: rgba(218,242,235,.62);
}

.dashboard-new-customers-card th:nth-child(1) { width: 22%; }
.dashboard-new-customers-card th:nth-child(2) { width: 47%; }
.dashboard-new-customers-card th:nth-child(3) { width: 19%; }
.dashboard-new-customers-card th:nth-child(4) { width: 12%; }

@media (max-width: 900px) {
  .dashboard-pie-svg-box {
    transform: translateY(8px);
  }

  .dashboard-customer-card-head {
    align-items: flex-start;
  }
}

/* V2.156: keep the animated SVG pie, but seat it lower and simplify new-customer columns. */
.dashboard-insight-card {
  overflow: hidden !important;
}

.dashboard-pie-wrap-svg {
  display: grid !important;
  grid-template-rows: minmax(205px, auto) auto !important;
  align-content: start;
  gap: 8px !important;
  padding-top: 24px;
}

.dashboard-pie-svg-box {
  min-height: 205px !important;
  height: auto !important;
  transform: none !important;
  align-self: start;
  display: grid;
  place-items: center;
}

.dashboard-pie-svg {
  width: min(100%, 208px) !important;
  height: 208px !important;
  min-height: 0 !important;
  max-height: none !important;
}

.dashboard-pie-wrap-svg .dashboard-pie-legend {
  max-height: 52px;
  margin-top: 0;
}

.dashboard-new-customers-card th:nth-child(1) { width: 52%; }
.dashboard-new-customers-card th:nth-child(2) { width: 22%; }
.dashboard-new-customers-card th:nth-child(3) { width: 26%; }

.dashboard-new-customers-card td,
.dashboard-new-customers-card th {
  white-space: nowrap;
}

.dashboard-new-customers-card td:first-child {
  white-space: normal;
}

@media (max-width: 900px) {
  .dashboard-pie-wrap-svg {
    padding-top: 16px;
  }

  .dashboard-pie-svg {
    width: min(100%, 190px) !important;
    height: 190px !important;
  }
}

/* V2.157: desktop-only SVG pie visibility fix. Mobile already renders correctly. */
@media (min-width: 901px) {
  .dashboard-insight-side,
  .dashboard-insight-side.dashboard-hero-side {
    min-height: 100% !important;
    overflow: visible !important;
  }

  .dashboard-insight-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .dashboard-insight-tabs {
    flex: 0 0 auto !important;
    min-height: 38px !important;
  }

  .dashboard-pie-wrap-svg {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding-top: 12px !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .dashboard-pie-svg-box {
    flex: 0 0 210px !important;
    width: 100% !important;
    min-height: 210px !important;
    height: 210px !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  .dashboard-pie-svg {
    display: block !important;
    width: 210px !important;
    height: 210px !important;
    min-width: 210px !important;
    min-height: 210px !important;
    max-width: 210px !important;
    max-height: 210px !important;
    overflow: visible !important;
  }

  .dashboard-pie-wrap-svg .dashboard-pie-legend {
    flex: 0 0 auto !important;
    max-height: 54px !important;
    margin-top: 0 !important;
    overflow: auto !important;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  .dashboard-pie-svg-box {
    flex-basis: 190px !important;
    min-height: 190px !important;
    height: 190px !important;
  }

  .dashboard-pie-svg {
    width: 190px !important;
    height: 190px !important;
    min-width: 190px !important;
    min-height: 190px !important;
    max-width: 190px !important;
    max-height: 190px !important;
  }
}

/* V2.158: right-column overview pie and dashboard card polish. */
@media (min-width: 1221px) {
  .dashboard-overview-sidebar > .dashboard-insight-side.dashboard-hero-side {
    grid-template-rows: minmax(0, 1fr) !important;
    align-content: stretch !important;
  }

  .dashboard-overview-sidebar .dashboard-insight-card {
    height: 100% !important;
    min-height: 0 !important;
  }

  .dashboard-overview-sidebar .dashboard-pie-wrap-svg {
    padding-top: 8px !important;
    gap: 6px !important;
  }

  .dashboard-overview-sidebar .dashboard-pie-svg-box {
    flex-basis: clamp(156px, 9.8vw, 176px) !important;
    min-height: clamp(156px, 9.8vw, 176px) !important;
    height: clamp(156px, 9.8vw, 176px) !important;
  }

  .dashboard-overview-sidebar .dashboard-pie-svg {
    width: clamp(156px, 9.8vw, 176px) !important;
    height: clamp(156px, 9.8vw, 176px) !important;
    min-width: 156px !important;
    min-height: 156px !important;
    max-width: 176px !important;
    max-height: 176px !important;
  }

  .dashboard-overview-sidebar .dashboard-pie-wrap-svg .dashboard-pie-legend {
    max-height: 44px !important;
  }
}

.dashboard-customer-card-head,
.dashboard-modern-stack .panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-customer-table-card h3,
.dashboard-modern-stack .panel-head h3 {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #10231f;
  font-size: clamp(18px, 1.4vw, 24px);
  font-weight: 950;
  letter-spacing: -.035em;
}

.dashboard-customer-card-head button,
.dashboard-modern-stack .panel-head button {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(15,118,110,.15);
  border-radius: 999px;
  background:
    radial-gradient(circle at 90% 0%, rgba(20,184,166,.22), transparent 42%),
    linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.86));
  color: #12352f;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(16,40,35,.08);
}

.dashboard-customer-card-head button:hover,
.dashboard-modern-stack .panel-head button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(16,40,35,.12);
}

.dashboard-recent-invoices-table {
  table-layout: fixed;
}

.dashboard-recent-invoices-table th:nth-child(1) { width: 15%; }
.dashboard-recent-invoices-table th:nth-child(2) { width: 16%; }
.dashboard-recent-invoices-table th:nth-child(3) { width: 18%; }
.dashboard-recent-invoices-table th:nth-child(4) { width: 18%; }
.dashboard-recent-invoices-table th:nth-child(5) { width: 18%; }
.dashboard-recent-invoices-table th:nth-child(6) { width: 15%; }

.dashboard-recent-invoices-table td {
  vertical-align: top;
  white-space: normal;
}

.dashboard-recent-invoices-table td b,
.dashboard-recent-invoices-table td small {
  display: block;
}

.dashboard-recent-invoices-table td small {
  margin-top: 3px;
  line-height: 1.35;
}

.dashboard-recent-invoices-table .status-badge {
  display: inline-flex;
  width: fit-content;
  margin-left: auto;
}

/* V2.159: move page actions into filter bars on Central, Payroll and Accounting. */
.central-panel > .panel-head,
.payroll-panel > .payroll-head,
.accounting-filter-box > .panel-head {
  display: none !important;
}

.central-date-filter {
  align-items: center !important;
  margin-top: 0;
}

.central-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.central-filter-actions button,
.payroll-filter-card .add-button,
.accounting-toolbar button {
  min-height: 38px;
  border-radius: 13px;
  white-space: nowrap;
}

.central-filter-actions .primary,
.payroll-filter-card .add-button {
  border-color: rgba(12,188,226,.26);
  background: linear-gradient(135deg, #08c7ee, #05b8d7);
  color: #fff;
  box-shadow: 0 12px 24px rgba(12,188,226,.16);
}

.payroll-filter-card {
  grid-template-columns: minmax(220px, 1.18fr) repeat(6, minmax(112px, .62fr)) minmax(118px, .55fr) auto auto auto !important;
}

.payroll-filter-card .list-filter-count {
  justify-self: end;
}

.accounting-filter-box {
  padding: 12px !important;
}

.accounting-toolbar {
  gap: 10px;
  align-items: end;
}

@media (max-width: 1220px) {
  .central-filter-actions {
    margin-left: 0;
  }

  .payroll-filter-card {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .central-filter-actions,
  .accounting-toolbar {
    width: 100%;
  }

  .central-filter-actions button,
  .accounting-toolbar button {
    flex: 1 1 0;
  }
}

/* V2.160: overview contrast and zebra rows for dark/light dashboard panels. */
.dashboard-recent-invoices-spotlight .panel-head h3,
.dashboard-recent-invoices-spotlight h3 {
  color: #f6fffb !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.16);
}

.dashboard-recent-invoices-spotlight .panel-head button {
  border-color: rgba(255,255,255,.22);
  background:
    radial-gradient(circle at 88% 0%, rgba(45,212,191,.24), transparent 44%),
    linear-gradient(135deg, rgba(255,255,255,.17), rgba(255,255,255,.08));
  color: #f6fffb;
}

.dashboard-due-payouts-card .alert-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(16,40,35,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.dashboard-due-payouts-card .alert-item {
  border: 0;
  border-bottom: 1px solid rgba(16,40,35,.09);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.dashboard-due-payouts-card .alert-item:nth-child(odd),
.dashboard-stock-overview-card tbody tr:nth-child(odd) {
  background: rgba(255,255,255,.86);
}

.dashboard-due-payouts-card .alert-item:nth-child(even),
.dashboard-stock-overview-card tbody tr:nth-child(even) {
  background: rgba(232,246,242,.58);
}

.dashboard-due-payouts-card .alert-item.overdue:nth-child(odd),
.dashboard-due-payouts-card .alert-item.soon:nth-child(odd) {
  background: rgba(255,255,255,.86);
}

.dashboard-due-payouts-card .alert-item.overdue:nth-child(even),
.dashboard-due-payouts-card .alert-item.soon:nth-child(even) {
  background: rgba(232,246,242,.58);
}

.dashboard-due-payouts-card .alert-item:last-child {
  border-bottom: 0;
}

.dashboard-stock-overview-card table {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.dashboard-stock-overview-card tbody tr:hover,
.dashboard-due-payouts-card .alert-item:hover {
  background: rgba(218,242,235,.72) !important;
}

/* V2.162: tabbed task flow in the overview sidebar. */
.dashboard-chart-card-taskflow {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}

.dashboard-taskflow-stream {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
}

.dashboard-taskflow-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  z-index: 2;
  overflow: visible;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(232,248,243,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 10px 20px rgba(17,42,35,.05);
}

.dashboard-taskflow-tabs button {
  position: relative;
  min-height: 44px;
  justify-content: center;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: transparent;
  color: #6a7d76;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-taskflow-tabs button.active {
  background:
    radial-gradient(circle at 82% 0%, rgba(20,184,166,.26), transparent 44%),
    linear-gradient(135deg, rgba(236,253,245,.98), rgba(255,255,255,.96));
  border-color: rgba(23,108,95,.16);
  color: #102f28;
  box-shadow: 0 16px 30px rgba(18,35,31,.12);
  transform: translateY(7px);
}

.dashboard-taskflow-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 9px;
  background: inherit;
}

.dashboard-taskflow-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px 12px 12px;
  border: 1px solid rgba(23,108,95,.14);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 86% 0%, rgba(20,184,166,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(244,252,249,.78));
}

.dashboard-taskflow-list-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(16,40,35,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.dashboard-taskflow-add {
  width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #0ac7df, #19c7a8);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(12,188,226,.2);
}

.dashboard-taskflow-list-head span {
  min-width: 0;
  overflow: hidden;
  color: #536b63;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-taskflow-list-head b {
  min-width: 30px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(218,242,235,.86);
  color: #096f61;
  font-size: 12px;
  text-align: center;
}

.dashboard-chart-card-taskflow .dashboard-calendar-list {
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.dashboard-due-today-item {
  position: relative;
}

.dashboard-due-today-item::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background: #14b8a6;
}

.dashboard-due-today-overdue::before,
.dashboard-due-today-invoice::before {
  background: #ef4444;
}

.dashboard-due-today-soon::before,
.dashboard-due-today-payout::before {
  background: #f97316;
}

.dashboard-due-today-done::before {
  background: #22c55e;
}

.dashboard-due-dot-invoice {
  background: #38bdf8;
  box-shadow: 0 0 0 5px rgba(56,189,248,.13);
}

.dashboard-due-dot-payout {
  background: #f97316;
  box-shadow: 0 0 0 5px rgba(249,115,22,.13);
}

.dashboard-due-dot-task {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.13);
}

.dashboard-taskflow-empty {
  align-self: start;
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(16,40,35,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.66);
}

/* V2.163: stronger active tab caps for the overview right sidebar. */
.dashboard-insight-tabs,
.dashboard-taskflow-tabs {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 22px 22px 0 0 !important;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(232,248,243,.72)) !important;
}

.dashboard-insight-tabs button,
.dashboard-taskflow-tabs button {
  position: relative !important;
  min-height: 44px !important;
  border: 1px solid transparent !important;
  border-bottom: 0 !important;
  border-radius: 20px 20px 0 0 !important;
}

.dashboard-insight-tabs button.active,
.dashboard-taskflow-tabs button.active {
  z-index: 3 !important;
  border-color: rgba(23,108,95,.16) !important;
  background:
    radial-gradient(circle at 82% 0%, rgba(20,184,166,.26), transparent 44%),
    linear-gradient(135deg, rgba(236,253,245,.98), rgba(255,255,255,.96)) !important;
  box-shadow: 0 16px 30px rgba(18,35,31,.12) !important;
  transform: translateY(7px) !important;
}

.dashboard-insight-tabs button.active::after,
.dashboard-taskflow-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 9px;
  background: inherit;
}

.dashboard-overview-sidebar .dashboard-pie-wrap-svg,
.dashboard-taskflow-panel {
  border: 1px solid rgba(23,108,95,.14) !important;
  border-top: 0 !important;
  border-radius: 0 0 24px 24px !important;
  background:
    radial-gradient(circle at 86% 0%, rgba(20,184,166,.12), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(244,252,249,.78)) !important;
}

/* V2.166: invoice status column, saved logo flow and mobile profile relocation. */
@media (max-width: 900px) {
  .dashboard-command-center.has-mobile-central-menu {
    grid-template-columns: minmax(0, 1fr) minmax(128px, 35%) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy {
    grid-column: 1 !important;
    min-width: 0 !important;
  }

  .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-central-badge {
    display: block !important;
    grid-column: 2 !important;
    align-self: start !important;
    justify-self: end !important;
    width: 100% !important;
    max-width: 180px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }

  .dashboard-command-center.has-mobile-central-menu .dashboard-toolbar-shell {
    grid-column: 1 / -1 !important;
  }

  .dashboard-mobile-central-select select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 56px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(17,199,167,.24) !important;
    border-radius: 24px !important;
    background:
      linear-gradient(45deg, transparent 50%, #103b32 50%),
      linear-gradient(135deg, #103b32 50%, transparent 50%),
      radial-gradient(circle at 24% 8%, rgba(255,255,255,.9), transparent 38%),
      linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.94)) !important;
    background-position:
      calc(100% - 22px) 24px,
      calc(100% - 16px) 24px,
      0 0,
      0 0 !important;
    background-size:
      7px 7px,
      7px 7px,
      100% 100%,
      100% 100% !important;
    background-repeat: no-repeat !important;
    color: #12352f !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    box-shadow: 0 12px 22px rgba(18,35,31,.10) !important;
    -webkit-appearance: none;
    appearance: none;
  }

  .dashboard-hero-main {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .dashboard-hero-heading {
    display: none !important;
  }

  .dashboard-net-card {
    grid-column: 1 / -1 !important;
    min-height: 108px !important;
  }

  .dashboard-modern-metrics {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-modern-metric {
    min-height: 116px !important;
  }

  .dashboard-mobile-filter-row-dates {
    align-items: stretch !important;
  }

  .dashboard-mobile-filter-panel input[type="date"] {
    padding: 0 10px !important;
    line-height: 52px !important;
    text-align: center !important;
  }

  .dashboard-mobile-filter-panel input[type="date"]::-webkit-date-and-time-value {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 52px !important;
    height: 52px !important;
    line-height: 52px !important;
    text-align: center !important;
  }

  .dashboard-mobile-filter-panel input[type="date"]::-webkit-datetime-edit,
  .dashboard-mobile-filter-panel input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    height: 52px !important;
    line-height: 52px !important;
    padding: 0 !important;
  }
}

/* V2.175: overview list tables use mobile-specific columns instead of horizontal scrolling. */
.dashboard-mobile-line,
.dashboard-stock-mobile-col {
  display: none !important;
}

@media (max-width: 900px) {
  #dashboard .dashboard-modern-stack,
  #dashboard .dashboard-overview-main,
  #dashboard .dashboard-overview-sidebar {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #dashboard .dashboard-modern-stack .panel,
  #dashboard .dashboard-customer-table-card,
  #dashboard .dashboard-due-payouts-card,
  #dashboard .dashboard-stock-overview-card,
  #dashboard .dashboard-recent-invoices-spotlight {
    overflow: hidden !important;
  }

  #dashboard .dashboard-modern-stack table,
  #dashboard .dashboard-customer-table-card table,
  #dashboard .dashboard-stock-overview-card table,
  #dashboard .dashboard-recent-invoices-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  #dashboard .dashboard-modern-stack th,
  #dashboard .dashboard-modern-stack td,
  #dashboard .dashboard-customer-table-card th,
  #dashboard .dashboard-customer-table-card td,
  #dashboard .dashboard-stock-overview-card th,
  #dashboard .dashboard-stock-overview-card td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  .dashboard-recent-invoices-table .dashboard-invoice-mobile-hide {
    display: none !important;
  }

  .dashboard-recent-invoices-table .dashboard-invoice-mobile-keep {
    display: table-cell !important;
  }

  .dashboard-recent-invoices-table th.dashboard-invoice-mobile-keep:nth-of-type(1),
  .dashboard-recent-invoices-table td.dashboard-invoice-mobile-keep:nth-of-type(1) {
    width: 30% !important;
  }

  .dashboard-recent-invoices-table th.dashboard-invoice-mobile-keep:nth-of-type(2),
  .dashboard-recent-invoices-table td.dashboard-invoice-mobile-keep:nth-of-type(2) {
    width: 38% !important;
  }

  .dashboard-recent-invoices-table th.dashboard-invoice-mobile-keep:nth-of-type(5),
  .dashboard-recent-invoices-table td.dashboard-invoice-mobile-keep:nth-of-type(5) {
    width: 32% !important;
  }

  .dashboard-recent-invoices-table th,
  .dashboard-recent-invoices-table td {
    padding: 10px 8px !important;
    font-size: 12px !important;
  }

  .dashboard-recent-invoices-table td b,
  .dashboard-recent-invoices-table td small {
    line-height: 1.24 !important;
  }

  .dashboard-recent-invoices-table .dashboard-desktop-line {
    display: none !important;
  }

  .dashboard-recent-invoices-table .dashboard-mobile-line {
    display: block !important;
  }

  .dashboard-recent-invoices-table .status-badge {
    margin-left: 0 !important;
    max-width: 100%;
  }

  .dashboard-recent-invoices-table .invoice-balance-note {
    display: none !important;
  }

  .dashboard-stock-overview-table .dashboard-stock-desktop-col {
    display: none !important;
  }

  .dashboard-stock-overview-table .dashboard-stock-mobile-col {
    display: table-cell !important;
  }

  .dashboard-stock-overview-table th:nth-child(1),
  .dashboard-stock-overview-table td:nth-child(1) {
    width: 42% !important;
  }

  .dashboard-stock-overview-table th.dashboard-stock-mobile-col,
  .dashboard-stock-overview-table td.dashboard-stock-mobile-col {
    width: 29% !important;
  }

  .dashboard-due-payouts-card .alert-list,
  .dashboard-chart-card-taskflow .dashboard-calendar-list {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* V2.176 final cascade guard: keep desktop dashboard filters from collapsing. */
@media (min-width: 901px) {
  .dashboard-toolbar-modern .dashboard-filter-row-desktop {
    display: grid !important;
    grid-template-columns:
      minmax(150px, .78fr)
      minmax(150px, .78fr)
      42px
      minmax(160px, .86fr)
      minmax(190px, 1.02fr)
      minmax(220px, 1.18fr)
      44px !important;
    gap: 12px !important;
    align-items: end !important;
    overflow: visible !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop > * {
    min-width: 0 !important;
    max-width: 100% !important;
    grid-column: auto !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop label,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-account-scope {
    display: grid !important;
    gap: 6px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop label > span,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-account-scope > span {
    display: block !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop input,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop select {
    height: 42px !important;
    min-height: 42px !important;
  }

  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-clear-button,
  .dashboard-toolbar-modern .dashboard-filter-row-desktop .dashboard-search-button {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    justify-self: stretch !important;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .dashboard-toolbar-modern .dashboard-filter-row-desktop {
    grid-template-columns:
      minmax(140px, .72fr)
      minmax(140px, .72fr)
      40px
      minmax(145px, .82fr)
      minmax(160px, .92fr)
      minmax(180px, 1fr)
      42px !important;
    gap: 9px !important;
  }
}

/* V2.194 actual EOF guard: dark mode and Kosten chart must win after legacy guards. */
.topbar .actions #themeToggleBtn {
  display: inline-grid;
}

@media (max-width: 760px) {
  .topbar .actions #themeToggleBtn {
    display: none !important;
  }
}

.accounting-chart-tabs {
  grid-template-columns: 1fr !important;
}

.accounting-chart-tabs button {
  width: 100%;
}

.accounting-finance-overview {
  grid-template-columns: repeat(3, minmax(260px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.accounting-finance-chart-module,
.accounting-finance-income,
.accounting-finance-expense {
  max-width: none !important;
  justify-self: stretch !important;
}

@media (max-width: 1180px) {
  .accounting-finance-overview {
    grid-template-columns: 1fr !important;
  }
}

body.theme-dark:not(.pdf-body) {
  --bg: #06110f;
  --panel: #0d1c18;
  --ink: #edfff9;
  --muted: #93aaa4;
  --line: rgba(181,232,220,.16);
  --soft: #102821;
  --accent: #34d399;
  color-scheme: dark;
  background:
    radial-gradient(circle at 10% -10%, rgba(20,184,166,.18), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(56,189,248,.12), transparent 30%),
    linear-gradient(180deg, #06110f 0%, #081512 45%, #050b0a 100%) !important;
  color: var(--ink);
}

body.theme-dark:not(.pdf-body) .panel,
body.theme-dark:not(.pdf-body) .stat,
body.theme-dark:not(.pdf-body) .settings-card,
body.theme-dark:not(.pdf-body) .dialog,
body.theme-dark:not(.pdf-body) .auth-card,
body.theme-dark:not(.pdf-body) .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) .dashboard-hero-main,
body.theme-dark:not(.pdf-body) .dashboard-hero-side,
body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-menu-card,
body.theme-dark:not(.pdf-body) .central-identity-card,
body.theme-dark:not(.pdf-body) .central-company-card,
body.theme-dark:not(.pdf-body) .accounting-finance-module {
  border-color: rgba(181,232,220,.15) !important;
  background:
    radial-gradient(circle at 90% 6%, rgba(52,211,153,.10), transparent 30%),
    linear-gradient(145deg, rgba(15,31,27,.94), rgba(9,22,19,.86)) !important;
  color: var(--ink) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,.32) !important;
}

body.theme-dark:not(.pdf-body) h1,
body.theme-dark:not(.pdf-body) h2,
body.theme-dark:not(.pdf-body) h3,
body.theme-dark:not(.pdf-body) b,
body.theme-dark:not(.pdf-body) strong {
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) p,
body.theme-dark:not(.pdf-body) small,
body.theme-dark:not(.pdf-body) .muted {
  color: var(--muted) !important;
}

body.theme-dark:not(.pdf-body) input,
body.theme-dark:not(.pdf-body) select,
body.theme-dark:not(.pdf-body) textarea {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(3,12,10,.72) !important;
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) th {
  background: rgba(28,54,48,.88) !important;
  color: #bfe7dd !important;
}

body.theme-dark:not(.pdf-body) td {
  border-color: rgba(181,232,220,.10) !important;
  color: var(--ink) !important;
}

body.theme-dark:not(.pdf-body) .invoice-print-document,
body.theme-dark:not(.pdf-body) .invoice-page,
body.theme-dark:not(.pdf-body) .qr-payment-slip,
body.theme-dark:not(.pdf-body) .campaign-print-page,
body.theme-dark:not(.pdf-body) .invoice-preview-page {
  background: #fff !important;
  color: #111 !important;
}

/* V2.195 true EOF guard: dark tables, header contrast and nine-grid icon. */
.topbar #navigationGridBtn .grid-nine-glyph {
  width: 24px;
  height: 24px;
}

.topbar #navigationGridBtn .grid-nine-glyph::before {
  left: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 2px;
  box-shadow:
    8px 0 0 currentColor,
    16px 0 0 currentColor,
    0 8px 0 currentColor,
    8px 8px 0 currentColor,
    16px 8px 0 currentColor,
    0 16px 0 currentColor,
    8px 16px 0 currentColor,
    16px 16px 0 currentColor;
}

.theme-glyph {
  width: 23px;
  height: 23px;
  position: relative;
  display: inline-block;
}

.theme-glyph::before,
.theme-glyph::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease, background .22s ease;
}

.theme-glyph::before {
  inset: 4px;
  border: 2px solid currentColor;
  background: transparent;
  box-shadow: none;
}

.theme-glyph::after {
  inset: 0;
  background: transparent;
  box-shadow:
    11px 0 0 -9px currentColor,
    -11px 0 0 -9px currentColor,
    0 11px 0 -9px currentColor,
    0 -11px 0 -9px currentColor,
    8px 8px 0 -9px currentColor,
    -8px -8px 0 -9px currentColor,
    8px -8px 0 -9px currentColor,
    -8px 8px 0 -9px currentColor;
}

body.theme-dark .theme-glyph::before {
  inset: 3px;
  border: 0;
  background: currentColor;
  transform: translateX(2px);
}

body.theme-dark .theme-glyph::after {
  inset: 3px 2px 3px 8px;
  background: #0b1d19;
  box-shadow: none;
  transform: none;
}

body.theme-dark:not(.pdf-body) .theme-toggle-button {
  color: #f5f7eb;
}

body.theme-dark:not(.pdf-body):not([data-active-tab="dashboard"]) .topbar-copy,
body.theme-dark:not(.pdf-body) .topbar-copy {
  border: 1px solid rgba(186,247,232,.20) !important;
  border-left: 5px solid rgba(52,211,153,.55) !important;
  background:
    linear-gradient(135deg, rgba(237,255,249,.09), rgba(52,211,153,.055)),
    rgba(5,17,15,.36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 20px 46px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) .topbar-copy h1,
body.theme-dark:not(.pdf-body) .topbar h1 {
  color: #f6fffb !important;
  text-shadow: 0 12px 30px rgba(0,0,0,.36) !important;
}

body.theme-dark:not(.pdf-body) .topbar-copy > p {
  border-left-color: rgba(186,247,232,.22) !important;
  color: rgba(237,255,249,.72) !important;
  text-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .table-scroll,
body.theme-dark:not(.pdf-body) .table-responsive,
body.theme-dark:not(.pdf-body) .catalog-products-main,
body.theme-dark:not(.pdf-body) .central-detail-tables,
body.theme-dark:not(.pdf-body) .central-edit-panel,
body.theme-dark:not(.pdf-body) .deleted-items-table,
body.theme-dark:not(.pdf-body) .cashbook-table {
  border-color: rgba(181,232,220,.13) !important;
  background: rgba(3,11,10,.62) !important;
}

body.theme-dark:not(.pdf-body) table,
body.theme-dark:not(.pdf-body) table:not(.invoice-print-table),
body.theme-dark:not(.pdf-body) .dashboard-customer-table-card table,
body.theme-dark:not(.pdf-body) .dashboard-recent-invoices-spotlight table,
body.theme-dark:not(.pdf-body) .central-detail-tables table,
body.theme-dark:not(.pdf-body) .central-edit-panel table,
body.theme-dark:not(.pdf-body) .cashbook-table {
  border: 1px solid rgba(181,232,220,.12) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: rgba(7,19,17,.92) !important;
  color: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) thead,
body.theme-dark:not(.pdf-body) tbody {
  background: transparent !important;
}

body.theme-dark:not(.pdf-body) thead th,
body.theme-dark:not(.pdf-body) table th {
  border-bottom: 1px solid rgba(181,232,220,.16) !important;
  background: linear-gradient(180deg, rgba(62,92,84,.88), rgba(35,62,55,.92)) !important;
  color: #f4fffb !important;
}

body.theme-dark:not(.pdf-body) tbody tr,
body.theme-dark:not(.pdf-body) table tbody tr {
  background: rgba(9,24,21,.88) !important;
}

body.theme-dark:not(.pdf-body) tbody tr:nth-child(even),
body.theme-dark:not(.pdf-body) table tbody tr:nth-child(even) {
  background: rgba(12,32,28,.94) !important;
}

body.theme-dark:not(.pdf-body) tbody tr:hover,
body.theme-dark:not(.pdf-body) table tbody tr:hover,
body.theme-dark:not(.pdf-body) tbody tr.clickable-row:hover {
  background: linear-gradient(90deg, rgba(52,211,153,.18), rgba(34,211,238,.08)) !important;
}

body.theme-dark:not(.pdf-body) tbody td,
body.theme-dark:not(.pdf-body) table td {
  border-color: rgba(181,232,220,.09) !important;
  background: transparent !important;
  color: #dffdf5 !important;
}

body.theme-dark:not(.pdf-body) tbody td b,
body.theme-dark:not(.pdf-body) table td b,
body.theme-dark:not(.pdf-body) tbody td strong,
body.theme-dark:not(.pdf-body) table td strong,
body.theme-dark:not(.pdf-body) tbody td a,
body.theme-dark:not(.pdf-body) table td a {
  color: #bdfbea !important;
}

body.theme-dark:not(.pdf-body) tbody td small,
body.theme-dark:not(.pdf-body) table td small,
body.theme-dark:not(.pdf-body) tbody td .muted,
body.theme-dark:not(.pdf-body) table td .muted,
body.theme-dark:not(.pdf-body) .invoice-balance-note {
  color: #9fbab3 !important;
}

body.theme-dark:not(.pdf-body) input[type="checkbox"] {
  accent-color: #34d399;
}

body.theme-dark:not(.pdf-body) .invoice-row-action-menu summary,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel button,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel select,
body.theme-dark:not(.pdf-body) .list-action-control,
body.theme-dark:not(.pdf-body) .list-action-select,
body.theme-dark:not(.pdf-body) .list-action-selected,
body.theme-dark:not(.pdf-body) .page-actions,
body.theme-dark:not(.pdf-body) .pagination,
body.theme-dark:not(.pdf-body) .pagination button,
body.theme-dark:not(.pdf-body) .pagination select {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(12,30,26,.94) !important;
  color: #effff9 !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.20) !important;
}

body.theme-dark:not(.pdf-body) .pagination button.active,
body.theme-dark:not(.pdf-body) .page-actions button.primary,
body.theme-dark:not(.pdf-body) .list-action-selected {
  background: linear-gradient(135deg, rgba(52,211,153,.30), rgba(34,211,238,.16)) !important;
  color: #effff9 !important;
}

body.theme-dark:not(.pdf-body) .status-badge,
body.theme-dark:not(.pdf-body) .badge.status,
body.theme-dark:not(.pdf-body) td .badge {
  color: #f4fffb !important;
}

/* V2.196 absolute EOF guard: readable dark popups and nested cards. */
body.theme-dark:not(.pdf-body) dialog,
body.theme-dark:not(.pdf-body) dialog .dialog,
body.theme-dark:not(.pdf-body) .preview-dialog,
body.theme-dark:not(.pdf-body) .preview-shell,
body.theme-dark:not(.pdf-body) .voice-assistant-dialog,
body.theme-dark:not(.pdf-body) .admin-subscriber-dialog,
body.theme-dark:not(.pdf-body) .central-company-edit-dialog,
body.theme-dark:not(.pdf-body) .central-catalog-dialog,
body.theme-dark:not(.pdf-body) .stock-location-dialog,
body.theme-dark:not(.pdf-body) .special-payout-dialog-shell,
body.theme-dark:not(.pdf-body) .payroll-payout-dialog-shell,
body.theme-dark:not(.pdf-body) .campaign-dialog-shell {
  border-color: rgba(181,232,220,.18) !important;
  background: linear-gradient(145deg, rgba(10,30,26,.98), rgba(3,13,11,.96)) !important;
  color: #f4fffb !important;
  box-shadow: 0 34px 96px rgba(0,0,0,.52) !important;
}

body.theme-dark:not(.pdf-body) dialog .panel,
body.theme-dark:not(.pdf-body) dialog .stat,
body.theme-dark:not(.pdf-body) dialog .card,
body.theme-dark:not(.pdf-body) dialog .grid > *,
body.theme-dark:not(.pdf-body) dialog fieldset,
body.theme-dark:not(.pdf-body) dialog label,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-panel,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-summary,
body.theme-dark:not(.pdf-body) dialog .invoice-payments-list,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-row,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-history,
body.theme-dark:not(.pdf-body) dialog .product-dialog-preview,
body.theme-dark:not(.pdf-body) dialog .admin-subscriber-kv,
body.theme-dark:not(.pdf-body) dialog .admin-subscriber-payments,
body.theme-dark:not(.pdf-body) dialog .admin-subscriber-profiles,
body.theme-dark:not(.pdf-body) dialog .admin-subscriber-payment-form,
body.theme-dark:not(.pdf-body) dialog .stock-location-inventory-panel,
body.theme-dark:not(.pdf-body) dialog .calendar-dialog-grid,
body.theme-dark:not(.pdf-body) dialog .campaign-editor-preview,
body.theme-dark:not(.pdf-body) dialog .status-timeline,
body.theme-dark:not(.pdf-body) dialog .timeline,
body.theme-dark:not(.pdf-body) dialog .timeline-item {
  border: 1px solid rgba(181,232,220,.16) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(8,25,22,.90) !important;
  color: #f4fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 14px 34px rgba(0,0,0,.24) !important;
}

body.theme-dark:not(.pdf-body) dialog h1,
body.theme-dark:not(.pdf-body) dialog h2,
body.theme-dark:not(.pdf-body) dialog h3,
body.theme-dark:not(.pdf-body) dialog h4,
body.theme-dark:not(.pdf-body) dialog b,
body.theme-dark:not(.pdf-body) dialog strong {
  color: #f7fffc !important;
}

body.theme-dark:not(.pdf-body) dialog p,
body.theme-dark:not(.pdf-body) dialog small,
body.theme-dark:not(.pdf-body) dialog span,
body.theme-dark:not(.pdf-body) dialog .muted {
  color: #a8c7bf !important;
}

body.theme-dark:not(.pdf-body) dialog input,
body.theme-dark:not(.pdf-body) dialog select,
body.theme-dark:not(.pdf-body) dialog textarea {
  border: 1px solid rgba(181,232,220,.17) !important;
  background: rgba(2,12,10,.86) !important;
  color: #f4fffb !important;
}

body.theme-dark:not(.pdf-body) dialog button {
  border: 1px solid rgba(181,232,220,.20) !important;
  background: linear-gradient(135deg, rgba(52,211,153,.25), rgba(34,211,238,.14)), rgba(12,34,30,.96) !important;
  color: #f4fffb !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) dialog button.primary,
body.theme-dark:not(.pdf-body) dialog button.success {
  border-color: rgba(52,211,153,.46) !important;
  background: linear-gradient(135deg, #16a34a, #06b6d4) !important;
  color: #fff !important;
}

body.theme-dark:not(.pdf-body) dialog button.danger {
  border-color: rgba(248,113,113,.42) !important;
  background: linear-gradient(135deg, #b91c1c, #f97316) !important;
  color: #fff !important;
}

body.theme-dark:not(.pdf-body) dialog button.dialog-close,
body.theme-dark:not(.pdf-body) dialog button.cancel {
  border-color: rgba(181,232,220,.18) !important;
  background: linear-gradient(135deg, rgba(148,163,184,.30), rgba(52,211,153,.10)), rgba(15,37,33,.98) !important;
  color: #f4fffb !important;
}

/* V2.196 absolute EOF guard: readable dashboard, filter, calendar and stock cards. */
body.theme-dark:not(.pdf-body) .dashboard-command-center,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-shell,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel,
body.theme-dark:not(.pdf-body) .invoice-filter-rail,
body.theme-dark:not(.pdf-body) .customer-filter-rail,
body.theme-dark:not(.pdf-body) .offers-filter-group,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row,
body.theme-dark:not(.pdf-body) .reports-filter-rail,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail,
body.theme-dark:not(.pdf-body) .payroll-filter-card,
body.theme-dark:not(.pdf-body) .bulk-tools,
body.theme-dark:not(.pdf-body) .page-actions {
  border: 1px solid rgba(181,232,220,.17) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(4,15,13,.82) !important;
  color: #f4fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 40px rgba(0,0,0,.25) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-filter-row label,
body.theme-dark:not(.pdf-body) .dashboard-account-scope,
body.theme-dark:not(.pdf-body) .search-box,
body.theme-dark:not(.pdf-body) .toolbar-search,
body.theme-dark:not(.pdf-body) .dashboard-search-field,
body.theme-dark:not(.pdf-body) .invoice-customer-filter,
body.theme-dark:not(.pdf-body) .list-action-filter-cell,
body.theme-dark:not(.pdf-body) .list-import-filter-cell,
body.theme-dark:not(.pdf-body) .io-toolbar-group,
body.theme-dark:not(.pdf-body) .cashbook-date-filter-group {
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern input,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern select,
body.theme-dark:not(.pdf-body) .dashboard-toolbar-modern button,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel input,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel select,
body.theme-dark:not(.pdf-body) .compact-list-filter-panel button,
body.theme-dark:not(.pdf-body) .invoice-filter-rail input,
body.theme-dark:not(.pdf-body) .invoice-filter-rail select,
body.theme-dark:not(.pdf-body) .invoice-filter-rail button,
body.theme-dark:not(.pdf-body) .customer-filter-rail input,
body.theme-dark:not(.pdf-body) .customer-filter-rail select,
body.theme-dark:not(.pdf-body) .customer-filter-rail button,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row input,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row select,
body.theme-dark:not(.pdf-body) .catalog-product-filter-row button,
body.theme-dark:not(.pdf-body) .reports-filter-rail input,
body.theme-dark:not(.pdf-body) .reports-filter-rail select,
body.theme-dark:not(.pdf-body) .reports-filter-rail button,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail input,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail select,
body.theme-dark:not(.pdf-body) .cashbook-filter-rail button,
body.theme-dark:not(.pdf-body) .payroll-filter-card input,
body.theme-dark:not(.pdf-body) .payroll-filter-card select,
body.theme-dark:not(.pdf-body) .payroll-filter-card button {
  border: 1px solid rgba(181,232,220,.18) !important;
  background: rgba(13,33,29,.96) !important;
  color: #f4fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-stack > .grid > .panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-revenue,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-growth,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-chart-card-calendar,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-recent-invoices-spotlight,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-customer-table-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card,
body.theme-dark:not(.pdf-body) #calendar .panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-main-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-side-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-mini-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-detail-panel,
body.theme-dark:not(.pdf-body) #calendar .calendar-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-day,
body.theme-dark:not(.pdf-body) #calendar .calendar-list-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-topbar,
body.theme-dark:not(.pdf-body) #stock .panel,
body.theme-dark:not(.pdf-body) #stock .stock-summary-panel,
body.theme-dark:not(.pdf-body) #stock .stock-location-panel,
body.theme-dark:not(.pdf-body) #stock .stock-workbook,
body.theme-dark:not(.pdf-body) #stock .stock-sheet,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-center,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-card,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-meta-card,
body.theme-dark:not(.pdf-body) #stock .stock-item-card,
body.theme-dark:not(.pdf-body) #stock .stock-location-dialog,
body.theme-dark:not(.pdf-body) #stock .stock-location-inventory-panel {
  border: 1px solid rgba(181,232,220,.16) !important;
  background: radial-gradient(circle at 94% 8%, rgba(52,211,153,.11), transparent 32%), linear-gradient(145deg, rgba(11,31,27,.93), rgba(5,16,14,.90)) !important;
  color: #f4fffb !important;
  box-shadow: 0 24px 62px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-signal-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card,
body.theme-dark:not(.pdf-body) #dashboard .trend-metric-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-metric,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-legend span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-actions button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-panel-kicker,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-active-profile,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-period-chip,
body.theme-dark:not(.pdf-body) #dashboard .chart-shell,
body.theme-dark:not(.pdf-body) #dashboard .chart-scroll,
body.theme-dark:not(.pdf-body) #dashboard .trend-panel,
body.theme-dark:not(.pdf-body) #dashboard .trend-chart,
body.theme-dark:not(.pdf-body) #calendar .calendar-entry,
body.theme-dark:not(.pdf-body) #calendar .calendar-item,
body.theme-dark:not(.pdf-body) #calendar .calendar-day-button,
body.theme-dark:not(.pdf-body) #calendar .calendar-nav-actions button,
body.theme-dark:not(.pdf-body) #calendar .calendar-view-actions button,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-scroll,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-info-table,
body.theme-dark:not(.pdf-body) #stock .stock-sheet-summary-table,
body.theme-dark:not(.pdf-body) #stock .stock-item-card-row {
  border-color: rgba(181,232,220,.14) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.065), rgba(52,211,153,.035)), rgba(12,32,28,.88) !important;
  color: #f4fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard h2,
body.theme-dark:not(.pdf-body) #dashboard h3,
body.theme-dark:not(.pdf-body) #dashboard h4,
body.theme-dark:not(.pdf-body) #calendar h2,
body.theme-dark:not(.pdf-body) #calendar h3,
body.theme-dark:not(.pdf-body) #stock h2,
body.theme-dark:not(.pdf-body) #stock h3,
body.theme-dark:not(.pdf-body) #dashboard b,
body.theme-dark:not(.pdf-body) #calendar b,
body.theme-dark:not(.pdf-body) #stock b {
  color: #f7fffc !important;
}

body.theme-dark:not(.pdf-body) #dashboard small,
body.theme-dark:not(.pdf-body) #dashboard .muted,
body.theme-dark:not(.pdf-body) #calendar small,
body.theme-dark:not(.pdf-body) #calendar .muted,
body.theme-dark:not(.pdf-body) #stock small,
body.theme-dark:not(.pdf-body) #stock .muted {
  color: #a8c7bf !important;
}

/* V2.197 absolute EOF guard: dark-mode surface polish for nested cards and light badges. */
body.theme-dark:not(.pdf-body) {
  --dark197-panel: rgba(7, 23, 20, .94);
  --dark197-panel-2: rgba(10, 31, 27, .91);
  --dark197-field: rgba(2, 13, 11, .90);
  --dark197-border: rgba(181, 232, 220, .18);
  --dark197-ink: #f5fffb;
  --dark197-muted: #a9c8c0;
}

body.theme-dark:not(.pdf-body) .central-date-filter,
body.theme-dark:not(.pdf-body) .central-filter-actions,
body.theme-dark:not(.pdf-body) .central-brand-compare,
body.theme-dark:not(.pdf-body) .calendar-filter-panel,
body.theme-dark:not(.pdf-body) .calendar-filter-strip,
body.theme-dark:not(.pdf-body) .calendar-topbar,
body.theme-dark:not(.pdf-body) .calendar-left-rail,
body.theme-dark:not(.pdf-body) .calendar-side-stack,
body.theme-dark:not(.pdf-body) .calendar-detail-panel,
body.theme-dark:not(.pdf-body) .calendar-main-panel,
body.theme-dark:not(.pdf-body) .calendar-mini-month,
body.theme-dark:not(.pdf-body) .calendar-side-card,
body.theme-dark:not(.pdf-body) .calendar-summary-mini,
body.theme-dark:not(.pdf-body) #stock .stock-control-panel,
body.theme-dark:not(.pdf-body) #stock .stock-filter-panel {
  border: 1px solid var(--dark197-border) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(4, 15, 13, .84) !important;
  color: var(--dark197-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 42px rgba(0,0,0,.27) !important;
}

body.theme-dark:not(.pdf-body) .central-date-filter label,
body.theme-dark:not(.pdf-body) .central-date-filter span,
body.theme-dark:not(.pdf-body) .calendar-filter-panel label,
body.theme-dark:not(.pdf-body) .calendar-filter-strip span,
body.theme-dark:not(.pdf-body) .calendar-side-card label,
body.theme-dark:not(.pdf-body) #stock label {
  color: var(--dark197-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark:not(.pdf-body) .central-date-filter input,
body.theme-dark:not(.pdf-body) .central-date-filter select,
body.theme-dark:not(.pdf-body) .central-date-filter button,
body.theme-dark:not(.pdf-body) .central-all-accounts-toggle,
body.theme-dark:not(.pdf-body) .calendar-filter-panel input,
body.theme-dark:not(.pdf-body) .calendar-filter-panel select,
body.theme-dark:not(.pdf-body) .calendar-filter-panel button,
body.theme-dark:not(.pdf-body) .calendar-filter-strip input,
body.theme-dark:not(.pdf-body) .calendar-filter-strip select,
body.theme-dark:not(.pdf-body) .calendar-filter-strip button,
body.theme-dark:not(.pdf-body) #stock input,
body.theme-dark:not(.pdf-body) #stock select,
body.theme-dark:not(.pdf-body) #stock button {
  border: 1px solid var(--dark197-border) !important;
  background: var(--dark197-field) !important;
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) dialog .invoice-issuer-preview,
body.theme-dark:not(.pdf-body) dialog .invoice-draft-summary,
body.theme-dark:not(.pdf-body) dialog .invoice-draft-summary-grid,
body.theme-dark:not(.pdf-body) dialog .invoice-summary-card,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-panel,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-summary,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-row,
body.theme-dark:not(.pdf-body) dialog .invoice-status-timeline,
body.theme-dark:not(.pdf-body) dialog .invoice-status-timeline-track,
body.theme-dark:not(.pdf-body) dialog .invoice-status-step,
body.theme-dark:not(.pdf-body) dialog .invoice-lock-note,
body.theme-dark:not(.pdf-body) dialog .product-dialog-preview,
body.theme-dark:not(.pdf-body) dialog .campaign-editor-preview,
body.theme-dark:not(.pdf-body) dialog .stock-sheet-info-card,
body.theme-dark:not(.pdf-body) dialog .stock-sheet-meta-card,
body.theme-dark:not(.pdf-body) dialog .stock-item-card,
body.theme-dark:not(.pdf-body) dialog .calendar-summary-card,
body.theme-dark:not(.pdf-body) dialog .calendar-card,
body.theme-dark:not(.pdf-body) dialog .calendar-agenda-card {
  border: 1px solid var(--dark197-border) !important;
  background: radial-gradient(circle at 94% 8%, rgba(52,211,153,.08), transparent 34%), linear-gradient(145deg, rgba(12, 35, 30, .94), rgba(4, 16, 14, .91)) !important;
  color: var(--dark197-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 14px 34px rgba(0,0,0,.25) !important;
}

body.theme-dark:not(.pdf-body) dialog .invoice-issuer-preview b,
body.theme-dark:not(.pdf-body) dialog .invoice-summary-card b,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-summary b,
body.theme-dark:not(.pdf-body) dialog .invoice-status-step b,
body.theme-dark:not(.pdf-body) dialog .calendar-summary-card b,
body.theme-dark:not(.pdf-body) dialog .calendar-card h3,
body.theme-dark:not(.pdf-body) dialog .calendar-agenda-card h3 {
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) dialog .invoice-issuer-preview span,
body.theme-dark:not(.pdf-body) dialog .invoice-issuer-preview small,
body.theme-dark:not(.pdf-body) dialog .invoice-payment-panel p,
body.theme-dark:not(.pdf-body) dialog .invoice-status-step small,
body.theme-dark:not(.pdf-body) dialog .calendar-card p,
body.theme-dark:not(.pdf-body) dialog .calendar-agenda-card p {
  color: var(--dark197-muted) !important;
}

body.theme-dark:not(.pdf-body) dialog .invoice-payment-chip-paid {
  border-color: rgba(52,211,153,.28) !important;
  background: rgba(22, 101, 52, .46) !important;
  color: #d9ffee !important;
}

body.theme-dark:not(.pdf-body) dialog .invoice-payment-chip-open {
  border-color: rgba(248,113,113,.28) !important;
  background: rgba(127, 29, 29, .46) !important;
  color: #ffe2e2 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-heading,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-active-profile,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg-box,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-legend,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-panel,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-list-head,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-today-list,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-list,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item {
  border-color: var(--dark197-border) !important;
  background: radial-gradient(circle at 94% 10%, rgba(52,211,153,.09), transparent 32%), linear-gradient(145deg, rgba(12, 35, 30, .94), rgba(4, 16, 14, .90)) !important;
  color: var(--dark197-ink) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 16px 38px rgba(0,0,0,.26) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button {
  color: var(--dark197-muted) !important;
  background: transparent !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-tabs button.active,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-tabs button.active {
  background: linear-gradient(135deg, rgba(34,197,94,.24), rgba(34,211,238,.12)), rgba(33, 64, 57, .98) !important;
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg text,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-legend b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-list-head b,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item b {
  fill: var(--dark197-ink) !important;
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg text + text,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-legend em,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-legend small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-list-head span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-calendar-item small {
  fill: var(--dark197-muted) !important;
  color: var(--dark197-muted) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-summary-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-month-cell,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-column,
body.theme-dark:not(.pdf-body) #calendar .calendar-agenda-card,
body.theme-dark:not(.pdf-body) #calendar .calendar-detail-item {
  border-color: var(--dark197-border) !important;
  background: linear-gradient(145deg, rgba(12, 35, 30, .94), rgba(4, 16, 14, .90)) !important;
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-summary-card b,
body.theme-dark:not(.pdf-body) #calendar .calendar-card h3,
body.theme-dark:not(.pdf-body) #calendar .calendar-agenda-card h3,
body.theme-dark:not(.pdf-body) #calendar .calendar-cell-date b,
body.theme-dark:not(.pdf-body) #calendar .calendar-week-head b {
  color: var(--dark197-ink) !important;
}

body.theme-dark:not(.pdf-body) #calendar .calendar-summary-card span,
body.theme-dark:not(.pdf-body) #calendar .calendar-card p,
body.theme-dark:not(.pdf-body) #calendar .calendar-card-meta,
body.theme-dark:not(.pdf-body) #calendar .calendar-agenda-card p,
body.theme-dark:not(.pdf-body) #calendar .calendar-cell-date span {
  color: var(--dark197-muted) !important;
}

body.theme-dark:not(.pdf-body) .status-draft,
body.theme-dark:not(.pdf-body) .badge.status-draft,
body.theme-dark:not(.pdf-body) td .status-draft,
body.theme-dark:not(.pdf-body) .invoice-row-action-panel .status-draft {
  background: #fde68a !important;
  color: #1f2937 !important;
}

body.theme-dark:not(.pdf-body) .status-sent,
body.theme-dark:not(.pdf-body) .status-paid,
body.theme-dark:not(.pdf-body) .status-partial,
body.theme-dark:not(.pdf-body) .status-reminder {
  color: #fff !important;
}

/* V2.198 absolute EOF guard: dark logo previews, mobile dark surfaces and vivid status badges. */
.settings-logo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.settings-logo-preview-card {
  min-width: 180px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(15,118,110,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 32px rgba(16,40,35,.08);
}

.settings-logo-preview-card span {
  display: block;
  margin-bottom: 8px;
  color: #61756f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-logo-preview-card img {
  display: block;
  max-width: 220px;
  max-height: 78px;
  object-fit: contain;
}

.settings-logo-preview-card-dark {
  background: linear-gradient(135deg, rgba(12,31,28,.96), rgba(2,12,10,.92));
}

.settings-logo-preview-card-dark span {
  color: rgba(237,255,249,.78);
}

body.theme-dark:not(.pdf-body) .settings-logo-preview-card {
  border-color: rgba(181,232,220,.18) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.035)), rgba(7,22,19,.92) !important;
  color: #f5fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 16px 38px rgba(0,0,0,.28) !important;
}

body.theme-dark:not(.pdf-body) .settings-logo-preview-card span {
  color: #a9c8c0 !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card {
  border-color: rgba(var(--tile-rgb), .24) !important;
  background:
    radial-gradient(circle at 82% 12%, rgba(var(--tile-rgb), .22), transparent 32%),
    linear-gradient(145deg, rgba(var(--tile-rgb), .18), rgba(5,18,15,.93) 56%, rgba(2,10,9,.96)) !important;
  color: #f5fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 60px rgba(0,0,0,.36) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-preview {
  opacity: .55;
  filter: saturate(1.18) brightness(1.05);
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-copy {
  border-color: rgba(181,232,220,.15) !important;
  background: linear-gradient(135deg, rgba(237,255,249,.12), rgba(52,211,153,.06)), rgba(9,27,24,.72) !important;
  color: #f5fffb !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-copy em {
  border-color: rgba(181,232,220,.18) !important;
  background: rgba(237,255,249,.08) !important;
  color: #dffdf5 !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-copy strong,
body.theme-dark:not(.pdf-body) .dashboard-menu-card-copy small {
  color: #f5fffb !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-copy small {
  color: #bddbd4 !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-draft,
body.theme-dark:not(.pdf-body) .status.status-draft,
body.theme-dark:not(.pdf-body) td .badge.status-draft {
  border: 1px solid rgba(253,230,138,.70) !important;
  background: linear-gradient(135deg, #fde68a, #facc15) !important;
  color: #1f2937 !important;
  box-shadow: 0 8px 20px rgba(250,204,21,.18) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-paid,
body.theme-dark:not(.pdf-body) .status.status-paid,
body.theme-dark:not(.pdf-body) td .badge.status-paid {
  border: 1px solid rgba(74,222,128,.42) !important;
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(34,197,94,.20) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-partial,
body.theme-dark:not(.pdf-body) .status.status-partial,
body.theme-dark:not(.pdf-body) td .badge.status-partial {
  border: 1px solid rgba(45,212,191,.42) !important;
  background: linear-gradient(135deg, #0f766e, #06b6d4) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(20,184,166,.20) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-sent,
body.theme-dark:not(.pdf-body) .status.status-sent,
body.theme-dark:not(.pdf-body) td .badge.status-sent,
body.theme-dark:not(.pdf-body) .status-badge.status-open,
body.theme-dark:not(.pdf-body) .status.status-open,
body.theme-dark:not(.pdf-body) td .badge.status-open {
  border: 1px solid rgba(251,146,60,.45) !important;
  background: linear-gradient(135deg, #f97316, #f59e0b) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(249,115,22,.20) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-reminder,
body.theme-dark:not(.pdf-body) .status.status-reminder,
body.theme-dark:not(.pdf-body) td .badge.status-reminder,
body.theme-dark:not(.pdf-body) .status-badge.status-reminded,
body.theme-dark:not(.pdf-body) .status.status-reminded,
body.theme-dark:not(.pdf-body) td .badge.status-reminded {
  border: 1px solid rgba(167,139,250,.48) !important;
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(124,58,237,.22) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-overdue,
body.theme-dark:not(.pdf-body) .status.status-overdue,
body.theme-dark:not(.pdf-body) td .badge.status-overdue,
body.theme-dark:not(.pdf-body) .status-badge.status-rejected,
body.theme-dark:not(.pdf-body) .status.status-rejected,
body.theme-dark:not(.pdf-body) td .badge.status-rejected {
  border: 1px solid rgba(248,113,113,.48) !important;
  background: linear-gradient(135deg, #dc2626, #f97316) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(220,38,38,.22) !important;
}

body.theme-dark:not(.pdf-body) .status-badge.status-archived,
body.theme-dark:not(.pdf-body) .status.status-archived,
body.theme-dark:not(.pdf-body) td .badge.status-archived {
  border: 1px solid rgba(148,163,184,.44) !important;
  background: linear-gradient(135deg, #475569, #64748b) !important;
  color: #ffffff !important;
}

@media (max-width: 760px) {
  body[data-active-tab="navigation"] .topbar,
  body[data-active-tab="navigation"] .topbar-copy {
    display: none !important;
  }

  body[data-active-tab="navigation"] #navigation.view.active {
    padding-top: 0 !important;
  }

  .navigation-grid-screen {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .navigation-grid-screen .dashboard-menu-card-section-screen {
    margin-top: 0 !important;
    padding-top: 8px !important;
  }

  .navigation-grid-screen .dashboard-menu-card-grid-screen {
    margin-top: 0 !important;
  }

  body.theme-dark:not(.pdf-body) .panel,
  body.theme-dark:not(.pdf-body) .stat,
  body.theme-dark:not(.pdf-body) .settings-card,
  body.theme-dark:not(.pdf-body) .card,
  body.theme-dark:not(.pdf-body) .dashboard-modern-panel,
  body.theme-dark:not(.pdf-body) .dashboard-hero-main,
  body.theme-dark:not(.pdf-body) .dashboard-hero-side,
  body.theme-dark:not(.pdf-body) .dashboard-command-center,
  body.theme-dark:not(.pdf-body) .dashboard-chart-card-revenue,
  body.theme-dark:not(.pdf-body) .dashboard-chart-card-growth,
  body.theme-dark:not(.pdf-body) .dashboard-chart-card-calendar,
  body.theme-dark:not(.pdf-body) .dashboard-recent-invoices-spotlight,
  body.theme-dark:not(.pdf-body) .dashboard-customer-table-card,
  body.theme-dark:not(.pdf-body) .dashboard-due-payouts-card,
  body.theme-dark:not(.pdf-body) .dashboard-stock-overview-card,
  body.theme-dark:not(.pdf-body) .calendar-main-panel,
  body.theme-dark:not(.pdf-body) .calendar-side-stack,
  body.theme-dark:not(.pdf-body) .calendar-side-card,
  body.theme-dark:not(.pdf-body) .calendar-detail-panel,
  body.theme-dark:not(.pdf-body) .calendar-month-cell,
  body.theme-dark:not(.pdf-body) .calendar-week-column,
  body.theme-dark:not(.pdf-body) .stock-workbook,
  body.theme-dark:not(.pdf-body) .stock-sheet,
  body.theme-dark:not(.pdf-body) .stock-item-card {
    border: 1px solid rgba(181,232,220,.17) !important;
    background: radial-gradient(circle at 92% 8%, rgba(52,211,153,.09), transparent 32%), linear-gradient(145deg, rgba(10,31,27,.95), rgba(3,13,11,.92)) !important;
    color: #f5fffb !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 42px rgba(0,0,0,.28) !important;
  }

  body.theme-dark:not(.pdf-body) .table-scroll,
  body.theme-dark:not(.pdf-body) .table-responsive,
  body.theme-dark:not(.pdf-body) table {
    background: rgba(4,15,13,.94) !important;
    color: #f5fffb !important;
  }

  body.theme-dark:not(.pdf-body) tbody tr,
  body.theme-dark:not(.pdf-body) table tbody tr {
    background: rgba(7,22,19,.94) !important;
  }

  body.theme-dark:not(.pdf-body) tbody tr:nth-child(even),
  body.theme-dark:not(.pdf-body) table tbody tr:nth-child(even) {
    background: rgba(10,31,27,.96) !important;
  }

  body.theme-dark:not(.pdf-body) dialog .panel,
  body.theme-dark:not(.pdf-body) dialog .stat,
  body.theme-dark:not(.pdf-body) dialog .card,
  body.theme-dark:not(.pdf-body) dialog .grid > *,
  body.theme-dark:not(.pdf-body) dialog fieldset,
  body.theme-dark:not(.pdf-body) dialog .invoice-issuer-preview,
  body.theme-dark:not(.pdf-body) dialog .invoice-draft-summary,
  body.theme-dark:not(.pdf-body) dialog .invoice-summary-card,
  body.theme-dark:not(.pdf-body) dialog .invoice-payment-panel,
  body.theme-dark:not(.pdf-body) dialog .invoice-status-timeline,
  body.theme-dark:not(.pdf-body) dialog .calendar-card,
  body.theme-dark:not(.pdf-body) dialog .calendar-summary-card {
    border-color: rgba(181,232,220,.18) !important;
    background: linear-gradient(135deg, rgba(237,255,249,.055), rgba(52,211,153,.04)), rgba(6,21,18,.94) !important;
    color: #f5fffb !important;
  }

  body.theme-dark:not(.pdf-body) dialog button,
  body.theme-dark:not(.pdf-body) dialog .toolbar button,
  body.theme-dark:not(.pdf-body) dialog .actions button {
    border-color: rgba(45,212,191,.34) !important;
    background: linear-gradient(135deg, rgba(20,184,166,.34), rgba(59,130,246,.18)), rgba(9,31,27,.96) !important;
    color: #ffffff !important;
  }

  body.theme-dark:not(.pdf-body) dialog button.danger {
    border-color: rgba(248,113,113,.44) !important;
    background: linear-gradient(135deg, #b91c1c, #ea580c) !important;
    color: #ffffff !important;
  }
}

/* V2.199: sidebar footer order and compact kreatiWeb signature. */
.sidebar-footer {
  border-top: 0 !important;
  gap: 8px !important;
  padding-top: 0 !important;
}

.sidebar-footer .brand-support-icons {
  display: none !important;
}

.sidebar-footer-divider {
  width: min(180px, calc(100% - 26px));
  height: 1px;
  margin: 6px auto 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}

.sidebar-dashboard-footer-toggle,
.sidebar-footer .sidebar-dashboard-toggle {
  margin: 0 auto 10px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
}

.sidebar-info-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #eafff8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 20px rgba(4,10,9,.14);
}

.sidebar-info-button:hover,
.sidebar-info-button:focus-visible {
  border-color: rgba(45,212,191,.42);
  background: rgba(45,212,191,.13);
  color: #9fffee;
  outline: none;
}

.kw-brand {
  gap: 2px !important;
  font-size: 10px !important;
}

.kw-brand-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.kw-copyright {
  display: inline-flex !important;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  line-height: 1;
}

.kw-brand .kw-logo {
  width: 34px !important;
  max-height: 17px !important;
}

.kw-domain {
  display: block !important;
  color: rgba(255,255,255,.76);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.1;
}

.sidebar-version {
  display: block !important;
  color: rgba(255,255,255,.48) !important;
  font-size: 10px !important;
  letter-spacing: .06em;
  line-height: 1.05;
}

body.sidebar-collapsed .sidebar-footer {
  border-top: 0 !important;
  gap: 6px !important;
  padding-top: 0 !important;
}

body.sidebar-collapsed .sidebar-footer-divider {
  width: 42px;
  margin-top: 4px;
}

body.sidebar-collapsed .sidebar-footer .sidebar-dashboard-toggle {
  width: 40px !important;
  height: 40px !important;
  margin-bottom: 8px !important;
}

body.sidebar-collapsed .sidebar-info-button {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 17px;
}

body.sidebar-collapsed .kw-brand {
  gap: 1px !important;
}

body.sidebar-collapsed .kw-brand .kw-brand-primary {
  display: inline-flex !important;
}

body.sidebar-collapsed .kw-brand .kw-logo {
  width: 25px !important;
  max-height: 13px !important;
}

body.sidebar-collapsed .kw-domain,
body.sidebar-collapsed .sidebar-version {
  display: none !important;
}

/* V2.200: dashboard detail popups, compact sidebar signature and dark-safe dashboard grids. */
.kw-domain {
  display: none !important;
}

.kw-copyright {
  font-size: 12.5px !important;
}

.dashboard-action-col {
  width: 42px;
  min-width: 42px;
  text-align: right;
  white-space: nowrap;
}

.dashboard-eye-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(20,184,166,.26);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236,253,245,.96), rgba(207,250,254,.72));
  color: #063f36;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 10px 20px rgba(15,118,110,.12);
}

.dashboard-eye-button:hover,
.dashboard-eye-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(20,184,166,.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 14px 24px rgba(15,118,110,.18);
  outline: none;
}

.dashboard-eye-glyph {
  position: relative;
  width: 17px;
  height: 11px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50% / 58%;
}

.dashboard-eye-glyph::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.dashboard-due-payouts-card .alert-item {
  gap: 10px;
  align-items: center;
}

.dashboard-alert-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-alert-main span {
  min-width: 0;
}

.dashboard-detail-dialog-shell {
  max-width: 760px;
}

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

.dashboard-detail-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(240,253,250,.72));
  color: #0c2e28;
}

.dashboard-detail-field span {
  color: rgba(12,46,40,.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dashboard-detail-field strong {
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-detail-input input,
.dashboard-detail-input select,
.dashboard-detail-input textarea {
  width: 100%;
  border: 1px solid rgba(15,118,110,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  color: #0b2f29;
  font: inherit;
  padding: 10px 11px;
}

.dashboard-detail-input textarea {
  min-height: 92px;
  resize: vertical;
}

.dashboard-detail-wide {
  grid-column: 1 / -1;
}

.dashboard-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-section,
body.theme-dark:not(.pdf-body) .dashboard-menu-card-section-overview,
body.theme-dark:not(.pdf-body) .navigation-grid-screen .dashboard-menu-card-section,
body.theme-dark:not(.pdf-body) .navigation-grid-screen {
  border-color: rgba(111,255,224,.18) !important;
  background:
    radial-gradient(circle at 12% 0, rgba(34,211,238,.12), transparent 34%),
    radial-gradient(circle at 100% 18%, rgba(250,204,21,.08), transparent 28%),
    linear-gradient(145deg, rgba(4,18,15,.96), rgba(8,35,30,.9)) !important;
  color: #f3fffb !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card-head h3,
body.theme-dark:not(.pdf-body) .dashboard-menu-card-head span,
body.theme-dark:not(.pdf-body) .dashboard-menu-card-section .eyebrow {
  color: #f3fffb !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.18);
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card {
  border-color: rgba(111,255,224,.18) !important;
  color: #f2fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 38px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-menu-card h4,
body.theme-dark:not(.pdf-body) .dashboard-menu-card p,
body.theme-dark:not(.pdf-body) .dashboard-menu-card .dashboard-menu-card-tag {
  color: #f2fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card .alert-list,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card table {
  border-color: rgba(111,255,224,.16) !important;
  background: rgba(3,16,13,.72) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card .alert-item,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card tbody tr {
  border-color: rgba(111,255,224,.11) !important;
  background: rgba(9,34,29,.88) !important;
  color: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card .alert-item:nth-child(even),
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card tbody tr:nth-child(even) {
  background: rgba(5,25,22,.94) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-due-payouts-card .alert-item:hover,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-stock-overview-card tbody tr:hover {
  background: rgba(18,62,54,.94) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-eye-button {
  border-color: rgba(94,234,212,.32);
  background: linear-gradient(135deg, rgba(15,118,110,.84), rgba(8,47,73,.72));
  color: #eafff8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 24px rgba(0,0,0,.28);
}

body.theme-dark:not(.pdf-body) .dashboard-detail-dialog-shell {
  background:
    radial-gradient(circle at 10% 0, rgba(45,212,191,.18), transparent 34%),
    linear-gradient(145deg, rgba(2,12,10,.96), rgba(8,34,29,.94)) !important;
  color: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) .dashboard-detail-field {
  border-color: rgba(111,255,224,.16);
  background: linear-gradient(135deg, rgba(8,35,30,.94), rgba(4,20,17,.88));
  color: #f3fffb;
}

body.theme-dark:not(.pdf-body) .dashboard-detail-field span {
  color: rgba(214,255,245,.72);
}

body.theme-dark:not(.pdf-body) .dashboard-detail-input input,
body.theme-dark:not(.pdf-body) .dashboard-detail-input select,
body.theme-dark:not(.pdf-body) .dashboard-detail-input textarea {
  border-color: rgba(111,255,224,.18);
  background: rgba(2,12,10,.82);
  color: #f3fffb;
}

@media (max-width: 720px) {
  .dashboard-detail-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-action-col {
    width: 34px;
    min-width: 34px;
  }

  .dashboard-eye-button {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }
}

/* V2.201: dark clock/pie polish, square language badge and one-line sidebar footer meta. */
.sidebar-footer-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
}

.sidebar-footer-meta .sidebar-info-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 10px;
  font-size: 17px;
}

.sidebar-footer-meta .kw-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 7px !important;
  width: auto !important;
  min-height: 28px;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none;
}

.sidebar-footer-meta .kw-copyright,
.sidebar-footer-meta .sidebar-version {
  display: inline-flex !important;
  align-items: center;
  min-height: 24px;
  line-height: 1;
}

.sidebar-footer-meta .kw-copyright {
  font-size: 13px !important;
  color: rgba(255,255,255,.78);
}

.sidebar-footer-meta .sidebar-version {
  color: rgba(255,255,255,.58) !important;
  font-size: 10.5px !important;
  font-weight: 850;
  letter-spacing: .06em;
}

.sidebar-footer-meta .kw-logo,
.sidebar-footer-meta .kw-brand-primary,
.sidebar-footer-meta .kw-domain {
  display: none !important;
}

body.sidebar-collapsed .sidebar-footer-meta {
  justify-content: center;
  min-height: 24px;
}

body.sidebar-collapsed .sidebar-footer-meta .sidebar-info-button,
body.sidebar-collapsed .sidebar-footer-meta .kw-copyright {
  display: none !important;
}

body.sidebar-collapsed .sidebar-footer-meta .kw-brand,
body.sidebar-collapsed .sidebar-footer-meta .sidebar-version {
  display: inline-flex !important;
}

body.sidebar-collapsed .sidebar-footer-meta .sidebar-version {
  min-height: 22px;
  padding: 0 2px;
  font-size: 9.5px !important;
}

/* V2.202: app-wide back button and cleaner dark overview navigation tiles. */
.global-back-button {
  position: fixed;
  left: calc(var(--sidebar-track, 250px) + 18px);
  bottom: 22px;
  z-index: 12000;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23,108,95,.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(229,244,240,.84));
  color: #103b34;
  box-shadow: 0 18px 36px rgba(11,31,27,.18);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.global-back-button:hover,
.global-back-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(11,31,27,.22);
  outline: none;
}

.global-back-button span {
  display: block;
  margin-top: -2px;
  font-size: 38px;
  font-weight: 650;
  line-height: .78;
}

body.theme-dark:not(.pdf-body) .global-back-button {
  border-color: rgba(111,255,224,.24);
  background: linear-gradient(145deg, rgba(10,42,35,.95), rgba(3,18,15,.92));
  color: #eafff8;
  box-shadow: 0 20px 44px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08);
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-menu-card-section-overview .dashboard-menu-card-copy {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-menu-card-section-overview .dashboard-menu-card-copy em {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(231,255,248,.78) !important;
  padding-inline: 0 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-menu-card-section-overview .dashboard-menu-card-copy strong,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-menu-card-section-overview .dashboard-menu-card-copy small {
  color: #f8fffc !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}

/* V2.203: mobile header stack, navigation-grid offset and dark mobile summary cards. */
@media (max-width: 900px) {
  .topbar-sticky-shell.app-chrome,
  .app-chrome,
  .app-brand-badge,
  .app-chrome .language-picker,
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn {
    z-index: 22000 !important;
  }

  .app-brand-badge {
    left: max(0px, env(safe-area-inset-left)) !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    overflow: visible !important;
  }

  .app-brand-badge::after {
    z-index: 2 !important;
  }

  .app-chrome .actions {
    position: static !important;
    inset: auto !important;
    display: contents !important;
  }

  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn,
  .app-chrome .language-picker {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    flex: 0 0 44px !important;
    border-radius: 14px !important;
  }

  .app-chrome .actions #navigationGridBtn {
    right: max(10px, env(safe-area-inset-right)) !important;
  }

  .app-chrome .language-picker {
    right: calc(max(10px, env(safe-area-inset-right)) + 52px) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
  }

  .app-chrome .language-picker select {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    text-align: center;
    text-align-last: center;
  }

  .app-chrome .actions #mobileSettingsBtn {
    right: calc(max(10px, env(safe-area-inset-right)) + 104px) !important;
  }

  .app-chrome .actions #logoutBtn {
    right: calc(max(10px, env(safe-area-inset-right)) + 156px) !important;
  }

  body[data-active-tab="navigation"] #navigation.view.active {
    padding-top: calc(max(10px, env(safe-area-inset-top)) + 60px) !important;
  }

  body[data-active-tab="navigation"] .navigation-grid-screen {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body[data-active-tab="navigation"] .navigation-grid-screen .dashboard-menu-card-section-screen {
    padding-top: 6px !important;
  }

  body.theme-dark:not(.pdf-body) .dashboard-mobile-hero-stat {
    border-color: rgba(125,255,224,.20) !important;
    background:
      radial-gradient(circle at 92% 0%, rgba(45,212,191,.13), transparent 36%),
      linear-gradient(145deg, rgba(8,34,29,.96), rgba(2,12,10,.92)) !important;
    color: #f5fffb !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 14px 34px rgba(0,0,0,.28) !important;
  }

  body.theme-dark:not(.pdf-body) .dashboard-mobile-hero-stat span {
    color: rgba(214,255,245,.72) !important;
  }

  body.theme-dark:not(.pdf-body) .dashboard-mobile-hero-stat b {
    color: #f5fffb !important;
  }
}

@media (max-width: 390px) {
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn,
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 13px !important;
  }

  .app-chrome .actions #navigationGridBtn {
    right: max(8px, env(safe-area-inset-right)) !important;
  }

  .app-chrome .language-picker {
    right: calc(max(8px, env(safe-area-inset-right)) + 46px) !important;
  }

  .app-chrome .actions #mobileSettingsBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 92px) !important;
  }

  .app-chrome .actions #logoutBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 138px) !important;
  }

  body[data-active-tab="navigation"] #navigation.view.active {
    padding-top: calc(max(8px, env(safe-area-inset-top)) + 56px) !important;
  }
}

@media (max-width: 900px) {
  .global-back-button {
    left: max(16px, env(safe-area-inset-left));
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .global-back-button span {
    font-size: 34px;
  }
}

.app-chrome .language-picker {
  width: 57px !important;
  min-width: 57px !important;
  max-width: 57px !important;
  flex: 0 0 57px !important;
}

.app-chrome .language-picker select {
  width: 57px !important;
  min-width: 57px !important;
  max-width: 57px !important;
  padding: 0 !important;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  background-image: none !important;
}

.desktop-sticky-active .app-chrome .language-picker {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  flex-basis: 40px !important;
}

.desktop-sticky-active .app-chrome .language-picker select {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  font-size: 12px;
}

@media (max-width: 1480px) and (min-width: 901px) {
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    flex-basis: 52px !important;
  }
}

@media (min-width: 901px) {
  .desktop-sticky-active .app-chrome .language-picker,
  .desktop-sticky-active .app-chrome .language-picker select {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    flex-basis: 40px !important;
  }
}

body.theme-dark:not(.pdf-body) .header-clock-widget {
  border-color: rgba(125, 255, 224, .22) !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(45,212,191,.20), transparent 38%),
    linear-gradient(135deg, rgba(8,34,29,.92), rgba(2,12,10,.86)) !important;
  color: #eafff8 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 26px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) .header-clock-widget-inline {
  color: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-side,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-insight-card {
  border-color: rgba(125,255,224,.18) !important;
  background:
    radial-gradient(circle at 92% 0%, rgba(45,212,191,.15), transparent 34%),
    linear-gradient(145deg, rgba(6,27,23,.96), rgba(2,12,10,.94)) !important;
  color: #f2fffb !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 20px 48px rgba(0,0,0,.34) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-wrap-svg {
  border-color: rgba(125,255,224,.16) !important;
  background:
    radial-gradient(circle at 76% 0%, rgba(45,212,191,.10), transparent 32%),
    linear-gradient(145deg, rgba(8,31,27,.92), rgba(2,12,10,.90)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg-box {
  border: 1px solid rgba(125,255,224,.12) !important;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(45,212,191,.10), transparent 46%),
    linear-gradient(145deg, rgba(6,24,21,.90), rgba(1,9,8,.82)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 28px rgba(0,0,0,.18);
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-track {
  stroke: rgba(181,232,220,.30) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-slice path {
  stroke: rgba(2,12,10,.96) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-hole {
  fill: rgba(9,31,27,.98) !important;
  stroke: rgba(181,232,220,.36) !important;
  stroke-width: 1.5px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.38)) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg text {
  fill: #eafff8 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-svg text + text {
  fill: rgba(214,255,245,.68) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-wrap-svg .dashboard-pie-legend {
  border: 1px solid rgba(125,255,224,.12) !important;
  border-radius: 14px;
  background: rgba(2,12,10,.62) !important;
  padding: 7px;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-pie-wrap-svg .dashboard-pie-legend span {
  color: rgba(234,255,248,.82) !important;
}

/* V2.204: keep mobile theme badge visible and make desktop sidebar usable on shorter screens. */
@media (max-width: 900px) {
  .topbar-sticky-shell.app-chrome,
  .app-chrome,
  .app-brand-badge,
  .app-chrome .language-picker,
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #themeToggleBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn {
    z-index: 26000 !important;
  }

  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #themeToggleBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn,
  .app-chrome .language-picker {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    flex: 0 0 44px !important;
    display: inline-grid !important;
    place-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-radius: 14px !important;
  }

  .app-chrome .actions #navigationGridBtn {
    right: max(10px, env(safe-area-inset-right)) !important;
  }

  .app-chrome .language-picker {
    right: calc(max(10px, env(safe-area-inset-right)) + 52px) !important;
  }

  .app-chrome .actions #themeToggleBtn {
    right: calc(max(10px, env(safe-area-inset-right)) + 104px) !important;
  }

  .app-chrome .actions #mobileSettingsBtn {
    right: calc(max(10px, env(safe-area-inset-right)) + 156px) !important;
  }

  .app-chrome .actions #logoutBtn {
    right: calc(max(10px, env(safe-area-inset-right)) + 208px) !important;
  }

  .app-chrome .language-picker select {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    border-radius: 14px !important;
    text-align: center;
    text-align-last: center;
  }
}

@media (max-width: 390px) {
  .app-chrome .actions #navigationGridBtn,
  .app-chrome .actions #themeToggleBtn,
  .app-chrome .actions #mobileSettingsBtn,
  .app-chrome .actions #logoutBtn,
  .app-chrome .language-picker,
  .app-chrome .language-picker select {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    border-radius: 13px !important;
  }

  .app-chrome .actions #navigationGridBtn {
    right: max(8px, env(safe-area-inset-right)) !important;
  }

  .app-chrome .language-picker {
    right: calc(max(8px, env(safe-area-inset-right)) + 46px) !important;
  }

  .app-chrome .actions #themeToggleBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 92px) !important;
  }

  .app-chrome .actions #mobileSettingsBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 138px) !important;
  }

  .app-chrome .actions #logoutBtn {
    right: calc(max(8px, env(safe-area-inset-right)) + 184px) !important;
  }
}

@media (min-width: 901px) {
  .sidebar {
    overflow: hidden !important;
  }

  #tabs,
  body.sidebar-collapsed #tabs {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(181,232,220,.36) transparent !important;
    padding-bottom: 14px !important;
    overscroll-behavior: contain;
  }

  #tabs::-webkit-scrollbar,
  body.sidebar-collapsed #tabs::-webkit-scrollbar {
    width: 5px !important;
  }

  #tabs::-webkit-scrollbar-thumb,
  body.sidebar-collapsed #tabs::-webkit-scrollbar-thumb {
    background: rgba(181,232,220,.36) !important;
    border-radius: 999px !important;
  }
}

@media (min-width: 901px) and (max-height: 900px) {
  #tabs,
  body.sidebar-collapsed #tabs {
    padding-top: clamp(10px, 2vh, 24px) !important;
    gap: clamp(0px, .35vh, 4px) !important;
  }

  #tabs .nav-group,
  body.sidebar-collapsed #tabs .nav-group {
    gap: clamp(0px, .25vh, 3px) !important;
    margin-bottom: clamp(1px, .35vh, 5px) !important;
  }

  #tabs button {
    min-height: clamp(32px, 4.25vh, 38px) !important;
    padding-block: clamp(2px, .45vh, 4px) !important;
  }

  body.sidebar-collapsed #tabs button {
    height: clamp(38px, 5.1vh, 46px) !important;
    min-height: clamp(38px, 5.1vh, 46px) !important;
  }

  .sidebar:not(.sidebar-collapsed) #tabs .nav-icon {
    width: clamp(29px, 3.4vh, 34px) !important;
    height: clamp(29px, 3.4vh, 34px) !important;
    flex-basis: clamp(29px, 3.4vh, 34px) !important;
  }

  body.sidebar-collapsed #tabs .nav-icon {
    width: clamp(30px, 4.1vh, 38px) !important;
    height: clamp(30px, 4.1vh, 38px) !important;
    flex-basis: clamp(30px, 4.1vh, 38px) !important;
  }
}

/* V2.209: clean header title shell, calmer overview hero and safer invoice print flow. */
.chrome-quick-nav.chrome-title-only {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.chrome-quick-nav.chrome-title-only .sticky-page-title {
  border: 1px solid rgba(20, 184, 166, .16);
  background: rgba(255,255,255,.58);
  box-shadow: 0 14px 30px rgba(18,35,31,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark:not(.pdf-body) .chrome-quick-nav.chrome-title-only .sticky-page-title {
  border-color: rgba(111,255,224,.18);
  background: rgba(8,33,28,.58);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
}

#dashboard .dashboard-hero-main .dashboard-hero-heading {
  gap: 10px !important;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  display: inline-flex !important;
  width: fit-content;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid rgba(20,184,166,.16);
  border-radius: 16px;
  background: rgba(239,249,246,.72);
  color: #102d28;
  font-size: clamp(20px, 2vw, 32px) !important;
  line-height: 1.08 !important;
  white-space: nowrap;
}

#dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, .20), rgba(255,255,255,.72)) !important;
  color: #0f322b !important;
  border-color: rgba(20,184,166,.18) !important;
  box-shadow: 0 18px 44px rgba(14,116,94,.10) !important;
}

#dashboard .dashboard-net-card b {
  font-size: clamp(22px, 1.8vw, 31px) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  border-color: rgba(111,255,224,.18);
  background: rgba(8,33,28,.72);
  color: #f3fffb;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(16,185,129,.22), rgba(8,33,28,.82)) !important;
  color: #f3fffb !important;
  border-color: rgba(111,255,224,.18) !important;
}

#invoices .panel {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

#invoices .invoice-detail-table {
  min-width: 1030px !important;
  table-layout: fixed;
}

#invoices .invoice-amount-cell {
  width: 105px !important;
  min-width: 105px !important;
}

#invoices .invoice-status-cell {
  width: 96px !important;
  min-width: 96px !important;
}

#invoices .invoice-customer-cell {
  width: 128px !important;
  min-width: 128px !important;
}

#invoices .invoice-date-stack-cell {
  width: 136px !important;
  min-width: 136px !important;
}

#invoices .invoice-issued-cell {
  width: 118px !important;
  min-width: 118px !important;
}

#invoices .invoice-number-cell {
  width: 138px !important;
  min-width: 138px !important;
}

#invoices .invoice-details-cell {
  width: 168px !important;
  min-width: 168px !important;
}

#invoices .invoice-row-actions,
#invoices .invoice-action-col {
  width: 108px !important;
  min-width: 108px !important;
}

#invoices .invoice-row-action-menu {
  min-width: 94px !important;
}

#invoices .invoice-row-action-menu summary {
  gap: 5px;
  padding-inline: 8px;
}

body[data-active-tab="navigation"] .dashboard-menu-card-copy,
.navigation-grid-rect-screen .dashboard-menu-card-copy,
#dashboard .dashboard-menu-card-copy {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.central-popup-staff-editor {
  margin-top: 14px;
}

.central-company-edit-dialog {
  width: min(1180px, calc(100vw - 34px));
}

.central-popup-staff-editor .table-scroll {
  max-height: 320px;
}

.invoice-page,
#printArea .invoice-page,
body.pdf-body .invoice-page {
  overflow: visible !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  padding-bottom: 8mm !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: static !important;
  width: auto !important;
  margin-top: 8mm !important;
  page-break-inside: avoid;
  break-inside: avoid;
}

.invoice-lines-block,
.invoice-lines-block table,
.invoice-lines-block tbody,
.invoice-lines-block tr {
  break-inside: auto;
  page-break-inside: auto;
}

.invoice-lines-block tr,
.invoice-print-totals,
.invoice-payment-history {
  break-inside: avoid;
  page-break-inside: avoid;
}

.payment-page {
  break-before: page;
  page-break-before: always;
}

/* V2.208 final overrides: keep the new layout above older version blocks. */
.dashboard-command-copy h2,
.dashboard-hero-heading strong {
  font-size: clamp(30px, 4vw, 56px) !important;
  line-height: .94 !important;
}

.dashboard-command-title-line p,
.dashboard-command-copy p,
.dashboard-command-subtitle {
  font-size: clamp(13px, 1.25vw, 16px) !important;
}

.dashboard-modern-metric b,
.dashboard-net-card b,
.dashboard-signal-card b,
.dashboard-chart-summary b {
  font-size: clamp(20px, 1.62vw, 28px) !important;
  line-height: 1.04 !important;
  white-space: nowrap;
}

.dashboard-modern-metric,
.dashboard-net-card,
.dashboard-signal-card,
.dashboard-chart-summary {
  min-width: 0;
}

.chrome-quick-nav.chrome-title-only {
  min-width: clamp(150px, 18vw, 280px) !important;
  width: auto !important;
}

.chrome-quick-nav.chrome-title-only .sticky-page-title {
  font-size: clamp(18px, 1.55vw, 25px) !important;
}

.invoice-filter-rail {
  grid-template-columns: 46px minmax(96px, 118px) minmax(126px, 145px) minmax(126px, 145px) minmax(130px, 170px) minmax(150px, 1fr) minmax(94px, 112px) 42px minmax(118px, 136px) auto !important;
  align-items: end !important;
  gap: 7px !important;
}

.invoice-filter-rail label {
  min-width: 0 !important;
}

.invoice-filter-rail .toolbar-search input,
.invoice-filter-rail .invoice-customer-filter input {
  width: 100% !important;
}

.invoice-filter-rail .filter-count,
.invoice-filter-rail .filter-result-count,
.invoice-filter-rail .selected-count-badge:not(.selection-count-pill) {
  max-width: 44px !important;
  overflow: hidden !important;
}

.invoice-detail-table {
  min-width: 980px !important;
  table-layout: fixed !important;
}

.invoice-detail-row td {
  padding: 10px 7px !important;
  vertical-align: top;
}

.invoice-amount-cell {
  width: 108px !important;
  min-width: 108px !important;
}

.invoice-customer-cell {
  width: 132px !important;
  min-width: 132px !important;
}

.invoice-status-cell {
  width: 104px !important;
  min-width: 104px !important;
}

.invoice-date-stack-cell {
  width: 138px !important;
  min-width: 138px !important;
}

.invoice-issued-cell {
  width: 118px !important;
  min-width: 118px !important;
}

.invoice-number-cell {
  width: 146px !important;
  min-width: 146px !important;
}

.invoice-details-cell {
  width: 172px !important;
  min-width: 172px !important;
}

.invoice-row-actions,
.invoice-action-col {
  width: 112px !important;
  min-width: 112px !important;
}

.invoice-detail-row small,
.invoice-detail-row .muted {
  word-break: normal !important;
  overflow-wrap: anywhere;
}

.dashboard-menu-card-section-overview {
  display: none !important;
}

body[data-active-tab="navigation"] .dashboard-menu-card-section-overview,
.navigation-grid-rect-screen .dashboard-menu-card-section-overview {
  display: block !important;
}

#dashboard .dashboard-menu-card-section-overview {
  display: none !important;
}

body[data-active-tab="navigation"] #navigation .dashboard-menu-card-section-overview {
  display: block !important;
}

.app-footer-shell,
.mobile-app-footer {
  display: none !important;
}

.invoice-lines-no-images tbody td {
  padding-block: 1.1mm !important;
  min-height: 0 !important;
}

.invoice-lines-no-images .invoice-line-description-text {
  min-height: 0 !important;
}

@media print {
  .invoice-page {
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 12mm 14mm 18mm !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .invoice-page-content,
  .invoice-print-body {
    overflow: visible !important;
  }

  .invoice-lines-block table {
    page-break-inside: auto !important;
  }

  .invoice-lines-block tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .invoice-qr-page,
  .payment-page {
    page-break-before: always !important;
    break-before: page !important;
  }
}

/* V2.235: measurement units, bounded delivery notes and cropped invoice logos. */
.line-row {
  grid-template-columns:
    minmax(170px, 1.12fr)
    minmax(170px, 1.16fr)
    70px
    94px
    100px
    82px
    88px
    40px !important;
}

.line-row .ln-unit {
  min-width: 0;
  font-weight: 700;
}

.logo-auto-dark {
  filter: brightness(0) invert(1) drop-shadow(0 0 1px rgba(255, 255, 255, .45));
}

.invoice-layout-logo-manager {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(18, 126, 105, .15);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(241, 250, 247, .94), rgba(255, 255, 255, .82));
}

.invoice-layout-logo-upload-grid,
.invoice-layout-logo-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invoice-layout-logo-preview-grid figure {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 92px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(18, 126, 105, .13);
  border-radius: 12px;
  background: #fff;
}

.invoice-layout-logo-preview-grid figure > span {
  justify-self: start;
  color: #61726d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.invoice-layout-logo-preview-grid img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 64px;
  object-fit: contain;
}

.invoice-layout-logo-preview-grid .invoice-layout-logo-preview-dark {
  background: #09241e;
}

.invoice-layout-logo-preview-dark > span {
  color: #bee8dc !important;
}

.invoice-layout-dark-logo-notice {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(21, 135, 112, .18);
  border-radius: 11px;
  background: rgba(221, 247, 239, .74);
  color: #195c4e;
  font-size: 11px;
  line-height: 1.45;
}

body.theme-dark:not(.pdf-body) .invoice-layout-logo-manager {
  border-color: rgba(107, 231, 196, .17);
  background: linear-gradient(145deg, rgba(15, 53, 45, .92), rgba(8, 29, 25, .9));
}

body.theme-dark:not(.pdf-body) .invoice-layout-logo-preview-grid figure {
  border-color: rgba(115, 231, 199, .15);
  background: rgba(9, 29, 25, .9);
}

body.theme-dark:not(.pdf-body) .invoice-layout-logo-preview-grid figure:not(.invoice-layout-logo-preview-dark) img {
  filter: brightness(0) invert(1);
}

body.theme-dark:not(.pdf-body) .invoice-layout-dark-logo-notice {
  border-color: rgba(89, 224, 187, .18);
  background: rgba(25, 88, 73, .5);
  color: #c6f5e8;
}

.logo-crop-dialog {
  width: min(900px, calc(100vw - 24px));
  max-width: 900px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
}

.logo-crop-shell {
  width: 100%;
  max-height: min(92vh, 820px);
  overflow: auto;
  box-sizing: border-box;
}

.logo-crop-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid rgba(18, 126, 105, .16);
  border-radius: 16px;
  background: #dfe8e5;
}

.logo-crop-stage canvas {
  display: block;
  width: min(100%, 720px);
  height: auto;
  max-height: 58vh;
  border-radius: 10px;
  cursor: move;
  touch-action: none;
}

.logo-crop-dimensions {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(7, 31, 26, .82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.logo-crop-actions {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.delivery-note-document {
  width: 210mm !important;
  min-width: 210mm;
  max-width: 210mm;
  margin-inline: auto !important;
  overflow: hidden !important;
}

.delivery-note-document > .delivery-note-page {
  width: 210mm !important;
  min-width: 210mm !important;
  max-width: 210mm !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  margin: 0 auto 18px !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.delivery-note-document > .delivery-note-page > .invoice-page-content {
  display: block !important;
  width: 100% !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.delivery-note-safe-area {
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  height: calc(297mm - 31mm);
  margin: 7mm 19mm 24mm;
  overflow: hidden;
  box-sizing: border-box;
}

.delivery-note-safe-area > *,
.delivery-note-lines,
.delivery-note-lines table {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.delivery-note-lines th,
.delivery-note-lines td,
.delivery-note-meta b,
.delivery-note-document-line b {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 900px) {
  .line-row {
    grid-template-columns: 1fr !important;
  }

  .invoice-layout-logo-upload-grid,
  .invoice-layout-logo-preview-grid {
    grid-template-columns: 1fr;
  }

  .logo-crop-actions {
    grid-template-columns: 1fr 1fr;
  }

  .logo-crop-actions > span {
    display: none;
  }
}

@media print {
  #printArea .delivery-note-document,
  body.pdf-body .delivery-note-document {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  #printArea .delivery-note-document > .delivery-note-page,
  body.pdf-body .delivery-note-document > .delivery-note-page {
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    break-after: page !important;
    page-break-after: always !important;
  }

  #printArea .delivery-note-document > .delivery-note-page:last-child,
  body.pdf-body .delivery-note-document > .delivery-note-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}

/* V2.233: refined invoice editor controls and Mazodor footer geometry. */
.invoice-product-images-option {
  align-self: end;
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(23, 108, 95, .14);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 250, 246, .9), rgba(255, 255, 255, .72));
  box-sizing: border-box;
}

.invoice-product-images-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.invoice-product-images-option span {
  font-size: 12px;
  line-height: 1.25;
}

.invoice-line-editor-panel {
  position: relative;
  margin: 14px 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(18, 126, 105, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(62, 209, 170, .10), transparent 34%),
    linear-gradient(145deg, rgba(244, 251, 248, .96), rgba(250, 252, 251, .88));
  box-shadow: 0 10px 28px rgba(20, 73, 62, .055), inset 0 1px 0 rgba(255, 255, 255, .88);
}

.invoice-line-editor-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.invoice-line-editor-heading h3 {
  margin: 0;
}

.invoice-line-editor-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.invoice-line-editor-panel .line-items {
  gap: 10px;
}

.invoice-line-editor-panel .line-row {
  padding: 10px;
  border: 1px solid rgba(23, 108, 95, .10);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 5px 14px rgba(20, 73, 62, .035);
  box-sizing: border-box;
}

.invoice-line-price-field .ln-price {
  border-color: rgba(7, 157, 126, .58) !important;
  background: linear-gradient(180deg, #fff, #f3fcf8) !important;
  box-shadow: 0 0 0 3px rgba(24, 190, 153, .12), 0 5px 12px rgba(17, 116, 95, .08);
  color: #0b5143;
  font-weight: 800;
}

.invoice-line-price-field .ln-price:focus {
  border-color: #0aa985 !important;
  box-shadow: 0 0 0 4px rgba(20, 184, 145, .19), 0 7px 16px rgba(17, 116, 95, .10);
}

.invoice-add-position-button {
  min-height: 40px;
  margin-top: 12px;
  border-color: rgba(15, 132, 108, .22);
  background: linear-gradient(135deg, rgba(221, 247, 238, .96), rgba(242, 252, 248, .96));
  color: #0b6654;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(19, 106, 88, .07);
}

.invoice-add-position-button:hover {
  border-color: rgba(15, 132, 108, .38);
  background: linear-gradient(135deg, rgba(207, 243, 231, .98), rgba(236, 250, 245, .98));
}

body.theme-dark:not(.pdf-body) .invoice-product-images-option {
  border-color: rgba(113, 234, 199, .18);
  background: linear-gradient(135deg, rgba(21, 71, 61, .68), rgba(19, 43, 38, .72));
}

body.theme-dark:not(.pdf-body) .invoice-line-editor-panel {
  border-color: rgba(112, 232, 198, .16);
  background:
    radial-gradient(circle at 100% 0, rgba(44, 187, 150, .13), transparent 36%),
    linear-gradient(145deg, rgba(17, 49, 42, .94), rgba(15, 36, 32, .91));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .17), inset 0 1px 0 rgba(210, 255, 242, .05);
}

body.theme-dark:not(.pdf-body) .invoice-line-editor-panel .line-row {
  border-color: rgba(111, 224, 194, .12);
  background: rgba(17, 49, 42, .66);
}

body.theme-dark:not(.pdf-body) .invoice-line-price-field .ln-price {
  border-color: rgba(59, 213, 172, .62) !important;
  background: linear-gradient(180deg, rgba(16, 62, 52, .98), rgba(15, 51, 44, .98)) !important;
  color: #bdf9e7;
  box-shadow: 0 0 0 3px rgba(42, 205, 162, .13);
}

body.theme-dark:not(.pdf-body) .invoice-add-position-button {
  border-color: rgba(89, 224, 187, .22);
  background: linear-gradient(135deg, rgba(25, 91, 75, .94), rgba(19, 65, 55, .94));
  color: #c8fbed;
}

.mazodor-footer {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .78fr) 13mm;
  justify-content: initial;
  gap: 2.4mm;
}

.mazodor-footer-page {
  justify-self: end;
  width: 13mm;
  padding-left: 1mm;
  text-align: right;
  overflow: visible !important;
  text-overflow: clip !important;
}

@media (max-width: 900px) {
  .invoice-line-editor-panel {
    padding: 11px;
    border-radius: 15px;
  }

  .invoice-line-editor-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

/* V2.232: invoice preview download, amount emphasis and line hierarchy. */
.invoice-preview-download {
  min-width: 112px;
  font-weight: 800;
}

.invoice-product-picker .ln-product-search {
  font-weight: 700;
}

.line-row .ln-desc {
  font-style: italic;
  font-weight: 400;
}

.invoice-line-editor-sku {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}

.invoice-line-editor-sku[hidden] {
  display: none;
}

.invoice-amount-emphasis {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.invoice-detail-row .invoice-amount-value {
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.05;
  letter-spacing: -.015em;
}

.invoice-detail-row .invoice-amount-currency {
  color: var(--muted);
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1;
}

.invoice-document .invoice-line-description-text,
#printArea .invoice-line-description-text,
body.pdf-body .invoice-line-description-text {
  display: grid !important;
  align-content: start;
  gap: .35mm;
  font-weight: 400 !important;
  line-height: 1.16 !important;
}

.invoice-document .invoice-line-product-name,
#printArea .invoice-line-product-name,
body.pdf-body .invoice-line-product-name {
  display: block !important;
  margin: 0 !important;
  color: inherit;
  font-size: 1em !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.16 !important;
}

.invoice-document .invoice-line-secondary-description,
#printArea .invoice-line-secondary-description,
body.pdf-body .invoice-line-secondary-description {
  display: block !important;
  margin: 0 !important;
  color: #2e3734;
  font-size: .94em !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

.invoice-document .invoice-line-sku,
#printArea .invoice-line-sku,
body.pdf-body .invoice-line-sku,
.invoice-document .invoice-line-discount-meta,
#printArea .invoice-line-discount-meta,
body.pdf-body .invoice-line-discount-meta {
  display: block !important;
  margin: 0 !important;
  color: #687874 !important;
  font-size: 5.8pt !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.12 !important;
}

body.theme-dark:not(.pdf-body) .invoice-detail-row .invoice-amount-currency {
  color: rgba(222, 242, 236, .72);
}

/* V2.231: bounded Mazodor columns, preview download actions and Lieferschein. */
.preview-dialog-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.preview-dialog-actions button {
  min-height: 38px;
}

.delivery-note-action-icon {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.invoice-delivery-note-text {
  grid-column: 1 / -1;
}

.delivery-note-document {
  color: #111;
}

.delivery-note-document .delivery-note-page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
  color: #111;
}

.delivery-note-document .delivery-note-page .invoice-page-content {
  display: flex;
  flex-direction: column;
  min-height: 297mm;
  padding: 7mm 19mm 15mm;
  box-sizing: border-box;
}

.delivery-note-logo {
  display: grid;
  place-items: start center;
  min-height: 20mm;
  margin: 0;
  text-align: center;
}

.delivery-note-logo .invoice-logo {
  display: block;
  width: auto;
  max-width: 44mm;
  height: auto;
  max-height: 18mm;
  margin: 0 auto;
  object-fit: contain;
}

.delivery-note-logo > strong {
  font-size: 16pt;
  letter-spacing: .06em;
}

.delivery-note-issuer {
  margin: 0 0 5mm;
  text-align: center;
  font-size: .72em;
}

.delivery-note-recipient {
  width: 72mm;
  min-height: 25mm;
  font-size: .86em;
}

.delivery-note-recipient b {
  display: block;
  margin-bottom: .8mm;
}

.delivery-note-recipient p {
  margin: 0;
}

.delivery-note-document-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8mm;
  margin: 2mm 0 4mm;
  padding-bottom: 1.8mm;
  border-bottom: .28mm solid rgba(17, 17, 17, .55);
}

.delivery-note-document-line h1 {
  margin: 0;
  font-size: 13pt;
  text-transform: uppercase;
}

.delivery-note-document-line b {
  font-size: .9em;
}

.delivery-note-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2mm 13mm;
  margin-bottom: 6mm;
}

.delivery-note-meta > div {
  display: grid;
  grid-template-columns: 31mm minmax(0, 1fr);
  gap: 2mm;
  align-items: baseline;
}

.delivery-note-meta span {
  font-size: .8em;
}

.delivery-note-meta b {
  min-width: 0;
  font-size: .84em;
  overflow-wrap: anywhere;
}

.delivery-note-lines table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .86em;
}

.delivery-note-lines .delivery-col-pos { width: 5%; }
.delivery-note-lines .delivery-col-description { width: 66%; }
.delivery-note-lines .delivery-col-qty { width: 13%; }
.delivery-note-lines .delivery-col-unit { width: 16%; }

.delivery-note-lines th,
.delivery-note-lines td {
  box-sizing: border-box;
  min-width: 0;
  padding: 1.5mm .8mm;
  border: 0;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.delivery-note-lines thead th {
  border-top: .26mm solid rgba(17, 17, 17, .55);
  border-bottom: .26mm solid rgba(17, 17, 17, .55);
  font-size: .82em;
  white-space: nowrap;
}

.delivery-note-lines tbody td {
  border-bottom: .14mm solid rgba(17, 17, 17, .14);
}

.delivery-note-lines th:nth-child(n + 3),
.delivery-note-lines td:nth-child(n + 3) {
  white-space: nowrap;
}

.delivery-note-lines .right {
  text-align: right;
}

.delivery-note-text {
  margin-top: 7mm;
  padding: 3mm 0;
  border-top: .2mm solid rgba(17, 17, 17, .34);
  border-bottom: .2mm solid rgba(17, 17, 17, .34);
  font-size: .84em;
}

.delivery-note-text p {
  margin: 1mm 0 0;
}

.delivery-note-confirmation {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 14mm;
  margin-top: auto;
  padding: 12mm 0 6mm;
}

.delivery-note-confirmation > div {
  min-height: 12mm;
  border-bottom: .25mm solid rgba(17, 17, 17, .55);
}

.delivery-note-confirmation span {
  display: block;
  padding-top: 13mm;
  font-size: .72em;
}

.delivery-note-continuation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 9mm 0 13mm;
  padding-bottom: 2mm;
  border-bottom: .28mm solid rgba(17, 17, 17, .55);
  font-size: .88em;
}

@media (max-width: 720px) {
  .preview-dialog .dialog-head {
    align-items: flex-start;
    gap: 10px;
  }

  .preview-dialog-actions {
    flex-wrap: wrap;
  }
}

@media print {
  .delivery-note-document .delivery-note-page {
    page-break-after: always;
    break-after: page;
  }

  .delivery-note-document .delivery-note-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}

/* V2.228: professional navigation icons, external calendars, fullscreen voice and Swiss invoice print. */
.nav-icon.nav-icon-svg {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-grid;
  place-items: center;
  color: var(--menu-color, #d9fff6);
  border: 1px solid rgba(var(--menu-rgb, 221, 251, 241), .32);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(var(--menu-rgb, 221, 251, 241), .2), rgba(5, 24, 23, .32)),
    rgba(7, 35, 33, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 7px 18px rgba(0, 0, 0, .16);
}

.nav-icon.nav-icon-svg::before,
.nav-icon.nav-icon-svg::after {
  display: none !important;
  content: none !important;
}

.nav-icon.nav-icon-svg svg {
  width: 21px;
  height: 21px;
  display: block;
  stroke-width: 1.75;
  filter: drop-shadow(0 2px 4px rgba(var(--menu-rgb, 221, 251, 241), .22));
}

.nav-main-button:hover .nav-icon-svg,
.nav-group-active .nav-icon-svg,
.nav-main-button.active .nav-icon-svg {
  color: #fff;
  border-color: rgba(var(--menu-rgb, 221, 251, 241), .66);
  background:
    linear-gradient(145deg, rgba(var(--menu-rgb, 221, 251, 241), .42), rgba(var(--menu-rgb, 221, 251, 241), .12)),
    rgba(7, 35, 33, .62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 0 0 3px rgba(var(--menu-rgb, 221, 251, 241), .08),
    0 10px 25px rgba(0, 0, 0, .2);
  transform: translateY(-1px);
}

.calendar-external-card {
  gap: 12px;
}

.calendar-external-title h3 {
  margin: 0 0 3px;
}

.calendar-external-title small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.calendar-provider-list {
  display: grid;
  gap: 9px;
}

.calendar-provider-card {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--calendar-provider) 18%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--calendar-provider) 4%, var(--panel));
}

.calendar-provider-card.is-connected {
  box-shadow: inset 3px 0 0 var(--calendar-provider);
}

.calendar-provider-main {
  display: grid !important;
  grid-template-columns: auto 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 !important;
}

.calendar-provider-main > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.calendar-provider-main b,
.calendar-provider-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-provider-main small,
.calendar-provider-meta > span {
  color: var(--muted);
  font-size: 10px;
}

.calendar-provider-logo {
  --calendar-provider: #18a986;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  background: var(--calendar-provider);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--calendar-provider) 28%, transparent);
}

.calendar-provider-connect {
  width: 100%;
  margin-top: 8px;
  min-height: 32px;
  border-style: dashed;
}

.calendar-provider-meta {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding-left: 24px;
}

.calendar-provider-meta > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-provider-meta button {
  min-height: 29px;
  padding: 5px 8px;
  font-size: 10px;
}

.calendar-event-external {
  border-left: 3px solid #4285f4 !important;
}

.calendar-event-provider-microsoft {
  border-left-color: #0078d4 !important;
}

.calendar-event-provider-apple {
  border-left-color: #ff3b30 !important;
}

.calendar-connection-dialog {
  width: min(620px, calc(100vw - 28px));
  max-width: 620px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

.calendar-connection-shell {
  width: 100%;
  max-width: none;
}

.calendar-connection-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-connection-heading h2,
.calendar-connection-heading p {
  margin: 0;
}

.calendar-connection-heading p {
  color: var(--muted);
  font-size: 12px;
}

.calendar-connection-body {
  display: grid;
  gap: 16px;
  padding: 18px 22px;
}

.calendar-connection-notice {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, #0ea37f 24%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #0ea37f 7%, var(--panel));
  line-height: 1.45;
}

.calendar-connection-notice span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-connection-body > label:not(.calendar-connection-visible) {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.calendar-connection-visible {
  display: flex;
  align-items: center;
  gap: 9px;
}

.calendar-connection-actions {
  padding: 0 22px 20px;
}

.calendar-connection-actions .danger {
  margin-right: auto;
}

.calendar-external-detail {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 6px;
}

.calendar-external-detail h3,
.calendar-external-detail p {
  margin: 0;
}

.calendar-external-description,
.calendar-external-detail > .muted,
.calendar-external-detail > .dialog-actions {
  grid-column: 1 / -1;
}

.calendar-external-description {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  line-height: 1.5;
}

#voiceAssistantOverlay.open {
  z-index: 10050;
}

.voice-freeform-layer {
  position: fixed;
  inset: 0;
  padding: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(22, 196, 143, .18), transparent 34%),
    linear-gradient(160deg, #021e18 0%, #063c2d 46%, #087050 100%);
}

.voice-freeform-dialog {
  position: relative;
  width: min(680px, 100%);
  height: min(820px, calc(100dvh - 44px));
  max-width: none;
  padding: 34px clamp(24px, 5vw, 52px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 20px;
  overflow: hidden;
  color: #effff9;
  border: 1px solid rgba(178, 255, 231, .18);
  border-radius: 32px;
  background: linear-gradient(155deg, rgba(2, 35, 27, .92), rgba(4, 101, 73, .78));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.voice-freeform-brand {
  justify-self: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
  color: rgba(231, 255, 247, .7);
}

.voice-freeform-brand span {
  color: #31dfaa;
}

.voice-freeform-stage {
  min-height: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.voice-freeform-rings {
  position: relative;
  width: min(52vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}

.voice-freeform-rings > span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(20, 206, 149, .08);
  transform: scale(.72);
}

.voice-freeform-rings > span:nth-child(2) {
  inset: 13%;
  background: rgba(20, 206, 149, .12);
}

.voice-freeform-rings > span:nth-child(3) {
  inset: 26%;
  background: rgba(20, 206, 149, .19);
}

.voice-freeform-stage.is-listening .voice-freeform-rings > span {
  animation: voiceFreeformPulse 2.2s ease-out infinite;
}

.voice-freeform-stage.is-listening .voice-freeform-rings > span:nth-child(2) {
  animation-delay: .25s;
}

.voice-freeform-stage.is-listening .voice-freeform-rings > span:nth-child(3) {
  animation-delay: .5s;
}

.voice-freeform-mic {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #37e6b1, #0ba979);
  box-shadow: 0 18px 45px rgba(10, 225, 164, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.voice-freeform-mic .mic-glyph,
.voice-round-mic .mic-glyph {
  transform: scale(1.15);
}

.voice-freeform-stage h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(22px, 4vw, 32px);
}

.voice-freeform-stage > p {
  max-width: 520px;
  margin: 0;
  color: rgba(225, 255, 245, .72);
  line-height: 1.5;
}

.voice-freeform-transcript {
  max-width: 520px;
  max-height: 86px;
  margin-top: 16px;
  padding: 10px 14px;
  overflow: auto;
  color: rgba(239, 255, 250, .88);
  border: 1px solid rgba(190, 255, 235, .14);
  border-radius: 13px;
  background: rgba(0, 23, 18, .28);
  font-size: 13px;
  line-height: 1.4;
}

.voice-freeform-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
}

.voice-freeform-manual input {
  min-width: 0;
  height: 46px;
  color: #ecfff8;
  border-color: rgba(190, 255, 235, .18);
  background: rgba(0, 28, 21, .38);
}

.voice-freeform-manual input::placeholder {
  color: rgba(221, 255, 244, .48);
}

.voice-freeform-manual button {
  width: 46px;
  height: 46px;
  padding: 0;
  color: #fff;
  border-color: rgba(190, 255, 235, .26);
  border-radius: 50%;
  background: rgba(24, 194, 142, .38);
  font-size: 20px;
}

.voice-freeform-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.voice-round-button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(218, 255, 244, .2);
  border-radius: 50%;
  background: rgba(225, 255, 246, .12);
  font-size: 25px;
}

.voice-round-mic {
  background: rgba(34, 209, 156, .25);
}

@keyframes voiceFreeformPulse {
  0% { opacity: .85; transform: scale(.58); }
  70% { opacity: .2; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

@media (max-width: 760px) {
  .voice-freeform-layer {
    padding: 0;
  }

  .voice-freeform-dialog {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

  .voice-freeform-rings {
    width: min(72vw, 260px);
  }

  .voice-freeform-mic {
    width: 82px;
    height: 82px;
  }

  .calendar-connection-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-connection-actions .danger {
    margin: 0;
  }
}

.invoice-document .invoice-content-page {
  color: #151515;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
}

.invoice-document .invoice-content-page .invoice-page-content {
  padding: 17mm 18mm 24mm !important;
}

.invoice-document .invoice-content-page .invoice-head {
  min-height: 35mm !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12mm !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invoice-document .invoice-brand {
  max-width: 90mm;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-document .invoice-brand .invoice-logo {
  width: auto !important;
  max-width: 47mm !important;
  max-height: 19mm !important;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 4mm !important;
}

.invoice-document .invoice-brand h2 {
  margin: 0 0 2mm !important;
  color: #111 !important;
  font-size: 17pt !important;
  line-height: 1.05 !important;
  letter-spacing: -.02em;
}

.invoice-document .invoice-brand p {
  margin: 0 !important;
  color: #303030 !important;
  font-size: 7.5pt !important;
  line-height: 1.45 !important;
}

.invoice-document.invoice-logo-left .invoice-brand {
  grid-column: 1;
  text-align: left !important;
}

.invoice-document.invoice-logo-right .invoice-brand {
  grid-column: 2;
  justify-self: end;
  text-align: right !important;
}

.invoice-document.invoice-logo-right .invoice-brand .invoice-logo {
  object-position: right center;
}

.invoice-document.invoice-logo-center .invoice-brand {
  grid-column: 1 / -1;
  justify-self: center;
  text-align: center !important;
}

.invoice-document .invoice-meta {
  display: none !important;
}

.invoice-document .invoice-content-page .invoice-addresses {
  display: grid !important;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) !important;
  gap: 14mm !important;
  width: 100% !important;
  max-width: none !important;
  margin: 2mm 0 34mm !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-document .invoice-commercial-facts {
  display: grid;
  align-content: start;
  gap: 1.2mm;
}

.invoice-document .invoice-commercial-facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr);
  gap: 2mm;
  min-width: 0;
  font-size: 7.4pt;
  line-height: 1.25;
}

.invoice-document .invoice-commercial-facts span {
  color: #5a5a5a;
  white-space: nowrap;
}

.invoice-document .invoice-commercial-facts b {
  color: #171717;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.invoice-document .invoice-recipient-block {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 8.4pt;
  line-height: 1.4;
}

.invoice-document .invoice-recipient-company {
  display: inline-block;
  margin-bottom: 1mm;
  color: #444;
  font-weight: 500;
  text-decoration: underline;
}

.invoice-document .invoice-recipient-block p {
  margin: 0 !important;
}

.invoice-document .invoice-inline-title {
  margin: 0 0 2.5mm !important;
  color: #111 !important;
  font-size: 11.2pt !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

.invoice-document .invoice-description-before-lines {
  margin: 0 0 7mm !important;
  padding: 0 !important;
  color: #252525 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 8.6pt !important;
  line-height: 1.45 !important;
  white-space: pre-wrap !important;
  overflow: visible !important;
  max-height: none !important;
}

.invoice-document .invoice-intro-text {
  margin: 0 0 6mm !important;
  padding: 0 !important;
  color: #202020 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 8.8pt !important;
  line-height: 1.45 !important;
}

.invoice-document .invoice-lines-block {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-document .invoice-lines-block table {
  width: 100%;
  border-collapse: collapse !important;
  table-layout: auto !important;
  font-size: 8pt !important;
}

.invoice-document .invoice-lines-block thead th {
  padding: 1.6mm 1.4mm !important;
  color: #111 !important;
  border: 0 !important;
  border-bottom: .35mm solid #b8b8b8 !important;
  background: #f3f3f0 !important;
  font-size: 7.2pt !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.invoice-document .invoice-lines-block tbody td {
  padding: 1.7mm 1.4mm !important;
  vertical-align: top !important;
  border: 0 !important;
  border-bottom: .2mm solid #dedede !important;
  line-height: 1.25 !important;
}

.invoice-document .invoice-position-col,
.invoice-document .invoice-position-cell {
  width: 8mm;
  padding-left: 1mm !important;
  text-align: left;
}

.invoice-document .invoice-line-description-text {
  font-weight: 700;
}

.invoice-document .invoice-line-description-text small {
  display: block;
  margin-top: .5mm;
  color: #5c5c5c;
  font-size: 6.6pt;
  font-weight: 400;
  line-height: 1.25;
}

.invoice-document .invoice-print-totals {
  width: 82mm !important;
  margin: 7mm 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-document .invoice-total {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 8.2pt !important;
}

.invoice-document .invoice-total td,
.invoice-document .invoice-total th {
  padding: 1.1mm 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-weight: 400;
}

.invoice-document .invoice-total td:last-child,
.invoice-document .invoice-total th:last-child {
  padding-left: 5mm !important;
}

.invoice-document .invoice-total .invoice-grand-total-row th {
  padding-top: 1.5mm !important;
  padding-bottom: 1.5mm !important;
  border-top: .45mm solid #222 !important;
  border-bottom: .45mm solid #222 !important;
  font-size: 9.2pt !important;
  font-weight: 700 !important;
}

.invoice-document .invoice-total-due {
  margin: 2.3mm 0 0 !important;
  text-align: right;
  font-size: 7.5pt;
}

.invoice-document .invoice-closing-copy {
  margin: 12mm 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 8.5pt;
  line-height: 1.5;
}

.invoice-document .invoice-note-print,
.invoice-document .invoice-print-footer-text {
  margin: 0 0 5mm !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.invoice-document .invoice-page-footer {
  left: 18mm !important;
  right: 18mm !important;
  bottom: 10mm !important;
  padding-top: 3mm !important;
  color: #444 !important;
  border-top: .2mm solid #d7d7d7 !important;
  font-size: 6.2pt !important;
  line-height: 1.35 !important;
}

@media print {
  #printArea .invoice-document .invoice-content-page .invoice-page-content,
  body.pdf-body .invoice-document .invoice-content-page .invoice-page-content {
    padding: 17mm 18mm 24mm !important;
  }

  #printArea .invoice-document .invoice-content-page .invoice-addresses,
  body.pdf-body .invoice-document .invoice-content-page .invoice-addresses {
    margin-bottom: 34mm !important;
  }

  #printArea .invoice-document .invoice-lines-block tbody tr,
  body.pdf-body .invoice-document .invoice-lines-block tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* V2.227: customer detail view, purchase history and invoice overview. */
#customers > .panel {
  overflow-x: auto;
}

#customers table {
  min-width: 1120px;
}

#customers .customer-table-row {
  cursor: pointer;
}

#customers .customer-table-row:hover {
  background: rgba(204, 251, 241, .58);
}

.customer-invoice-overview-cell {
  min-width: 172px;
}

.customer-invoice-overview {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(14, 116, 144, .18);
  border-radius: 999px;
  background: rgba(207, 250, 254, .58);
  color: #155e75;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

#customerDialog {
  width: min(1080px, 94vw);
  max-height: 92dvh;
}

#customerDialog > .dialog {
  width: 100%;
  max-height: 92dvh;
  overflow: auto;
  box-sizing: border-box;
}

.customer-detail-view {
  display: grid;
  gap: 14px;
}

.customer-detail-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, .20);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, .16), transparent 34%),
    linear-gradient(135deg, rgba(236, 253, 245, .96), rgba(240, 249, 255, .92));
}

.customer-detail-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(8, 145, 178, .22);
}

.customer-detail-hero h3,
.customer-detail-hero p {
  margin: 3px 0 0;
}

.customer-detail-hero > div > span {
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.customer-detail-hero p {
  color: var(--muted);
  font-size: 12px;
}

.customer-detail-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.customer-detail-contact-grid > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
}

.customer-detail-contact-grid b {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.customer-detail-contact-grid span span {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 750;
}

.customer-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.customer-detail-metrics article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, rgba(236, 253, 245, .72));
}

.customer-detail-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.customer-detail-metrics b {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.customer-purchase-panel,
.customer-detail-notes {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
}

.customer-purchase-table-wrap {
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-purchase-table {
  width: 100%;
  min-width: 760px;
  margin: 0;
}

.customer-purchase-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.customer-purchase-table th,
.customer-purchase-table td {
  padding: 8px 9px;
  font-size: 11px;
}

.customer-detail-note-list {
  display: grid;
  gap: 8px;
}

.customer-detail-note {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(248, 250, 252, .86);
}

.customer-detail-note time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-detail-note p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.customer-detail-actions {
  position: sticky;
  bottom: -18px;
  z-index: 5;
  margin: 16px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

body.theme-dark:not(.pdf-body) #customers .customer-table-row:hover {
  background: rgba(13, 92, 78, .55);
}

body.theme-dark:not(.pdf-body) .customer-invoice-overview {
  border-color: rgba(103, 232, 249, .25);
  background: rgba(8, 145, 178, .18);
  color: #a5f3fc;
}

body.theme-dark:not(.pdf-body) .customer-detail-hero,
body.theme-dark:not(.pdf-body) .customer-detail-contact-grid > span,
body.theme-dark:not(.pdf-body) .customer-detail-metrics article,
body.theme-dark:not(.pdf-body) .customer-purchase-panel,
body.theme-dark:not(.pdf-body) .customer-detail-notes,
body.theme-dark:not(.pdf-body) .customer-detail-note {
  border-color: rgba(153, 246, 228, .12);
  background: linear-gradient(145deg, rgba(7, 32, 28, .96), rgba(5, 24, 33, .90));
  color: #ecfdf5;
}

body.theme-dark:not(.pdf-body) .customer-detail-actions {
  border-top-color: rgba(153, 246, 228, .12);
  background: rgba(4, 22, 19, .94);
}

@media (max-width: 760px) {
  #customerDialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
  }

  #customerDialog > .dialog {
    min-height: 100dvh;
    max-height: none;
  }

  .customer-detail-contact-grid,
  .customer-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-detail-hero {
    padding: 14px;
  }

  .customer-detail-avatar {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 15px;
  }

  .customer-detail-actions {
    bottom: -12px;
    margin-inline: -12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .invoice-filter-rail {
    grid-template-columns: 44px repeat(4, minmax(96px, 1fr)) 42px minmax(112px, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .dashboard-command-copy h2 {
    font-size: clamp(42px, 12vw, 64px) !important;
  }

  .invoice-filter-rail {
    grid-template-columns: 44px repeat(2, minmax(0, 1fr)) !important;
  }

  .navigation-grid-rect-screen {
    padding-top: calc(var(--mobile-chrome-height, 92px) + 10px) !important;
  }
}

/* V2.205: Zentral profile persistence/layout polish. */
#central .central-identity-card.central-visit-card {
  grid-template-columns: 128px minmax(520px, 1fr) minmax(320px, .58fr) !important;
  grid-template-areas:
    "counts counts counts"
    "logo copy metrics"
    "logo copy actions" !important;
  align-items: stretch !important;
  gap: 18px 24px !important;
  padding: 18px 20px 22px !important;
}

#central .central-identity-card .central-identity-counts {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(96px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 72px 12px 0 !important;
  justify-content: stretch !important;
  align-items: center !important;
}

#central .central-identity-card .central-identity-counts span {
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

#central .central-identity-card .central-identity-counts b {
  font-size: clamp(18px, 1.5vw, 23px) !important;
}

#central .central-identity-card .central-identity-copy {
  align-self: stretch !important;
  display: grid !important;
  align-content: center !important;
}

#central .central-identity-card .central-identity-grid-reordered {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

#central .central-identity-card .central-identity-info-column {
  min-height: 228px !important;
  height: 100% !important;
  display: grid !important;
  grid-template-rows: repeat(6, minmax(30px, 1fr)) !important;
  gap: 6px !important;
  padding: 16px 18px !important;
  border: 1px solid rgba(18,199,167,.16) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(4,191,234,.08), transparent 35%),
    rgba(255,255,255,.45) !important;
}

#central .central-identity-card .central-identity-info-column span {
  min-height: 0 !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
  border-bottom: 1px solid rgba(23,108,95,.07) !important;
}

#central .central-identity-card .central-identity-info-column span:last-child {
  border-bottom: 0 !important;
}

#central .central-identity-card .central-profile-metrics {
  align-self: stretch !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px solid rgba(18,199,167,.20) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(20,184,166,.20), transparent 32%),
    radial-gradient(circle at 98% 100%, rgba(255,179,71,.18), transparent 35%),
    rgba(255,255,255,.36) !important;
  box-shadow: 0 24px 58px rgba(16,40,35,.12), inset 0 1px 0 rgba(255,255,255,.50) !important;
}

#central .central-identity-card .central-profile-metric {
  min-height: 62px !important;
  border-radius: 12px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(240,255,250,.70)) !important;
  box-shadow: 0 13px 28px rgba(16,40,35,.08), inset 0 1px 0 rgba(255,255,255,.64) !important;
}

#central .central-identity-card .central-profile-metric b {
  font-size: clamp(20px, 1.65vw, 26px) !important;
}

#central .central-identity-card .central-profile-metric.income {
  border-left-color: #14d6b4 !important;
}

#central .central-identity-card .central-profile-metric.paid {
  border-left-color: #5b9dff !important;
}

#central .central-identity-card .central-profile-metric.open {
  border-left-color: #ff6b6b !important;
}

#central .central-identity-card .central-profile-metric.expense {
  border-left-color: #ff944d !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-identity-info-column {
  border-color: rgba(125,255,224,.18) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(45,212,191,.12), transparent 35%),
    rgba(4,25,21,.58) !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-identity-info-column span {
  border-bottom-color: rgba(181,232,220,.11) !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-profile-metrics {
  border-color: rgba(125,255,224,.22) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(45,212,191,.18), transparent 32%),
    radial-gradient(circle at 98% 100%, rgba(249,115,22,.13), transparent 35%),
    rgba(4,21,18,.68) !important;
  box-shadow: 0 26px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.06) !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-profile-metric {
  background:
    linear-gradient(135deg, rgba(12,48,41,.95), rgba(4,22,19,.82)) !important;
  border-color: rgba(125,255,224,.12) !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-profile-metric span,
body.theme-dark:not(.pdf-body) #central .central-identity-card .central-profile-metric small,
body.theme-dark:not(.pdf-body) #central .central-identity-card .central-identity-info-column,
body.theme-dark:not(.pdf-body) #central .central-identity-card .central-identity-info-column b {
  color: rgba(234,255,248,.84) !important;
}

body.theme-dark:not(.pdf-body) #central .central-identity-card .central-profile-metric b {
  color: #f2fffb !important;
}

@media (max-width: 1280px) {
  #central .central-identity-card.central-visit-card {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    grid-template-areas:
      "counts counts"
      "logo copy"
      "metrics metrics"
      "actions actions" !important;
  }

  #central .central-identity-card .central-identity-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin-right: 0 !important;
  }

  #central .central-identity-card .central-profile-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #central .central-identity-card.central-visit-card {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "counts"
      "logo"
      "copy"
      "metrics"
      "actions" !important;
  }

  #central .central-identity-card .central-identity-counts,
  #central .central-identity-card .central-profile-metrics,
  #central .central-identity-card .central-identity-grid-reordered {
    grid-template-columns: 1fr !important;
  }

  #central .central-identity-card .central-identity-info-column {
    min-height: auto !important;
  }
}

/* V2.206: clearer theme toggle state and Zentral IBAN card readability. */
body:not(.theme-dark) .theme-glyph {
  color: #123b34;
}

body:not(.theme-dark) .theme-glyph::before {
  width: 18px;
  height: 18px;
  inset: auto;
  left: 1px;
  top: 3px;
  border: 0;
  background: currentColor;
  box-shadow: inset 6px -3px 0 0 rgba(255,255,255,.96);
}

body:not(.theme-dark) .theme-glyph::after {
  width: 4px;
  height: 4px;
  inset: auto;
  right: 2px;
  top: 3px;
  background: currentColor;
  box-shadow:
    -1px 10px 0 -1px currentColor,
    7px 8px 0 -1.5px currentColor;
}

body.theme-dark .theme-glyph::before {
  inset: 5px;
  border: 0;
  background: #f7d46b;
  box-shadow: 0 0 0 2px rgba(247,212,107,.18), 0 0 14px rgba(247,212,107,.38);
  transform: none;
}

body.theme-dark .theme-glyph::after {
  inset: 0;
  background: transparent;
  box-shadow:
    11px 0 0 -9px #f7d46b,
    -11px 0 0 -9px #f7d46b,
    0 11px 0 -9px #f7d46b,
    0 -11px 0 -9px #f7d46b,
    8px 8px 0 -9px #f7d46b,
    -8px -8px 0 -9px #f7d46b,
    8px -8px 0 -9px #f7d46b,
    -8px 8px 0 -9px #f7d46b;
  transform: none;
}

body.theme-dark:not(.pdf-body) .central-company-iban {
  color: rgba(190,255,238,.74);
}

/* V2.208: compact header, invoice workflow, central tabs and rectangular dashboard navigation. */
.app-footer-shell,
.mobile-app-footer {
  display: none !important;
}

.chrome-quick-nav.chrome-title-only {
  min-width: clamp(160px, 20vw, 300px);
  width: auto;
  justify-content: center;
  pointer-events: none;
}

.chrome-quick-nav.chrome-title-only .sticky-page-title {
  padding: 0 22px;
  color: #0b2f29;
  font-size: clamp(19px, 1.9vw, 28px);
  font-weight: 950;
  letter-spacing: -.03em;
  white-space: nowrap;
}

body.theme-dark:not(.pdf-body) .chrome-quick-nav.chrome-title-only .sticky-page-title {
  color: #f3fffb;
}

.dashboard-command-copy h2,
.dashboard-hero-heading strong {
  font-size: clamp(38px, 5vw, 76px) !important;
}

.dashboard-command-copy p,
.dashboard-command-subtitle {
  font-size: clamp(14px, 1.45vw, 18px) !important;
}

.dashboard-modern-metric b,
.dashboard-net-card b,
.dashboard-signal-card b,
.dashboard-chart-summary b {
  font-size: clamp(24px, 2vw, 34px) !important;
  line-height: 1.05;
}

.dashboard-modern-metric small,
.dashboard-modern-metric span,
.dashboard-net-card span {
  font-size: 12px !important;
}

.dashboard-menu-card-section-overview {
  display: none !important;
}

body[data-active-tab="navigation"] .dashboard-menu-card-section-overview,
.navigation-grid-rect-screen .dashboard-menu-card-section-overview {
  display: block !important;
}

.navigation-grid-rect-screen {
  padding: clamp(18px, 4vw, 52px);
}

.navigation-grid-rect-screen .dashboard-menu-card-section-overview {
  max-width: 1480px;
  margin: 0 auto;
}

.navigation-grid-rect-screen .dashboard-menu-card-head {
  display: none !important;
}

.navigation-grid-rect-screen .dashboard-menu-card-grid-overview {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  max-width: 1480px;
}

.navigation-grid-rect-screen .dashboard-menu-card {
  min-height: 128px !important;
  aspect-ratio: auto !important;
  border-radius: 22px !important;
}

.invoice-filter-rail {
  grid-template-columns: 48px minmax(108px, .42fr) minmax(176px, .62fr) minmax(138px, .50fr) minmax(150px, .66fr) minmax(112px, .38fr) 44px minmax(132px, .48fr) !important;
  gap: 7px !important;
  padding: 10px !important;
}

.invoice-filter-rail input,
.invoice-filter-rail select,
.invoice-filter-rail button:not(.invoice-filter-add-badge):not(.import-icon-button) {
  min-width: 0 !important;
  height: 36px !important;
  padding-inline: 10px !important;
  font-size: 13px;
}

.invoice-filter-rail .toolbar-search input::placeholder {
  font-size: 13px;
}

.invoice-filter-rail .toolbar-search,
.invoice-filter-rail .invoice-customer-filter {
  min-width: 0 !important;
}

.invoice-reset-compact {
  white-space: nowrap;
  max-width: 118px;
}

#invoices .panel {
  overflow-x: auto;
}

.invoice-detail-table {
  min-width: 1120px !important;
  width: 100% !important;
}

.invoice-detail-row td {
  padding: 12px 8px !important;
}

.invoice-detail-row b {
  font-size: 13px !important;
}

.invoice-detail-row small {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.invoice-amount-cell {
  width: 118px;
  min-width: 118px;
}

.invoice-customer-cell {
  width: 145px;
  min-width: 145px;
}

.invoice-status-cell {
  width: 112px !important;
  min-width: 112px !important;
}

.invoice-date-stack-cell {
  width: 150px !important;
  min-width: 150px !important;
}

.invoice-issued-cell {
  width: 132px !important;
  min-width: 132px !important;
}

.invoice-number-cell {
  width: 158px !important;
  min-width: 158px !important;
}

.invoice-details-cell {
  width: 190px !important;
  min-width: 190px !important;
}

.invoice-details-cell small:last-child {
  max-width: 172px !important;
}

.invoice-row-actions,
.invoice-action-col {
  width: 124px !important;
  min-width: 124px !important;
}

.line-row {
  grid-template-columns: minmax(180px, 1.16fr) minmax(180px, 1.22fr) 68px 100px 88px 92px 40px !important;
}

.invoice-product-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: center;
}

.line-add-product {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
}

.invoice-options-row {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(23,108,95,.12);
  border-radius: 14px;
  background: rgba(237,249,245,.72);
}

.invoice-description-field {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.invoice-description-field textarea {
  min-height: 92px;
  white-space: pre-wrap;
}

.central-actions-filter {
  display: flex !important;
  justify-content: flex-end;
  align-items: center !important;
  gap: 10px !important;
}

.central-actions-filter button,
.central-actions-filter .central-all-accounts-toggle {
  min-width: 132px;
}

.central-count-tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(118px, 1fr));
  gap: 8px !important;
  margin: 0 0 10px !important;
}

.central-count-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(20,184,166,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  color: #4a5f58;
  font-weight: 900;
}

.central-count-tabs button b {
  color: #00c1ea;
  font-size: 20px;
}

.central-count-tabs button.active {
  border-color: rgba(17,199,167,.44);
  background: linear-gradient(135deg, rgba(210,255,245,.96), rgba(255,255,255,.86));
  color: #082f2a;
  box-shadow: 0 12px 28px rgba(17,199,167,.16);
}

.central-tab-panel {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 440px;
  overflow: auto;
  padding-top: 8px;
}

.central-tab-table {
  width: 100%;
  min-width: 760px;
}

.central-detail-tables {
  display: none !important;
}

.invoice-inline-title {
  margin: 0 0 6mm;
  font-size: 20pt;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.invoice-lines-no-images th,
.invoice-lines-no-images td {
  padding-top: 1.25mm !important;
  padding-bottom: 1.25mm !important;
}

.invoice-lines-no-images .invoice-line-description-text {
  line-height: 1.22;
}

.invoice-description-print {
  margin-top: 5mm;
  padding: 4mm;
  border: 1px solid rgba(17,17,17,.10);
  border-radius: 3mm;
  background: rgba(245,249,248,.78);
  line-height: 1.45;
  white-space: normal;
}

.invoice-lines-block tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media print {
  .invoice-page {
    overflow: visible !important;
  }
  .invoice-page-content {
    padding-bottom: 18mm !important;
  }
}

@media (max-width: 1280px) and (min-width: 901px) {
  .invoice-filter-rail {
    grid-template-columns: 48px minmax(100px, .46fr) minmax(150px, .70fr) minmax(124px, .58fr) minmax(136px, .70fr) 112px 44px minmax(120px, .54fr) !important;
  }
}

@media (max-width: 900px) {
  .invoice-filter-rail {
    grid-template-columns: 44px repeat(2, minmax(0, 1fr)) !important;
    overflow-x: visible !important;
  }
  .line-row {
    grid-template-columns: 1fr !important;
  }
  .central-count-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* V2.207: dashboard task detail view, mobile-sticky dialog actions and wider invoice table columns. */
.dashboard-detail-dialog-shell {
  position: relative;
  max-height: min(88vh, 920px);
  overflow: auto;
}

.dashboard-detail-dialog-shell .dialog-head {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: -18px -18px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(15,118,110,.12);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
}

.dashboard-detail-dialog-shell .dialog-close {
  border-color: rgba(220,38,38,.24);
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 12px 28px rgba(185,28,28,.22);
}

.dashboard-detail-actions {
  position: sticky;
  right: 0;
  bottom: 0;
  z-index: 11;
  margin: 18px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid rgba(15,118,110,.12);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
}

.dashboard-detail-actions .success {
  border-color: rgba(16,185,129,.28);
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
}

.dashboard-detail-actions .primary {
  border-color: rgba(14,165,233,.28);
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
}

body.theme-dark:not(.pdf-body) .dashboard-detail-dialog-shell .dialog-head,
body.theme-dark:not(.pdf-body) .dashboard-detail-actions {
  border-color: rgba(111,255,224,.16);
  background: rgba(3,16,13,.86);
}

body.theme-dark:not(.pdf-body) .dashboard-detail-dialog-shell .dialog-close {
  background: linear-gradient(135deg, #ef4444, #991b1b) !important;
  color: #fff !important;
}

@media (max-width: 760px) {
  dialog:not(#invoiceDialog) {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  dialog:not(#invoiceDialog) .dialog {
    min-height: 100dvh;
    padding: 12px 12px 104px;
  }

  dialog:not(#invoiceDialog) .dialog-head {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -12px -12px 14px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
  }

  dialog:not(#invoiceDialog) .dialog-close {
    border-color: rgba(220,38,38,.24);
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
  }

  dialog:not(#invoiceDialog) .form-actions,
  dialog:not(#invoiceDialog) .dialog-actions,
  dialog:not(#invoiceDialog) .modal-actions,
  dialog:not(#invoiceDialog) .dashboard-detail-actions,
  dialog:not(#invoiceDialog) .stock-location-modal-actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 22;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 16px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 36px rgba(18,35,31,.18);
  }

  dialog:not(#invoiceDialog) .form-actions button,
  dialog:not(#invoiceDialog) .dialog-actions button,
  dialog:not(#invoiceDialog) .modal-actions button,
  dialog:not(#invoiceDialog) .dashboard-detail-actions button,
  dialog:not(#invoiceDialog) .stock-location-modal-actions button {
    width: 100%;
    min-height: 46px;
  }

  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .dialog-head,
  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .form-actions,
  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .dialog-actions,
  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .modal-actions,
  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .dashboard-detail-actions,
  body.theme-dark:not(.pdf-body) dialog:not(#invoiceDialog) .stock-location-modal-actions {
    border-color: rgba(111,255,224,.18);
    background: rgba(3,16,13,.9);
  }
}

/* V2.209 final overrides: keep these after older version blocks. */
.chrome-quick-nav.chrome-title-only {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}

.chrome-quick-nav.chrome-title-only .sticky-page-title {
  border: 1px solid rgba(20, 184, 166, .16) !important;
  background: rgba(255,255,255,.58) !important;
  box-shadow: 0 14px 30px rgba(18,35,31,.08) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

body.theme-dark:not(.pdf-body) .chrome-quick-nav.chrome-title-only .sticky-page-title {
  border-color: rgba(111,255,224,.18) !important;
  background: rgba(8,33,28,.58) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.24) !important;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 8px 13px !important;
  border: 1px solid rgba(20,184,166,.16) !important;
  border-radius: 16px !important;
  background: rgba(239,249,246,.72) !important;
  color: #102d28 !important;
  font-size: clamp(20px, 2vw, 32px) !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
}

#dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, .20), rgba(255,255,255,.72)) !important;
  color: #0f322b !important;
  border-color: rgba(20,184,166,.18) !important;
  box-shadow: 0 18px 44px rgba(14,116,94,.10) !important;
}

#dashboard .dashboard-net-card b {
  font-size: clamp(22px, 1.8vw, 31px) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  border-color: rgba(111,255,224,.18) !important;
  background: rgba(8,33,28,.72) !important;
  color: #f3fffb !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(16,185,129,.22), rgba(8,33,28,.82)) !important;
  color: #f3fffb !important;
  border-color: rgba(111,255,224,.18) !important;
}

#invoices .panel {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#invoices .invoice-detail-table {
  min-width: 1030px !important;
  table-layout: fixed !important;
}

#invoices .invoice-amount-cell {
  width: 105px !important;
  min-width: 105px !important;
}

#invoices .invoice-status-cell {
  width: 96px !important;
  min-width: 96px !important;
}

#invoices .invoice-customer-cell {
  width: 128px !important;
  min-width: 128px !important;
}

#invoices .invoice-date-stack-cell {
  width: 136px !important;
  min-width: 136px !important;
}

#invoices .invoice-issued-cell {
  width: 118px !important;
  min-width: 118px !important;
}

#invoices .invoice-number-cell {
  width: 138px !important;
  min-width: 138px !important;
}

#invoices .invoice-details-cell {
  width: 168px !important;
  min-width: 168px !important;
}

#invoices .invoice-row-actions,
#invoices .invoice-action-col {
  width: 108px !important;
  min-width: 108px !important;
}

#invoices .invoice-row-action-menu {
  min-width: 94px !important;
}

#invoices .invoice-row-action-menu summary {
  gap: 5px !important;
  padding-inline: 8px !important;
}

body[data-active-tab="navigation"] .dashboard-menu-card-copy,
.navigation-grid-rect-screen .dashboard-menu-card-copy,
#dashboard .dashboard-menu-card-copy {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.invoice-page,
#printArea .invoice-page,
body.pdf-body .invoice-page {
  overflow: visible !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  padding-bottom: 8mm !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: static !important;
  width: auto !important;
  margin-top: 8mm !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

.invoice-lines-block tr,
.invoice-print-totals,
.invoice-payment-history {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.payment-page {
  break-before: page !important;
  page-break-before: always !important;
}

/* V2.210 invoice pagination and Swiss Classic print preset. */
.invoice-page,
#printArea .invoice-page,
body.pdf-body .invoice-page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 297mm !important;
  height: auto !important;
  overflow: visible !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding-bottom: 4mm !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: static !important;
  margin-top: auto !important;
  padding-top: 4mm !important;
}

.invoice-continuation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8mm;
  padding-bottom: 3mm;
  border-bottom: 1px solid rgba(17,17,17,.18);
  color: #111;
  font-size: 9pt;
}

.invoice-continuation-head b {
  font-size: 12pt;
}

.invoice-layout-classic .invoice-page {
  padding: 18mm 20mm 14mm !important;
  font-family: Arial, Helvetica, sans-serif;
}

.invoice-layout-classic .invoice-head {
  min-height: 45mm;
  border-bottom: 0 !important;
  padding-bottom: 6mm !important;
}

.invoice-layout-classic .invoice-logo {
  max-width: 42mm;
  max-height: 25mm;
}

.invoice-layout-classic.invoice-logo-size-large .invoice-logo {
  max-width: 50mm;
  max-height: 31mm;
}

.invoice-layout-classic .invoice-head h2 {
  margin: 2mm 0 0;
  font-size: 14pt;
}

.invoice-layout-classic .invoice-head p,
.invoice-layout-classic .invoice-addresses p {
  margin: 1mm 0 0;
  line-height: 1.25;
  font-size: 8.3pt;
}

.invoice-layout-classic .invoice-meta {
  align-self: end;
}

.invoice-layout-classic .invoice-addresses {
  gap: 18mm;
  margin: 4mm 0 14mm;
  font-size: 8.8pt;
}

.invoice-layout-classic .invoice-inline-title {
  margin: 0 0 8mm;
  font-size: 21pt;
  font-weight: 500;
  letter-spacing: -.02em;
}

.invoice-layout-classic .invoice-lines-block table {
  table-layout: fixed;
}

.invoice-layout-classic .invoice-lines-block th,
.invoice-layout-classic .invoice-lines-block td,
.invoice-layout-classic .invoice-total td,
.invoice-layout-classic .invoice-total th {
  padding-top: 1.35mm !important;
  padding-bottom: 1.35mm !important;
  font-size: 8.1pt;
}

.invoice-layout-classic .invoice-lines-block thead th {
  border-bottom: 1.8px solid #bbb;
  background: #efefef;
  text-transform: none;
}

.invoice-layout-classic .invoice-lines-block tbody tr:nth-child(even) {
  background: rgba(0,0,0,.025);
}

.invoice-layout-classic .invoice-line-description-text {
  line-height: 1.16;
}

.invoice-layout-classic .invoice-line-description-text small {
  margin-top: 1px;
  font-size: 6.6pt;
}

.invoice-layout-classic .invoice-print-totals {
  margin-top: 8mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.invoice-layout-classic .invoice-total {
  width: 74mm;
}

.invoice-layout-classic .invoice-lines-block tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.invoice-layout-classic .invoice-description-print,
.invoice-layout-classic .invoice-payment-history {
  font-size: 8.2pt;
  padding: 3mm;
}

.invoice-layout-classic .invoice-page-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5mm;
  border-top: 1px solid #bbb;
  color: #333;
  font-size: 6.4pt;
  line-height: 1.2;
}

/* V2.210 overview customizer and light-mode net-profit readability. */
.dashboard-command-center {
  position: relative;
}

.dashboard-config-pencil {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  color: #0f3b35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(15, 35, 31, .12);
  z-index: 3;
}

.dashboard-config-modern .panel-head {
  align-items: center;
  gap: 14px;
}

.dashboard-config-modern .panel-head .actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.dashboard-config-modern h4 {
  margin: 18px 0 10px;
  color: #0f2f29;
}

.dashboard-section-config-grid .dashboard-section-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section-move {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
}

.dashboard-section-move button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 10px;
}

.dashboard-section-frame {
  min-width: 0;
}

.dashboard-layout-edit-mode .dashboard-section-frame {
  position: relative;
  outline: 1px dashed rgba(15, 188, 178, .5);
  outline-offset: 7px;
  border-radius: 28px;
}

.dashboard-layout-edit-mode .dashboard-section-frame.is-editing {
  cursor: grab;
}

.dashboard-section-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(15, 188, 178, .35);
  background: rgba(255, 255, 255, .92);
  color: #0f766e;
  box-shadow: 0 10px 26px rgba(15, 35, 31, .14);
}

body:not(.theme-dark):not(.pdf-body) #dashboard .dashboard-net-card,
body:not(.theme-dark):not(.pdf-body) #dashboard .dashboard-net-card span,
body:not(.theme-dark):not(.pdf-body) #dashboard .dashboard-net-card b,
body:not(.theme-dark):not(.pdf-body) #dashboard .dashboard-net-card em {
  color: #0b2f29 !important;
}

body:not(.theme-dark):not(.pdf-body) #dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(203, 250, 244, .58)) !important;
  border: 1px solid rgba(15, 118, 110, .18) !important;
}

body.theme-dark:not(.pdf-body) .dashboard-config-pencil,
body.theme-dark:not(.pdf-body) .dashboard-section-handle {
  background: rgba(10, 39, 34, .95);
  color: #dffcf4;
  border-color: rgba(125, 245, 218, .32);
}

body.theme-dark:not(.pdf-body) .dashboard-config-modern h4 {
  color: #eefcf8;
}

@media (max-width: 720px) {
  .dashboard-config-pencil {
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
  }
}

/* V2.211: overview pie visibility, central tab actions and safer invoice print footer. */
#dashboard .dashboard-command-copy h2 {
  font-size: clamp(28px, 3.2vw, 46px) !important;
}

#dashboard .dashboard-insight-side,
#dashboard .dashboard-insight-card {
  overflow: visible !important;
}

#dashboard .dashboard-insight-card {
  min-height: 330px !important;
  display: flex !important;
  flex-direction: column !important;
}

#dashboard .dashboard-pie-wrap-svg,
#dashboard .dashboard-overview-sidebar .dashboard-pie-wrap-svg {
  flex: 1 1 auto !important;
  min-height: 270px !important;
  height: auto !important;
  grid-template-rows: minmax(190px, 1fr) auto !important;
  overflow: visible !important;
  transform: none !important;
  margin: 0 !important;
}

#dashboard .dashboard-pie-svg-box,
#dashboard .dashboard-overview-sidebar .dashboard-pie-svg-box {
  min-height: 205px !important;
  overflow: visible !important;
}

#dashboard .dashboard-pie-svg,
#dashboard .dashboard-overview-sidebar .dashboard-pie-svg {
  width: min(100%, 220px) !important;
  height: auto !important;
  max-height: none !important;
  display: block !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-insight-card {
  height: auto !important;
  min-height: 360px !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-insight-tabs {
  flex: 0 0 auto !important;
  position: relative;
  z-index: 2;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-wrap-svg {
  align-items: center !important;
  justify-content: flex-start !important;
  padding-top: 16px !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-svg-box {
  flex: 0 0 220px !important;
  width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-svg {
  width: 210px !important;
  height: 210px !important;
  min-height: 210px !important;
}

.central-tab-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 118, 110, .12);
}

.central-tab-panel-actions button {
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(14, 165, 233, .16);
}

.invoice-page,
#printArea .invoice-page,
body.pdf-body .invoice-page {
  position: relative !important;
  min-height: 297mm !important;
  padding-bottom: 24mm !important;
  box-sizing: border-box !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  flex: 0 0 auto !important;
  padding-bottom: 0 !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: absolute !important;
  left: 18mm !important;
  right: 18mm !important;
  bottom: 8mm !important;
  margin: 0 !important;
  padding-top: 3mm !important;
}

.invoice-page-footer-payment,
#printArea .invoice-page-footer-payment,
body.pdf-body .invoice-page-footer-payment {
  position: static !important;
  margin: 0 0 8mm !important;
  padding-top: 0 !important;
}

.invoice-line-discount-print {
  display: block;
  margin-top: 1px;
  color: #6f7f78;
  font-size: 6.4pt;
  font-weight: 600;
}

.invoice-layout-classic .invoice-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(58mm, 76mm) !important;
  gap: 8mm 14mm !important;
  align-items: start !important;
  min-height: 56mm !important;
}

.invoice-layout-classic .invoice-brand {
  grid-column: 2 !important;
  justify-self: end !important;
  text-align: right !important;
}

.invoice-layout-classic .invoice-meta {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  align-self: start !important;
  margin-top: 2mm !important;
  text-align: right !important;
}

.invoice-layout-classic .invoice-addresses {
  display: block !important;
  width: min(82mm, 52%) !important;
  margin: 2mm 0 16mm !important;
}

.invoice-layout-classic .invoice-addresses > div {
  width: 100%;
}

body.theme-dark:not(.pdf-body) .central-tab-panel-actions {
  border-color: rgba(125, 245, 218, .18);
}

/* V2.212: print footer anchoring, Swiss Classic header meta and compact interactive pie. */
#dashboard .dashboard-overview-sidebar .dashboard-insight-card {
  min-height: 292px !important;
  height: auto !important;
  overflow: hidden !important;
  padding: 10px !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-insight-tabs {
  min-height: 38px !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-insight-tabs button.active {
  transform: translateY(5px) !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-wrap-svg {
  min-height: 0 !important;
  grid-template-rows: 166px auto !important;
  gap: 5px !important;
  padding: 11px 10px 8px !important;
  overflow: hidden !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-svg-box {
  flex: 0 0 166px !important;
  height: 166px !important;
  min-height: 166px !important;
  overflow: visible !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-svg {
  width: 164px !important;
  height: 164px !important;
  min-height: 0 !important;
}

#dashboard .dashboard-overview-sidebar .dashboard-pie-wrap-svg .dashboard-pie-legend {
  max-height: 50px !important;
  overflow: hidden !important;
  gap: 4px 7px !important;
}

#dashboard .dashboard-pie-slice {
  cursor: pointer;
}

#dashboard .dashboard-pie-slice.selected path {
  transform: scale(1.045);
  filter: drop-shadow(0 10px 12px rgba(16,40,35,.18));
}

.invoice-content-page,
#printArea .invoice-content-page,
body.pdf-body .invoice-content-page {
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  break-after: page !important;
  page-break-after: always !important;
}

.invoice-page,
#printArea .invoice-page,
body.pdf-body .invoice-page {
  position: relative !important;
  min-height: 297mm !important;
  box-sizing: border-box !important;
  padding-bottom: 26mm !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  max-height: calc(297mm - 44mm) !important;
  overflow: visible !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: absolute !important;
  left: 18mm !important;
  right: 18mm !important;
  bottom: 8mm !important;
  margin: 0 !important;
  padding-top: 3mm !important;
  z-index: 3 !important;
}

.invoice-page-footer-payment,
#printArea .invoice-page-footer-payment,
body.pdf-body .invoice-page-footer-payment {
  position: static !important;
  margin: 0 0 8mm !important;
}

.invoice-layout-classic .invoice-head {
  grid-template-columns: minmax(56mm, 1fr) minmax(58mm, 76mm) !important;
  min-height: 46mm !important;
  gap: 5mm 14mm !important;
}

.invoice-layout-classic .invoice-brand {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  justify-self: end !important;
  text-align: right !important;
}

.invoice-layout-classic .invoice-meta {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: start !important;
  margin-top: 0 !important;
  text-align: left !important;
}

.invoice-layout-classic .invoice-meta p {
  margin-top: 0 !important;
  line-height: 1.28 !important;
}

.invoice-layout-classic .invoice-addresses {
  margin: 0 0 13mm !important;
}

@media print {
  .invoice-content-page,
  #printArea .invoice-content-page,
  body.pdf-body .invoice-content-page {
    height: 297mm !important;
    max-height: 297mm !important;
    overflow: hidden !important;
  }
}

/* V2.213: keep overview edit action separated from the Business Cockpit label. */
#dashboard .dashboard-command-copy {
  padding-right: 58px !important;
}

#dashboard .dashboard-config-pencil {
  top: 18px !important;
  right: 18px !important;
  transform: none !important;
}

#dashboard .dashboard-command-copy .dashboard-eyebrow {
  margin-right: 0 !important;
}

@media (max-width: 720px) {
  #dashboard .dashboard-command-copy {
    padding-right: 48px !important;
  }

  #dashboard .dashboard-config-pencil {
    top: 14px !important;
    right: 14px !important;
  }
}

/* V2.214: keep navigation titles readable while the large preview icons live on the right side. */
.navigation-grid-screen .dashboard-menu-card,
.dashboard-menu-card-section-overview .dashboard-menu-card {
  grid-template-columns: minmax(0, 56%) minmax(96px, 44%) !important;
  align-items: center !important;
  align-content: center !important;
  justify-items: stretch !important;
}

.navigation-grid-screen .dashboard-menu-card-copy,
.dashboard-menu-card-section-overview .dashboard-menu-card-copy {
  position: relative !important;
  z-index: 2 !important;
  grid-column: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.navigation-grid-screen .dashboard-menu-card-preview,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon {
  inset: 8px 8px 8px auto !important;
  left: auto !important;
  width: min(45%, 150px) !important;
  min-width: 96px !important;
  z-index: 1 !important;
  opacity: .92 !important;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .14), #000 22%, #000 100%) !important;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .14), #000 22%, #000 100%) !important;
}

.navigation-grid-screen .dashboard-menu-card-preview::before,
.navigation-grid-screen .dashboard-menu-card-preview::after,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::before,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::after {
  transform-origin: center !important;
}

.navigation-grid-screen .dashboard-menu-card-preview::after,
.dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon::after {
  right: -18px !important;
  bottom: -22px !important;
  width: 104px !important;
  height: 104px !important;
}

@media (max-width: 720px) {
  .navigation-grid-screen .dashboard-menu-card,
  .dashboard-menu-card-section-overview .dashboard-menu-card {
    grid-template-columns: minmax(0, 52%) minmax(100px, 48%) !important;
    min-height: 112px !important;
  }

  .navigation-grid-screen .dashboard-menu-card-preview,
  .dashboard-menu-card-section-overview .dashboard-menu-card-preview.dashboard-preview-icon {
    inset: 7px 7px 7px auto !important;
    width: 48% !important;
    min-width: 104px !important;
  }

  .navigation-grid-screen .dashboard-menu-card-copy strong,
  .dashboard-menu-card-section-overview .dashboard-menu-card-copy strong {
    font-size: clamp(17px, 5.2vw, 22px) !important;
  }

  .navigation-grid-screen .dashboard-menu-card-copy small,
  .dashboard-menu-card-section-overview .dashboard-menu-card-copy small {
    font-size: clamp(10px, 3.1vw, 12px) !important;
  }
}

/* V2.215: invoice print safe area and stable footer flow for all presets. */
.invoice-document,
#printArea .invoice-document,
body.pdf-body .invoice-document {
  background: #fff !important;
  color: #111 !important;
}

.invoice-content-page,
#printArea .invoice-content-page,
body.pdf-body .invoice-content-page {
  --print-safe-top: 8mm;
  --print-safe-x: 15mm;
  --print-safe-bottom: 24mm;
  width: 210mm !important;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm !important;
  padding: var(--print-safe-top) var(--print-safe-x) var(--print-safe-bottom) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: #fff !important;
  color: #111 !important;
}

.invoice-page-content,
#printArea .invoice-page-content,
body.pdf-body .invoice-page-content {
  max-height: calc(297mm - var(--print-safe-top) - var(--print-safe-bottom)) !important;
  padding: 0 !important;
  overflow: visible !important;
  color: #111 !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  position: absolute !important;
  left: var(--print-safe-x) !important;
  right: var(--print-safe-x) !important;
  bottom: 7mm !important;
  min-height: 9mm !important;
  margin: 0 !important;
  padding-top: 2mm !important;
  border-top: 1px solid rgba(17, 17, 17, .28) !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 5.4pt !important;
  line-height: 1.18 !important;
  z-index: 8 !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment) span,
#printArea .invoice-page-footer:not(.invoice-page-footer-payment) span,
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) span {
  color: #111 !important;
  overflow-wrap: anywhere;
}

.payment-page .invoice-page-footer,
#printArea .payment-page .invoice-page-footer,
body.pdf-body .payment-page .invoice-page-footer {
  display: none !important;
}

.invoice-head,
#printArea .invoice-head,
body.pdf-body .invoice-head {
  display: grid !important;
  grid-template-columns: minmax(58mm, 1fr) minmax(54mm, 74mm) !important;
  align-items: start !important;
  gap: 5mm 12mm !important;
  min-height: 34mm !important;
  margin: 0 0 5mm !important;
  padding: 0 0 4mm !important;
  border-bottom: 0 !important;
  background: transparent !important;
  color: #111 !important;
}

.invoice-brand,
#printArea .invoice-brand,
body.pdf-body .invoice-brand {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  justify-self: end !important;
  align-self: start !important;
  text-align: right !important;
  background: transparent !important;
  color: #111 !important;
}

.invoice-meta,
#printArea .invoice-meta,
body.pdf-body .invoice-meta {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: start !important;
  max-width: 70mm !important;
  margin: 0 !important;
  text-align: left !important;
  background: transparent !important;
  color: #111 !important;
  font-size: 7.3pt !important;
  line-height: 1.22 !important;
}

.invoice-logo,
#printArea .invoice-logo,
body.pdf-body .invoice-logo {
  max-width: 45mm !important;
  max-height: 24mm !important;
  object-fit: contain !important;
}

.invoice-logo-size-large .invoice-logo,
#printArea .invoice-logo-size-large .invoice-logo,
body.pdf-body .invoice-logo-size-large .invoice-logo {
  max-width: 54mm !important;
  max-height: 29mm !important;
}

.invoice-head h1,
.invoice-head h2,
.invoice-head p,
.invoice-print-module,
.invoice-print-module p,
.invoice-print-module td,
.invoice-print-module th,
.invoice-print-module b,
.invoice-print-module strong,
.invoice-print-module span,
#printArea .invoice-head h1,
#printArea .invoice-head h2,
#printArea .invoice-head p,
#printArea .invoice-print-module,
#printArea .invoice-print-module p,
#printArea .invoice-print-module td,
#printArea .invoice-print-module th,
#printArea .invoice-print-module b,
#printArea .invoice-print-module strong,
#printArea .invoice-print-module span,
body.pdf-body .invoice-head h1,
body.pdf-body .invoice-head h2,
body.pdf-body .invoice-head p,
body.pdf-body .invoice-print-module,
body.pdf-body .invoice-print-module p,
body.pdf-body .invoice-print-module td,
body.pdf-body .invoice-print-module th,
body.pdf-body .invoice-print-module b,
body.pdf-body .invoice-print-module strong,
body.pdf-body .invoice-print-module span {
  color: #111 !important;
}

.invoice-print-module.module-tone-soft,
.invoice-print-module.module-tone-filled,
.invoice-print-module.module-tone-dark,
.invoice-head.module-tone-soft,
.invoice-head.module-tone-filled,
.invoice-head.module-tone-dark,
#printArea .invoice-print-module.module-tone-soft,
#printArea .invoice-print-module.module-tone-filled,
#printArea .invoice-print-module.module-tone-dark,
#printArea .invoice-head.module-tone-soft,
#printArea .invoice-head.module-tone-filled,
#printArea .invoice-head.module-tone-dark,
body.pdf-body .invoice-print-module.module-tone-soft,
body.pdf-body .invoice-print-module.module-tone-filled,
body.pdf-body .invoice-print-module.module-tone-dark,
body.pdf-body .invoice-head.module-tone-soft,
body.pdf-body .invoice-head.module-tone-filled,
body.pdf-body .invoice-head.module-tone-dark {
  background: transparent !important;
  border-radius: 0 !important;
}

.invoice-addresses,
#printArea .invoice-addresses,
body.pdf-body .invoice-addresses {
  display: block !important;
  width: min(86mm, 52%) !important;
  margin: 0 0 6mm !important;
  font-size: 7.4pt !important;
  line-height: 1.22 !important;
}

.invoice-addresses b,
#printArea .invoice-addresses b,
body.pdf-body .invoice-addresses b {
  font-size: 8.1pt !important;
}

.invoice-inline-title,
#printArea .invoice-inline-title,
body.pdf-body .invoice-inline-title {
  margin: 0 0 3mm !important;
  font-size: 15pt !important;
  line-height: 1.08 !important;
  font-weight: 700 !important;
}

.invoice-description-before-lines,
#printArea .invoice-description-before-lines,
body.pdf-body .invoice-description-before-lines {
  margin: 0 0 4mm !important;
  padding: 3mm !important;
  border: 1px solid rgba(17, 17, 17, .12) !important;
  border-radius: 2mm !important;
  background: #f7faf9 !important;
  color: #111 !important;
  font-size: 7pt !important;
  line-height: 1.25 !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.invoice-lines-block,
#printArea .invoice-lines-block,
body.pdf-body .invoice-lines-block {
  margin: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.invoice-lines-block table,
#printArea .invoice-lines-block table,
body.pdf-body .invoice-lines-block table {
  table-layout: fixed !important;
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 6.8pt !important;
  line-height: 1.16 !important;
}

.invoice-lines-block th,
.invoice-lines-block td,
#printArea .invoice-lines-block th,
#printArea .invoice-lines-block td,
body.pdf-body .invoice-lines-block th,
body.pdf-body .invoice-lines-block td {
  padding: .75mm 1.15mm !important;
  border-bottom: 1px solid rgba(17, 17, 17, .13) !important;
  font-size: 6.8pt !important;
  line-height: 1.14 !important;
  vertical-align: top !important;
}

.invoice-lines-block thead th,
#printArea .invoice-lines-block thead th,
body.pdf-body .invoice-lines-block thead th {
  padding-top: .9mm !important;
  padding-bottom: .9mm !important;
  background: #edf3f1 !important;
  color: #111 !important;
  font-size: 5.9pt !important;
  letter-spacing: .02em !important;
}

.invoice-lines-block th.right,
.invoice-lines-block td.right,
#printArea .invoice-lines-block th.right,
#printArea .invoice-lines-block td.right,
body.pdf-body .invoice-lines-block th.right,
body.pdf-body .invoice-lines-block td.right {
  width: 18mm !important;
  white-space: nowrap !important;
}

.invoice-lines-block .invoice-image-col,
.invoice-lines-block .invoice-image-cell,
#printArea .invoice-lines-block .invoice-image-col,
#printArea .invoice-lines-block .invoice-image-cell,
body.pdf-body .invoice-lines-block .invoice-image-col,
body.pdf-body .invoice-lines-block .invoice-image-cell {
  width: 13mm !important;
  max-width: 13mm !important;
}

.invoice-line-thumb,
.invoice-line-image-thumb,
.invoice-line-image-placeholder,
#printArea .invoice-line-thumb,
#printArea .invoice-line-image-thumb,
#printArea .invoice-line-image-placeholder,
body.pdf-body .invoice-line-thumb,
body.pdf-body .invoice-line-image-thumb,
body.pdf-body .invoice-line-image-placeholder {
  width: 50px !important;
  height: 50px !important;
}

.invoice-lines-no-images tbody td,
#printArea .invoice-lines-no-images tbody td,
body.pdf-body .invoice-lines-no-images tbody td {
  padding-top: .55mm !important;
  padding-bottom: .55mm !important;
}

.invoice-line-description-text,
#printArea .invoice-line-description-text,
body.pdf-body .invoice-line-description-text {
  line-height: 1.1 !important;
}

.invoice-line-description-text small,
.invoice-line-discount-print,
#printArea .invoice-line-description-text small,
#printArea .invoice-line-discount-print,
body.pdf-body .invoice-line-description-text small,
body.pdf-body .invoice-line-discount-print {
  margin-top: .25mm !important;
  font-size: 5.6pt !important;
  line-height: 1.05 !important;
  color: #53625e !important;
}

.invoice-print-totals,
#printArea .invoice-print-totals,
body.pdf-body .invoice-print-totals {
  margin-top: 3mm !important;
  display: flex !important;
  justify-content: flex-end !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.invoice-total,
#printArea .invoice-total,
body.pdf-body .invoice-total {
  width: 70mm !important;
  flex: 0 0 70mm !important;
  font-size: 6.8pt !important;
}

.invoice-total td,
.invoice-total th,
#printArea .invoice-total td,
#printArea .invoice-total th,
body.pdf-body .invoice-total td,
body.pdf-body .invoice-total th {
  padding: .9mm 1mm !important;
  font-size: 6.8pt !important;
  line-height: 1.12 !important;
}

.invoice-note-print,
#printArea .invoice-note-print,
body.pdf-body .invoice-note-print {
  margin-top: 30px !important;
  padding: 3mm !important;
  border: 1px solid rgba(17, 17, 17, .13) !important;
  border-radius: 2mm !important;
  background: #f7faf9 !important;
  color: #111 !important;
  font-size: 7pt !important;
  line-height: 1.25 !important;
  white-space: pre-wrap !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

@media print {
  #printArea .invoice-content-page,
  body.pdf-body .invoice-content-page {
    break-after: page !important;
    page-break-after: always !important;
  }

  #printArea .invoice-document > .invoice-content-page:last-of-type,
  body.pdf-body .invoice-document > .invoice-content-page:last-of-type {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  #printArea .invoice-document > .invoice-content-page:has(+ .payment-page),
  body.pdf-body .invoice-document > .invoice-content-page:has(+ .payment-page) {
    break-after: page !important;
    page-break-after: always !important;
  }
}

/* V2.216: harmonised print template geometry across all invoice presets. */
.invoice-content-page,
#printArea .invoice-content-page,
body.pdf-body .invoice-content-page {
  --print-safe-top: 7mm;
  --print-safe-x: 14mm;
  --print-safe-bottom: 23mm;
  padding: var(--print-safe-top) var(--print-safe-x) var(--print-safe-bottom) !important;
}

.invoice-head,
#printArea .invoice-head,
body.pdf-body .invoice-head {
  grid-template-columns: minmax(66mm, 1fr) minmax(48mm, 70mm) !important;
  min-height: 32mm !important;
  margin: 0 0 4.5mm !important;
  padding: 0 0 3mm !important;
}

.invoice-meta,
#printArea .invoice-meta,
body.pdf-body .invoice-meta {
  grid-column: 1 !important;
  grid-row: 1 !important;
  max-width: 74mm !important;
  padding-left: 0 !important;
  border-left-width: 1.1mm !important;
  font-size: 7.8pt !important;
  line-height: 1.22 !important;
  text-align: left !important;
}

.invoice-brand,
#printArea .invoice-brand,
body.pdf-body .invoice-brand {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  max-width: 70mm !important;
  font-size: 7.4pt !important;
  line-height: 1.18 !important;
  text-align: right !important;
}

.invoice-brand h2,
#printArea .invoice-brand h2,
body.pdf-body .invoice-brand h2 {
  margin: 1mm 0 .8mm !important;
  font-size: 11pt !important;
  line-height: 1.04 !important;
}

.invoice-brand p,
#printArea .invoice-brand p,
body.pdf-body .invoice-brand p {
  margin: 0 !important;
  font-size: 7.4pt !important;
  line-height: 1.18 !important;
}

.invoice-logo,
#printArea .invoice-logo,
body.pdf-body .invoice-logo {
  max-width: 42mm !important;
  max-height: 22mm !important;
}

.invoice-logo-size-large .invoice-logo,
#printArea .invoice-logo-size-large .invoice-logo,
body.pdf-body .invoice-logo-size-large .invoice-logo {
  max-width: 48mm !important;
  max-height: 25mm !important;
}

.invoice-addresses,
#printArea .invoice-addresses,
body.pdf-body .invoice-addresses {
  justify-self: start !important;
  width: 82mm !important;
  max-width: 82mm !important;
  margin: 0 0 6mm !important;
  padding: 0 !important;
  text-align: left !important;
}

.invoice-addresses,
.invoice-addresses *,
#printArea .invoice-addresses,
#printArea .invoice-addresses *,
body.pdf-body .invoice-addresses,
body.pdf-body .invoice-addresses * {
  text-align: left !important;
}

.invoice-inline-title,
#printArea .invoice-inline-title,
body.pdf-body .invoice-inline-title {
  margin: 0 0 2.4mm !important;
  font-size: 15.5pt !important;
}

.invoice-description-before-lines,
#printArea .invoice-description-before-lines,
body.pdf-body .invoice-description-before-lines {
  margin: 0 0 3mm !important;
  padding: 2.4mm 3mm !important;
  max-height: 24mm !important;
  overflow: hidden !important;
}

.invoice-lines-block table,
#printArea .invoice-lines-block table,
body.pdf-body .invoice-lines-block table {
  font-size: 6.55pt !important;
}

.invoice-lines-block th,
.invoice-lines-block td,
#printArea .invoice-lines-block th,
#printArea .invoice-lines-block td,
body.pdf-body .invoice-lines-block th,
body.pdf-body .invoice-lines-block td {
  padding: .52mm .9mm !important;
  font-size: 6.55pt !important;
}

.invoice-lines-block thead th,
#printArea .invoice-lines-block thead th,
body.pdf-body .invoice-lines-block thead th {
  font-size: 5.7pt !important;
}

.invoice-print-totals,
#printArea .invoice-print-totals,
body.pdf-body .invoice-print-totals {
  margin-top: 1.8mm !important;
}

.invoice-total,
#printArea .invoice-total,
body.pdf-body .invoice-total {
  width: 66mm !important;
  flex-basis: 66mm !important;
}

.invoice-total td,
.invoice-total th,
#printArea .invoice-total td,
#printArea .invoice-total th,
body.pdf-body .invoice-total td,
body.pdf-body .invoice-total th {
  padding: .72mm .9mm !important;
  font-size: 6.55pt !important;
}

.invoice-note-print,
#printArea .invoice-note-print,
body.pdf-body .invoice-note-print {
  margin: 30px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111 !important;
  font-size: 8pt !important;
  line-height: 1.38 !important;
}

.invoice-print-footer-text,
.invoice-print-footer-text p,
#printArea .invoice-print-footer-text,
#printArea .invoice-print-footer-text p,
body.pdf-body .invoice-print-footer-text,
body.pdf-body .invoice-print-footer-text p {
  margin-top: 5mm !important;
  color: #111 !important;
  font-size: 8pt !important;
  line-height: 1.32 !important;
  background: transparent !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  bottom: 6.5mm !important;
  min-height: 10mm !important;
  display: grid !important;
  grid-template-columns: 1.2fr 1.05fr 1.25fr .55fr !important;
  align-items: start !important;
  gap: 4mm !important;
  font-size: 5.25pt !important;
  line-height: 1.16 !important;
}

.payment-page {
  display: block !important;
}

.payment-page-header {
  position: absolute;
  top: 12mm;
  left: 14mm;
  right: 14mm;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(42mm, 64mm);
  gap: 10mm;
  color: #111;
  font-size: 7.4pt;
  line-height: 1.2;
}

.payment-page-brand,
.payment-page-meta {
  display: grid;
  gap: 1mm;
  align-content: start;
}

.payment-page-meta {
  text-align: right;
}

.payment-page-header .invoice-logo {
  max-width: 36mm !important;
  max-height: 18mm !important;
  margin-bottom: 2mm;
}

.payment-page-header b {
  font-size: 10pt;
}

.payment-part.swiss-qr-slip {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* V2.217: overview finance cards inspired by compact ERP stat tiles with subtle chart backplates. */
#dashboard .dashboard-hero-main {
  gap: 12px !important;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  padding: 7px 11px !important;
  font-size: clamp(16px, 1.35vw, 24px) !important;
  letter-spacing: -.03em !important;
}

#dashboard .dashboard-modern-metrics {
  gap: 12px !important;
}

#dashboard .dashboard-modern-metric {
  isolation: isolate;
  min-height: 118px !important;
  padding: 14px 15px 42px !important;
  border-color: color-mix(in srgb, var(--metric-color, #14b8a6) 24%, rgba(16,40,35,.10)) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(248,252,250,.76)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 18px 42px rgba(16,40,35,.08) !important;
}

#dashboard .dashboard-modern-metric::before {
  z-index: 1;
  width: 4px !important;
}

#dashboard .dashboard-modern-metric::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 16px;
  bottom: 11px;
  height: 34px;
  z-index: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--metric-color, #14b8a6) 24%, transparent);
  background:
    linear-gradient(to top, color-mix(in srgb, var(--metric-color, #14b8a6) 14%, transparent), transparent 74%),
    linear-gradient(90deg, transparent 0 14%, color-mix(in srgb, var(--metric-color, #14b8a6) 34%, transparent) 14% 15%, transparent 15% 34%, color-mix(in srgb, var(--metric-color, #14b8a6) 38%, transparent) 34% 35%, transparent 35% 57%, color-mix(in srgb, var(--metric-color, #14b8a6) 42%, transparent) 57% 58%, transparent 58% 82%, color-mix(in srgb, var(--metric-color, #14b8a6) 46%, transparent) 82% 83%, transparent 83% 100%);
  clip-path: polygon(0 78%, 13% 68%, 27% 72%, 41% 48%, 55% 55%, 69% 34%, 84% 39%, 100% 18%, 100% 100%, 0 100%);
  opacity: .92;
  pointer-events: none;
}

#dashboard .dashboard-modern-metric > span,
#dashboard .dashboard-modern-metric > b,
#dashboard .dashboard-modern-metric > small,
#dashboard .dashboard-modern-metric > em {
  position: relative;
  z-index: 2;
}

#dashboard .dashboard-modern-metric span {
  font-size: 11px !important;
  letter-spacing: .055em !important;
}

#dashboard .dashboard-modern-metric b,
#dashboard .dashboard-net-card b {
  font-size: clamp(17px, 1.28vw, 23px) !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
  white-space: nowrap !important;
}

#dashboard .dashboard-modern-metric small {
  max-width: 100%;
  font-size: 11px !important;
  line-height: 1.28 !important;
}

#dashboard .dashboard-modern-metric em {
  margin-top: 1px !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}

#dashboard .dashboard-net-card {
  min-height: 72px !important;
  padding: 12px 14px 34px !important;
}

#dashboard .dashboard-net-card::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 18px;
  bottom: 11px;
  height: 28px;
  border-bottom: 1px solid rgba(15,118,110,.18);
  background: linear-gradient(to top, rgba(20,184,166,.14), transparent 76%);
  clip-path: polygon(0 72%, 18% 58%, 34% 62%, 49% 44%, 65% 51%, 82% 28%, 100% 18%, 100% 100%, 0 100%);
  opacity: .75;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric {
  background:
    linear-gradient(145deg, rgba(10,43,37,.90), rgba(5,23,20,.76)) !important;
  border-color: color-mix(in srgb, var(--metric-color, #14b8a6) 36%, rgba(147,255,229,.12)) !important;
  box-shadow: inset 0 1px 0 rgba(145,255,231,.08), 0 20px 46px rgba(0,0,0,.22) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric::after {
  opacity: .72;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric em {
  color: rgba(218,255,246,.72) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-modern-metric b {
  color: #f5fffb !important;
}

@media (max-width: 920px) {
  #dashboard .dashboard-modern-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* V2.218: mobile overview bottom stats, data-driven stat-card sparklines and cleaner invoice list rows. */
.dashboard-mobile-title-reset {
  display: none;
}

#dashboard .dashboard-modern-metric::after,
#dashboard .dashboard-net-card::before {
  display: none !important;
}

#dashboard .dashboard-metric-sparkline {
  position: absolute;
  left: 20px;
  right: 14px;
  bottom: 10px;
  z-index: 1;
  width: calc(100% - 34px);
  height: 35px;
  overflow: visible;
  pointer-events: none;
}

#dashboard .dashboard-metric-sparkline polygon {
  fill: color-mix(in srgb, var(--spark-color, #14b8a6) 16%, transparent);
}

#dashboard .dashboard-metric-sparkline polyline {
  fill: none;
  stroke: var(--spark-color, #14b8a6);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 8px color-mix(in srgb, var(--spark-color, #14b8a6) 20%, transparent));
}

#dashboard .dashboard-metric-sparkline circle {
  fill: var(--spark-color, #14b8a6);
  stroke: rgba(255,255,255,.9);
  stroke-width: 2;
}

#dashboard .dashboard-net-card .dashboard-metric-sparkline {
  left: 16px;
  right: 16px;
  bottom: 8px;
  width: calc(100% - 32px);
  height: 28px;
  opacity: .72;
}

#invoices .invoice-detail-table {
  min-width: 960px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#invoices .invoice-detail-row:nth-child(odd) {
  background: rgba(247, 252, 250, .84) !important;
}

#invoices .invoice-detail-row:nth-child(even) {
  background: rgba(232, 246, 241, .58) !important;
}

#invoices .invoice-detail-row:hover {
  background: rgba(207, 250, 238, .78) !important;
}

#invoices .invoice-detail-row td {
  border-bottom: 1px solid rgba(16, 40, 35, .075) !important;
}

#invoices .invoice-amount-cell,
#invoices .invoice-detail-table th.right:first-of-type {
  width: 88px !important;
  min-width: 88px !important;
  text-align: left !important;
}

#invoices .invoice-amount-cell b {
  font-size: 13px !important;
  white-space: normal !important;
}

#invoices .invoice-amount-cell small {
  font-size: 10px !important;
  line-height: 1.18 !important;
}

#invoices .invoice-status-cell {
  width: 78px !important;
  min-width: 78px !important;
}

#invoices .invoice-status-cell .status-badge {
  max-width: 100%;
  padding-inline: 9px !important;
  font-size: 10.5px !important;
}

body.theme-dark:not(.pdf-body) #invoices .invoice-detail-row:nth-child(odd) {
  background: rgba(4, 24, 20, .88) !important;
}

body.theme-dark:not(.pdf-body) #invoices .invoice-detail-row:nth-child(even) {
  background: rgba(8, 42, 35, .78) !important;
}

body.theme-dark:not(.pdf-body) #invoices .invoice-detail-row:hover {
  background: rgba(16, 80, 67, .78) !important;
}

body.theme-dark:not(.pdf-body) #invoices .invoice-detail-row td {
  border-bottom-color: rgba(151, 255, 230, .10) !important;
}

@media (max-width: 900px) {
  #dashboard .dashboard-command-copy {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
  }

  #dashboard .dashboard-command-copy .dashboard-eyebrow {
    grid-column: 1 !important;
    margin: 0 !important;
  }

  #dashboard .dashboard-command-title-line {
    display: none !important;
  }

  #dashboard .dashboard-mobile-title-reset {
    grid-column: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(15, 188, 178, .28) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(236, 253, 245, .96), rgba(255,255,255,.88)) !important;
    color: #0d3b34 !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    box-shadow: 0 10px 20px rgba(16,40,35,.08) !important;
  }

  #dashboard .dashboard-mobile-filter-row-actions {
    display: none !important;
  }

  #dashboard .dashboard-mobile-hero-stats {
    order: 90 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin: 4px 0 calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #dashboard .dashboard-mobile-hero-stat {
    min-height: 52px !important;
    padding: 8px 8px 8px 9px !important;
    border-radius: 14px !important;
    gap: 3px !important;
  }

  #dashboard .dashboard-mobile-hero-stat span {
    font-size: clamp(8px, 2.45vw, 10px) !important;
    line-height: 1.05 !important;
  }

  #dashboard .dashboard-mobile-hero-stat b {
    font-size: clamp(10px, 3.15vw, 14px) !important;
    line-height: 1.02 !important;
    white-space: nowrap !important;
    letter-spacing: -.025em !important;
  }

  #dashboard .dashboard-modern-metric b,
  #dashboard .dashboard-net-card b {
    white-space: normal !important;
  }
}

/* V2.219: completed invoice flow, central/cashbook sparklines and compact actions. */
#central .central-profile-metric,
.cashbook-stat {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 38%) !important;
  align-items: center !important;
  gap: 12px !important;
  overflow: hidden;
}

#central .central-profile-metric-copy,
.cashbook-stat-copy {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  gap: 4px;
}

#central .central-profile-metric .dashboard-metric-sparkline,
.cashbook-stat .dashboard-metric-sparkline {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 46px;
  min-width: 0;
  overflow: visible;
  pointer-events: none;
}

#central .central-profile-metric .dashboard-metric-sparkline polygon,
.cashbook-stat .dashboard-metric-sparkline polygon {
  fill: color-mix(in srgb, var(--spark-color, #14b8a6) 16%, transparent);
}

#central .central-profile-metric .dashboard-metric-sparkline polyline,
.cashbook-stat .dashboard-metric-sparkline polyline {
  fill: none;
  stroke: var(--spark-color, #14b8a6);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#central .central-profile-metric .dashboard-metric-sparkline circle,
.cashbook-stat .dashboard-metric-sparkline circle {
  fill: var(--spark-color, #14b8a6);
  stroke: rgba(255,255,255,.9);
  stroke-width: 2;
}

.cashbook-stat.income {
  color: #087a56 !important;
  border-left-color: #10b981 !important;
}

.cashbook-stat.expense {
  color: #c83232 !important;
  border-left-color: #ef4444 !important;
}

body.theme-dark:not(.pdf-body) .cashbook-stat {
  background: linear-gradient(145deg, rgba(10,43,37,.94), rgba(5,23,20,.82)) !important;
  border-color: rgba(147,255,229,.12) !important;
}

body.theme-dark:not(.pdf-body) .cashbook-stat.income,
body.theme-dark:not(.pdf-body) .cashbook-stat.income b,
body.theme-dark:not(.pdf-body) .cashbook-stat.income span {
  color: #54e6ac !important;
}

body.theme-dark:not(.pdf-body) .cashbook-stat.expense,
body.theme-dark:not(.pdf-body) .cashbook-stat.expense b,
body.theme-dark:not(.pdf-body) .cashbook-stat.expense span {
  color: #ff7b7b !important;
}

body.theme-dark:not(.pdf-body) .cashbook-stat.neutral,
body.theme-dark:not(.pdf-body) .cashbook-stat.neutral b,
body.theme-dark:not(.pdf-body) .cashbook-stat.neutral span {
  color: #8edfff !important;
}

body.theme-dark:not(.pdf-body) .cashbook-stat small {
  color: rgba(229,255,248,.72) !important;
}

#invoices .invoice-issued-cell {
  width: 96px !important;
  min-width: 96px !important;
}

#invoices .invoice-row-actions,
#invoices .invoice-action-col {
  width: 148px !important;
  min-width: 148px !important;
}

.invoice-page-footer:not(.invoice-page-footer-payment),
#printArea .invoice-page-footer:not(.invoice-page-footer-payment),
body.pdf-body .invoice-page-footer:not(.invoice-page-footer-payment) {
  grid-template-columns: repeat(auto-fit, minmax(28mm, 1fr)) !important;
}

@media (max-width: 900px) {
  #dashboard .dashboard-command-center.has-mobile-central-menu {
    align-items: end !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy {
    grid-row: 1 !important;
    align-self: end !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy .dashboard-eyebrow {
    grid-column: 1 / -1 !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-title-reset {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 56px !important;
    margin-top: 8px !important;
    border-radius: 24px !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-central-badge {
    grid-row: 1 !important;
    align-self: end !important;
  }
}

/* V2.225: scrollable update history, paid cashflow cards and print-copy fixes. */
.release-notes-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.release-notes-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  outline: none;
}

.release-notes-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(20, 184, 166, .28);
}

.release-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 32px 13px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 88, 75, .12);
}

.release-history-heading span {
  font-size: 17px;
  font-weight: 950;
}

.release-history-heading small {
  color: rgba(16, 35, 31, .58);
}

.release-history-list {
  display: grid;
  gap: 14px;
  padding: 0 32px 24px;
}

.release-history-card {
  padding: 16px;
  border: 1px solid rgba(16, 88, 75, .12);
  border-radius: 19px;
  background: rgba(255, 255, 255, .55);
}

.release-history-card > header {
  display: flex;
  align-items: start;
  gap: 11px;
}

.release-history-card h3,
.release-history-card p {
  margin: 0;
}

.release-history-card > header h3 {
  font-size: 15px;
}

.release-history-card > header small,
.release-history-summary {
  color: rgba(16, 35, 31, .62);
  font-size: 12px;
}

.release-history-summary {
  margin-top: 10px !important;
  line-height: 1.45;
}

.release-version-tag {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(20, 184, 166, .25);
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: #087c6b;
  font-size: 10px;
  font-weight: 950;
}

.release-notes-list-compact {
  gap: 7px;
  padding: 12px 0 0;
}

.release-notes-list-compact .release-note-item {
  grid-template-columns: 78px minmax(0, 1fr);
  padding: 11px;
}

.release-notes-list-compact .release-note-item h3 {
  font-size: 13px;
}

.release-notes-list-compact .release-note-item p {
  font-size: 12px;
}

.release-notes-actions {
  padding-top: 14px;
  border-top: 1px solid rgba(16, 88, 75, .10);
  background: rgba(247, 252, 250, .94);
}

body.theme-dark:not(.pdf-body) .release-history-heading,
body.theme-dark:not(.pdf-body) .release-history-card,
body.theme-dark:not(.pdf-body) .release-notes-actions {
  border-color: rgba(164, 255, 233, .13);
}

body.theme-dark:not(.pdf-body) .release-history-card {
  background: rgba(4, 24, 20, .58);
}

body.theme-dark:not(.pdf-body) .release-history-heading small,
body.theme-dark:not(.pdf-body) .release-history-card > header small,
body.theme-dark:not(.pdf-body) .release-history-summary {
  color: rgba(229, 255, 248, .68);
}

body.theme-dark:not(.pdf-body) .release-notes-actions {
  background: rgba(6, 25, 21, .96);
}

.dashboard-modern-chart-grid-main > .dashboard-chart-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-modern-chart-grid-main .trend-metric-grid.compact {
  min-height: 184px;
}

.dashboard-modern-chart-grid-main .trend-metric-card {
  min-height: 84px;
}

.trend-panel-revenue .trend-metric-card-revenue b {
  font-size: 19px;
}

body.theme-dark:not(.pdf-body) #dashboard .trend-compare-pill {
  border-color: rgba(151, 255, 229, .24);
  background: linear-gradient(180deg, rgba(18, 66, 56, .98), rgba(5, 27, 23, .98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}

body.theme-dark:not(.pdf-body) #dashboard .trend-compare-pill-up b {
  color: #54e6ac;
}

body.theme-dark:not(.pdf-body) #dashboard .trend-compare-pill-down b {
  color: #ffc266;
}

body.theme-dark:not(.pdf-body) #dashboard .trend-compare-pill-flat b {
  color: #d5eee7;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-taskflow-empty {
  border-color: rgba(154, 255, 231, .18);
  background: rgba(5, 30, 25, .72);
  color: rgba(229, 255, 248, .76);
}

body.theme-dark:not(.pdf-body) #cashbook .cashbook-amount-income {
  color: #54e6ac !important;
}

body.theme-dark:not(.pdf-body) #cashbook .cashbook-amount-expense {
  color: #ff7b7b !important;
}

.invoice-description-before-lines,
#printArea .invoice-description-before-lines,
body.pdf-body .invoice-description-before-lines {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  -webkit-line-clamp: unset !important;
}

.invoice-closing-copy,
#printArea .invoice-closing-copy,
body.pdf-body .invoice-closing-copy {
  display: grid !important;
  gap: 3mm !important;
  margin-top: 5mm !important;
}

.invoice-closing-copy .invoice-note-print,
#printArea .invoice-closing-copy .invoice-note-print,
body.pdf-body .invoice-closing-copy .invoice-note-print,
.invoice-closing-copy .invoice-print-footer-text,
#printArea .invoice-closing-copy .invoice-print-footer-text,
body.pdf-body .invoice-closing-copy .invoice-print-footer-text {
  margin: 0 !important;
}

.invoice-closing-copy .invoice-note-print,
#printArea .invoice-closing-copy .invoice-note-print,
body.pdf-body .invoice-closing-copy .invoice-note-print {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 8pt !important;
  line-height: 1.4 !important;
}

@media (max-width: 600px) {
  .release-history-heading {
    display: grid;
    margin-right: 19px;
    margin-left: 19px;
  }

  .release-history-list {
    padding-right: 19px;
    padding-left: 19px;
  }

  .release-notes-list-compact .release-note-item {
    grid-template-columns: 1fr;
  }

  .dashboard-modern-chart-grid-main .trend-metric-grid.compact {
    min-height: 0;
  }
}

/* V2.226: denser invoice pages, real cashflow sources and mobile width polish. */
.trend-panel-revenue .trend-metric-card-revenue {
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: stretch;
  min-width: 0;
}

.trend-panel-revenue .cashflow-metric-label {
  text-align: center;
}

.trend-panel-revenue .cashflow-paid-value {
  align-self: end;
  margin-top: 8px;
  text-align: center;
}

.cashflow-source-list {
  width: 100%;
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 3px;
}

.cashflow-source-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(58px, .9fr) minmax(30px, 1.25fr) 32px;
  align-items: center;
  gap: 6px;
}

.trend-panel-revenue .cashflow-source-row > span {
  min-width: 0;
  overflow: hidden;
  color: #697a75;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashflow-source-row > i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(98, 117, 111, .13);
}

.cashflow-source-row > i > em {
  display: block;
  min-width: 2px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--cashflow-source-color, var(--trend-color));
  box-shadow: 0 0 10px color-mix(in srgb, var(--cashflow-source-color, var(--trend-color)) 38%, transparent);
}

.cashflow-source-row > strong {
  color: #52645f;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

body.theme-dark:not(.pdf-body) #dashboard .cashflow-source-row > span,
body.theme-dark:not(.pdf-body) #dashboard .cashflow-source-row > strong {
  color: rgba(226, 251, 244, .78);
}

body.theme-dark:not(.pdf-body) #dashboard .cashflow-source-row > i {
  background: rgba(199, 239, 228, .12);
}

.release-notes-hero:focus {
  outline: none;
}

@media (max-width: 760px) {
  #central {
    width: calc(100% + 16px) !important;
    max-width: none !important;
    margin-inline: -8px !important;
  }

  #central > .central-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
    padding: 8px 4px 12px !important;
    box-sizing: border-box !important;
  }

  #central .central-detail-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #central .central-identity-card.central-visit-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
    padding: 13px 10px 15px !important;
    box-sizing: border-box !important;
  }

  #central .central-company-strip {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 8px !important;
    padding: 8px 4px !important;
    box-sizing: border-box !important;
  }

  #central .central-date-filter {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
  }

  #central .central-identity-card .central-identity-counts {
    margin: 0 !important;
  }

  #central .central-tab-panel {
    min-width: 0 !important;
    padding-inline: 0 !important;
  }
}

@media (max-width: 600px) {
  dialog.release-notes-dialog {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    height: min(92dvh, 720px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 12px) !important;
    border-radius: 18px !important;
  }

  dialog.release-notes-dialog .release-notes-dialog-card {
    height: min(92dvh, 720px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 12px) !important;
    padding: 0 !important;
  }

  .release-notes-hero {
    gap: 5px;
    padding: 15px 16px 12px;
  }

  .release-notes-hero h2 {
    font-size: clamp(22px, 7vw, 28px);
    line-height: 1.04;
  }

  .release-notes-hero p {
    font-size: 12px;
    line-height: 1.35;
  }

  .release-notes-kicker {
    padding: 5px 8px;
    font-size: 9px;
  }

  .release-notes-list {
    gap: 7px;
    padding: 12px 14px;
  }

  .release-note-item {
    gap: 7px;
    padding: 10px;
    border-radius: 13px;
  }

  .release-note-item h3 {
    font-size: 13px;
  }

  .release-note-item p {
    font-size: 11px;
    line-height: 1.35;
  }

  .release-history-heading {
    gap: 3px;
    margin: 2px 14px 9px;
    padding-top: 12px;
  }

  .release-history-list {
    gap: 9px;
    padding: 0 14px 14px;
  }

  .release-history-card {
    padding: 11px;
    border-radius: 14px;
  }

  .release-notes-actions {
    padding: 9px 14px 12px;
  }

  .release-notes-actions button {
    min-height: 42px;
  }

  .trend-panel-revenue .trend-metric-card-revenue {
    padding: 11px 8px;
  }

  .cashflow-source-row {
    grid-template-columns: minmax(38px, .95fr) minmax(20px, 1.05fr) 26px;
    gap: 4px;
  }

  .trend-panel-revenue .cashflow-source-row > span,
  .cashflow-source-row > strong {
    font-size: 8px;
  }
}

@media print {
  #printArea .invoice-page-content > .invoice-print-totals,
  body.pdf-body .invoice-page-content > .invoice-print-totals,
  #printArea .invoice-page-content > .invoice-print-paymentHistory,
  body.pdf-body .invoice-page-content > .invoice-print-paymentHistory,
  #printArea .invoice-page-content > .invoice-print-footer,
  body.pdf-body .invoice-page-content > .invoice-print-footer {
    margin: 2mm 0 0 !important;
  }

  #printArea .invoice-page-content > .invoice-print-totals .invoice-print-totals,
  body.pdf-body .invoice-page-content > .invoice-print-totals .invoice-print-totals,
  #printArea .invoice-page-content > .invoice-print-paymentHistory .invoice-payment-history,
  body.pdf-body .invoice-page-content > .invoice-print-paymentHistory .invoice-payment-history,
  #printArea .invoice-page-content > .invoice-print-footer .invoice-closing-copy,
  body.pdf-body .invoice-page-content > .invoice-print-footer .invoice-closing-copy {
    margin-top: 0 !important;
  }

  #printArea .invoice-page-content > .invoice-print-footer .invoice-closing-copy,
  body.pdf-body .invoice-page-content > .invoice-print-footer .invoice-closing-copy {
    gap: 1.5mm !important;
  }
}

/* V2.229: replace descriptive page subtitles with compact live metric badges. */
body:not([data-active-tab="dashboard"]) .topbar-copy {
  width: min(960px, calc(100vw - var(--sidebar-track) - 72px));
  max-width: calc(100% - 36px);
}

body:not([data-active-tab="dashboard"]) .topbar-copy > .page-metric-strip {
  display: flex !important;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: none;
  margin: 0 !important;
  padding: 0 0 0 12px;
  border-left: 1px solid rgba(var(--active-nav-rgb, 23,108,95), .2);
  overflow-x: auto;
  overflow-y: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  text-overflow: clip;
  scrollbar-width: none;
}

body:not([data-active-tab="dashboard"]) .topbar-copy > .page-metric-strip::-webkit-scrollbar {
  display: none;
}

.page-metric-badge {
  --metric-rgb: 20, 184, 166;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 3px 8px 3px 6px;
  border: 1px solid rgba(var(--metric-rgb), .34);
  border-radius: 999px;
  background: rgba(var(--metric-rgb), .09);
  color: rgb(var(--metric-rgb));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}

.page-metric-badge::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(var(--metric-rgb), .1);
  content: "";
}

.page-metric-badge strong {
  color: #112c27;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: -.015em;
}

.page-metric-badge span {
  color: rgba(17,44,39,.72);
}

.page-metric-teal { --metric-rgb: 13, 148, 136; }
.page-metric-emerald { --metric-rgb: 5, 150, 105; }
.page-metric-cyan { --metric-rgb: 8, 145, 178; }
.page-metric-blue { --metric-rgb: 37, 99, 235; }
.page-metric-violet { --metric-rgb: 124, 58, 237; }
.page-metric-amber { --metric-rgb: 217, 119, 6; }
.page-metric-coral { --metric-rgb: 234, 88, 12; }
.page-metric-rose { --metric-rgb: 225, 29, 72; }
.page-metric-lime { --metric-rgb: 77, 124, 15; }

.dashboard-calendar-external {
  border-color: color-mix(in srgb, var(--calendar-provider, #4285f4) 24%, rgba(17,44,39,.12)) !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--calendar-provider, #4285f4) 6%, white), rgba(255,255,255,.88)) !important;
}

.dashboard-calendar-provider {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--calendar-provider, #4285f4);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  vertical-align: 1px;
}

body.theme-dark:not(.pdf-body) .page-metric-badge {
  border-color: rgba(var(--metric-rgb), .52);
  background: rgba(var(--metric-rgb), .15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  color: rgb(var(--metric-rgb));
}

body.theme-dark:not(.pdf-body) .page-metric-badge strong {
  color: #f4fffb;
}

body.theme-dark:not(.pdf-body) .page-metric-badge span {
  color: rgba(226,250,242,.78);
}

body.theme-dark:not(.pdf-body) .dashboard-calendar-external {
  background: linear-gradient(90deg, rgba(var(--active-nav-rgb, 23,108,95), .12), rgba(4,22,18,.92)) !important;
}

@media (max-width: 900px) {
  body:not([data-active-tab="dashboard"]) .topbar-copy {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
    gap: 10px;
  }

  body:not([data-active-tab="dashboard"]) .topbar-copy > p.page-metric-strip {
    display: flex !important;
    flex: 1 1 auto;
    max-width: none;
  }
}

@media (max-width: 640px) {
  body:not([data-active-tab="dashboard"]) .topbar-copy {
    flex-direction: column;
    align-items: flex-start;
    min-height: 72px;
    padding-block: 9px;
    white-space: normal;
  }

  body:not([data-active-tab="dashboard"]) .topbar-copy > .page-metric-strip {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }
}

/* V2.230: Mazodor invoice preset, typography controls and comparison series. */
.invoice-type-style-badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.invoice-type-style-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(17, 44, 39, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #183c35;
}

.invoice-type-style-badge > :first-child {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(17, 44, 39, .08);
  font-size: 13px;
}

.invoice-type-style-badge.active {
  border-color: rgba(15, 118, 110, .48);
  background: rgba(20, 184, 166, .13);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .1);
  color: #0f766e;
}

.invoice-agreements-editor {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(23, 108, 95, .15);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, .08), transparent 34%),
    rgba(247, 252, 250, .82);
}

.invoice-agreements-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.invoice-agreements-fields textarea {
  min-height: 170px;
  resize: vertical;
}

body.theme-dark:not(.pdf-body) .invoice-type-style-badge,
body.theme-dark:not(.pdf-body) .invoice-agreements-editor {
  border-color: rgba(186, 247, 232, .18);
  background: rgba(6, 27, 23, .72);
  color: rgba(240, 255, 250, .9);
}

.preset-sideLogo {
  border: 1px solid rgba(17, 17, 17, .24);
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(17, 17, 17, .75) 8% 9%, transparent 9% 91%, rgba(17, 17, 17, .75) 91% 92%, transparent 92%),
    linear-gradient(180deg, #fff 0 23%, #111 23% 25%, #fff 25% 69%, #111 69% 71%, #f8f8f8 71%);
}

.invoice-font-inter { --invoice-font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.invoice-font-helvetica { --invoice-font-family: Helvetica, Arial, sans-serif; }
.invoice-font-verdana { --invoice-font-family: Verdana, Geneva, sans-serif; }
.invoice-font-georgia { --invoice-font-family: Georgia, "Times New Roman", serif; }
.invoice-font-times { --invoice-font-family: "Times New Roman", Times, serif; }

.invoice-document,
.invoice-builder-canvas,
.invoice-layout-mini-preview {
  font-family: var(--invoice-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
}

.invoice-document .invoice-page {
  font-size: var(--invoice-font-size, 9pt);
}

.invoice-font-bold .invoice-page-content,
.invoice-font-bold .invoice-page-footer {
  font-weight: 700;
}

.invoice-font-italic .invoice-page-content,
.invoice-font-italic .invoice-page-footer {
  font-style: italic;
}

.invoice-document[class*="invoice-pattern-"] .invoice-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.invoice-document[class*="invoice-pattern-"] .invoice-page::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.invoice-document[class*="invoice-pattern-"] .invoice-page-content,
.invoice-document[class*="invoice-pattern-"] .invoice-page-footer {
  position: relative;
  z-index: 1;
}

.invoice-pattern-corner .invoice-page::before {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--invoice-accent) 18%, transparent) 0 1.5mm, transparent 1.5mm) top left / 35mm 35mm no-repeat,
    linear-gradient(315deg, color-mix(in srgb, var(--invoice-accent) 16%, transparent) 0 1.5mm, transparent 1.5mm) bottom right / 45mm 45mm no-repeat;
}

.invoice-pattern-diagonal .invoice-page::before {
  opacity: .34;
  background: repeating-linear-gradient(135deg, transparent 0 12mm, color-mix(in srgb, var(--invoice-accent) 8%, transparent) 12mm 12.4mm);
}

.invoice-pattern-dots .invoice-page::before {
  opacity: .4;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--invoice-accent) 22%, transparent) .35mm, transparent .45mm);
  background-size: 7mm 7mm;
}

.invoice-pattern-grid .invoice-page::before {
  opacity: .24;
  background:
    linear-gradient(color-mix(in srgb, var(--invoice-accent) 15%, transparent) .25mm, transparent .25mm),
    linear-gradient(90deg, color-mix(in srgb, var(--invoice-accent) 15%, transparent) .25mm, transparent .25mm);
  background-size: 14mm 14mm;
}

.invoice-pattern-bands .invoice-page::before {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--invoice-accent) 12%, transparent) 0 3mm, transparent 3mm calc(100% - 3mm), color-mix(in srgb, var(--invoice-accent) 12%, transparent) calc(100% - 3mm)),
    linear-gradient(180deg, color-mix(in srgb, var(--invoice-accent) 7%, transparent) 0 1.5mm, transparent 1.5mm calc(100% - 1.5mm), color-mix(in srgb, var(--invoice-accent) 7%, transparent) calc(100% - 1.5mm));
}

.invoice-layout-sideLogo.invoice-builder-canvas {
  gap: 4px;
  border-color: rgba(17, 17, 17, .22);
  background: #fff;
  color: #111;
}

.invoice-layout-sideLogo.invoice-builder-canvas .invoice-builder-module {
  padding-block: 6px;
  border-radius: 0;
  border-color: rgba(17, 17, 17, .14);
  background: rgba(255, 255, 255, .9);
}

.invoice-layout-sideLogo.invoice-builder-canvas [data-module="header"] {
  text-align: center;
}

.invoice-layout-sideLogo.invoice-builder-canvas .builder-header-demo {
  justify-items: center;
  text-align: center;
}

.invoice-layout-sideLogo.invoice-builder-canvas .builder-logo-demo {
  margin-inline: auto;
  border-radius: 0;
  background: #111;
}

.invoice-layout-mazodor {
  color: #111;
  --mazodor-rule: rgba(17, 17, 17, .55);
}

.invoice-layout-mazodor .invoice-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 0 !important;
  box-sizing: border-box;
  background-color: #fff;
  color: #111;
  font-family: var(--invoice-font-family, Helvetica, Arial, sans-serif);
  line-height: 1.28;
}

.invoice-layout-mazodor .invoice-page-content {
  display: flex;
  flex-direction: column;
  min-height: 297mm;
  padding: 7mm 19mm 14mm;
  box-sizing: border-box;
}

.mazodor-logo-head {
  display: grid;
  place-items: start center;
  min-height: 20mm;
  margin: 0;
  text-align: center;
}

.mazodor-logo-head .invoice-logo,
.invoice-layout-mazodor .invoice-agreements-logo .invoice-logo {
  display: block;
  width: auto;
  max-width: 44mm;
  height: auto;
  max-height: 18mm;
  margin: 0 auto;
  object-fit: contain;
}

.mazodor-logo-head > strong,
.invoice-layout-mazodor .invoice-agreements-logo > strong {
  font-size: 16pt;
  letter-spacing: .06em;
}

.mazodor-recipient {
  width: 68mm;
  min-height: 23mm;
  margin-top: 1mm;
  font-size: .86em;
}

.mazodor-recipient b {
  display: block;
  margin-bottom: .8mm;
  font-size: 1em;
}

.mazodor-recipient p {
  margin: 0;
}

.mazodor-document-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8mm;
  align-items: end;
  margin: 2mm 0 4mm;
  padding-bottom: 1.8mm;
  border-bottom: .28mm solid var(--mazodor-rule);
}

.mazodor-document-line b {
  font-size: 1.12em;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.mazodor-reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13mm;
  margin-bottom: 4mm;
}

.mazodor-reference-grid > div {
  display: grid;
  align-content: start;
  gap: 1.1mm;
}

.mazodor-reference-grid > div > div {
  display: grid;
  grid-template-columns: 30mm minmax(0, 1fr);
  gap: 2mm;
  align-items: baseline;
}

.mazodor-reference-grid span {
  color: #222;
  font-size: .84em;
}

.mazodor-reference-grid b {
  font-size: .86em;
  overflow-wrap: anywhere;
}

.mazodor-description {
  margin: 0 0 2.5mm;
  padding: 2mm 0 2.2mm;
  border-top: .2mm solid rgba(17, 17, 17, .3);
  border-bottom: .2mm solid rgba(17, 17, 17, .3);
}

.mazodor-description b {
  display: block;
  margin-bottom: .7mm;
  font-size: .86em;
}

.mazodor-description p {
  margin: 0;
  font-size: .9em;
  white-space: normal;
}

.mazodor-invoice-title {
  margin: 1.8mm 0 2.3mm;
  font-size: 11pt;
  line-height: 1;
}

.mazodor-lines table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .86em;
}

.mazodor-lines th,
.mazodor-lines td {
  box-sizing: border-box;
  min-width: 0;
  padding: 1.25mm .7mm;
  border: 0;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.mazodor-lines thead th {
  border-top: .26mm solid var(--mazodor-rule);
  border-bottom: .26mm solid var(--mazodor-rule);
  font-size: .82em;
  white-space: nowrap;
}

.mazodor-lines tbody td {
  border-bottom: .14mm solid rgba(17, 17, 17, .13);
}

.mazodor-lines .mazodor-col-pos { width: 4%; }
.mazodor-lines .mazodor-col-description { width: 52%; }
.mazodor-lines .mazodor-col-qty { width: 8%; }
.mazodor-lines .mazodor-col-unit { width: 9%; }
.mazodor-lines .mazodor-col-price { width: 12%; }
.mazodor-lines .mazodor-col-total { width: 15%; }

.mazodor-lines th:nth-child(n + 3),
.mazodor-lines td:nth-child(n + 3) {
  white-space: nowrap;
}

.mazodor-lines td:nth-child(2) b {
  font-size: .87em;
  letter-spacing: .02em;
}

.mazodor-lines td:nth-child(2) span {
  display: block;
  margin-top: .4mm;
  line-height: 1.22;
}

.mazodor-lines .right,
.mazodor-totals b {
  text-align: right;
}

.mazodor-lines tfoot th {
  padding-top: 2mm;
  border-top: .28mm solid var(--mazodor-rule);
  border-bottom: .28mm solid var(--mazodor-rule);
}

.mazodor-totals {
  width: 96mm;
  margin: 4mm 0 0 auto;
  border-top: .25mm solid var(--mazodor-rule);
  font-size: .86em;
}

.mazodor-totals > div {
  display: grid;
  grid-template-columns: 1fr 33mm;
  gap: 5mm;
  padding: 1mm 0;
  border-bottom: .15mm solid rgba(17, 17, 17, .24);
}

.mazodor-totals .mazodor-grand-total {
  border-top: .34mm solid #111;
  border-bottom: .34mm solid #111;
  font-size: 1.08em;
}

.mazodor-continuation-page .mazodor-totals {
  margin-top: auto;
}

.mazodor-note,
.mazodor-closing {
  max-width: 105mm;
  margin: 4mm 0 0;
  font-size: .84em;
}

.mazodor-continuation-head {
  display: grid;
  grid-template-columns: 24mm minmax(0, 1fr);
  gap: 1.4mm 4mm;
  margin: 10mm 0 12mm;
  font-size: .85em;
}

.mazodor-continuation-head > div {
  display: grid;
  grid-template-columns: 13mm minmax(0, 1fr);
  gap: 2mm;
}

.mazodor-continuation-head > strong {
  grid-column: 1 / -1;
  margin-top: 1mm;
}

.mazodor-footer {
  position: absolute !important;
  right: 19mm;
  bottom: 6mm;
  left: 19mm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
  min-height: 0 !important;
  padding: 1.5mm 0 0 !important;
  border-top: .2mm solid rgba(17, 17, 17, .5);
  color: #111;
  font-size: 5.5pt;
  line-height: 1;
  white-space: nowrap;
}

.mazodor-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-agreements-page .invoice-page-content {
  padding: 10mm 18mm 15mm;
}

.invoice-agreements-logo {
  display: grid;
  place-items: center;
  min-height: 24mm;
  margin: 0 0 7mm;
  text-align: center;
}

.invoice-agreements-logo .invoice-logo {
  width: auto;
  max-width: 46mm;
  max-height: 20mm;
  object-fit: contain;
}

.invoice-agreements-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 18mm;
  padding: 4mm 0;
  border-top: .25mm solid rgba(17, 17, 17, .45);
  border-bottom: .25mm solid rgba(17, 17, 17, .45);
}

.invoice-agreements-meta section > small {
  display: block;
  margin-bottom: 2mm;
  color: #59635f;
  font-size: .78em;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.invoice-agreements-meta section > b {
  display: block;
  margin-bottom: 1mm;
}

.invoice-agreements-meta p {
  margin: 0;
}

.invoice-agreements-meta dl {
  display: grid;
  grid-template-columns: 30mm minmax(0, 1fr);
  gap: 1.2mm 3mm;
  margin: 0;
}

.invoice-agreements-meta dt {
  color: #59635f;
}

.invoice-agreements-meta dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.invoice-agreements-copy {
  flex: 1 1 auto;
  padding: 9mm 0 0;
}

.invoice-agreements-copy h1 {
  margin: 0 0 8mm;
  padding-bottom: 3mm;
  border-bottom: .4mm solid var(--invoice-accent, #111);
  color: #111;
  font-size: 18pt;
}

.invoice-agreements-copy h2 {
  margin: 7mm 0 2mm;
  font-size: 13pt;
}

.invoice-agreements-copy h3 {
  margin: 5mm 0 1.5mm;
  font-size: 11pt;
}

.invoice-agreements-copy h4 {
  margin: 4mm 0 1mm;
  font-size: 9.5pt;
}

.invoice-agreements-copy p {
  margin: 0 0 2.4mm;
  line-height: 1.48;
  white-space: normal;
}

.invoice-agreement-space {
  height: 3mm;
}

.invoice-agreement-bullet {
  position: relative;
  padding-left: 5mm;
}

.invoice-agreement-bullet::before {
  position: absolute;
  left: 1mm;
  content: "•";
}

.invoice-layout-mazodor .invoice-agreements-page .invoice-page-content {
  padding: 7mm 19mm 14mm;
}

.invoice-layout-mazodor .invoice-agreements-meta {
  gap: 13mm;
  padding-block: 3mm;
}

.invoice-layout-mazodor .invoice-agreements-copy {
  padding-top: 7mm;
}

.dashboard-metric-sparkline .dashboard-sparkline-previous {
  fill: none;
  stroke: var(--spark-color);
  stroke-width: 1.8;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  opacity: .38;
}

.trend-chart .trend-series-previous {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2.2;
  stroke-dasharray: 8 7;
  stroke-linecap: round;
  opacity: .38;
}

.dashboard-previous-series-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 5px;
  color: rgba(17, 44, 39, .58);
  font-size: 10px;
  font-weight: 720;
}

.dashboard-previous-series-note i,
.chart-legend-previous i,
.dashboard-pie-previous-legend i {
  width: 24px !important;
  height: 0 !important;
  border: 0 !important;
  border-top: 2px dashed currentColor !important;
  border-radius: 0 !important;
  background: transparent !important;
  opacity: .55;
}

.chart {
  position: relative;
}

.chart-previous-overlay {
  position: absolute;
  top: 24px;
  right: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 170px;
  overflow: visible;
  pointer-events: none;
}

.chart-previous-overlay polyline {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2.2;
  stroke-dasharray: 8 7;
  stroke-linecap: round;
  opacity: .43;
  vector-effect: non-scaling-stroke;
}

.chart-col {
  position: relative;
  z-index: 2;
}

.chart-legend-previous {
  color: rgba(17, 44, 39, .62);
}

.dashboard-pie-previous-slice {
  fill: none;
  stroke: var(--slice);
  stroke-width: 4;
  stroke-dasharray: 3 5;
  stroke-linecap: round;
  opacity: .48;
}

.dashboard-pie-previous-legend {
  grid-column: 1 / -1;
  color: rgba(17, 44, 39, .64);
}

body.theme-dark:not(.pdf-body) .dashboard-previous-series-note,
body.theme-dark:not(.pdf-body) .chart-legend-previous,
body.theme-dark:not(.pdf-body) .dashboard-pie-previous-legend {
  color: rgba(226, 250, 242, .7);
}

@media (max-width: 720px) {
  .invoice-agreements-meta,
  .mazodor-reference-grid {
    grid-template-columns: 1fr;
    gap: 5mm;
  }

  .invoice-type-style-badges {
    flex-wrap: wrap;
  }
}

@media print {
  .invoice-layout-mazodor .invoice-page,
  .invoice-agreements-page {
    page-break-after: always;
    break-after: page;
  }

  .invoice-layout-mazodor .invoice-page:last-child,
  .invoice-document > .invoice-agreements-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .invoice-type-style-badges,
  .invoice-agreements-editor {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* V2.233 final Mazodor footer override: compact page column aligned right. */
.invoice-layout-mazodor .mazodor-footer,
.delivery-note-document .mazodor-footer {
  display: grid !important;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .78fr) 13mm !important;
  justify-content: initial !important;
  gap: 2.4mm !important;
}

.invoice-layout-mazodor .mazodor-footer-page,
.delivery-note-document .mazodor-footer-page {
  justify-self: end;
  width: 13mm;
  padding-left: 1mm;
  text-align: right;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* V2.234: centered, fixed-A4 and paginated agreement pages. */
.preview-scroll .invoice-document {
  margin-inline: auto !important;
  transform-origin: top center !important;
}

.preview-scroll .invoice-document > .invoice-page {
  margin: 0 auto 18px !important;
}

.invoice-document > .invoice-agreements-page {
  width: 210mm !important;
  min-width: 210mm;
  max-width: 210mm;
  height: 297mm !important;
  min-height: 297mm !important;
  max-height: 297mm;
  margin-inline: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

.invoice-document > .invoice-agreements-page > .invoice-page-content {
  width: 100%;
  height: 297mm;
  min-height: 297mm !important;
  padding: 10mm 18mm 18mm !important;
  overflow: hidden;
  box-sizing: border-box;
}

.invoice-layout-mazodor > .invoice-agreements-page > .invoice-page-content {
  padding: 7mm 19mm 14mm !important;
}

.invoice-agreements-copy {
  min-width: 0;
  overflow: hidden;
}

.invoice-agreement-continuation {
  margin-top: 0 !important;
}

.invoice-agreement-bullet.invoice-agreement-continuation::before {
  content: "";
}

@media print {
  #printArea .invoice-document > .invoice-agreements-page,
  body.pdf-body .invoice-document > .invoice-agreements-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    break-after: page !important;
    page-break-after: always !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  #printArea .invoice-document > .invoice-agreements-page > .invoice-page-content,
  body.pdf-body .invoice-document > .invoice-agreements-page > .invoice-page-content {
    height: 297mm !important;
    min-height: 297mm !important;
    overflow: hidden !important;
  }

  #printArea .invoice-document > .invoice-agreements-page:last-child,
  body.pdf-body .invoice-document > .invoice-agreements-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}

/* V2.235 final cascade guards. */
.invoice-quantity-unit-cell b,
.invoice-quantity-unit-cell small {
  display: block;
}

.invoice-quantity-unit-cell small {
  margin-top: .5mm;
  color: #5d6b67;
  font-size: .78em;
  font-weight: 600;
}

@media (min-width: 901px) {
  .invoice-line-editor-panel .line-row {
    grid-template-columns:
      minmax(170px, 1.12fr)
      minmax(170px, 1.16fr)
      70px
      94px
      100px
      82px
      88px
      40px !important;
  }
}

@media (max-width: 900px) {
  .invoice-line-editor-panel .line-row {
    grid-template-columns: 1fr !important;
  }
}

/* V2.236: wide net-profit analysis and high-density warehouse directory. */
@media (min-width: 901px) {
  #dashboard .dashboard-hero-main {
    grid-template-columns: minmax(220px, .34fr) minmax(0, 1fr) !important;
    align-items: stretch;
  }
}

#dashboard .dashboard-hero-heading {
  min-width: 0;
}

#dashboard .dashboard-net-card {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch !important;
  gap: 8px !important;
  min-width: 0;
  min-height: 158px !important;
  padding: 15px 17px 11px !important;
  overflow: hidden;
}

.dashboard-net-chart-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

#dashboard .dashboard-net-chart-head > span {
  padding-top: 3px;
  color: #4f6761 !important;
  font-size: 11px !important;
  line-height: 1.2;
}

.dashboard-net-chart-value {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
  text-align: right;
}

#dashboard .dashboard-net-chart-value b {
  color: #0c3129 !important;
  font-size: clamp(22px, 1.75vw, 30px) !important;
  line-height: 1 !important;
  letter-spacing: -.045em;
  white-space: nowrap;
}

#dashboard .dashboard-net-chart-value em {
  color: #607c75 !important;
  font-size: 10px;
  white-space: nowrap;
}

.dashboard-net-chart-plot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(68px, 1fr) auto;
  min-width: 0;
  min-height: 82px;
}

.dashboard-net-chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 68px;
  overflow: visible;
}

.dashboard-net-chart-zero {
  stroke: rgba(31, 66, 58, .42);
  stroke-width: 1.4;
  stroke-dasharray: 2 8;
  vector-effect: non-scaling-stroke;
}

.dashboard-net-chart-area {
  fill: color-mix(in srgb, var(--net-chart-color) 12%, transparent);
}

.dashboard-net-chart-current,
.dashboard-net-chart-previous {
  fill: none;
  stroke: var(--net-chart-color);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dashboard-net-chart-previous {
  opacity: .38;
  stroke-dasharray: 5 7;
  stroke-width: 1.8;
}

.dashboard-net-chart-point {
  fill: #fff;
  stroke: var(--net-chart-color);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.dashboard-net-chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 3px;
  border-top: 1px solid rgba(30, 76, 66, .10);
}

#dashboard .dashboard-net-chart-axis span {
  min-width: 0;
  color: #6d817c !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 1.15;
  letter-spacing: 0 !important;
  text-align: center;
  text-transform: none !important;
  white-space: nowrap;
}

.stock-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 230px) auto minmax(260px, 1fr) auto;
  align-items: end;
  gap: 9px;
}

.stock-directory-toolbar > label {
  margin: 0;
}

.stock-directory-search {
  width: 100%;
}

.stock-directory-panel {
  padding: 0 !important;
  overflow: hidden;
}

.stock-directory-panel > .panel-head {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.stock-directory-panel > .panel-head > div {
  min-width: 0;
}

.stock-directory-panel > .panel-head small {
  display: block;
  margin-top: 4px;
}

.stock-directory-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
}

.stock-directory {
  min-width: 1080px;
  background: rgba(250, 252, 251, .82);
}

.stock-directory-header,
.stock-directory-row {
  display: grid;
  grid-template-columns: 92px minmax(210px, 1.08fr) minmax(250px, 1.32fr) minmax(190px, .92fr) minmax(210px, 1fr);
}

.stock-directory-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 38px;
  border-bottom: 1px solid rgba(30, 82, 70, .14);
  background: rgba(239, 247, 244, .96);
  box-shadow: 0 8px 18px rgba(18, 55, 47, .05);
  backdrop-filter: blur(10px);
}

.stock-directory-header span {
  display: flex;
  align-items: center;
  padding: 10px 13px;
  border-right: 1px solid rgba(30, 82, 70, .10);
  color: #526a64;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.stock-directory-header span:first-child {
  justify-content: center;
}

.stock-directory-body {
  display: grid;
}

.stock-directory-row {
  position: relative;
  min-height: 146px;
  border-bottom: 1px solid rgba(30, 82, 70, .12);
  background: rgba(255, 255, 255, .96);
  cursor: pointer;
  outline: none;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.stock-directory-row:hover,
.stock-directory-row:focus-visible {
  z-index: 2;
  background: #fbfffd;
  box-shadow: inset 4px 0 0 var(--accent), 0 12px 28px rgba(18, 64, 53, .09);
}

.stock-directory-row.active {
  background: linear-gradient(90deg, rgba(224, 248, 240, .78), rgba(255, 255, 255, .98) 42%);
  box-shadow: inset 4px 0 0 var(--accent);
}

.stock-directory-row > * {
  min-width: 0;
  border-right: 1px solid rgba(30, 82, 70, .09);
}

.stock-directory-row > *:last-child {
  border-right: 0;
}

.stock-directory-logo {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 14px 10px;
  background: linear-gradient(160deg, rgba(241, 249, 246, .92), rgba(255, 255, 255, .88));
}

.stock-directory-logo img,
.stock-directory-logo > span {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(22, 111, 91, .16);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 68, 56, .08);
}

.stock-directory-logo img {
  display: block;
  padding: 8px;
  object-fit: contain;
  box-sizing: border-box;
}

.stock-directory-logo > span {
  display: grid;
  place-items: center;
  color: #126b58;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.stock-directory-cell {
  display: grid;
  grid-template-rows: repeat(3, minmax(34px, auto));
  align-content: center;
  padding: 10px 13px;
}

.stock-directory-primary,
.stock-directory-line {
  display: grid;
  grid-template-columns: minmax(76px, .58fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(31, 87, 74, .12);
}

.stock-directory-cell > :last-child {
  border-bottom: 0;
}

.stock-directory-primary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stock-directory-primary strong {
  overflow: hidden;
  color: #102e28;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-directory-active-badge {
  padding: 4px 7px;
  border: 1px solid rgba(5, 150, 105, .16);
  border-radius: 999px;
  background: rgba(209, 250, 229, .72);
  color: #047857;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.stock-directory-line small {
  color: #6b7f7a;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stock-directory-line b {
  min-width: 0;
  overflow: hidden;
  color: #203a34;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.28;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.stock-directory-address-line b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stock-directory-counts .stock-directory-line b,
.stock-directory-operations .stock-directory-line b {
  color: #0d5e4d;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.stock-directory-open-line {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stock-directory-open-line > span {
  display: grid;
  grid-template-columns: minmax(76px, .58fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.stock-directory-open-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: rgba(7, 115, 91, .16);
  border-radius: 10px;
  background: rgba(225, 247, 240, .82);
  color: #08745e;
  font-size: 18px;
}

.stock-directory-empty,
.stock-directory-empty-result {
  margin: 0;
  padding: 26px;
  text-align: center;
}

.stock-location-delete-button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.stock-location-overlay {
  box-sizing: border-box;
}

.stock-location-dialog {
  box-sizing: border-box;
  max-width: 100%;
}

.stock-location-dialog .dialog-head,
.stock-location-inventory-editor-grid,
.stock-location-inventory-panel,
.stock-location-items-editor {
  min-width: 0;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-card {
  background: linear-gradient(135deg, rgba(12, 74, 62, .64), rgba(6, 28, 24, .94)) !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-chart-head > span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-chart-axis span,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-chart-value em {
  color: #9fc6bc !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-chart-value b {
  color: #f2fff9 !important;
}

body.theme-dark:not(.pdf-body) .dashboard-net-chart-zero {
  stroke: rgba(202, 242, 231, .34);
}

body.theme-dark:not(.pdf-body) .dashboard-net-chart-axis {
  border-color: rgba(202, 242, 231, .13);
}

body.theme-dark:not(.pdf-body) .dashboard-net-chart-point {
  fill: #08231d;
}

body.theme-dark:not(.pdf-body) #stock .stock-directory,
body.theme-dark:not(.pdf-body) #stock .stock-directory-panel {
  border-color: rgba(181, 232, 220, .16) !important;
  background: #071b17 !important;
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-header {
  border-color: rgba(181, 232, 220, .14);
  background: rgba(13, 42, 35, .96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-header span,
body.theme-dark:not(.pdf-body) #stock .stock-directory-row > * {
  border-color: rgba(181, 232, 220, .11);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-header span,
body.theme-dark:not(.pdf-body) #stock .stock-directory-line small {
  color: #9abbb3;
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-row {
  border-color: rgba(181, 232, 220, .12);
  background: rgba(8, 29, 24, .94);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-row:hover,
body.theme-dark:not(.pdf-body) #stock .stock-directory-row:focus-visible,
body.theme-dark:not(.pdf-body) #stock .stock-directory-row.active {
  background: linear-gradient(90deg, rgba(15, 89, 71, .55), rgba(8, 29, 24, .98) 46%);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-logo {
  background: linear-gradient(160deg, rgba(15, 51, 42, .94), rgba(7, 25, 21, .92));
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-logo img,
body.theme-dark:not(.pdf-body) #stock .stock-directory-logo > span {
  border-color: rgba(181, 232, 220, .17);
  background: rgba(5, 20, 17, .92);
  color: #69e2c2;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-primary,
body.theme-dark:not(.pdf-body) #stock .stock-directory-line {
  border-color: rgba(181, 232, 220, .10);
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-primary strong,
body.theme-dark:not(.pdf-body) #stock .stock-directory-line b {
  color: #effcf8;
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-counts .stock-directory-line b,
body.theme-dark:not(.pdf-body) #stock .stock-directory-operations .stock-directory-line b {
  color: #6ee7c5;
}

body.theme-dark:not(.pdf-body) #stock .stock-directory-open-button {
  border-color: rgba(110, 231, 197, .18);
  background: rgba(25, 106, 85, .42);
  color: #8cf3d6;
}

@media (max-width: 900px) {
  .stock-directory-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stock-directory-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #dashboard .dashboard-net-card {
    min-height: 168px !important;
  }
}

@media (max-width: 620px) {
  .stock-location-overlay {
    align-items: start;
    padding: 12px;
    overflow-y: auto;
  }

  .stock-location-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  .stock-location-dialog .dialog-head {
    align-items: flex-start;
    gap: 12px;
  }

  .stock-location-modal-actions {
    width: 100%;
    justify-content: stretch;
  }

  .stock-location-modal-actions button {
    flex: 1 1 calc(50% - 4px);
  }

  .dashboard-net-chart-head {
    gap: 9px;
  }

  #dashboard .dashboard-net-chart-value b {
    font-size: 20px !important;
  }

  .dashboard-net-chart-axis span:not(:first-child):not(:last-child) {
    display: none;
  }

  .stock-directory-panel {
    overflow: visible;
  }

  .stock-directory-scroll {
    overflow: visible;
  }

  .stock-directory {
    min-width: 0;
    padding: 10px;
    background: transparent;
  }

  .stock-directory-header {
    display: none;
  }

  .stock-directory-body {
    gap: 12px;
  }

  .stock-directory-row {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(30, 82, 70, .13);
    border-radius: 17px;
    box-shadow: 0 10px 24px rgba(18, 64, 53, .06);
  }

  .stock-directory-logo {
    grid-column: 1;
    grid-row: 1;
  }

  .stock-directory-identity {
    grid-column: 2;
    grid-row: 1;
  }

  .stock-directory-contact,
  .stock-directory-counts,
  .stock-directory-operations {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(30, 82, 70, .09);
    border-right: 0;
  }

  .stock-directory-counts,
  .stock-directory-operations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stock-directory-counts .stock-directory-line,
  .stock-directory-operations .stock-directory-line,
  .stock-directory-open-line > span {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 3px;
    text-align: center;
  }

  .stock-directory-counts .stock-directory-line b,
  .stock-directory-operations .stock-directory-line b {
    text-align: center;
  }
}

/* V2.238: dashboard framing, subscription states and a leaner stock directory header. */
#dashboard .dashboard-chart-card-growth .trend-metric-card {
  border-width: 1px !important;
  border-color: color-mix(in srgb, var(--trend-color) 62%, transparent) !important;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  max-width: 100%;
  min-width: 0;
  padding-inline: 10px !important;
  font-size: clamp(14px, 1.15vw, 19px) !important;
  line-height: 1.15 !important;
  letter-spacing: -.035em !important;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.stock-directory-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.admin-subscription-month-status {
  align-self: end;
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(23, 108, 95, .16);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface, #fff) 90%, transparent);
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}

.admin-subscription-month.subscription-status-none {
  border-style: dashed;
  border-color: rgba(108, 118, 132, .18);
  background: rgba(108, 118, 132, .035);
}

.admin-subscription-month.subscription-status-none > b,
.admin-subscription-month.subscription-status-none > strong {
  color: var(--muted);
  font-size: 11px;
}

.admin-subscription-month.subscription-status-none > span {
  color: #6a7280;
  background: rgba(108, 118, 132, .12);
}

body.theme-dark:not(.pdf-body) .admin-subscription-month-status {
  border-color: rgba(164, 255, 233, .16);
  background: rgba(4, 24, 20, .72);
  color: #edf7f4;
}

@media (max-width: 620px) {
  .stock-directory-panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
    width: 100%;
    font-size: 14px !important;
  }
}
/* V2.237: free-trial selection, first-run guidance and subscription operations. */
.trial-selection-card {
  width: min(1240px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: clamp(20px, 3vw, 38px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(50, 210, 172, .12), transparent 34%),
    radial-gradient(circle at 92% 92%, rgba(32, 121, 255, .10), transparent 30%),
    var(--panel);
}

.trial-selection-heading {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 24px;
  text-align: center;
}

.trial-selection-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.045em;
}

.trial-selection-heading p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
}

.trial-eyebrow,
.trial-free-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(23, 108, 95, .16);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(23, 108, 95, .07);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.trial-free-badge {
  margin-top: 6px;
  color: #087b56;
  letter-spacing: 0;
  background: rgba(24, 193, 132, .11);
}

.trial-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trial-plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 330px;
  padding: 20px;
  border: 1px solid rgba(23, 108, 95, .14);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, .76);
  text-align: left;
  box-shadow: 0 12px 34px rgba(28, 57, 50, .05);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.trial-plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 108, 95, .34);
  box-shadow: 0 18px 42px rgba(28, 57, 50, .10);
}

.trial-plan-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 20px 46px rgba(23, 108, 95, .13);
}

.trial-plan-card.recommended::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #19b989, #2b85ff);
}

.trial-plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trial-plan-card-top em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #167962;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.trial-plan-name {
  font-size: 20px;
  font-weight: 900;
}

.trial-plan-free {
  color: #0d8b65;
  font-size: 12px;
  font-weight: 800;
}

.trial-plan-card > strong {
  font-size: 16px;
}

.trial-plan-card > small {
  min-height: 34px;
  color: var(--muted);
  line-height: 1.4;
}

.trial-plan-features {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.trial-plan-features > span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  font-size: 12px;
  line-height: 1.35;
}

.trial-plan-features i {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #087b56;
  background: rgba(24, 193, 132, .12);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.trial-plan-select-indicator {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(23, 108, 95, .24);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.trial-plan-card.selected .trial-plan-select-indicator {
  border-color: var(--accent);
  background: var(--accent);
}

.trial-selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 108, 95, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
}

.trial-terms {
  display: grid;
  gap: 4px;
}

.trial-terms span {
  color: var(--muted);
  font-size: 12px;
}

#startTrialButton {
  min-height: 46px;
  padding-inline: 22px;
  border-radius: 13px;
}

#trialMessage {
  margin: 12px 0 0;
  text-align: center;
}

.first-run-tour-overlay {
  position: fixed;
  z-index: 20050;
  inset: 0;
  pointer-events: none;
}

.first-run-tour-spotlight {
  position: fixed;
  border: 2px solid rgba(62, 242, 190, .92);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(5, 19, 16, .68), 0 0 0 7px rgba(62, 242, 190, .14), 0 14px 48px rgba(0, 0, 0, .25);
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
}

.first-run-tour-bubble {
  position: fixed;
  width: min(390px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(65, 216, 174, .32);
  border-radius: 20px;
  color: #10211d;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
  pointer-events: auto;
}

.first-run-tour-bubble h3 {
  margin: 14px 0 7px;
  font-size: 20px;
}

.first-run-tour-bubble p {
  margin: 0;
  color: #52625e;
  font-size: 14px;
  line-height: 1.55;
}

.first-run-tour-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #687772;
  font-size: 11px;
  font-weight: 800;
}

.first-run-tour-progress i {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eeeb;
}

.first-run-tour-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #13ae7c, #2d8cff);
}

.first-run-tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.first-run-tour-actions > span {
  display: flex;
  gap: 7px;
}

.setup-assistant-host {
  position: fixed;
  z-index: 1800;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: grid;
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

.setup-assistant-launcher,
.setup-assistant-panel {
  pointer-events: auto;
}

.setup-assistant-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 14px 8px 8px;
  border: 1px solid rgba(37, 202, 153, .34);
  border-radius: 18px;
  color: #eefbf7;
  background: linear-gradient(135deg, #082d25, #0b5746);
  box-shadow: 0 15px 45px rgba(2, 37, 29, .28);
}

.setup-assistant-launcher.is-active::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6px;
  border-radius: 23px;
  background: rgba(39, 220, 165, .16);
  animation: setup-assistant-pulse 2.3s ease-in-out infinite;
}

@keyframes setup-assistant-pulse {
  0%, 100% { transform: scale(.96); opacity: .35; }
  50% { transform: scale(1.04); opacity: .85; }
}

.setup-assistant-launcher-ring {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#47e4b5 var(--setup-progress), rgba(255, 255, 255, .16) 0);
}

.setup-assistant-launcher-ring::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0a493b;
}

.setup-assistant-launcher-ring b {
  position: relative;
  z-index: 1;
  font-size: 10px;
}

.setup-assistant-launcher > span:last-child {
  display: grid;
  gap: 1px;
  text-align: left;
}

.setup-assistant-launcher strong {
  font-size: 13px;
}

.setup-assistant-launcher small {
  color: rgba(239, 255, 250, .7);
  font-size: 10px;
}

.setup-assistant-panel {
  width: min(430px, calc(100vw - 32px));
  max-height: min(690px, calc(100dvh - 105px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(23, 108, 95, .16);
  border-radius: 24px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 28px 90px rgba(3, 38, 30, .26);
  backdrop-filter: blur(18px);
}

.setup-assistant-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.setup-assistant-panel-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.setup-assistant-panel-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

.setup-assistant-orbit {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(24, 193, 132, .24);
  border-radius: 17px;
  color: #0a8c66;
  background: rgba(24, 193, 132, .09);
}

.setup-assistant-panel-actions {
  display: flex;
  align-self: start;
  align-items: center;
  gap: 2px;
}

.setup-assistant-hide {
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid rgba(23, 108, 95, .14);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.setup-assistant-hide:hover,
.setup-assistant-hide:focus-visible {
  color: var(--ink);
  border-color: rgba(23, 108, 95, .32);
  background: rgba(23, 108, 95, .06);
}

.setup-assistant-close {
  align-self: start;
  min-width: 32px;
  padding: 4px 8px;
  border: 0;
  font-size: 21px;
}

.setup-assistant-bar {
  height: 5px;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 108, 95, .09);
}

.setup-assistant-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #11ad7a, #2a8dff);
}

.setup-assistant-task-list {
  display: grid;
  gap: 7px;
}

.setup-assistant-task {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(23, 108, 95, .09);
  border-radius: 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 84%, #eff8f5);
  text-align: left;
}

.setup-assistant-task > i {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(23, 108, 95, .16);
  border-radius: 9px;
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.setup-assistant-task > span {
  display: grid;
  gap: 2px;
}

.setup-assistant-task small {
  color: var(--muted);
  font-size: 10px;
}

.setup-assistant-task em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.setup-assistant-task.done {
  opacity: .66;
}

.setup-assistant-task.done > i {
  color: #fff;
  border-color: #12a775;
  background: #12a775;
}

.setup-assistant-task.skipped {
  border-style: dashed;
}

.setup-assistant-next {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 160, 119, .10), rgba(38, 132, 255, .08));
}

.setup-assistant-next > span {
  display: grid;
  gap: 2px;
}

.setup-assistant-next > span small {
  color: var(--muted);
  font-size: 10px;
}

.setup-assistant-next > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.setup-assistant-complete {
  margin-top: 14px;
  padding: 13px;
  border-radius: 14px;
  color: #087a59;
  background: rgba(24, 193, 132, .10);
  font-weight: 800;
}

.admin-online-text {
  color: #0ba66f !important;
  font-weight: 800;
}

.admin-subscription-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-subscription-policy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.admin-subscription-policy > span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(23, 108, 95, .09);
  border-radius: 12px;
  background: rgba(23, 108, 95, .035);
}

.admin-subscription-policy small {
  color: var(--muted);
  font-size: 10px;
}

.admin-subscription-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(122px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.admin-subscription-month {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 12px;
  border: 1px solid rgba(23, 108, 95, .11);
  border-radius: 14px;
  background: rgba(255, 255, 255, .56);
}

.admin-subscription-month > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.admin-subscription-month em {
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.admin-subscription-month strong {
  font-size: 14px;
}

.admin-subscription-month > span {
  align-self: end;
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.admin-subscription-month.subscription-status-paid > span {
  color: #087957;
  background: rgba(19, 180, 126, .13);
}

.admin-subscription-month.subscription-status-trial > span {
  color: #146ab4;
  background: rgba(39, 137, 232, .13);
}

.admin-subscription-month.subscription-status-open > span,
.admin-subscription-month.subscription-status-missing > span {
  color: #b43c2e;
  background: rgba(230, 77, 58, .12);
}

.admin-subscription-month.subscription-status-future > span {
  color: #6a7280;
  background: rgba(108, 118, 132, .12);
}

.admin-subscription-month.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 10%, transparent);
}

.admin-subscriber-activity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.admin-subscriber-activity article {
  display: grid;
  gap: 5px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid rgba(23, 108, 95, .09);
  border-radius: 14px;
  background: rgba(23, 108, 95, .035);
}

.admin-subscriber-activity article > span,
.admin-subscriber-activity article > small {
  color: var(--muted);
  font-size: 10px;
}

.admin-subscriber-activity article.online {
  border-color: rgba(18, 174, 119, .25);
  background: rgba(18, 174, 119, .08);
}

.admin-subscriber-payment-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-subscriber-payments span {
  display: grid;
  gap: 3px;
}

.admin-subscriber-payments span small {
  color: var(--muted);
}

body.theme-dark:not(.pdf-body) .trial-plan-card,
body.theme-dark:not(.pdf-body) .trial-selection-footer,
body.theme-dark:not(.pdf-body) .admin-subscription-month {
  color: #edf7f4;
  background: rgba(11, 34, 29, .82);
}

body.theme-dark:not(.pdf-body) .setup-assistant-panel {
  color: #edf7f4;
  background: rgba(9, 28, 24, .97);
}

body.theme-dark:not(.pdf-body) .setup-assistant-task,
body.theme-dark:not(.pdf-body) .admin-subscription-policy > span,
body.theme-dark:not(.pdf-body) .admin-subscriber-activity article {
  color: #edf7f4;
  background: rgba(255, 255, 255, .035);
}

@media (max-width: 980px) {
  .trial-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trial-plan-card {
    min-height: 300px;
  }

  .admin-subscription-edit-grid,
  .admin-subscriber-activity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #paywall.auth-screen {
    align-items: stretch;
    padding: 0;
  }

  .trial-selection-card {
    width: 100vw;
    max-width: none;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }

  .trial-selection-heading {
    margin-bottom: 17px;
  }

  .trial-selection-heading h1 {
    font-size: 30px;
  }

  .trial-plan-grid {
    grid-template-columns: 1fr;
  }

  .trial-plan-card {
    min-height: 0;
    padding: 17px;
  }

  .trial-plan-card > small {
    min-height: 0;
  }

  .trial-selection-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 15px;
  }

  .trial-selection-footer .actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  #startTrialButton {
    white-space: normal;
  }

  .first-run-tour-bubble {
    max-height: calc(100dvh - 40px);
    overflow: auto;
    border-radius: 18px;
  }

  .first-run-tour-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .first-run-tour-actions > span,
  .first-run-tour-actions button {
    flex: 1;
  }

  .setup-assistant-host {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .setup-assistant-launcher {
    min-height: 52px;
  }

  .setup-assistant-panel {
    max-height: calc(100dvh - 155px);
    padding: 14px;
  }

  .setup-assistant-panel-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .setup-assistant-task {
    padding: 9px;
  }

  .admin-subscription-edit-grid,
  .admin-subscription-policy,
  .admin-subscriber-activity,
  .admin-subscriber-payment-form {
    grid-template-columns: 1fr;
  }

  .admin-subscriber-dialog {
    overflow-x: hidden;
  }

  .admin-subscriber-dialog > .dialog-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .admin-subscriber-dialog > .dialog-head .actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    width: 100%;
  }

  .admin-subscriber-dialog > .dialog-head .actions button {
    min-width: 0;
    white-space: normal;
  }
}

/* V2.239: visible subscription states, compact cash balance and mobile cockpit. */
body:not(.theme-dark):not(.pdf-body) .admin-subscription-month {
  color: #10231f;
}

body:not(.theme-dark):not(.pdf-body) .admin-subscription-month.subscription-status-paid {
  border-color: rgba(19, 180, 126, .24);
  background:
    radial-gradient(circle at 92% 8%, rgba(19, 180, 126, .10), transparent 34%),
    linear-gradient(145deg, rgba(239, 253, 247, .96), rgba(255, 255, 255, .92));
}

body:not(.theme-dark):not(.pdf-body) .admin-subscription-month.subscription-status-paid > b,
body:not(.theme-dark):not(.pdf-body) .admin-subscription-month.subscription-status-paid > strong {
  color: #123b32;
}

body:not(.theme-dark):not(.pdf-body) .admin-subscription-month.subscription-status-paid > span {
  color: #087957;
  background: rgba(19, 180, 126, .13);
}

.cashbook-balance-card {
  align-self: center;
  align-content: center;
  justify-items: stretch;
  gap: 5px;
  min-width: 0;
  min-height: 66px;
  padding: 11px 15px;
  border-radius: 17px;
  box-shadow: 0 14px 30px rgba(9, 47, 41, .16);
}

.cashbook-balance-card.cashbook-balance-profit {
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .22), transparent 34%),
    linear-gradient(135deg, #139d68, #087957);
}

.cashbook-balance-card.cashbook-balance-loss {
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .20), transparent 34%),
    linear-gradient(135deg, #e64d4d, #b92c38);
}

.cashbook-balance-card.cashbook-balance-neutral {
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(135deg, #47736b, #244d46);
}

.cashbook-balance-card > span,
.cashbook-balance-card > b {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

.cashbook-balance-card > span {
  font-size: 10px;
  line-height: 1;
}

.cashbook-balance-card > b {
  overflow: hidden;
  color: #fff;
  font-size: clamp(19px, 2.05vw, 29px);
  line-height: 1.05;
  letter-spacing: -.04em;
  text-overflow: clip;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #dashboard .dashboard-command-center {
    gap: 4px !important;
    min-height: 0 !important;
    padding: 7px 8px !important;
    border-radius: 16px !important;
  }

  #dashboard .dashboard-command-center::before {
    inset: 5px !important;
    border-radius: 12px !important;
    background-size: 20px 20px !important;
  }

  #dashboard .dashboard-command-copy {
    min-height: 0 !important;
    gap: 4px !important;
    padding: 0 !important;
  }

  #dashboard .dashboard-command-copy .dashboard-eyebrow {
    min-height: 0 !important;
    padding: 3px 7px !important;
    font-size: 8px !important;
    line-height: 1 !important;
    letter-spacing: .055em !important;
  }

  #dashboard .dashboard-config-pencil {
    top: 7px !important;
    right: 8px !important;
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
    box-shadow: 0 6px 14px rgba(15, 35, 31, .10) !important;
  }

  #dashboard .dashboard-mobile-title-reset {
    min-height: 24px !important;
    height: 24px !important;
    margin-right: 29px !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    box-shadow: 0 5px 12px rgba(16, 40, 35, .07) !important;
  }

  #dashboard .dashboard-toolbar-shell,
  #dashboard .dashboard-toolbar-modern,
  #dashboard .dashboard-toolbar {
    min-height: 0 !important;
    margin: 0 !important;
  }

  #dashboard .dashboard-toolbar-modern {
    padding: 4px !important;
    border-radius: 12px !important;
  }

  #dashboard .dashboard-mobile-filter-panel,
  #dashboard .dashboard-mobile-filter-row {
    gap: 4px !important;
  }

  #dashboard .dashboard-mobile-filter-panel input,
  #dashboard .dashboard-mobile-filter-panel select,
  #dashboard .dashboard-mobile-filter-button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 28px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 4px 9px rgba(16, 40, 35, .045) !important;
  }

  #dashboard .dashboard-mobile-filter-panel select {
    padding-right: 22px !important;
    background-position:
      calc(100% - 13px) 11px,
      calc(100% - 9px) 11px,
      0 0,
      0 0 !important;
    background-size:
      4px 4px,
      4px 4px,
      100% 100%,
      100% 100% !important;
  }

  #dashboard .dashboard-mobile-filter-panel input[type="date"] {
    padding: 0 5px !important;
    line-height: 28px !important;
  }

  #dashboard .dashboard-mobile-filter-panel input[type="date"]::-webkit-date-and-time-value,
  #dashboard .dashboard-mobile-filter-panel input[type="date"]::-webkit-datetime-edit,
  #dashboard .dashboard-mobile-filter-panel input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    min-height: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu {
    grid-template-columns: minmax(0, 1fr) minmax(104px, 34%) !important;
    gap: 4px !important;
    align-items: center !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy {
    align-self: center !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-command-copy .dashboard-eyebrow {
    grid-column: 1 !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-title-reset {
    grid-column: 2 !important;
    width: auto !important;
    min-height: 24px !important;
    margin-right: 29px !important;
    margin-top: 0 !important;
    border-radius: 10px !important;
  }

  #dashboard .dashboard-command-center.has-mobile-central-menu .dashboard-mobile-central-badge {
    grid-row: 1 !important;
    align-self: center !important;
    max-width: 145px !important;
  }

  #dashboard .dashboard-mobile-central-select select {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 21px 0 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
    line-height: 28px !important;
    background-position:
      calc(100% - 13px) 11px,
      calc(100% - 9px) 11px,
      0 0,
      0 0 !important;
    background-size:
      4px 4px,
      4px 4px,
      100% 100%,
      100% 100% !important;
    box-shadow: 0 4px 9px rgba(18, 35, 31, .07) !important;
  }

  .cashbook-hero {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 42%);
    gap: 10px;
  }

  .cashbook-balance-card {
    min-height: 60px;
    padding: 9px 12px;
    border-radius: 15px;
  }

  .cashbook-balance-card > b {
    font-size: clamp(17px, 4.7vw, 24px);
  }
}

@media (max-width: 620px) {
  .cashbook-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .cashbook-balance-card {
    width: 100%;
    min-height: 58px;
  }

  .cashbook-balance-card > b {
    font-size: clamp(18px, 6.1vw, 25px);
  }
}

/* V2.240: single-row calendar filters, invoice status totals and refined dashboard fit. */
.calendar-filter-strip {
  display: grid !important;
  grid-template-columns: minmax(116px, .72fr) minmax(116px, .72fr) auto auto;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: thin;
}

.calendar-filter-strip select {
  width: 100%;
  min-width: 0;
  flex: none;
}

.calendar-filter-strip .calendar-filter-reset {
  margin-left: 0;
  white-space: nowrap;
}

.calendar-filter-strip .calendar-filter-count {
  justify-self: end;
  padding: 7px 10px;
  border: 1px solid rgba(12, 188, 226, .16);
  border-radius: 999px;
  background: rgba(12, 188, 226, .09);
  color: #087f9b;
  line-height: 1;
  white-space: nowrap;
}

.calendar-filter-strip .calendar-filter-count b {
  color: inherit;
  font-size: inherit;
}

.invoice-status-total-badge {
  align-self: end;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  height: 36px;
  padding: 4px 7px;
  border: 1px solid rgba(12, 188, 226, .20);
  border-radius: 11px;
  background:
    radial-gradient(circle at 92% 8%, rgba(12, 188, 226, .16), transparent 42%),
    linear-gradient(135deg, rgba(237, 252, 255, .96), rgba(255, 255, 255, .88));
  color: #075d72;
  box-sizing: border-box;
  overflow: hidden;
}

.invoice-status-total-badge > span {
  overflow: hidden;
  color: #4d777f;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-status-total-badge > b {
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.08;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-dark:not(.pdf-body) .invoice-status-total-badge {
  border-color: rgba(94, 225, 255, .20);
  background:
    radial-gradient(circle at 92% 8%, rgba(23, 186, 216, .16), transparent 42%),
    linear-gradient(135deg, rgba(8, 48, 55, .92), rgba(5, 29, 32, .86));
  color: #a9f2ff;
}

body.theme-dark:not(.pdf-body) .invoice-status-total-badge > span {
  color: rgba(198, 246, 255, .68);
}

@media (min-width: 901px) {
  #invoices .invoice-filter-rail {
    grid-template-columns:
      44px
      minmax(96px, .40fr)
      minmax(158px, .58fr)
      minmax(144px, .56fr)
      minmax(112px, .43fr)
      minmax(120px, .48fr)
      minmax(94px, .34fr)
      40px
      minmax(106px, .40fr) !important;
    gap: 6px !important;
  }
}

#invoices .invoice-detail-table {
  min-width: 1100px !important;
}

#invoices .panel:has(.invoice-resizable-table) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

#invoices .invoice-detail-table.invoice-resizable-table {
  max-width: none !important;
  table-layout: fixed !important;
}

#invoices .invoice-detail-table.invoice-resizable-table th,
#invoices .invoice-detail-table.invoice-resizable-table td {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box;
  overflow: hidden;
}

#invoices .invoice-detail-table.invoice-resizable-table th {
  position: relative;
  padding-right: 13px;
}

#invoices .invoice-detail-table.invoice-resizable-table th .sort-header {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#invoices .invoice-detail-table.invoice-resizable-table .invoice-customer-cell > b,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-customer-cell > small,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-issued-cell > b,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-issued-cell > small,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-number-cell > b,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-number-cell > small,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-details-cell > b,
#invoices .invoice-detail-table.invoice-resizable-table .invoice-details-cell > small {
  display: block;
  width: 100%;
  max-width: 100% !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-column-resizer {
  position: absolute;
  z-index: 5;
  top: 5px;
  right: -4px;
  bottom: 5px;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.invoice-column-resizer::after {
  content: "";
  position: absolute;
  top: 14%;
  right: 4px;
  bottom: 14%;
  width: 1px;
  border-radius: 2px;
  background: rgba(77, 119, 127, .22);
  transition: background .16s ease, width .16s ease;
}

.invoice-column-resizer:hover::after,
.invoice-detail-table.is-resizing-column .invoice-column-resizer::after {
  width: 2px;
  background: #0891b2;
}

body.invoice-column-resize-active,
body.invoice-column-resize-active * {
  cursor: col-resize !important;
  user-select: none !important;
}

body.theme-dark:not(.pdf-body) .invoice-column-resizer::after {
  background: rgba(148, 210, 222, .30);
}

body.theme-dark:not(.pdf-body) .invoice-column-resizer:hover::after,
body.theme-dark:not(.pdf-body) .invoice-detail-table.is-resizing-column .invoice-column-resizer::after {
  background: #22d3ee;
}

#invoices .invoice-number-cell {
  width: 158px !important;
  min-width: 158px !important;
}

#invoices .invoice-detail-table th .sort-header {
  max-width: 100%;
  gap: 4px;
  font-size: 10.5px;
  white-space: nowrap;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  padding: 6px 8px !important;
  font-size: clamp(12px, 1vw, 16px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.025em !important;
  text-align: center;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  #invoices .invoice-filter-rail {
    grid-template-columns: 44px repeat(2, minmax(138px, 1fr)) !important;
    gap: 7px !important;
    overflow-x: auto !important;
  }

  #invoices .invoice-status-total-badge {
    width: 100%;
  }

  #dashboard .dashboard-command-copy .dashboard-eyebrow {
    padding: 3px 7px !important;
    font-size: 9.5px !important;
    line-height: 1.05 !important;
  }

  #dashboard .dashboard-mobile-title-reset {
    font-size: 10px !important;
    font-weight: 900 !important;
  }

  #dashboard .dashboard-mobile-filter-panel input,
  #dashboard .dashboard-mobile-filter-panel select,
  #dashboard .dashboard-mobile-filter-button {
    padding-inline: 8px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: -.015em !important;
  }

  #dashboard .dashboard-mobile-filter-panel select {
    padding-right: 22px !important;
  }

  #dashboard .dashboard-mobile-central-select select {
    padding: 0 21px 0 8px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: -.015em !important;
  }
}

@media (max-width: 620px) {
  .calendar-filter-strip {
    grid-template-columns: minmax(62px, 1fr) minmax(62px, 1fr) auto auto;
    gap: 4px;
    padding: 4px;
  }

  .calendar-filter-strip select,
  .calendar-filter-strip .calendar-filter-reset {
    height: 34px;
    min-height: 34px;
    padding-inline: 8px;
    font-size: 10.5px;
  }

  .calendar-filter-strip .calendar-filter-count {
    padding: 6px 8px;
    font-size: 10px;
  }

  .calendar-filter-strip .calendar-filter-count-suffix {
    display: none;
  }
}

/* V2.259: one transaction for company settings and a compact work-plan workspace. */
.settings-page-head {
  align-items: flex-start;
  gap: 14px;
}

.settings-page-actions {
  margin-left: auto;
  flex: 0 0 auto;
}

.settings-page-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settings-page-field input,
.settings-page-field select,
.settings-page-field textarea {
  min-width: 0;
  color: var(--ink);
}

.settings-page-field input:disabled,
.settings-page-field select:disabled,
.settings-page-field textarea:disabled {
  opacity: .78;
  cursor: default;
  background: color-mix(in srgb, var(--panel) 82%, var(--bg));
}

.settings-page-textarea {
  grid-column: span 2;
}

.settings-page-textarea textarea {
  min-height: 86px;
  resize: vertical;
}

.work-plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.work-plan-table-wrap {
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 14px;
}

.work-plan-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.work-plan-dialog {
  width: min(880px, calc(100vw - 28px));
  max-width: 880px;
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
}

.work-plan-dialog::backdrop {
  background: rgba(6, 20, 18, .52);
}

.work-plan-dialog .dialog {
  max-width: none;
}

.work-plan-dialog-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.work-plan-dialog-total span {
  color: var(--muted);
  font-size: 12px;
}

.work-plan-notes {
  display: grid;
  gap: 6px;
}

.work-plan-notes textarea {
  min-height: 82px;
  resize: vertical;
}

@media (max-width: 820px) {
  .work-plan-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-page-textarea {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .settings-page-head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .settings-page-actions {
    width: 100%;
    margin-left: 0;
  }

  .settings-page-actions button {
    flex: 1 1 auto;
  }

  .work-plan-summary {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .work-plan-summary .stat {
    min-height: 84px;
    padding: 10px;
  }

  .work-plan-dialog {
    width: min(100vw - 16px, 880px);
  }
}
 

/* The user profile list distinguishes a staff profile from an activated login without increasing row height. */
.user-profile-login-state { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.user-profile-actions { white-space: nowrap; }
.user-profile-actions button { margin: 0 2px 2px 0; padding: 6px 8px; font-size: 11px; }
#customerDialog > .dialog,
#productDialog > .dialog { max-height: calc(100dvh - 28px); overflow: auto; }

@media (max-width: 760px) {
  #customerDialog > .dialog,
  #productDialog > .dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 12px; }
  #customerDialog .grid.two,
  #productDialog .grid.two,
  #customerDialog .compact-form-grid,
  #productDialog .product-dialog-grid { grid-template-columns: minmax(0, 1fr); }
  .user-profile-actions { white-space: normal; }
}
/* V2.243 modular source compatibility bundle */
body[data-account-font="system"] { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body[data-account-font="serif"] { font-family: Georgia, "Times New Roman", serif; }
body[data-account-font="rounded"] { font-family: ui-rounded, "Arial Rounded MT Bold", "Segoe UI", sans-serif; }
body[data-account-font="inter"] { font-family: Inter, "Segoe UI", Arial, sans-serif; }
.account-settings-shell{display:grid;gap:16px}.account-settings-card{overflow:visible}.account-form-grid label,.account-delete-flow>label,.account-inline-verify label{display:grid;gap:7px;font-weight:700;color:var(--text)}.account-inline-verify,.account-lifecycle-actions,.account-delete-flow{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-top:14px}.account-inline-verify[hidden]{display:none}.account-delete-flow{padding-top:16px;border-top:1px solid var(--border)}.account-danger-zone{border-color:color-mix(in srgb,#dc2626 35%,var(--border))}.billing-current-plan{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.billing-current-plan>div{display:grid;gap:4px;padding:13px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--panel) 92%,#0ea5e9 8%)}.billing-current-plan span{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.billing-plan-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.billing-plan-card{display:flex;flex-direction:column;gap:9px;min-height:226px;padding:16px;border:1px solid var(--border);border-radius:18px;background:var(--panel)}.billing-plan-card.is-current{border-color:#14b8a6;box-shadow:0 0 0 2px color-mix(in srgb,#14b8a6 16%,transparent)}.billing-plan-card>span{font-size:.72rem;font-weight:800;text-transform:uppercase;color:#078b68}.billing-plan-card h4{margin:0;font-size:1.15rem}.billing-plan-card strong{font-size:1.28rem}.billing-plan-card strong small{display:block;margin-top:2px;font-size:.68rem;color:var(--muted)}.billing-plan-card p{flex:1;margin:0;color:var(--muted);font-size:.82rem;line-height:1.45}.billing-history-table{min-width:900px}.billing-history-table td,.billing-history-table th{white-space:nowrap}
.dashboard-unified-legend{display:flex;align-items:center;flex-wrap:wrap;gap:5px 9px;margin:5px 0 0;padding-top:6px;border-top:1px solid rgba(30,76,66,.10)}.dashboard-unified-legend button{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border:0;background:transparent;color:var(--text);font-size:.66rem;box-shadow:none}.dashboard-unified-legend button i{width:9px;height:9px;border-radius:50%;background:var(--series-color);flex:none}.dashboard-unified-legend button.is-off{opacity:.35;text-decoration:line-through}.dashboard-unified-legend small{margin-left:auto;color:var(--muted);font-size:.62rem}.dashboard-unified-line{fill:none;stroke:var(--series-color);stroke-width:2.15;vector-effect:non-scaling-stroke}.dashboard-unified-line.previous{stroke-dasharray:5 6;opacity:.34;stroke-width:1.6}.dashboard-unified-point{fill:var(--series-color);stroke:var(--panel);stroke-width:1;vector-effect:non-scaling-stroke}#dashboard .dashboard-net-card{grid-template-rows:auto minmax(92px,1fr) auto!important;gap:7px!important;min-height:210px!important;padding:14px 17px 11px!important}
#dashboard .dashboard-net-chart-plot{grid-template-rows:minmax(72px,1fr) auto;min-height:92px;overflow:visible}
#dashboard .dashboard-unified-chart-svg{height:100%;min-height:0;max-height:112px;overflow:hidden}
.dashboard-net-chart-hit-layer{position:absolute;z-index:4;inset:0 0 18px;pointer-events:none}
.dashboard-net-chart-hit{position:absolute;top:0;bottom:0;left:var(--hover-left);width:max(14px,calc(100% / var(--bucket-count)));transform:translateX(-50%);pointer-events:auto;outline:none}
.dashboard-net-chart-hit.is-start{transform:none}
.dashboard-net-chart-hit.is-end{transform:translateX(-100%)}
.dashboard-net-chart-guide{position:absolute;top:4px;bottom:0;left:50%;width:1px;border-left:1px dotted color-mix(in srgb,#0f766e 56%,transparent);opacity:0;transition:opacity .16s ease}
.dashboard-net-chart-hit.is-start .dashboard-net-chart-guide{left:0}
.dashboard-net-chart-hit.is-end .dashboard-net-chart-guide{left:100%}
.dashboard-net-chart-tooltip{position:absolute;z-index:8;top:4px;left:50%;display:none;width:min(188px,64vw);padding:6px 7px;border:1px solid rgba(20,73,63,.10);border-radius:8px;background:color-mix(in srgb,var(--panel) 76%,transparent);box-shadow:0 8px 20px rgba(15,45,38,.11);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);color:var(--text);font-weight:400!important;text-transform:none!important;transform:translateX(-50%);pointer-events:none}
.dashboard-net-chart-hit.is-start .dashboard-net-chart-tooltip{left:0;transform:none}
.dashboard-net-chart-hit.is-end .dashboard-net-chart-tooltip{right:0;left:auto;transform:none}
.dashboard-net-chart-hit:hover .dashboard-net-chart-tooltip,.dashboard-net-chart-hit:focus .dashboard-net-chart-tooltip{display:grid;gap:3px}
.dashboard-net-chart-hit:hover .dashboard-net-chart-guide,.dashboard-net-chart-hit:focus .dashboard-net-chart-guide{opacity:1}
.dashboard-net-chart-tooltip>strong{padding-bottom:3px;border-bottom:1px solid rgba(30,76,66,.08);font-size:9.5px!important;font-weight:600!important;line-height:1.2;text-align:left;text-transform:none!important}
.dashboard-net-tooltip-row{display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:4px;font-size:9px!important;font-weight:400!important;line-height:1.15;text-align:left;text-transform:none!important}
.dashboard-net-tooltip-row>i{width:5.5px;height:5.5px;border-radius:50%;background:var(--series-color)}
#dashboard .dashboard-net-tooltip-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px!important;font-weight:400!important;text-transform:none!important}
#dashboard .dashboard-net-tooltip-row>b{font-size:9px!important;font-weight:600!important;letter-spacing:0!important;line-height:1.15!important;text-transform:none!important;white-space:nowrap}
#dashboard .trend-panel-growth{grid-template-rows:auto minmax(0,1fr) auto auto!important;gap:10px!important;min-height:0;overflow:hidden}
#dashboard .trend-panel-growth .trend-chart{display:grid;min-height:0!important;height:auto!important;box-sizing:border-box;overflow:hidden}
#dashboard .trend-panel-growth .trend-chart svg{width:100%;height:100%!important;min-height:0!important;max-height:100%;align-self:stretch}
#dashboard .trend-panel-growth .trend-axis{min-height:18px;margin-top:0;padding-bottom:0}
@media(max-width:900px){#dashboard .dashboard-net-card{min-height:196px!important}#dashboard .trend-panel-growth{grid-template-rows:auto minmax(190px,230px) auto auto!important}#dashboard .trend-panel-growth .trend-chart{height:clamp(190px,52vw,230px)!important;min-height:190px!important}}.dashboard-modern-metric .dashboard-metric-sparkline{display:none!important}

/* V2.244: compact finance hero with the net summary in the period card. */
#dashboard .dashboard-hero-main {
  grid-template-columns: minmax(205px, .31fr) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, auto) auto;
  align-items: stretch;
  gap: 10px 12px !important;
  padding: 14px !important;
}

#dashboard .dashboard-hero-heading {
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start !important;
  gap: 6px !important;
  min-height: 0 !important;
  padding: 11px 12px !important;
  border-radius: 20px !important;
}

#dashboard .dashboard-hero-heading > span {
  font-size: 10px !important;
  line-height: 1 !important;
}

#dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  width: 100% !important;
  min-width: 0;
  padding: 5px 7px !important;
  border-radius: 12px !important;
  font-size: clamp(11px, .92vw, 14px) !important;
  line-height: 1.05 !important;
  text-align: left;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dashboard .dashboard-active-profile {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 7px !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 5px 7px !important;
  border-radius: 12px !important;
}

#dashboard .dashboard-active-profile small {
  flex: 0 0 auto;
  font-size: 8px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

#dashboard .dashboard-active-profile b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard .dashboard-net-summary {
  align-self: end;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(23, 108, 95, .12);
}

#dashboard .dashboard-net-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

#dashboard .dashboard-net-summary small {
  color: var(--dashboard-muted);
  font-size: 9px !important;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

#dashboard .dashboard-net-summary b {
  min-width: 0;
  color: #0f766e;
  font-size: clamp(15px, 1.2vw, 20px) !important;
  line-height: 1 !important;
  letter-spacing: -.035em;
  text-align: right;
  white-space: nowrap;
}

#dashboard .dashboard-net-summary-negative b {
  color: #c2410c;
}

#dashboard .dashboard-net-summary em {
  overflow: hidden;
  color: #607c75;
  font-size: 8.5px !important;
  font-style: normal;
  font-weight: 750;
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard .dashboard-net-card {
  grid-template-rows: minmax(78px, 1fr) auto !important;
  gap: 5px !important;
  min-height: 0 !important;
  padding: 9px 13px 8px !important;
}

#dashboard .dashboard-net-chart-plot {
  grid-template-rows: minmax(66px, 1fr) auto;
  min-height: 78px;
}

#dashboard .dashboard-unified-legend {
  margin-top: 1px;
  padding-top: 4px;
  gap: 3px 7px;
}

#dashboard .dashboard-unified-legend button {
  padding: 2px 4px;
  font-size: .61rem;
}

#dashboard .dashboard-unified-legend small {
  font-size: .56rem;
}

#dashboard .dashboard-modern-metrics {
  align-items: stretch;
  gap: 9px !important;
}

#dashboard .dashboard-modern-metric {
  min-height: 100px !important;
  padding: 11px 13px !important;
  gap: 4px !important;
}

#dashboard .dashboard-modern-metric b {
  font-size: clamp(16px, 1.2vw, 22px) !important;
}

#dashboard .dashboard-modern-metric small {
  font-size: 10px !important;
  line-height: 1.2 !important;
}

#dashboard .dashboard-modern-metric em {
  font-size: 9px !important;
  line-height: 1.15 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-summary {
  border-top-color: rgba(125, 255, 224, .16);
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-summary small,
body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-summary em {
  color: #9fc6bc !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-summary b {
  color: #5eead4 !important;
}

body.theme-dark:not(.pdf-body) #dashboard .dashboard-net-summary-negative b {
  color: #fb923c !important;
}

#dashboard .dashboard-chart-card-growth .trend-metric-card-growth {
  position: relative;
  isolation: isolate;
  grid-template-rows: auto auto minmax(18px, 1fr);
  align-content: stretch;
  min-width: 0;
  overflow: hidden;
}

#dashboard .trend-metric-card-growth > span,
#dashboard .trend-metric-card-growth > b,
#dashboard .trend-metric-card-growth > .growth-card-compare {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: 62%;
}

#dashboard .trend-metric-card-growth > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#dashboard .growth-card-sparkline {
  position: absolute;
  z-index: 1;
  right: 7px;
  bottom: 7px;
  width: 63%;
  height: 72%;
  overflow: visible;
  pointer-events: none;
  opacity: .34;
}

#dashboard .growth-card-sparkline polygon {
  fill: color-mix(in srgb, var(--growth-line) 15%, transparent);
}

#dashboard .growth-card-sparkline polyline {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#dashboard .growth-card-series-current {
  stroke: var(--growth-line);
  stroke-width: 2;
}

#dashboard .growth-card-series-previous {
  stroke: color-mix(in srgb, var(--trend-color) 64%, #80928d);
  stroke-width: 1.35;
  stroke-dasharray: 4 4;
  opacity: .7;
}

#dashboard .growth-card-compare {
  align-self: end;
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  color: #647b75;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
}

#dashboard .growth-card-compare span {
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-overflow: ellipsis;
}

#dashboard .growth-card-compare strong {
  color: var(--ink);
  font-size: 10px;
}

#dashboard .growth-card-compare em {
  color: #64748b;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

#dashboard .growth-card-compare-up em {
  color: #059669;
}

#dashboard .growth-card-compare-down em {
  color: #dc2626;
}

body.theme-dark:not(.pdf-body) #dashboard .growth-card-sparkline {
  opacity: .44;
}

body.theme-dark:not(.pdf-body) #dashboard .growth-card-compare,
body.theme-dark:not(.pdf-body) #dashboard .growth-card-compare span {
  color: #9fc6bc !important;
}

body.theme-dark:not(.pdf-body) #dashboard .growth-card-compare strong {
  color: #effffb;
}

body.theme-dark:not(.pdf-body) #dashboard .growth-card-compare-up em {
  color: #5eead4;
}

body.theme-dark:not(.pdf-body) #dashboard .growth-card-compare-down em {
  color: #fb7185;
}

@media (max-width: 900px) {
  #dashboard .dashboard-hero-main {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto;
    overflow: visible !important;
  }

  #dashboard .dashboard-hero-heading {
    min-height: 126px !important;
  }

  #dashboard .dashboard-net-card {
    grid-column: 1 !important;
    min-height: 150px !important;
  }

  #dashboard .dashboard-modern-metrics {
    grid-column: 1 !important;
  }
}
.navigation-hub-screen {
  display: grid;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(4px, 1vw, 12px);
}

.navigation-hub-head {
  display: grid;
  gap: 5px;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid rgba(71, 150, 138, .2);
  border-radius: 24px;
  background: linear-gradient(125deg, rgba(255,255,255,.88), rgba(223,252,247,.66));
  box-shadow: 0 16px 42px rgba(20, 76, 69, .08);
}

.navigation-hub-head > span {
  color: var(--active-nav-color, #176c5f);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.navigation-hub-head h2,
.navigation-hub-head p {
  margin: 0;
}

.navigation-hub-head h2 {
  color: #143c36;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.05;
}

.navigation-hub-head p {
  max-width: 680px;
  color: #5b746e;
  font-size: 13px;
  line-height: 1.5;
}

.navigation-hub-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  margin: 0 !important;
}

.navigation-hub-grid .dashboard-menu-card {
  min-height: 170px !important;
}

body.theme-dark:not(.pdf-body) .navigation-hub-head {
  border-color: rgba(111, 232, 211, .19);
  background: linear-gradient(125deg, rgba(12, 37, 34, .96), rgba(14, 61, 54, .74));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .2);
}

body.theme-dark:not(.pdf-body) .navigation-hub-head h2 {
  color: #ecfffa;
}

body.theme-dark:not(.pdf-body) .navigation-hub-head p {
  color: #a7c7c0;
}

@media (max-width: 520px) {
  .navigation-hub-screen {
    gap: 11px;
    padding: 0;
  }

  .navigation-hub-head {
    padding: 16px;
    border-radius: 18px;
  }

  .navigation-hub-head h2 {
    font-size: 22px;
  }

  .navigation-hub-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .navigation-hub-grid .dashboard-menu-card {
    min-height: 138px !important;
  }

  #dashboard .dashboard-hero-main {
    padding: 9px !important;
  }

  #dashboard .dashboard-hero-main .dashboard-hero-heading > strong {
    font-size: 11px !important;
  }

  #dashboard .dashboard-net-summary b {
    font-size: 15px !important;
  }

  #dashboard .dashboard-modern-metrics {
    grid-template-columns: 1fr !important;
  }

  #dashboard .trend-metric-card-growth > span,
  #dashboard .trend-metric-card-growth > b,
  #dashboard .trend-metric-card-growth > .growth-card-compare {
    max-width: 72%;
  }

  #dashboard .growth-card-sparkline {
    width: 58%;
  }
}
.invoice-detail-row.is-action-open{position:relative;background:color-mix(in srgb,#0ea5e9 10%,var(--panel));outline:2px solid color-mix(in srgb,#0ea5e9 68%,transparent);outline-offset:-2px}.invoice-detail-row.is-action-open>td:first-child{box-shadow:inset 4px 0 #0ea5e9}.invoice-row-action-panel{font-size:12px;line-height:1.32}#invoices .invoice-row-action-panel button,#invoices .invoice-row-action-panel select{font-size:12px!important;line-height:1.2}.invoice-row-action-panel small{font-size:.68em}.invoice-sticky-actions{position:sticky;z-index:25;bottom:0;margin:18px -18px -18px;padding:12px 18px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:color-mix(in srgb,var(--panel) 94%,transparent);backdrop-filter:blur(16px);box-shadow:0 -12px 30px rgba(15,23,42,.09)}#invoiceDialog[open]{max-height:calc(100dvh - 24px);overflow:hidden}#invoiceDialog #invoiceForm{max-height:calc(100dvh - 92px);overflow:auto;overscroll-behavior:contain;padding-bottom:2px}.product-detail-table tr.clickable-row:focus-within,.product-detail-table tr.clickable-row:hover{background:color-mix(in srgb,#14b8a6 7%,var(--panel))}
.invoice-page:not(.mazodor-page) .invoice-lines-block table{width:100%;table-layout:fixed}.invoice-page:not(.mazodor-page) .invoice-lines-block th,.invoice-page:not(.mazodor-page) .invoice-lines-block td{overflow-wrap:anywhere}.invoice-layout-modern .invoice-page,.invoice-layout-corporate .invoice-page,.invoice-layout-compact .invoice-page,.invoice-layout-service .invoice-page{padding-inline:clamp(26px,5vw,58px)}
body.theme-dark .account-danger-zone{background:color-mix(in srgb,#3f1519 58%,var(--panel))}body.theme-dark .invoice-detail-row.is-action-open{background:color-mix(in srgb,#0ea5e9 18%,var(--panel))}body.theme-dark .invoice-sticky-actions{background:color-mix(in srgb,var(--panel) 90%,transparent)}
@media(max-width:1050px){.billing-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.account-form-grid,.billing-current-plan{grid-template-columns:1fr!important}.billing-plan-grid{grid-template-columns:1fr}.billing-plan-card{min-height:0}.dashboard-unified-legend button{font-size:.59rem;padding:2px 4px}.dashboard-unified-legend small{width:100%;margin-left:0}.invoice-sticky-actions{margin-inline:-10px;padding-inline:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-row-action-panel{font-size:1.18em}.account-inline-verify,.account-lifecycle-actions,.account-delete-flow{align-items:stretch;flex-direction:column}.account-inline-verify>*{width:100%}}

/* V2.247 delivery-note register */
#deliveryNotes .delivery-note-filter-rail {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(150px, .42fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, .20);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,247,232,.76));
}

#deliveryNotes .delivery-note-filter-rail label,
#deliveryNotes .delivery-note-status-filter {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

#deliveryNotes .delivery-note-filter-rail label > span {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#deliveryNotes .delivery-note-filter-rail input,
#deliveryNotes .delivery-note-filter-rail select,
#deliveryNotes .delivery-note-filter-rail button {
  min-height: 38px;
}

#deliveryNotes .delivery-note-result-count {
  align-self: center;
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  color: #a45b00;
  background: rgba(245, 158, 11, .13);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

#deliveryNotes .delivery-note-panel {
  overflow-x: auto;
}

#deliveryNotes .delivery-note-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

#deliveryNotes .delivery-note-table th,
#deliveryNotes .delivery-note-table td {
  vertical-align: middle;
}

#deliveryNotes .delivery-note-table th:nth-child(1) { width: 44px; }
#deliveryNotes .delivery-note-table th:nth-child(2) { width: 145px; }
#deliveryNotes .delivery-note-table th:nth-child(3) { width: 145px; }
#deliveryNotes .delivery-note-table th:nth-child(4) { width: 215px; }
#deliveryNotes .delivery-note-table th:nth-child(5) { width: 120px; }
#deliveryNotes .delivery-note-table th:nth-child(6) { width: 215px; }
#deliveryNotes .delivery-note-table th:nth-child(7) { width: 125px; }
#deliveryNotes .delivery-note-table th:nth-child(8) { width: 205px; }

#deliveryNotes .delivery-note-table b,
#deliveryNotes .delivery-note-table small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#deliveryNotes .delivery-note-table small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-note-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.delivery-note-actions button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}

.delivery-note-status-created { color: #a16207 !important; background: rgba(245,158,11,.14) !important; }
.delivery-note-status-sent { color: #047857 !important; background: rgba(16,185,129,.14) !important; }
.delivery-note-status-failed { color: #be123c !important; background: rgba(244,63,94,.12) !important; }
.delivery-note-empty { padding: 22px; color: var(--muted); text-align: center; }

body.theme-dark:not(.pdf-body) #deliveryNotes .delivery-note-filter-rail {
  border-color: rgba(251,191,36,.22) !important;
  background: linear-gradient(135deg, rgba(251,191,36,.08), rgba(8,20,18,.88)) !important;
}

body.theme-dark:not(.pdf-body) #deliveryNotes .delivery-note-filter-rail input,
body.theme-dark:not(.pdf-body) #deliveryNotes .delivery-note-filter-rail select,
body.theme-dark:not(.pdf-body) #deliveryNotes .delivery-note-filter-rail button {
  border-color: rgba(181,232,220,.16) !important;
  background: rgba(12,30,26,.94) !important;
  color: #effff9 !important;
}

body.theme-dark:not(.pdf-body) #deliveryNotes .delivery-note-result-count { color: #fcd34d; background: rgba(245,158,11,.18); }
body.theme-dark:not(.pdf-body) .delivery-note-status-created { color: #fcd34d !important; }
body.theme-dark:not(.pdf-body) .delivery-note-status-sent { color: #6ee7b7 !important; }
body.theme-dark:not(.pdf-body) .delivery-note-status-failed { color: #fda4af !important; }

@media (max-width: 760px) {
  #deliveryNotes .delivery-note-filter-rail { grid-template-columns: 1fr 1fr; }
  #deliveryNotes .delivery-note-filter-rail .search-box { grid-column: 1 / -1; }
  #deliveryNotes .delivery-note-result-count { justify-self: start; }
}
.invoice-delivery-note-create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  grid-column: span 2;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px dashed color-mix(in srgb, var(--line) 80%, var(--accent) 20%);
  border-radius: 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 92%, var(--accent-soft) 8%);
}

.invoice-delivery-note-create button {
  flex: 0 0 auto;
  white-space: nowrap;
}

#offers .offer-detail-row,
#deliveryNotes .delivery-note-detail-row {
  cursor: pointer;
}

#offers .offer-detail-row:hover,
#deliveryNotes .delivery-note-detail-row:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

#offers .offer-row-action-menu,
#deliveryNotes .delivery-note-row-action-menu {
  min-width: 112px;
}

#offers .offers-compact-table .row-actions,
#deliveryNotes .delivery-note-table .row-actions {
  width: 142px;
  min-width: 142px;
}

.offer-line-items {
  display: grid;
  gap: 9px;
}

/* V2.250: Platform admin details and scoped permissions */
.platform-admin-row {
  display: grid;
  grid-template-columns: minmax(170px, .75fr) minmax(280px, 1.6fr) auto;
  gap: 14px;
  align-items: center;
  cursor: pointer;
}

.platform-admin-row:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--panel));
}

.platform-admin-row-summary,
.platform-admin-permission-badges,
.platform-admin-permission-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.platform-admin-row-summary .badge,
.platform-admin-permission-badges .badge {
  font-size: .7rem;
  line-height: 1.15;
}

.platform-admin-dialog {
  width: min(960px, calc(100vw - 28px));
}

.platform-admin-dialog-grid {
  display: grid;
  gap: 14px;
}

.platform-admin-dialog .panel h3 {
  margin: 0 0 12px;
}

.platform-admin-permission-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
}

.platform-admin-password-fields {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .platform-admin-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .platform-admin-row .admin-user-actions {
    justify-content: flex-start;
  }

  .platform-admin-permission-editor {
    grid-template-columns: 1fr;
  }
}

.offer-line-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(150px, 1.7fr) repeat(5, minmax(92px, .7fr)) 34px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent) 16%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 96%, var(--accent) 4%);
}

.offer-line-row label {
  min-width: 0;
}

.offer-line-sku {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.offer-line-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.offer-draft-summary {
  margin-top: 12px;
}

.delivery-note-edit-text {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .offer-line-row { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 680px) {
  .offer-line-row { grid-template-columns: 1fr 1fr; }
  .offer-line-row .invoice-product-picker,
  .offer-line-row label:nth-child(2) { grid-column: 1 / -1; }
  #offers .offers-compact-table .row-actions,
  #deliveryNotes .delivery-note-table .row-actions { width: 116px; min-width: 116px; }
}

@media (max-width: 680px) {
  .invoice-delivery-note-create { grid-column: span 1; align-items: flex-start; flex-direction: column; }
}

/* V2.251: source-aware inventory allocation and server-backed movement ledger. */
.stock-allocation-field {
  min-width: 0;
}

.stock-allocation-field.is-hidden {
  display: none !important;
}

.stock-allocation-field select {
  min-width: 0;
}

@media (min-width: 901px) {
  .invoice-line-editor-panel .line-row {
    grid-template-columns:
      minmax(158px, 1.08fr)
      minmax(150px, 1.08fr)
      66px
      82px
      minmax(142px, .92fr)
      92px
      74px
      78px
      38px !important;
  }
}

.offer-line-row {
  grid-template-columns: minmax(170px, 1.7fr) minmax(145px, 1.45fr) 70px 86px minmax(150px, .95fr) 88px 74px 76px 34px;
}

.delivery-note-stock-allocation {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-soft) 28%, var(--panel));
}

.delivery-note-stock-lines {
  display: grid;
  gap: 8px;
}

.delivery-note-stock-lines > label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .72fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.delivery-note-stock-lines span,
.delivery-note-stock-lines small {
  display: block;
}

.delivery-note-stock-lines small {
  margin-top: 2px;
  color: var(--muted);
}

.stock-movement-panel {
  margin-top: 14px;
}

.stock-movement-table-wrap {
  overflow-x: auto;
}

.stock-movement-quantity {
  font-weight: 800;
}

.stock-movement-quantity.out { color: #c43e35; }
.stock-movement-quantity.in { color: #138a69; }

.delivery-note-lines .delivery-col-description { width: 53%; }
.delivery-note-lines .delivery-col-qty { width: 11%; }
.delivery-note-lines .delivery-col-unit { width: 11%; }
.delivery-note-lines .delivery-col-location { width: 20%; }
.delivery-note-lines td.delivery-note-location,
.delivery-note-lines th:nth-child(5) { white-space: normal; }

@media (max-width: 1100px) {
  .offer-line-row { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 680px) {
  .delivery-note-stock-lines > label { grid-template-columns: 1fr; gap: 5px; }
}

/* V2.252: immutable inventory movements, cost pricing, and low-stock visibility. */
.product-detail-table th:nth-last-child(5),
.product-detail-table td:nth-last-child(5),
.product-detail-table th:nth-last-child(4),
.product-detail-table td:nth-last-child(4),
.product-detail-table th:nth-last-child(3),
.product-detail-table td:nth-last-child(3),
.product-detail-table th:nth-last-child(2),
.product-detail-table td:nth-last-child(2) {
  white-space: nowrap;
}

.stock-low-badge {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border-radius: 999px;
  background: #d94c43;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
}

.product-dialog-grid {
  gap: 10px;
}

.product-dialog-grid label,
.product-location-readonly {
  min-width: 0;
}

.product-inventory-card {
  margin-top: 10px;
  padding: 12px;
}

.product-inventory-card .panel-head {
  align-items: flex-start;
  gap: 10px;
}

.product-location-grid {
  gap: 8px;
}

.product-location-readonly {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 30px 30px;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
}

.product-location-readonly span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-location-readonly b {
  font-variant-numeric: tabular-nums;
}

.product-location-readonly .icon-button {
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
}

.product-movement-history {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 96%, var(--accent-soft));
}

.product-movement-history .panel-head {
  align-items: flex-start;
}

.product-movement-after-save {
  margin: 10px 0 0;
}

.stock-movement-dialog {
  width: min(680px, calc(100vw - 28px));
  max-width: 680px;
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 28px 78px rgba(10, 36, 39, .28);
}

.stock-movement-feedback {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--danger, #c0392b) 42%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger, #c0392b) 10%, transparent);
  color: var(--danger, #a92d24);
  font-size: .84rem;
  line-height: 1.35;
}

.stock-movement-feedback[data-tone="info"] {
  border-color: color-mix(in srgb, var(--accent, #008f84) 30%, transparent);
  background: color-mix(in srgb, var(--accent, #008f84) 8%, transparent);
  color: var(--text, #17332f);
}

.stock-movement-dialog::backdrop {
  background: rgba(8, 26, 31, .46);
  backdrop-filter: blur(3px);
}

.stock-movement-dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.stock-movement-dialog .dialog-head {
  padding: 0;
}

.stock-movement-dialog .form-actions {
  margin: 0;
}

.stock-location-product-ledger-panel .stock-location-panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 680px) {
  .product-location-readonly { grid-template-columns: minmax(0, 1fr) auto 28px 28px; }
  .stock-movement-dialog form { padding: 14px; }
  .stock-movement-form-grid { grid-template-columns: 1fr; }
  .stock-directory-panel-actions { flex-wrap: wrap; }
}
 

/* Compact, responsive stock location detail: every long value remains inside its card. */
.stock-location-dialog {
  width: min(1060px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 16px;
}

.stock-location-dialog .dialog-head { gap: 10px; margin-bottom: 12px; }
.stock-location-dialog .dialog-head h3,
.stock-location-dialog .dialog-head p { margin: 0; }

.stock-location-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stock-location-cards .stat,
.stock-location-detail-grid .panel,
.stock-location-team-panel,
.stock-location-logo-panel { min-width: 0; padding: 10px; }

.stock-location-cards .stat { display: grid; align-content: start; gap: 3px; min-height: 0; }
.stock-location-cards .stat span,
.stock-location-cards .stat b,
.stock-location-detail-grid td,
.stock-location-detail-grid th { min-width: 0; overflow-wrap: anywhere; }
.stock-location-cards .stat span { font-size: 10px; }
.stock-location-cards .stat b { font-size: 13px; line-height: 1.25; }

.stock-location-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stock-location-detail-grid table { width: 100%; table-layout: fixed; }
.stock-location-detail-grid table th,
.stock-location-detail-grid table td { padding: 7px 8px; font-size: 12px; }
.stock-location-edit-grid { gap: 8px; margin-bottom: 10px; }
.stock-location-team-panel,
.stock-location-logo-panel { margin-bottom: 10px !important; }
.stock-movement-dialog { max-height: calc(100dvh - 28px); overflow: auto; }

@media (max-width: 760px) {
  .stock-location-overlay { padding: 8px; }
  .stock-location-dialog { width: 100%; max-height: calc(100dvh - 16px); padding: 12px; }
  .stock-location-dialog .dialog-head,
  .stock-location-modal-actions { align-items: stretch; flex-wrap: wrap; }
  .stock-location-modal-actions button { flex: 1 1 auto; }
  .stock-location-detail-grid,
  .stock-location-edit-grid,
  .stock-location-inventory-editor-grid,
  .product-dialog-grid { grid-template-columns: minmax(0, 1fr); }
  .stock-location-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-location-detail-grid .panel { overflow-x: auto; }
}
