:root {
  color-scheme: dark;
  --bg: #050608;
  --panel: #111827;
  --panel-soft: #0b1220;
  --line: #273244;
  --text: #f8fafc;
  --muted: #9ca3af;
  --primary: #14b8a6;
  --primary-soft: #0f3f3c;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --shadow: 0 18px 45px rgba(0, 0, 0, .35);
  --surface-glass: linear-gradient(180deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .88));
  --surface-glow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 16px 36px rgba(0, 0, 0, .30);
  --surface-line: rgba(148, 163, 184, .30);
  --surface-line-strong: rgba(148, 163, 184, .52);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }

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

.initial-loading {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin: 12vh auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.initial-loading strong {
  font-size: 18px;
}

.initial-loading span {
  color: var(--muted);
  font-size: 13px;
}

.initial-loading::before {
  content: "";
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
  animation: loadingPulse 1s ease-in-out infinite alternate;
}

@keyframes loadingPulse {
  from { opacity: .35; transform: scaleX(.55); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.login-page {
  min-height: 100vh;
  background-color: #030712;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, .86) 0%, rgba(2, 6, 23, .66) 36%, rgba(2, 6, 23, .18) 67%, rgba(2, 6, 23, .38) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, .24), rgba(2, 6, 23, .42)),
    url("/assets/bruna-login.jpg") 58% center / cover no-repeat;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .91), rgba(7, 13, 27, .94));
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.login-brand {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 14px;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(20, 184, 166, .18);
}

.login-heading {
  display: grid;
  gap: 7px;
}

.login-heading span {
  color: #5eead4;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.login-heading h1,
.login-heading p {
  margin: 0;
}

.login-heading h1 {
  font-size: clamp(27px, 6vw, 34px);
  line-height: 1.1;
}

.login-heading p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form label {
  color: #dbe4f0;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  min-height: 48px;
  padding: 11px 13px;
  background: rgba(2, 6, 23, .7);
}

.login-password-field {
  position: relative;
  display: block;
}

.login-password-field input {
  padding-right: 78px;
}

.login-password-field button {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: rgba(30, 41, 59, .92);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transform: translateY(-50%);
}

.login-error {
  min-height: 18px;
  margin: -3px 0 0;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 750;
}

.login-submit {
  min-height: 48px;
  font-size: 14px;
}

.login-security-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid rgba(148, 163, 184, .16);
  color: #8190a5;
  font-size: 11px;
}

.login-security-note span {
  color: #2dd4bf;
  font-size: 9px;
}

@media (max-width: 520px) {
  .login-page::before {
    bottom: auto;
    height: clamp(390px, 58svh, 470px);
    background:
      linear-gradient(180deg, rgba(2, 6, 23, .08) 0%, rgba(2, 6, 23, .18) 55%, #030712 100%),
      url("/assets/bruna-login.jpg") 54% 38% / auto 150% no-repeat;
  }
  .login-shell {
    display: block;
    padding: clamp(320px, 52svh, 420px) 12px 18px;
  }
  .login-card {
    margin: 0 auto;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(7, 13, 27, .94));
  }
  .login-brand {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 20px;
  }
  .login-heading { gap: 4px; }
  .login-heading h1 { font-size: 25px; }
  .login-heading p { font-size: 12px; line-height: 1.35; }
  .login-form { gap: 10px; }
  .login-form input,
  .login-submit { min-height: 42px; }
  .login-password-field input { padding-right: 66px; }
  .login-password-field button {
    right: 6px;
    min-height: 27px;
    padding: 3px 6px;
    font-size: 9px;
  }
  .login-security-note { padding-top: 11px; font-size: 10px; }
}

.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  background: #020617;
  color: #f9fafb;
  border-right: 1px solid var(--line);
  transition: width .18s ease, padding .18s ease;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 20px;
}

.brand-mark {
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #0b1220;
  color: #fff;
  font-weight: 800;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.brand small { display: block; color: #cbd5e1; margin-top: 2px; }

.sidebar-toggle {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.profile-avatar,
.profile-switcher button {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #0b1220;
  color: var(--text);
  overflow: hidden;
  cursor: pointer;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.profile-avatar img,
.profile-switcher img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar span,
.profile-switcher span {
  font-weight: 900;
}

.profile-info {
  min-width: 0;
}

.profile-info strong,
.profile-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-info small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 11px;
}

.profile-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-switcher button {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: left;
}

.profile-switcher button.active {
  border-color: var(--primary);
  background: rgba(20, 184, 166, .14);
}

.profile-switcher img,
.profile-switcher span {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.profile-switcher span {
  display: grid;
  place-items: center;
  background: rgba(148, 163, 184, .16);
  font-size: 11px;
}

.profile-switcher em {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d1d5db;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 11px 12px;
  cursor: pointer;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(148, 163, 184, .10);
  color: var(--text);
  font-weight: 900;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav button.active,
.nav button:hover {
  background: rgba(20, 184, 166, .16);
  color: #fff;
}

.shell.sidebar-collapsed .sidebar {
  padding: 18px 10px;
}

.shell.sidebar-collapsed .brand {
  justify-content: center;
  padding: 0 0 16px;
}

.shell.sidebar-collapsed .brand > div,
.shell.sidebar-collapsed .nav-label {
  display: none;
}

.shell.sidebar-collapsed .brand-mark {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
}

.shell.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 58px;
  right: 7px;
  width: 22px;
  height: 22px;
  font-size: 15px;
  transform: rotate(180deg);
}

.shell.sidebar-collapsed .nav button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 10px;
}

.main { min-width: 0; max-width: 100%; overflow-x: hidden; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(5, 6, 8, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 11px; }

.mobile-menu-toggle {
  display: none;
}

.production-mobile-filter-summary,
.production-mobile-section-title,
.production-mobile-rank-toggle {
  display: none;
}

.production-overview-unified,
.production-full-filter {
  display: contents;
}

.production-orders-mobile {
  display: contents;
}

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

.logout-button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.top-profile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  color: var(--text);
  overflow: hidden;
  cursor: pointer;
}

.top-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-profile span {
  font-weight: 900;
}

.content {
  display: grid;
  gap: 18px;
  padding: 24px 28px 40px;
  min-width: 0;
  max-width: 100%;
}

.grid { display: grid; gap: 16px; align-items: start; }
.equal-grid { align-items: stretch; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.card {
  position: relative;
  min-width: 0;
  max-width: 100%;
  background: var(--surface-glass);
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  box-shadow: var(--surface-glow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 100%, rgba(148, 163, 184, .16) 0 10px, transparent 11px),
    linear-gradient(90deg, transparent 0%, rgba(20, 184, 166, .06) 50%, transparent 100%);
  opacity: .65;
}

.card.pad { padding: 18px; }

.card > * {
  position: relative;
  z-index: 1;
}
.card h2, .card h3 { margin: 0 0 14px; font-size: 18px; letter-spacing: 0; }
.card h3 { font-size: 15px; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
}

.metric {
  display: grid;
  gap: 7px;
  padding: 18px;
  min-height: 112px;
}

.metric span { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.metric small { color: var(--muted); }

.dashboard-summary-row {
  gap: 12px;
}

.dashboard-summary-row .metric {
  min-height: 92px;
  padding: 10px 8px;
  place-items: center;
  text-align: center;
  gap: 5px;
}

.dashboard-summary-row .metric span {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-summary-row .metric strong {
  font-size: 18px;
  white-space: nowrap;
}

.dashboard-summary-row .metric small {
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.production-metrics {
  gap: 12px;
}

.production-metrics-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.production-metrics .metric {
  min-height: 88px;
  padding: 12px 10px;
  gap: 5px;
  place-items: center;
  text-align: center;
}

.production-metrics .metric span {
  font-size: 12px;
}

.production-metrics .metric strong {
  font-size: 20px;
}

.production-metrics .metric small {
  font-size: 11px;
}

.metric small:has(.metric-comparison),
.metric small:has(.metric-previous-value) {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.metric .metric-comparison {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.metric .metric-comparison.positive { color: #4ade80; }
.metric .metric-comparison.negative { color: #f87171; }
.metric .metric-comparison.neutral { color: #94a3b8; }

.metric .metric-previous-value {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.metric .metric-previous-value.positive { color: #4ade80; }
.metric .metric-previous-value.negative { color: #f87171; }
.metric .metric-previous-value.neutral { color: #94a3b8; }

.metric .metric-previous-value b {
  color: inherit;
  font-size: 11px;
}

.metric .metric-hint {
  color: var(--muted);
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}

.dashboard-fixed-card {
  display: flex;
  flex-direction: column;
}

.dashboard-fixed-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
}

.dashboard-fixed-stack .dashboard-fixed-card {
  flex: 1;
}

.dashboard-fixed-card .fixed-compare {
  flex: 1;
}

.dashboard-fixed-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  padding: 12px;
}

.dashboard-fixed-filter > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  padding-bottom: 0;
  white-space: nowrap;
}

.dashboard-period-filter {
  display: grid;
  gap: 8px;
}

.dashboard-fixed-filter .mini-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-fixed-filter .mini-filters label {
  gap: 5px;
  font-size: 11px;
  text-align: center;
}

.dashboard-fixed-filter .mini-filters input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
}

.dashboard-period-analysis {
  align-self: stretch;
}

.period-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.period-analysis-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(39, 50, 68, .82);
  border-radius: 8px;
  background: rgba(2, 6, 23, .24);
  text-align: center;
}

.period-analysis-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.period-analysis-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}

.dashboard-chart-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-chart-row h2 {
  text-align: center;
  font-weight: 900;
}

.dashboard-next-card h3 {
  font-size: 18px;
  text-align: center;
  font-weight: 900;
}

.dashboard-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-card-row > .card {
  min-height: 100%;
}

.dashboard-future-card h3 {
  font-size: 18px;
  text-align: center;
  font-weight: 900;
}

.dashboard-future-card .chart {
  min-height: 170px;
}

.dashboard-future-card .chart svg {
  height: 170px;
}

.dashboard-accounts-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.dashboard-accounts-title {
  display: grid;
  justify-items: center;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 0;
  text-align: center;
}

.dashboard-accounts-title h2,
.dashboard-accounts-title p {
  margin: 0;
}

.dashboard-accounts-title p {
  margin-top: 4px;
}

.dashboard-accounts-title > strong {
  font-size: 18px;
  white-space: nowrap;
}

.dashboard-account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.dashboard-account-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.dashboard-account-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dashboard-account-name {
  min-width: 0;
}

.dashboard-account-card span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.dashboard-account-card strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dashboard-account-card .button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 10px;
  justify-self: end;
}

.dashboard-account-card.has-credit {
  grid-template-columns: 1fr;
}

.dashboard-account-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: start;
  gap: 6px;
  min-width: 0;
}

.dashboard-account-details {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.dashboard-account-values > div {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 7px;
  background: rgba(2, 6, 23, .18);
}

.dashboard-account-values strong {
  color: #f8fafc;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-account-total {
  color: #f8fafc;
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-account-credit {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 8px;
  background: rgba(20, 184, 166, .06);
}

.dashboard-account-credit span,
.dashboard-account-credit small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.dashboard-account-credit strong {
  color: #34d399;
  font-size: 13px;
  line-height: 1.1;
}

.dashboard-hidden-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  max-height: 72px;
  overflow-y: auto;
}

.dashboard-hidden-accounts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-hidden-accounts .button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}

.account-credit-overview {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .10), transparent 42%),
    var(--panel);
}

.account-credit-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-credit-totals span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, .26);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

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

.account-credit-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
}

.account-credit-card.warning {
  border-color: rgba(245, 158, 11, .50);
  background: rgba(245, 158, 11, .07);
}

.account-credit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-credit-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.account-credit-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 17px;
}

.account-credit-head em {
  color: #34d399;
  font-style: normal;
  font-size: 17px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.account-credit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.account-credit-metrics div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(39, 50, 68, .82);
  border-radius: 8px;
  background: rgba(2, 6, 23, .26);
}

.account-credit-metrics span,
.account-credit-cards span,
.account-credit-cards small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.account-credit-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
}

.account-credit-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-credit-breakdown span {
  padding: 5px 7px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(15, 23, 42, .58);
  font-size: 10px;
  font-weight: 850;
}

.finance-rebuild-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
}

.finance-rebuild-empty h2 {
  margin: 16px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
}

.finance-rebuild-empty p {
  max-width: 560px;
  margin: 0 auto;
}

.finance-redesign,
.finance-block {
  display: grid;
  gap: 12px;
}

.finance-main-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(39, 50, 68, .82);
  border-radius: 12px;
  background: rgba(15, 23, 42, .94);
}

.finance-main-nav h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.finance-tabs {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.finance-launch-tabs {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.finance-launch-mode {
  max-width: 340px;
  width: min(340px, 100%);
}

.finance-launch-mode label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-entry-title {
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 0;
}

.finance-entry-title .muted {
  margin-bottom: 0;
}

.finance-shortcuts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

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

.finance-shortcut-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(39, 50, 68, .82);
  border-radius: 10px;
  background: rgba(2, 6, 23, .26);
  cursor: pointer;
}

.finance-shortcut-card:hover {
  border-color: rgba(20, 184, 166, .55);
  background: rgba(20, 184, 166, .08);
}

.finance-shortcut-card.active {
  border-color: rgba(20, 184, 166, .72);
  background: rgba(20, 184, 166, .12);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .18);
}

.finance-shortcut-card span {
  grid-row: span 2;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: var(--primary);
  font-size: 18px;
  font-weight: 950;
  background: rgba(20, 184, 166, .12);
}

.finance-shortcut-card strong {
  font-size: 14px;
}

.finance-shortcut-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.finance-planning {
  gap: 16px;
}

.planning-form {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  background: rgba(2, 6, 23, .18);
}

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

.planning-month-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(20, 184, 166, .24);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .10), transparent 44%),
    var(--panel-soft);
}

.planning-month-card header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.planning-month-card span,
.planning-item-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.planning-month-card strong {
  display: block;
  margin-top: 2px;
  font-size: 19px;
}

.planning-month-card em {
  font-style: normal;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.planning-month-lines {
  display: grid;
  gap: 6px;
}

.planning-month-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.planning-month-lines strong {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}

.planning-check-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .07), transparent 44%),
    rgba(2, 6, 23, .20);
}

.planning-check-panel .section-title.compact {
  margin: 0;
}

.planning-check-panel .section-title.compact h3 {
  margin: 0;
  font-size: 16px;
}

.planning-check-panel .section-title.compact > strong {
  font-size: 18px;
  white-space: nowrap;
}

.planning-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.planning-check-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 10px;
  background: rgba(15, 23, 42, .50);
}

.planning-check-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.planning-check-column header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.planning-check-column header h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.planning-check-column header strong {
  white-space: nowrap;
}

.planning-check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: planning-items;
}

.planning-check-list li {
  counter-increment: planning-items;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(2, 6, 23, .24);
}

.planning-check-list li::before {
  content: counter(planning-items, decimal-leading-zero);
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #99f6e4;
  font-size: 10px;
  font-weight: 950;
  background: rgba(20, 184, 166, .16);
}

.planning-check-list strong {
  display: block;
  font-size: 13px;
  line-height: 1.15;
}

.planning-check-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.planning-check-list em {
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.planning-list {
  display: grid;
  gap: 8px;
}

.planning-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  background: rgba(15, 23, 42, .58);
}

.planning-item-card.inactive {
  opacity: .68;
}

.planning-item-card strong {
  display: block;
  font-size: 15px;
}

.planning-item-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.finance-overview-grid .metric {
  min-height: 92px;
  padding: 14px;
}

.finance-overview-grid .metric strong {
  font-size: 22px;
}

.finance-entry-form,
.finance-bank-forms,
.finance-new-bank-form,
.finance-bank-detail {
  padding: 16px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 12px;
  background: rgba(15, 23, 42, .42);
}

.finance-invoice-preview {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, .34);
  border-radius: 10px;
  background: rgba(20, 184, 166, .08);
}

.finance-invoice-preview span,
.finance-invoice-preview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-invoice-preview strong {
  font-size: 16px;
}

.finance-invoice-summary {
  display: grid;
  grid-template-columns: 140px repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  background: var(--surface-glass);
  box-shadow: var(--surface-glow);
}

.finance-invoice-card {
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 12px;
  background: rgba(2, 6, 23, .22);
}

.finance-invoice-summary div {
  min-height: 48px;
  padding: 0 28px;
  border-right: 1px solid rgba(20, 184, 166, .5);
}

.finance-invoice-summary div:last-child {
  border-right: 0;
}

.finance-invoice-summary .finance-invoice-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: max-content;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(59, 130, 246, .38);
  border-radius: 6px;
  color: #93c5fd;
  background: rgba(15, 23, 42, .55);
}

.finance-invoice-summary span,
.finance-invoice-items small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.finance-invoice-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.finance-invoice-summary .finance-invoice-count strong {
  margin: 0;
  font-size: 15px;
}

.finance-invoice-summary .finance-invoice-count span {
  color: #93c5fd;
  font-size: 13px;
}

.finance-invoice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.finance-invoice-group {
  display: grid;
  gap: 12px;
}

.finance-invoice-group-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.finance-invoice-group-title h3 {
  margin: 0;
  font-size: 17px;
}

.finance-invoice-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-invoice-closed {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.finance-invoice-closed-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(39, 50, 68, .9);
  border-radius: 10px;
  background: rgba(2, 6, 23, .30);
  color: var(--text);
  cursor: pointer;
}

.finance-invoice-closed-toggle span {
  font-size: 14px;
  font-weight: 900;
}

.finance-invoice-closed-toggle strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(96, 165, 250, .16);
  color: #bfdbfe;
  font-size: 12px;
}

.finance-invoice-grid-closed {
  opacity: .86;
}

.finance-invoice-month-card {
  display: grid;
  min-width: 0;
  container-type: inline-size;
  container-name: invoice-card;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  background: var(--surface-glass);
  box-shadow: var(--surface-glow);
}

.finance-invoice-month-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 6, 23, .24);
}

.finance-invoice-month-head small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.finance-invoice-month-head strong {
  display: block;
  font-size: 22px;
  color: #f8fafc;
}

.finance-invoice-month-head > strong {
  color: #5eead4;
}

.finance-invoice-chevron {
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
}

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

.finance-invoice-card {
  display: grid;
  min-width: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  background: transparent;
}

.finance-invoice-card:last-child {
  border-bottom: 0;
}

.finance-invoice-card.open {
  border-color: rgba(20, 184, 166, .34);
}

.finance-invoice-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(110px, 1fr) 105px 96px minmax(210px, 260px) auto auto;
  gap: 10px;
  align-items: center;
  padding: 18px 20px;
}

.finance-invoice-row > small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.finance-invoice-row > select,
.finance-pay-controls select {
  width: 100%;
  height: 40px;
}

.finance-pay-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(105px, .85fr);
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.finance-pay-date {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.finance-pay-date input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
}

.finance-invoice-head strong {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.05;
}

.finance-invoice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  justify-content: stretch;
}

.finance-invoice-actions .button {
  min-height: 40px;
  padding: 8px 12px;
}

.finance-invoice-items {
  display: grid;
  gap: 8px;
  margin: 0 20px 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(39, 50, 68, .58);
}

.finance-invoice-items div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .48);
}

.finance-invoice-items span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-invoice-items small {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-invoice-items strong {
  justify-self: end;
  white-space: nowrap;
}

.finance-bank-forms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.finance-bank-forms h3,
.finance-table-panel h3 {
  margin: 0 0 12px;
}

.finance-table-panel {
  display: grid;
  gap: 12px;
}

.finance-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.finance-bank-table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(39, 50, 68, .82);
  border-radius: 12px;
  background: rgba(2, 6, 23, .28);
}

.finance-bank-table-head,
.finance-bank-row {
  display: grid;
  grid-template-columns: 1.08fr .72fr .72fr .76fr .78fr .82fr .9fr 1.38fr;
  align-items: center;
  min-width: 1180px;
}

.finance-bank-table-head {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  border-bottom: 1px solid rgba(39, 50, 68, .72);
}

.finance-bank-table-body {
  display: grid;
}

.finance-bank-row {
  min-height: 48px;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid rgba(39, 50, 68, .54);
}

.finance-bank-row:last-child {
  border-bottom: 0;
}

.finance-bank-row.active {
  background: rgba(20, 184, 166, .06);
  box-shadow: inset 3px 0 0 rgba(20, 184, 166, .78);
}

.finance-bank-row > div {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border-right: 1px solid rgba(39, 50, 68, .66);
}

.finance-bank-row > div:first-child {
  padding-left: 0;
}

.finance-bank-row > div:last-child {
  border-right: 0;
}

.finance-bank-name-cell {
  gap: 0;
}

.finance-bank-name-cell strong,
.finance-bank-row strong {
  font-size: 16px;
  line-height: 1.1;
}

.finance-bank-name-cell strong {
  font-size: 16px;
}

.finance-bank-name-cell small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.finance-bank-credit-cell {
  justify-content: center;
  color: var(--primary);
  background: rgba(20, 184, 166, .08);
  box-shadow: inset 1px 0 0 rgba(20, 184, 166, .22), inset -1px 0 0 rgba(20, 184, 166, .16);
}

.finance-bank-actions {
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.danger-link {
  color: #fb7185;
}

.finance-bank-actions .button {
  min-height: 38px;
  min-width: 104px;
  padding: 9px 13px;
  font-size: 13px;
}

.finance-bank-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(39, 50, 68, .86);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(17, 24, 39, .72));
}

.finance-bank-card.active {
  border-color: rgba(20, 184, 166, .72);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, .16), 0 18px 48px rgba(20, 184, 166, .08);
}

.finance-bank-head,
.finance-bank-metrics {
  display: flex;
  gap: 10px;
}

.finance-bank-head {
  align-items: flex-start;
  justify-content: space-between;
}

.finance-bank-head span,
.finance-bank-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-bank-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.finance-bank-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-bank-metrics.detail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.finance-bank-metrics div,
.finance-pocket-list span {
  padding: 10px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 10px;
  background: rgba(2, 6, 23, .28);
}

.finance-bank-metrics strong {
  display: block;
  margin-top: 4px;
}

.finance-pocket-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-pocket-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.finance-new-bank-form {
  width: 100%;
  grid-template-columns: auto minmax(150px, .8fr) minmax(180px, 1.2fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(39, 50, 68, .78);
  border-radius: 10px;
  background: rgba(2, 18, 36, .4);
}

.finance-new-bank-form h3 {
  margin: 0;
  align-self: center;
  min-width: 118px;
  font-size: 15px;
}

.finance-new-bank-form > input[type="hidden"] {
  display: none;
}

.finance-new-bank-form > label,
.finance-new-bank-form > .actions {
  min-width: 0;
}

.finance-new-bank-form label {
  gap: 6px;
  font-size: 12px;
  font-weight: 850;
}

.finance-new-bank-form input,
.finance-new-bank-form select {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
}

.finance-new-bank-form .actions {
  align-self: end;
}

.finance-new-bank-form .button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  white-space: nowrap;
}

.finance-bank-detail {
  display: grid;
  gap: 16px;
  background: rgba(2, 6, 23, .24);
}

.finance-bank-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.finance-bank-detail-head h3 {
  margin: 10px 0 4px;
  font-size: 24px;
}

.finance-bank-inner {
  display: grid;
  gap: 14px;
}

form.finance-category-form {
  width: min(760px, 100%);
  grid-template-columns: 118px 145px minmax(210px, 1fr) 64px 142px;
  gap: 8px;
  align-items: end;
  padding: 10px;
}

form.finance-category-form h3 {
  margin: 0;
  align-self: center;
  white-space: nowrap;
  font-size: 14px;
}

form.finance-category-form label {
  gap: 4px;
  font-size: 11px;
}

form.finance-category-form input,
form.finance-category-form select {
  min-height: 34px;
  padding: 7px 9px;
}

form.finance-category-form input[type="color"] {
  width: 64px;
  min-height: 34px;
  padding: 5px;
}

form.finance-category-form .actions {
  align-self: end;
  justify-content: flex-start;
  white-space: nowrap;
}

form.finance-category-form .button {
  min-height: 34px;
  padding: 8px 11px;
}

.finance-category-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.finance-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.finance-category-title h3 {
  margin: 0;
}

.finance-category-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.finance-category-title.muted-title {
  opacity: .72;
}

.finance-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.finance-archived-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.finance-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(39, 50, 68, .76);
  border-radius: 12px;
  background: rgba(2, 6, 23, .22);
}

.finance-category-card.archived {
  opacity: .62;
  background: rgba(2, 6, 23, .12);
}

.category-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .04);
}

.finance-category-card strong,
.finance-category-card small {
  display: block;
}

.finance-category-card strong {
  overflow-wrap: anywhere;
}

.finance-category-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-category-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.finance-category-actions .button {
  padding: 7px 9px;
  font-size: 11px;
}

.finance-credit-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.finance-credit-summary div,
.finance-duplicate-credit {
  padding: 12px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 10px;
  background: rgba(2, 6, 23, .24);
}

.finance-credit-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.finance-credit-summary strong {
  display: block;
  margin-top: 5px;
}

.finance-duplicate-credit {
  display: grid;
  gap: 10px;
}

.finance-duplicate-credit h3 {
  margin: 0;
}

.finance-bank-inner .form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 12px;
  background: rgba(15, 23, 42, .5);
}

.finance-bank-inner .form h3 {
  margin: 0;
}

@media (max-width: 980px) {
  .finance-bank-forms,
  .finance-new-bank-form,
  .finance-category-form,
  .finance-category-columns,
  .finance-overview-grid,
  .finance-shortcuts,
  .finance-credit-summary,
  .finance-invoice-summary,
  .finance-invoice-grid,
  .finance-bank-inner .form,
  .finance-bank-metrics.detail {
    grid-template-columns: 1fr;
  }

  .finance-main-nav {
    position: static;
    display: grid;
  }

  .finance-invoice-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  form.finance-category-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  form.finance-category-form input[type="color"] {
    width: 100%;
  }

  .finance-invoice-summary div {
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(20, 184, 166, .28);
  }

  .finance-invoice-summary div:last-child {
    border-bottom: 0;
  }

  .finance-invoice-summary .finance-invoice-count {
    width: 100%;
  }

  .finance-invoice-actions,
  .finance-invoice-actions .actions {
    justify-content: stretch;
    grid-template-columns: 1fr;
  }

  .finance-tabs {
    justify-content: stretch;
  }

  .finance-bank-detail-head {
    display: grid;
  }
}

.account-credit-cards {
  display: grid;
  gap: 7px;
}

.account-credit-cards div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(39, 50, 68, .74);
  border-radius: 8px;
  background: rgba(15, 23, 42, .78);
}

.account-credit-cards strong {
  color: #34d399;
  font-size: 13px;
  text-align: right;
}

.account-credit-cards small {
  grid-column: 1 / -1;
}

.monthly-flow-gallery {
  display: grid;
  gap: 16px;
}

.monthly-flow-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.monthly-flow-heading h2 {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.monthly-flow-months {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.monthly-flow-month-card {
  display: grid;
  gap: 9px;
  min-height: 158px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  will-change: transform;
}

.monthly-flow-month-card:hover {
  border-color: rgba(20, 184, 166, .52);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .32);
  transform: scale(1.035);
}

.month-flow-card-head {
  display: grid;
  gap: 1px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.monthly-flow-month-card h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  text-transform: capitalize;
}

.month-flow-card-head strong {
  font-size: 15px;
  line-height: 1.15;
}

.month-flow-card-head span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.month-flow-lines {
  display: grid;
  gap: 6px;
}

.month-flow-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.month-flow-line span,
.month-flow-invoice span {
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-flow-line strong,
.month-flow-invoice strong {
  color: var(--text);
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
}

.month-flow-invoice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}

.month-flow-invoice em {
  min-width: 42px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .14);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  text-align: center;
}

.month-flow-invoice em.paid { background: rgba(34, 197, 94, .14); color: var(--success); }
.month-flow-invoice em.open { background: rgba(239, 68, 68, .14); color: #f87171; }
.money-pos,
.month-flow-line.positive strong { color: var(--success); }
.month-flow-line.negative strong { color: #f87171; }

.production-volume-row {
  display: grid;
  grid-template-columns: minmax(0, 3.35fr) minmax(190px, .8fr);
  gap: 16px;
  align-items: stretch;
}

.production-volume-row > .card {
  display: flex;
  flex-direction: column;
}

.production-volume-row > .card .order-volume-chart {
  flex: 1;
}

.production-volume-row .order-volume-chart {
  align-items: stretch;
}

.production-volume-row .order-volume-chart svg {
  height: 100%;
  min-height: 250px;
}

.production-volume-row .order-volume-summary {
  min-height: 100%;
}

.production-side-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.production-side-metrics .metric {
  min-height: 0;
  padding: 10px 12px;
  gap: 4px;
  place-items: center;
  text-align: center;
}

.production-side-metrics .metric span {
  font-size: 12px;
}

.production-side-metrics .metric strong {
  font-size: 19px;
}

.production-side-metrics .metric small {
  font-size: 12px;
}

.daily-goal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 280px) minmax(220px, 1fr) minmax(260px, 410px);
  gap: 20px;
  align-items: center;
  min-height: 104px;
  margin-bottom: 14px;
  padding: 15px 22px 17px;
  border: 1px solid rgba(148, 163, 184, .62);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 100%, rgba(148, 163, 184, .28) 0 10px, transparent 11px),
    linear-gradient(180deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .88));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 16px 36px rgba(0, 0, 0, .30);
  overflow: visible;
}

.daily-goal.one {
  border-color: rgba(139, 92, 246, .70);
}

.daily-goal.done,
.daily-goal.great {
  border-color: rgba(20, 184, 166, .76);
}

.daily-goal.perfect {
  border-color: rgba(245, 158, 11, .78);
  animation: goalPulse 1.8s ease-in-out infinite;
}

.daily-goal::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(20, 184, 166, .28) 50%, transparent 100%);
  opacity: .50;
}

.daily-goal span,
.daily-goal small {
  color: var(--muted);
}

.daily-goal-main {
  min-width: 0;
}

.daily-goal-main > span {
  display: block;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 800;
}

.daily-goal-message {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(125, 211, 206, .88);
  text-shadow: 0 0 18px rgba(20, 184, 166, .22);
  box-shadow: none;
  font-size: 19px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
  line-height: 1.25;
}

.daily-goal strong {
  display: block;
  margin: 3px 0 4px;
  color: var(--text);
  font-size: 31px;
  line-height: .98;
}

.daily-goal-visual {
  position: relative;
  display: grid;
  gap: 8px;
  z-index: 1;
}

.daily-goal-visual small {
  justify-self: end;
  color: rgba(203, 213, 225, .78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.daily-goal-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  background: rgba(2, 6, 23, .95);
  border: 1px solid rgba(148, 163, 184, .20);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .55), 0 0 18px rgba(20, 184, 166, .12);
  overflow: hidden;
}

.daily-goal-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  min-width: 10px;
  background: linear-gradient(90deg, #2dd4bf, #67e8f9);
  box-shadow: 0 0 12px rgba(45, 212, 191, .80), 0 0 28px rgba(20, 184, 166, .45);
}

.daily-goal-ticks {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}

.daily-goal-ticks span {
  justify-self: end;
  width: 1px;
  height: 10px;
  background: rgba(148, 163, 184, .30);
}

.daily-goal.zero { color: #ef4444; }
.daily-goal.one { color: #8b5cf6; }
.daily-goal.done,
.daily-goal.great { color: #22c55e; }
.daily-goal.perfect { color: #f59e0b; }

.daily-goal-footer {
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  z-index: 2;
}

.daily-goal-footer span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: 999px;
  background: #0b1220;
  color: rgba(203, 213, 225, .86);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
}

@keyframes goalPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 16px 36px rgba(0, 0, 0, .30); transform: translateY(0); }
  50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 18px 48px rgba(245, 158, 11, .20); transform: translateY(-1px); }
}

.finance-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 230px;
  align-items: stretch;
}

.finance-bar-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.finance-bar-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.finance-bar-card strong {
  color: var(--text);
  font-size: 20px;
}

.finance-bar {
  display: flex;
  align-items: end;
  min-height: 130px;
  border-radius: 8px;
  background: #020617;
  overflow: hidden;
}

.finance-bar i {
  display: block;
  width: 100%;
  border-radius: 8px 8px 0 0;
}

.order-volume-chart {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.order-volume-chart svg {
  width: 100%;
  min-height: 150px;
  display: block;
}

.order-volume-plot {
  position: relative;
  min-width: 0;
}

.order-volume-legend {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 8px;
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.order-volume-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.order-volume-legend span::before {
  content: "";
  width: 17px;
  border-top: 3px solid #14b8a6;
  border-radius: 999px;
}

.order-volume-legend .compared::before {
  border-color: #8aa4d8;
  border-top-style: dashed;
}

.order-volume-summary {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 130px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.order-volume-summary span,
.order-volume-summary small {
  color: var(--muted);
  font-weight: 750;
}

.order-volume-summary strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.order-volume-current {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.order-volume-summary small {
  font-size: 11px;
  line-height: 1.35;
}

.order-volume-compared {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}

.order-volume-compared strong {
  font-size: 25px;
}

.order-volume-difference {
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 900;
  font-style: normal;
}

.order-volume-difference.positive { background: rgba(34, 197, 94, .15); color: #4ade80; }
.order-volume-difference.negative { background: rgba(239, 68, 68, .14); color: #f87171; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.compact-filter-panel {
  padding: 12px;
  border-color: var(--surface-line);
  background: rgba(2, 6, 23, .28);
}

.compact-filter-panel .filter-title {
  margin-bottom: 8px;
}

.compact-filter-panel .filter-title h2 {
  font-size: 15px;
}

.compact-filter-panel .filter-title p {
  font-size: 11px;
}

.compact-filter-panel .filter-title .button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.compact-filters {
  grid-template-columns: repeat(2, minmax(112px, 130px)) repeat(4, minmax(105px, 1fr));
  gap: 8px;
  align-items: end;
}

.compact-filters label {
  gap: 4px;
  font-size: 11px;
}

.compact-filters input,
.compact-filters select {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.production-order-filters {
  margin-bottom: 14px;
}

.clearable-search {
  position: relative;
  display: block;
  min-width: 0;
}

.clearable-search input {
  width: 100%;
  padding-right: 30px;
}

.clear-search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(148, 163, 184, .82);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.clear-search-button:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, .12);
}

.production-filter-card .production-order-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  margin-bottom: 0;
}

[data-production-metric-filters] {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
}

.production-comparison-toggle {
  align-self: stretch;
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--text);
}

.switch-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-control i {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 999px;
  background: #1e293b;
  transition: background .18s ease, border-color .18s ease;
}

.switch-control i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform .18s ease, background .18s ease;
}

.switch-control input:checked + i {
  border-color: rgba(45, 212, 191, .72);
  background: #0f766e;
}

.switch-control input:checked + i::after {
  background: #fff;
  transform: translateX(20px);
}

.switch-control b {
  font-size: 11px;
}

.production-comparison-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.production-comparison-fields.is-hidden {
  display: none;
}

.production-previous-period {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.orders-panel-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.orders-panel-body > * {
  min-width: 0;
}

.orders-panel-body .compact-table-card {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.orders-panel-body .table-wrap {
  width: 100%;
  max-width: 100%;
  padding-bottom: 4px;
}

.orders-panel-body h3 {
  margin: 0;
  font-size: 15px;
}

.orders-load-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.orders-load-more .button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.dashboard-chart-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}

.dashboard-chart-filter h2,
.dashboard-chart-filter p {
  margin: 0;
}

.dashboard-chart-filter p {
  margin-top: 4px;
}

.mini-filters {
  display: grid;
  grid-template-columns: repeat(2, 170px) auto;
  gap: 10px;
  align-items: end;
}

.dashboard-summary-row .mini-filters {
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dashboard-summary-row .mini-filters label {
  font-size: 9px;
  text-align: center;
  gap: 3px;
}

.dashboard-summary-row .mini-filters input {
  min-height: 30px;
  padding: 5px 6px;
  font-size: 10px;
  text-align: center;
}

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

.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.form.compact-form.finance-new-bank-form {
  width: 100%;
  grid-template-columns: 118px minmax(160px, 1fr) minmax(240px, 1.25fr) minmax(180px, 1fr) 150px;
  gap: 12px;
  align-items: end;
}

@media (max-width: 900px) {
  .form.compact-form.finance-new-bank-form {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

.movement-compact-form {
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: 8px;
}

.movement-compact-form label {
  gap: 4px;
  font-size: 11px;
}

.movement-compact-form input,
.movement-compact-form select,
.movement-compact-form textarea {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.production-compact-form {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 8px;
}

.production-compact-form label {
  gap: 4px;
  font-size: 11px;
}

.production-compact-form input,
.production-compact-form select,
.production-compact-form textarea {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.shipping-charge-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
}

.shipping-charge-control input {
  min-width: 0;
}

.shipping-charge-control input:disabled {
  opacity: .58;
  cursor: not-allowed;
}

.shipping-free-toggle {
  min-width: 76px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  background: rgba(15, 23, 42, .88);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.shipping-free-toggle span {
  display: inline-block;
  width: 0;
  overflow: hidden;
  opacity: 0;
}

.shipping-free-toggle.active {
  border-color: rgba(34, 197, 94, .62);
  background: rgba(22, 101, 52, .38);
  color: #86efac;
}

.shipping-free-toggle.active span {
  width: auto;
  opacity: 1;
}

.custom-product-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 8px;
  background: rgba(20, 184, 166, .06);
}

.custom-product-fields[hidden] {
  display: none;
}

.form .wide { grid-column: span 2; }
.form .full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input, select, textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(2, 6, 23, .62);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(20, 184, 166, .28);
  border-color: var(--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 0 0 4px rgba(20, 184, 166, .07);
}

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

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

input[type="date"] {
  cursor: pointer;
}

textarea { resize: vertical; min-height: 76px; }

form.finance-entry-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
}

form.finance-entry-form > label {
  grid-column: span 3;
  gap: 5px;
}

form.finance-entry-form .wide {
  grid-column: span 6;
}

form.finance-entry-form .full {
  grid-column: 1 / -1;
}

form.finance-entry-form input,
form.finance-entry-form select {
  min-height: 36px;
  padding: 8px 10px;
}

form.finance-entry-form textarea {
  min-height: 50px;
  padding: 8px 10px;
}

form.finance-entry-form .finance-invoice-preview {
  grid-column: span 3;
  min-height: 40px;
}

form.finance-entry-form .actions.full {
  grid-column: span 3;
}

form.finance-entry-form .actions .button {
  min-height: 40px;
}

.button, .icon-button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  font-weight: 750;
  cursor: pointer;
}

.button.secondary { background: rgba(30, 41, 59, .88); color: #f9fafb; }
.button.danger { background: var(--danger); }
.button.ghost { background: rgba(2, 6, 23, .24); color: var(--primary); border: 1px solid rgba(148, 163, 184, .22); }
.button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.icon-button { width: 42px; height: 42px; padding: 0; }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 760px; table-layout: auto; }
th, td { padding: 12px 10px; border-bottom: 1px solid rgba(148, 163, 184, .16); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }

.equal-history-grid {
  align-items: stretch;
}

.equal-history-grid > .card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.equal-history-grid .table-wrap {
  flex: 1;
}

.movement-history-table th,
.movement-history-table td,
.compact-invoice-table th,
.compact-invoice-table td {
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
}

.movement-history-table .row-actions,
.compact-invoice-table .row-actions {
  white-space: nowrap;
}

.movement-value-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.movement-value-summary > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.56);
  padding: 10px 12px;
}

.movement-value-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movement-value-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.load-error-card {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin: 12vh auto 0;
  border-color: rgba(239, 68, 68, .28);
  background: linear-gradient(135deg, rgba(127, 29, 29, .18), rgba(15, 23, 42, .92));
}

.load-error-card h2 {
  margin: 0;
}

.load-error-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.load-error-card small {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 8px;
  background: rgba(127, 29, 29, .16);
  color: #fecaca;
  overflow-wrap: anywhere;
}

.purchase-filter-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .44);
}

.purchase-filter-panel label {
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.purchase-filter-panel .wide {
  grid-column: 1 / -1;
}

.purchase-filter-panel input,
.purchase-filter-panel select {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.purchase-total-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 8px;
  background: rgba(20, 184, 166, .08);
}

.purchase-total-footer span,
.purchase-total-footer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.purchase-total-footer strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #ccfbf1;
  font-size: 17px;
  font-weight: 950;
}

.account-reconciliation-summary {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.56);
  padding: 12px;
}

.account-reconciliation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.account-reconciliation-head span,
.account-reconciliation-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-reconciliation-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.account-reconciliation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.account-reconciliation-grid > div {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 10px;
}

.account-reconciliation-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.compact-invoice-table {
  min-width: 660px;
}

.open-invoice-table {
  min-width: 420px;
}

.compact-invoice-table .actions {
  flex-wrap: nowrap;
}

.compact-invoice-table select {
  min-height: 30px;
  min-width: 130px;
  padding: 5px 7px;
  font-size: 12px;
}

.compact-invoice-table .button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.purchases-table {
  min-width: 940px;
}

.purchases-table th,
.purchases-table td {
  padding: 12px 10px;
  font-size: 14px;
  line-height: 1.3;
}

.purchases-table th:nth-child(1),
.purchases-table td:nth-child(1),
.purchases-table th:nth-child(5),
.purchases-table td:nth-child(5),
.purchases-table th:nth-child(6),
.purchases-table td:nth-child(6),
.purchases-table th:nth-child(7),
.purchases-table td:nth-child(7),
.purchases-table th:nth-child(8),
.purchases-table td:nth-child(8) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.purchases-table th:nth-child(1),
.purchases-table td:nth-child(1) {
  min-width: 92px;
}

.purchases-table th:nth-child(8),
.purchases-table td:nth-child(8) {
  min-width: 132px;
}

.purchases-table .actions {
  flex-wrap: nowrap;
  gap: 5px;
}

.purchases-table .button {
  padding: 7px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.production-status-select {
  min-width: 210px;
  white-space: normal;
  background: var(--status-bg, #0b1220);
  color: var(--status-text, var(--text));
  border-color: var(--status-border, var(--line));
  font-weight: 850;
}

.status-nao-iniciada { --status-bg: #5b5b55; --status-text: #f7f7ee; --status-border: #77776f; }
.status-fazendo { --status-bg: #8b6a4d; --status-text: #fff2df; --status-border: #a47f5d; }
.status-letra-pronta { --status-bg: #b66c3a; --status-text: #fff2e8; --status-border: #d18650; }
.status-nome-pronto { --status-bg: #9a5ac8; --status-text: #f9efff; --status-border: #b574df; }
.status-elementos-feitos { --status-bg: #b54f7d; --status-text: #ffeaf4; --status-border: #d06396; }
.status-colagem { --status-bg: #2f82c9; --status-text: #eaf5ff; --status-border: #4598df; }
.status-pronto { --status-bg: #3f946d; --status-text: #e9fff4; --status-border: #52ad84; }
.status-sem-resposta { --status-bg: #6b6b64; --status-text: #f5f5ed; --status-border: #85857e; }
.status-alteracao { --status-bg: #bf5d4d; --status-text: #fff0ec; --status-border: #d87565; }
.status-gerar-etiqueta { --status-bg: #b9773a; --status-text: #fff2e3; --status-border: #d58b47; }
.status-enviar-motoboy { --status-bg: #4f74a6; --status-text: #eef6ff; --status-border: #6b93c6; }
.status-vai-retirar { --status-bg: #226c8a; --status-text: #e8f7ff; --status-border: #3195ba; }
.status-enviar-correios { --status-bg: #287f86; --status-text: #e7fbff; --status-border: #3ca2aa; }
.status-entregue { --status-bg: #277a55; --status-text: #e9fff4; --status-border: #36a06f; }
.status-cancelado-sinal { --status-bg: #805ad5; --status-text: #f3e8ff; --status-border: #a78bfa; }
.status-cancelado { --status-bg: #96363a; --status-text: #ffe8ea; --status-border: #b94a50; }

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 270px);
  gap: 11px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  overscroll-behavior-inline: contain;
}

.kanban-shell {
  overflow: hidden;
}

.kanban-filters {
  grid-template-columns: minmax(220px, 360px) minmax(420px, 1fr);
  align-items: end;
  margin: 10px 0 12px;
}

.kanban-filters label {
  max-width: 360px;
}

.kanban-delivery-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 6px;
  align-items: stretch;
  min-width: 0;
}

.kanban-delivery-summary {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.kanban-delivery-chip {
  color: inherit;
  font-family: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  text-align: left;
  flex: 0 0 126px;
  min-height: 62px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.kanban-delivery-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, .6);
  background: rgba(15, 23, 42, .96);
}

.kanban-delivery-chip.active {
  border-color: rgba(20, 184, 166, .9);
  background: linear-gradient(135deg, rgba(20, 184, 166, .24), rgba(15, 23, 42, .98));
  box-shadow: 0 16px 32px rgba(15, 23, 42, .28), inset 0 0 0 1px rgba(20, 184, 166, .18);
}

.kanban-delivery-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.kanban-delivery-chip small {
  grid-column: 1;
  color: rgba(203, 213, 225, .72);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.kanban-delivery-chip strong {
  grid-row: 1 / span 3;
  grid-column: 2;
  color: var(--text);
  font-size: 21px;
  line-height: .95;
}

.kanban-delivery-chip em {
  grid-column: 1 / -1;
  color: rgba(125, 211, 252, .9);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.1;
}

.kanban-days-button {
  display: grid;
  place-items: center;
  min-width: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f2937;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.kanban-days-button:hover {
  border-color: rgba(20, 184, 166, .48);
  background: rgba(20, 184, 166, .16);
}

.kanban-delivery-chip.today { border-color: rgba(20, 184, 166, .45); }
.kanban-delivery-chip.tomorrow { border-color: rgba(148, 163, 184, .38); }
.kanban-delivery-chip.soon,
.kanban-delivery-chip.three-days,
.kanban-delivery-chip.future { border-color: rgba(96, 165, 250, .42); }
.kanban-delivery-chip.late { border-color: rgba(239, 68, 68, .55); }
.kanban-delivery-chip.nodate { border-color: rgba(245, 158, 11, .55); }

.kanban-filter-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 3px 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(20, 184, 166, .22);
  border-radius: 8px;
  background: rgba(20, 184, 166, .08);
  color: #dffcf7;
  font-size: 12px;
  font-weight: 850;
}

.kanban-filter-status small {
  color: rgba(203, 213, 225, .76);
  font-size: 11px;
  font-weight: 850;
}

.kanban-filter-status button {
  grid-row: 1 / span 2;
  grid-column: 2;
  border: 1px solid rgba(20, 184, 166, .35);
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
  color: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.kanban-filter-status button:hover {
  background: rgba(20, 184, 166, .18);
}

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.kanban-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.kanban-toolbar .button {
  min-width: 40px;
  padding: 8px 10px;
}

.kanban-board.panning {
  cursor: grabbing;
  user-select: none;
}

.kanban-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 231px;
  padding: 11px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--status-bg, var(--line));
  border-radius: 8px;
  background: var(--panel-soft);
  transition: border-color .15s ease, background .15s ease;
}

.kanban-column.drag-over {
  border-color: var(--primary);
  background: rgba(20, 184, 166, .10);
}

.kanban-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.kanban-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kanban-title span::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--status-bg, var(--muted));
  box-shadow: 0 0 0 3px rgba(148, 163, 184, .12);
}

.kanban-title strong {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #334155;
  color: #f8fafc;
  text-align: center;
  font-size: 11px;
}

.kanban-items {
  display: grid;
  align-content: start;
  gap: 9px;
}

.kanban-card {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1220;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  overflow-wrap: anywhere;
  cursor: default;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  will-change: transform;
}

.kanban-card:hover {
  border-color: rgba(20, 184, 166, .52);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .32);
  transform: scale(1.035);
}

.kanban-card:active {
  cursor: default;
}

.kanban-card.dragging {
  opacity: .55;
  outline: 2px solid var(--primary);
}

.kanban-card.saving {
  border-color: rgba(20, 184, 166, .42);
}

.kanban-card.saving .kanban-drag-handle,
.kanban-card.saving .production-status-select,
.kanban-card.saving .kanban-save-note-button {
  pointer-events: none;
  opacity: .72;
}

.kanban-drag-handle {
  flex: 0 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  min-width: 25px;
  height: 21px;
  min-height: 21px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 6px;
  background: rgba(30, 41, 59, .82);
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.kanban-drag-handle:hover {
  border-color: rgba(20, 184, 166, .62);
  color: #f8fafc;
}

.kanban-drag-handle:active {
  cursor: grabbing;
}

.kanban-card strong {
  color: var(--text);
  font-size: 14px;
}

.kanban-card b {
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.kanban-card span,
.kanban-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.kanban-customer-line,
.kanban-copy-line {
  position: relative;
  display: block;
  min-width: 0;
  padding-right: 27px;
}

.kanban-copy-line.kanban-customer-line {
  padding-right: 56px;
}

.kanban-customer-line > span,
.kanban-copy-line > span {
  display: inline;
  overflow-wrap: break-word;
}

.kanban-copy-line .kanban-copy-button {
  position: absolute;
  top: 0;
  right: 0;
}

.kanban-copy-line.kanban-customer-line .kanban-copy-button {
  right: 29px;
}

.kanban-copy-line .kanban-drag-handle {
  position: absolute;
  top: 0;
  right: 0;
}

.kanban-copy-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .30);
  border-radius: 6px;
  background: rgba(15, 23, 42, .58);
  color: rgba(203, 213, 225, .88);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.kanban-copy-button:hover {
  border-color: rgba(20, 184, 166, .55);
  background: rgba(20, 184, 166, .14);
  color: #f8fafc;
}

.kanban-date-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.kanban-date-field input {
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.kanban-card .deadline-ok,
.kanban-card .deadline-late {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 850;
  font-size: 13px;
}

.kanban-card .deadline-ok {
  background: #052e16;
  color: #86efac;
}

.kanban-card .deadline-late {
  background: #450a0a;
  color: #fca5a5;
}

.kanban-delivery-note {
  padding: 7px 9px;
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 7px;
  background: rgba(30, 64, 175, .22);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.kanban-card-footer {
  display: grid;
  gap: 6px;
}

.kanban-card-footer em {
  color: var(--success);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.kanban-card .production-status-select {
  width: 100%;
  min-width: 0;
  min-height: 35px;
  padding: 7px 30px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-align-last: center;
  border-radius: 7px;
}

.kanban-edit-button {
  border: 1px solid rgba(96, 165, 250, .38);
  border-radius: 7px;
  background: rgba(37, 99, 235, .10);
  color: #dbeafe;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  min-height: 29px;
  padding: 6px 8px;
  text-align: center;
}

.kanban-edit-button:hover {
  border-color: rgba(96, 165, 250, .64);
  background: rgba(37, 99, 235, .24);
}

.kanban-edit-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.kanban-details-toggle {
  width: 100%;
  min-height: 35px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #111827;
  color: var(--text);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.kanban-payment-toggle {
  margin-top: 1px;
}

.kanban-payment {
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 7px;
  background: rgba(2, 6, 23, .36);
}

.kanban-payment .kanban-payment-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.kanban-payment-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.kanban-payment-list div:last-child {
  border-bottom: 0;
}

.kanban-payment-list dt,
.kanban-payment-list dd {
  margin: 0;
  font-size: 11px;
}

.kanban-payment-list dt {
  color: var(--muted);
  font-weight: 750;
}

.kanban-payment-list dd {
  color: var(--text);
  font-weight: 900;
  text-align: right;
}

.kanban-payment-list .payment-total {
  margin-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, .24);
}

.kanban-payment-list .payment-received dd {
  color: #4ade80;
}

.kanban-payment-list .payment-remaining dd {
  color: #fbbf24;
}

.kanban-payment-message {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}

.kanban-payment-message small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.kanban-payment-message p {
  margin: 0;
  color: var(--text);
  font-size: 10px;
  line-height: 1.45;
}

.kanban-payment-message button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: #14b8a6;
  color: #042f2e;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.kanban-details {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.kanban-delivery-form {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.kanban-delivery-form label {
  gap: 4px;
  font-size: 10px;
}

.kanban-delivery-form input,
.kanban-delivery-form textarea {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 11px;
}

.kanban-delivery-form textarea {
  min-height: 58px;
  resize: vertical;
}

.kanban-delivery-form .button {
  min-height: 28px;
  padding: 6px 8px;
  font-size: 10px;
}

.kanban-delivery-form .kanban-save-note-button {
  border: 1px solid rgba(245, 158, 11, .42);
  background: rgba(245, 158, 11, .18);
  color: #fef3c7;
}

.kanban-delivery-form .kanban-save-note-button:hover {
  background: rgba(245, 158, 11, .28);
  border-color: rgba(245, 158, 11, .62);
}

.kanban-details dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.kanban-details div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 6px;
}

.kanban-details dt,
.kanban-details dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
}

.kanban-details dt {
  color: var(--muted);
  font-weight: 850;
}

.kanban-details dd {
  color: var(--text);
  overflow-wrap: anywhere;
}

.compact-table-card table {
  min-width: 1320px;
}

.compact-table-card th,
.compact-table-card td {
  padding: 10px 12px;
}

.compact-table-card td {
  font-size: 13px;
  line-height: 1.35;
}

.compact-table-card th {
  font-size: 11px;
}

.compact-table-card .button {
  padding: 6px 8px;
  font-size: 11px;
}

.compact-table-card .actions {
  gap: 5px;
  flex-wrap: nowrap;
}

.compact-table-card .actions .button {
  min-width: 64px;
  white-space: nowrap;
}

.compact-table-card .production-status-select {
  min-width: 210px;
  padding: 8px 10px;
  font-size: 13px;
}

.production-wide-table-card table {
  min-width: 1320px;
}

.production-wide-table-card th,
.production-wide-table-card td {
  padding: 10px 12px;
}

.production-wide-table-card td {
  font-size: 13px;
  line-height: 1.35;
}

.production-wide-table-card th {
  font-size: 11px;
}

.production-wide-table-card .button {
  padding: 6px 8px;
  min-width: 64px;
  font-size: 11px;
  white-space: nowrap;
}

.production-wide-table-card .actions {
  gap: 5px;
  flex-wrap: nowrap;
}

.products-table th:last-child,
.products-table td:last-child {
  min-width: 140px;
  white-space: nowrap;
}

.filaments-table th:last-child,
.filaments-table td:last-child {
  min-width: 140px;
  white-space: nowrap;
}

.catalog-gallery-grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(0, 2.1fr);
  gap: 12px;
  align-items: start;
}

.catalog-panel {
  min-width: 0;
  padding: 16px;
}

.catalog-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.catalog-panel-head h2 {
  margin-bottom: 4px;
}

.catalog-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.catalog-panel-head > span {
  min-width: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b1220;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.catalog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.products-gallery {
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
}

.filaments-gallery {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}

.catalog-item-card,
.catalog-add-card {
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  overflow: hidden;
}

.catalog-item-card {
  display: grid;
  grid-template-rows: 86px 1fr;
  position: relative;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.catalog-item-card:hover {
  border-color: rgba(20, 184, 166, .48);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .30);
  transform: translateY(-2px);
}

.catalog-item-media {
  min-width: 0;
  background: #020617;
}

.catalog-item-media .product-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.catalog-item-media .product-thumb.placeholder {
  border-radius: 0;
}

.catalog-item-body {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.catalog-item-title {
  display: grid;
  gap: 2px;
}

.catalog-item-title strong {
  font-size: 13px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.catalog-item-title small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.catalog-status {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .18);
  color: #86efac;
  font-size: 10px;
  font-weight: 850;
}

.catalog-item-facts {
  display: grid;
  gap: 2px;
  margin: 0;
}

.catalog-item-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.catalog-item-facts dt,
.catalog-item-facts dd {
  margin: 0;
  font-size: 10px;
}

.catalog-item-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.catalog-item-facts dd {
  color: var(--text);
  font-weight: 850;
  text-align: right;
}

.catalog-item-card .actions {
  gap: 5px;
  margin-top: 0;
}

.catalog-item-card .button {
  min-width: 0;
  padding: 5px 7px;
  font-size: 10px;
}

.product-card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: -1px;
}

.product-card {
  min-height: 164px;
  grid-template-rows: 78px 1fr;
}

.product-card .catalog-item-body {
  gap: 4px;
  padding: 7px;
}

.product-card-status-row > strong {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(20, 184, 166, .14);
  color: #99f6e4;
  font-size: 10px;
  font-weight: 900;
}

.product-card-footer {
  display: grid;
  gap: 4px;
  margin-top: -1px;
}

.product-card-footer .catalog-item-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.product-card-footer .catalog-item-facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
}

.product-card-footer .catalog-item-facts dd {
  text-align: right;
}

.product-card-footer .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.product-card-footer .button {
  width: 100%;
}

.filament-kg-value {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.filament-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.filament-card .stock-control {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.filament-card .stock-control > span {
  display: none;
}

.filament-card .stock-control div {
  display: flex;
  gap: 5px;
}

.filament-card .stock-control .button {
  min-width: 36px;
  padding: 4px 7px;
}

.filament-card-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.filament-card-footer .catalog-item-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.filament-card-footer .catalog-item-facts div {
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .54);
}

.filament-card-footer .catalog-item-facts dd {
  text-align: left;
}

.filament-card-footer .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.filament-card-footer .button {
  width: 100%;
}

.filament-card.dragging {
  opacity: .55;
  outline: 2px solid var(--primary);
}

.filament-card.drag-over {
  border-color: rgba(20, 184, 166, .72);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .18), 0 14px 30px rgba(0, 0, 0, .30);
}

.filament-drag-handle {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 8px;
  background: rgba(2, 6, 23, .78);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.filament-drag-handle:active {
  cursor: grabbing;
}

.filament-drag-handle:hover {
  border-color: rgba(20, 184, 166, .70);
  color: #5eead4;
}

.catalog-add-card {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.catalog-add-card:hover {
  border-color: rgba(20, 184, 166, .48);
  color: var(--text);
}

.catalog-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
}

.stock-control {
  display: grid;
  gap: 6px;
  min-width: 116px;
}

.stock-control span {
  font-weight: 850;
}

.stock-control div {
  display: flex;
  gap: 5px;
}

.stock-control .button {
  min-width: 34px;
  padding: 5px 8px;
  font-size: 13px;
}

.product-thumb {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #020617;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.product-image-preview {
  min-height: 64px;
}

.product-image-preview .product-thumb {
  width: 86px;
  height: 86px;
}

.orders-table th:nth-child(1),
.orders-table td:nth-child(1),
.orders-table th:nth-child(6),
.orders-table td:nth-child(6),
.orders-table th:nth-child(7),
.orders-table td:nth-child(7),
.orders-table th:nth-child(8),
.orders-table td:nth-child(8),
.orders-table th:nth-child(9),
.orders-table td:nth-child(9),
.orders-table th:nth-child(10),
.orders-table td:nth-child(10),
.orders-table th:nth-child(11),
.orders-table td:nth-child(11) {
  min-width: 92px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.orders-table th:last-child,
.orders-table td:last-child {
  min-width: 150px;
  padding-right: 18px;
  white-space: nowrap;
}

.orders-table th:nth-child(4),
.orders-table td:nth-child(4) {
  min-width: 150px;
}

.orders-table th:nth-child(2),
.orders-table td:nth-child(2),
.orders-table th:nth-child(3),
.orders-table td:nth-child(3) {
  min-width: 160px;
  overflow-wrap: normal;
  word-break: normal;
}

.kanban-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions {
  display: grid;
  grid-template-columns: repeat(2, 68px);
  gap: 6px;
  justify-content: end;
}

.row-actions .button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
}

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: #172554; color: #bfdbfe; font-size: 12px; font-weight: 750; }
.pill.open { background: #422006; color: #fde68a; }
.pill.paid { background: #052e16; color: #86efac; }
.money-pos { color: var(--success); font-weight: 760; }
.money-neg { color: var(--danger); font-weight: 760; }
.muted { color: var(--muted); }

.collapsible-title,
.preset-card .section-title {
  align-items: center;
  margin-bottom: 0;
}

.filter-title {
  align-items: center;
  margin-bottom: 10px;
}

.filter-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.collapsible-title > div:first-child {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.collapsible-title h2 {
  white-space: nowrap;
}

.collapsible-title p,
.preset-card p {
  margin: 4px 0 0;
}

.collapsible-title .button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
}

.collapsible-title .pill {
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.movement-stack,
.admin-stack {
  display: grid;
  gap: 16px;
  align-items: start;
}

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

.admin-stack .collapsible-panel:has(.collapsible-body) {
  grid-column: 1 / -1;
}

.admin-full-row {
  grid-column: 1 / -1;
}

.movement-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.collapsible-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.collapsible-body {
  min-width: 0;
  max-width: 100%;
  border-top: 1px solid rgba(148, 163, 184, .16);
  padding-top: 14px;
}

.preset-actions {
  margin-top: 12px;
}

.reminder-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reminder-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main actions"
    "check actions";
  align-items: center;
  gap: 6px 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.reminder-main {
  grid-area: main;
  min-width: 0;
}

.reminder-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.reminder-main strong {
  font-size: 13px;
}

.reminder-item .done {
  color: var(--success);
  text-decoration: line-through;
}

.check-row {
  grid-area: check;
  display: inline-flex;
  align-items: center;
  grid-template-columns: none;
  gap: 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.check-row input {
  width: 14px;
  min-height: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.reminder-item .actions {
  grid-area: actions;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.reminder-item .actions strong {
  font-size: 13px;
}

.reminder-item .button {
  padding: 5px 7px;
  font-size: 10px;
}

.reminder-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.reminder-total span {
  color: var(--muted);
  font-weight: 750;
}

.reminder-total strong {
  font-size: 18px;
}

.reminder-total small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.chart {
  width: 100%;
  min-height: 240px;
}

.chart svg { width: 100%; height: 240px; display: block; }
.bar-chart-group {
  cursor: pointer;
}

.bar-chart-column {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: filter .15s ease, opacity .15s ease, transform .16s ease;
}

.bar-chart-group:hover .bar-chart-column {
  filter: brightness(1.18);
  opacity: .92;
  transform: scale(1.06);
}

.chart-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(135px, 1.05fr) minmax(180px, 3fr) minmax(74px, auto);
  gap: 12px;
  align-items: center;
  min-height: 22px;
  font-size: 13px;
}

.bar-row > span {
  min-width: 0;
  color: #e5e7eb;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.bar-row strong {
  justify-self: end;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.bar {
  position: relative;
  height: 11px;
  border: 1px solid rgba(148, 163, 184, .10);
  border-radius: 999px;
  background: rgba(51, 65, 85, .58);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #2dd4bf);
  box-shadow: 0 0 16px rgba(45, 212, 191, .30);
}

.production-chart-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  border-color: rgba(148, 163, 184, .22);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(11, 18, 32, .98));
  box-shadow: var(--surface-glow);
}

.production-insight-grid {
  align-items: stretch;
}

.production-chart-card h2 {
  margin-bottom: 2px;
  color: #f8fafc;
  font-size: 18px;
  letter-spacing: 0;
}

.production-chart-wide .bar-row {
  grid-template-columns: minmax(130px, .8fr) minmax(260px, 4fr) minmax(92px, auto);
}

.production-rank-list,
.production-profit-list {
  display: grid;
  gap: 9px;
}

.production-rank-list.sales {
  max-height: 100%;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.production-rank-list.sales::-webkit-scrollbar {
  width: 6px;
}

.production-rank-list.sales::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, .28);
}

.production-rank-list.sales::-webkit-scrollbar-track {
  background: transparent;
}

.production-rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  border-radius: 0;
  background: transparent;
}

.production-rank-item:first-child {
  border-color: rgba(20, 184, 166, .18);
  background: transparent;
}

.production-rank-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 22px;
  border: 1px solid rgba(20, 184, 166, .20);
  border-radius: 999px;
  background: rgba(20, 184, 166, .10);
  color: #99f6e4;
  font-size: 10px;
  font-weight: 950;
}

.production-rank-info {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.production-rank-info strong {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.production-rank-item em {
  min-width: 70px;
  padding: 6px 9px;
  border: 1px solid rgba(45, 212, 191, .16);
  border-radius: 999px;
  background: rgba(20, 184, 166, .09);
  color: #ccfbf1;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.production-rank-list.margin .production-rank-number {
  border-color: rgba(20, 184, 166, .20);
  background: rgba(20, 184, 166, .10);
  color: #99f6e4;
}

.production-rank-list.margin .production-rank-item em {
  border-color: rgba(20, 184, 166, .16);
  background: rgba(20, 184, 166, .09);
  color: #ccfbf1;
}

.production-rank-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(51, 65, 85, .52);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.production-rank-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(20, 184, 166, .86), rgba(45, 212, 191, .82));
  box-shadow: 0 0 14px rgba(20, 184, 166, .22);
}

.production-rank-list.margin .production-rank-track i {
  background: linear-gradient(90deg, rgba(20, 184, 166, .86), rgba(45, 212, 191, .82));
  box-shadow: 0 0 14px rgba(20, 184, 166, .22);
}

.production-profit-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-profit-item {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 126px;
  padding: 17px;
  border: 1px solid rgba(148, 163, 184, .20);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(11, 18, 32, .98));
  box-shadow: var(--surface-glow);
  overflow: hidden;
}

.production-profit-item.tone-2 {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(11, 18, 32, .98));
}

.production-profit-item.tone-3 {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(11, 18, 32, .98));
}

.production-profit-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
  opacity: .72;
}

.production-profit-item div:first-child {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.production-profit-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.production-profit-item strong {
  color: #f8fafc;
  font-size: 20px;
  white-space: nowrap;
}

.production-profit-item .production-rank-track {
  position: relative;
  z-index: 1;
  height: 6px;
  background: rgba(51, 65, 85, .52);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .34);
}

.production-profit-item .production-rank-track i {
  background: linear-gradient(90deg, rgba(20, 184, 166, .86), rgba(45, 212, 191, .82));
  box-shadow: 0 0 14px rgba(20, 184, 166, .22);
}

.production-profit-spark {
  position: absolute;
  right: 13px;
  bottom: 30px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 42px;
  opacity: .14;
}

.production-profit-spark i {
  width: 7px;
  border-radius: 999px;
  background: var(--primary);
}

.production-profit-spark i:nth-child(1) { height: 12px; }
.production-profit-spark i:nth-child(2) { height: 20px; }
.production-profit-spark i:nth-child(3) { height: 16px; }
.production-profit-spark i:nth-child(4) { height: 27px; }
.production-profit-spark i:nth-child(5) { height: 23px; }
.production-profit-spark i:nth-child(6) { height: 34px; }
.production-profit-spark i:nth-child(7) { height: 29px; }

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

.next-card-list {
  max-height: 122px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.next-card-list::-webkit-scrollbar {
  width: 6px;
}

.next-card-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #334155;
}

.next-card-total {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.next-card-total span,
.next-card-total small {
  color: var(--muted);
  font-weight: 750;
}

.next-card-total strong {
  font-size: 24px;
  line-height: 1;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.split-panel section {
  min-width: 0;
}

.split-panel section + section {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.fixed-compare {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.35fr) minmax(220px, .85fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-fixed-card .fixed-compare {
  grid-template-columns: minmax(145px, .85fr) minmax(180px, 1.15fr);
  gap: 12px;
}

.dashboard-fixed-card .fixed-compare-meter {
  display: none;
}

.fixed-compare-hero {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background: #0f766e;
}

.dashboard-fixed-card .fixed-compare-hero {
  min-height: 150px;
  padding: 14px;
  justify-items: start;
}

.dashboard-fixed-card .fixed-compare-hero strong {
  font-size: 22px;
  white-space: nowrap;
}

.dashboard-fixed-card .fixed-compare-scale {
  gap: 12px;
  padding: 0;
}

.dashboard-fixed-card .scale-row {
  grid-template-columns: 110px minmax(0, 1fr) 36px;
  gap: 8px;
}

.dashboard-fixed-card .scale-row strong {
  font-size: 15px;
}

.dashboard-fixed-card .scale-note {
  display: none;
}

.fixed-compare-hero.negative { background: #b91c1c; }
.fixed-compare-hero span { font-weight: 800; white-space: nowrap; }
.fixed-compare-hero strong { font-size: 32px; line-height: 1; overflow-wrap: anywhere; }
.fixed-compare-hero small { color: rgba(255, 255, 255, .82); }

.fixed-compare-scale {
  display: grid;
  gap: 18px;
  align-content: center;
  padding: 8px 0;
}

.scale-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.scale-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.scale-row strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.scale-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.scale-track {
  height: 18px;
  border-radius: 999px;
  background: #263244;
  overflow: hidden;
}

.scale-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.scale-row.income .scale-track span { background: #0f766e; }
.scale-row.expense .scale-track span { background: #dc2626; }

.scale-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.pie-wrap {
  flex: 1;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(190px, 1fr) minmax(150px, 180px);
  gap: 20px;
  align-items: center;
  min-height: 0;
  margin: auto 0;
}

.pie-visual {
  display: flex;
  justify-content: center;
}

.pie-visual svg {
  width: 100%;
  max-width: 230px;
  display: block;
}

.pie-empty-state {
  min-height: 220px;
}

.pie-empty-state .empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
}

.pie-slice {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .15s ease, filter .15s ease, transform .16s ease;
}

.pie-slice:hover {
  opacity: .86;
  filter: brightness(1.15);
  transform: scale(1.06);
}

.pie-card-legend-left .pie-visual { order: 2; }
.pie-card-legend-left .pie-legend { order: 1; }
.pie-card-legend-left .pie-wrap {
  grid-template-columns: minmax(150px, 180px) minmax(190px, 1fr);
}

.pie-card-legend-right .pie-legend-row {
  grid-template-columns: minmax(0, 1fr) 9px;
}

.pie-card-legend-right .pie-legend-row > span {
  order: 2;
}

.pie-card-legend-right .pie-legend-row > div {
  order: 1;
  text-align: right;
}

.chart-point {
  cursor: pointer;
  stroke: var(--panel);
  stroke-width: 2;
  transition: opacity .15s ease, filter .15s ease;
}

.chart-point-group,
.chart-point-hit {
  cursor: pointer;
}

.chart-point-hit {
  pointer-events: all;
}

.chart-point-group:hover .chart-point {
  opacity: .9;
  filter: brightness(1.25);
}

.pie-visual circle {
  fill: var(--panel);
}

.pie-legend {
  display: grid;
  gap: 7px;
  align-content: start;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  border-radius: 7px;
  cursor: pointer;
  transition: background .14s ease, transform .14s ease;
}

.pie-legend-row:hover {
  background: rgba(20, 184, 166, .08);
  transform: translateX(2px);
}

.pie-legend-row > span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.pie-legend-row strong {
  display: block;
  font-size: 12px;
  line-height: 1.15;
}

.pie-legend-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.equal-chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.equal-chart > h2 {
  flex: 0 0 auto;
}

.pie-tooltip {
  position: fixed;
  z-index: 40;
  width: max-content;
  min-width: 220px;
  max-width: 320px;
  max-height: min(360px, calc(100vh - 32px));
  overflow: hidden;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020617;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  scrollbar-width: thin;
}

.pie-tooltip.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pie-tooltip-rich {
  display: grid;
  gap: 8px;
}

.pie-tooltip-head {
  display: grid;
  gap: 2px;
}

.pie-tooltip-head strong {
  font-size: 13px;
  line-height: 1.2;
}

.pie-tooltip-head span {
  color: var(--accent);
  font-size: 12px;
}

.pie-tooltip-list {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 7px;
  padding-right: 4px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  scrollbar-width: thin;
}

.pie-tooltip-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
}

.pie-tooltip-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-tooltip-item strong {
  color: var(--text);
  font-size: 12px;
}

.pie-tooltip-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pie-tooltip-more {
  color: var(--muted);
  font-size: 10px;
}

.fixed-compare-meter {
  display: grid;
  place-items: center;
  overflow: visible;
}

.fixed-compare-meter svg {
  width: 100%;
  max-width: 320px;
  display: block;
  overflow: visible;
}

.empty {
  padding: 28px;
  border: 1px dashed rgba(148, 163, 184, .22);
  border-radius: 10px;
  background: rgba(2, 6, 23, .24);
  color: var(--muted);
  text-align: center;
}

.filtered-empty {
  display: grid;
  gap: 12px;
  justify-items: center;
}

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #020617;
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(120%);
  transition: transform .2s ease;
  z-index: 20;
}

.toast.show { transform: translateY(0); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
}

.delivery-modal {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.movement-edit-modal {
  width: min(760px, 100%);
}

.profile-login-modal {
  width: min(520px, 100%);
}

.access-control-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.access-control-page {
  display: grid;
  gap: 14px;
}

.access-gate-card {
  width: min(520px, 100%);
  margin: 0 auto;
}

.access-gate-card h2,
.access-gate-card p { margin-top: 0; }

.access-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.25fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.access-create-form label,
.access-user-card form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.access-user-list {
  display: grid;
  gap: 9px;
}

.access-user-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 6, 23, .2);
}

.access-user-heading,
.access-user-card form {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
}

.access-user-heading strong,
.access-user-heading small {
  display: block;
}

.access-user-heading small {
  margin-top: 2px;
  color: var(--muted);
}

.access-role {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .13);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.access-role.manager {
  background: rgba(20, 184, 166, .15);
  color: #5eead4;
}

.access-user-card form label:first-child { flex: 1; }
.access-enabled { display: flex !important; align-items: center; white-space: nowrap; }
.access-enabled input { width: 16px; min-height: 16px; }

.access-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.access-permissions strong {
  width: 100%;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.access-permissions label {
  display: flex !important;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.access-permissions input { width: 16px; min-height: 16px; }

.movement-edit-modal .section-title {
  margin-bottom: 0;
}

.movement-edit-modal .section-title h2,
.profile-login-modal .section-title h2 {
  margin: 0;
}

.profile-login-current {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.profile-login-current strong,
.profile-login-current small {
  display: block;
}

.profile-login-current small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.login-switcher {
  grid-template-columns: 1fr 1fr;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
}

.delivery-modal h2,
.delivery-modal p {
  margin: 0;
}

.delivery-modal p {
  color: var(--muted);
  line-height: 1.45;
}

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

.delivery-cost-summary div,
.delivery-cost-summary label {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.delivery-cost-summary span,
.delivery-cost-summary label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.delivery-cost-summary input {
  min-height: 30px;
  padding: 6px 7px;
  font-size: 12px;
}

.delivery-cost-summary strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.modal-error {
  color: #fca5a5;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .brand { padding-bottom: 12px; }
  .nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav button { text-align: center; }
  .cols-6, .cols-5, .cols-4, .cols-3, .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-chart-row { grid-template-columns: 1fr; }
  .dashboard-card-row { grid-template-columns: 1fr; }
  .monthly-flow-months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-chart-filter { grid-template-columns: 1fr; }
  .mini-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fixed-compare { grid-template-columns: 1fr; }
  .split-panel { grid-template-columns: 1fr; }
  .split-panel section + section { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
  .admin-stack { grid-template-columns: 1fr; }
  .movement-two-columns { grid-template-columns: 1fr; }
  .movement-value-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters, .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  form.finance-entry-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  form.finance-entry-form > label,
  form.finance-entry-form .finance-invoice-preview,
  form.finance-entry-form .actions.full { grid-column: span 3; }
  form.finance-entry-form .wide,
  form.finance-entry-form .full { grid-column: 1 / -1; }
  .account-reconciliation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-gallery-grid,
  .catalog-form-grid { grid-template-columns: 1fr; }
  .catalog-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .products-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filaments-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .production-chart-wide .bar-row,
  .bar-row { grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) minmax(70px, auto); }
  .production-profit-list { grid-template-columns: 1fr; }
  .orders-panel-body .table-wrap { max-width: calc(100vw - 64px); }
}

@media (max-width: 720px) {
  .access-create-form { grid-template-columns: 1fr; }
  .access-user-card form { align-items: stretch; flex-direction: column; }
  .access-user-card form .button { width: 100%; }
}

@media (max-width: 680px) {
  .topbar { padding: 18px; }
  .content { padding: 18px; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-6, .cols-5, .cols-4, .cols-3, .cols-2, .filters, .form { grid-template-columns: 1fr; }
  .movement-value-summary { grid-template-columns: 1fr; }
  form.finance-entry-form { grid-template-columns: 1fr; }
  form.finance-entry-form,
  form.finance-entry-form > label,
  form.finance-entry-form .wide,
  form.finance-entry-form .full,
  form.finance-entry-form .finance-invoice-preview,
  form.finance-entry-form .actions.full { grid-column: 1 / -1; }
  .monthly-flow-months { grid-template-columns: 1fr; }
  .dashboard-fixed-filter { grid-template-columns: 1fr; justify-self: stretch; width: 100%; }
  .dashboard-fixed-filter > span { padding-bottom: 0; }
  .dashboard-accounts-title { align-items: flex-start; }
  .dashboard-account-card,
  .dashboard-account-card.has-credit { grid-template-columns: 1fr; align-items: start; }
  .dashboard-account-main,
  .dashboard-account-details { grid-template-columns: 1fr; }
  .dashboard-account-credit { width: 100%; }
  .account-credit-grid,
  .account-credit-metrics,
  .account-reconciliation-grid { grid-template-columns: 1fr; }
  .account-reconciliation-head { align-items: flex-start; flex-direction: column; }
  .account-credit-totals { justify-content: flex-start; }
  .dashboard-fixed-card .fixed-compare { grid-template-columns: 1fr; }
  .production-chart-wide .bar-row,
  .bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .bar-row strong {
    justify-self: start;
  }
  .production-rank-item {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .production-rank-item em {
    grid-column: 2;
    justify-self: start;
  }
  .production-profit-item div:first-child {
    display: grid;
  }
  .production-volume-row { grid-template-columns: 1fr; }
  .production-side-metrics { grid-template-columns: 1fr; }
  .kanban-filters { grid-template-columns: 1fr; }
  .kanban-delivery-strip {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 7px;
  }
  .kanban-delivery-chip {
    flex-basis: 128px;
    min-height: 58px;
  }
  .kanban-days-button {
    min-width: 36px;
  }
  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery,
  .planning-month-grid,
  .planning-check-grid,
  .planning-item-card { grid-template-columns: 1fr; }
  .mini-filters { grid-template-columns: 1fr; }
  .orders-panel-body .table-wrap { max-width: calc(100vw - 36px); }
  .form .wide { grid-column: auto; }
  .metric strong { font-size: 22px; }
  .reminder-item { grid-template-columns: 1fr; align-items: start; }
  .section-title { align-items: flex-start; }
  .scale-row { grid-template-columns: 1fr; }
  .scale-row em { text-align: left; }
  .fixed-compare-hero { min-height: 150px; }
  .pie-wrap { grid-template-columns: 1fr; }
  .pie-visual svg { margin: 0 auto; }
  .order-volume-chart { grid-template-columns: 1fr; }
  .daily-goal { grid-template-columns: 1fr; }
  .finance-compare { grid-template-columns: 1fr; }
  table { min-width: 680px; }
}

@media (max-width: 480px) {
  .reminder-list { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .shell {
    min-height: 100dvh;
  }

  .sidebar {
    padding: 12px 12px 10px;
    overflow: hidden;
  }

  .brand {
    padding: 0 4px 10px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .sidebar-toggle {
    width: 28px;
    height: 28px;
  }

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

  .nav button {
    min-height: 46px;
    padding: 9px 10px;
    grid-template-columns: 28px minmax(0, 1fr);
    text-align: left;
    border-radius: 9px;
  }

  .nav-label {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 16px;
  }

  .topbar h1 {
    font-size: 21px;
    line-height: 1.1;
  }

  .topbar p {
    font-size: 11px;
  }

  .content {
    padding: 14px 12px 22px;
  }

  .card.pad {
    padding: 16px;
  }

  .finance-main-nav {
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
  }

  .finance-main-nav .section-title {
    align-items: center;
    text-align: center;
  }

  .finance-main-nav h2 {
    margin-top: 0;
    font-size: 20px;
  }

  .finance-main-nav .pill {
    justify-self: center;
  }

  .finance-shortcuts,
  .production-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .finance-shortcut-card {
    min-height: 92px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
    padding: 12px 10px;
    text-align: center;
  }

  .finance-shortcut-card span {
    grid-row: auto;
    width: 34px;
    height: 34px;
  }

  .finance-shortcut-card strong {
    font-size: 14px;
    line-height: 1.2;
  }

  .finance-shortcut-card small {
    max-width: 150px;
    font-size: 10px;
    line-height: 1.25;
  }

  .finance-shortcuts .finance-shortcut-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .finance-overview-grid,
  .dashboard-summary-row,
  .production-metrics,
  .movement-value-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .finance-overview-grid .metric,
  .dashboard-summary-row .metric,
  .production-metrics .metric,
  .metric {
    min-height: 84px;
    padding: 12px 10px;
    text-align: center;
  }

  .metric strong,
  .finance-overview-grid .metric strong,
  .dashboard-summary-row .metric strong,
  .production-metrics .metric strong {
    font-size: 19px;
    line-height: 1.1;
  }

  .metric span,
  .metric small {
    line-height: 1.25;
  }

  .pie-wrap {
    gap: 14px;
  }

  .pie-card h2,
  .card h2 {
    text-align: center;
  }

  .pie-legend {
    max-height: 210px;
    overflow: auto;
    padding-right: 4px;
  }

  .period-analysis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .period-analysis-grid div {
    padding: 9px 6px;
    text-align: center;
  }

  .period-analysis-grid strong {
    font-size: 15px;
  }

  .daily-goal {
    min-height: 0;
    padding: 15px;
    gap: 14px;
    text-align: center;
  }

  .daily-goal-main,
  .daily-goal-visual {
    justify-items: center;
  }

  .daily-goal-message {
    font-size: 17px;
  }

  .daily-goal strong {
    font-size: 29px;
  }

  .production-volume-row .order-volume-chart svg {
    min-height: 210px;
  }

  .order-volume-summary {
    min-height: 92px;
    text-align: center;
  }

  .order-volume-summary strong {
    font-size: 28px;
  }

  .compact-filters,
  .production-filter-card .production-order-filters,
  .kanban-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-filters .wide,
  .kanban-filters .wide {
    grid-column: 1 / -1;
  }

  .finance-entry-form,
  .production-compact-form {
    gap: 9px;
  }

  .finance-entry-form label,
  .production-compact-form label {
    gap: 5px;
  }

  .finance-invoice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-invoice-summary div {
    padding: 10px 8px;
    text-align: center;
  }

  .finance-invoice-summary .finance-invoice-count {
    grid-column: 1 / -1;
  }

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

  .finance-invoice-row {
    gap: 8px;
    padding: 12px;
  }

  .finance-invoice-actions {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card-title,
  .filament-card h3 {
    font-size: 13px;
  }

  .product-card-actions,
  .filament-card-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .content {
    padding-inline: 10px;
  }

  .finance-shortcuts,
  .production-shortcuts,
  .finance-overview-grid,
  .planning-month-grid,
  .planning-check-grid,
  .planning-item-card,
  .production-metrics,
  .movement-value-summary,
  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery {
    grid-template-columns: 1fr;
  }

  .period-analysis-grid,
  .compact-filters,
  .production-filter-card .production-order-filters,
  .kanban-filters {
    grid-template-columns: 1fr;
  }
}

/* Responsive system */
@media (max-width: 1023px) {
  html,
  body,
  .shell,
  .main,
  .content {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .shell {
    display: block;
    min-width: 0;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    border-right: 0;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(18px);
  }

  .brand {
    display: none;
  }

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

  .nav button {
    min-height: 54px;
    padding: 8px 10px;
    border-radius: 10px;
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .nav-label {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
  }

  .main {
    min-width: 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .topbar {
    top: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }

  .topbar h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.1;
  }

  .topbar p,
  .section-title p,
  .muted {
    line-height: 1.35;
  }

  .content {
    padding: 14px 12px calc(92px + env(safe-area-inset-bottom));
    gap: 14px;
  }

  .card,
  .card.pad,
  .finance-main-nav,
  .production-main-nav,
  .production-filter-card,
  .catalog-panel,
  .finance-invoice-card,
  .finance-bank-panel {
    border-radius: 10px;
  }

  .card.pad,
  .finance-main-nav,
  .production-main-nav,
  .production-filter-card,
  .catalog-panel {
    padding: 14px;
  }

  button,
  .button,
  .icon-button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px;
  }

  textarea {
    min-height: 96px;
  }

  .button,
  .icon-button,
  .nav button,
  .finance-shortcut-card,
  .production-shortcut-card,
  .kanban-card,
  .catalog-item,
  .finance-invoice-month-head {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .button:active,
  .icon-button:active,
  .nav button:active,
  .finance-shortcut-card:active,
  .production-shortcut-card:active,
  .kanban-card:active,
  .catalog-item:active {
    transform: translateY(1px);
  }

  .finance-main-nav,
  .production-main-nav {
    gap: 12px;
  }

  .finance-shortcuts,
  .production-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .finance-shortcut-card,
  .production-shortcut-card {
    min-width: 0;
    min-height: 82px;
    padding: 11px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
  }

  .finance-shortcut-card strong,
  .production-shortcut-card strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.2;
  }

  .finance-shortcut-card small,
  .production-shortcut-card small {
    font-size: 10px;
    line-height: 1.25;
  }

  .grid,
  .cols-2,
  .cols-3,
  .cols-4,
  .form,
  .compact-form,
  .movement-compact-form,
  .production-compact-form,
  form.finance-entry-form,
  form.finance-category-form,
  .custom-product-fields,
  .filters,
  .compact-filters,
  .mini-filters,
  .purchase-filter-panel,
  .dashboard-fixed-filter,
  .production-filter-card .production-order-filters,
  .kanban-filters {
    grid-template-columns: 1fr;
  }

  form.finance-entry-form > label,
  form.finance-entry-form .wide,
  form.finance-entry-form .full,
  form.finance-entry-form .finance-invoice-preview,
  form.finance-entry-form .actions.full,
  .compact-filters .wide,
  .kanban-filters .wide {
    grid-column: 1 / -1;
  }

  .finance-entry-form,
  .movement-compact-form,
  .production-compact-form,
  form.finance-entry-form {
    gap: 9px;
  }

  .finance-new-bank-form {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .finance-new-bank-form > h3,
  .finance-new-bank-form > .button {
    align-self: stretch;
  }

  .finance-new-bank-form > .button {
    width: 100%;
  }

  .finance-overview-grid,
  .dashboard-summary-row,
  .production-metrics,
  .movement-value-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .metric,
  .finance-overview-grid .metric,
  .dashboard-summary-row .metric,
  .production-metrics .metric,
  .movement-value-summary .metric {
    min-height: 82px;
    padding: 11px 10px;
    text-align: center;
  }

  .metric strong,
  .finance-overview-grid .metric strong,
  .dashboard-summary-row .metric strong,
  .production-metrics .metric strong,
  .movement-value-summary .metric strong {
    overflow-wrap: anywhere;
    font-size: clamp(18px, 5.2vw, 24px);
    line-height: 1.1;
  }

  .period-analysis-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .period-analysis-grid div {
    min-width: 0;
    padding: 9px 6px;
    text-align: center;
  }

  .pie-wrap,
  .pie-wrap.reverse {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }

  .pie-legend {
    width: 100%;
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
  }

  .finance-invoice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .finance-invoice-summary .finance-invoice-count {
    grid-column: 1 / -1;
  }

  .finance-invoice-grid,
  .finance-invoice-grid-closed {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .finance-invoice-month-card {
    overflow: hidden;
    border-radius: 10px;
  }

  .finance-invoice-month-head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 10px;
    padding: 13px 12px;
  }

  .finance-invoice-month-head h3 {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 20px;
    line-height: 1.05;
  }

  .finance-invoice-month-head > strong,
  .finance-invoice-month-head > .pill {
    grid-column: 2;
    justify-self: start;
  }

  .finance-invoice-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px;
  }

  .finance-invoice-row > strong,
  .finance-invoice-row > small,
  .finance-invoice-row > select,
  .finance-pay-controls,
  .finance-pay-date,
  .finance-invoice-actions,
  .finance-invoice-row > .pill {
    min-width: 0;
  }

  .finance-invoice-row > small,
  .finance-invoice-row > select,
  .finance-pay-controls,
  .finance-pay-date,
  .finance-invoice-actions,
  .finance-invoice-row > .pill {
    grid-column: 1 / -1;
  }

  .finance-invoice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .finance-pay-controls {
    grid-template-columns: 1fr;
  }

  .finance-invoice-actions .button {
    width: 100%;
  }

  .finance-invoice-items {
    max-height: min(54dvh, 420px);
    overflow: auto;
  }

  .finance-bank-table {
    overflow: visible;
  }

  .finance-bank-table-head {
    display: none;
  }

  .finance-bank-row {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .finance-bank-row > div {
    min-width: 0;
    padding: 0;
    border-left: 0;
  }

  .finance-bank-row > div:first-child,
  .finance-bank-row > div:last-child {
    grid-column: 1 / -1;
  }

  .finance-bank-row > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .finance-bank-row .button,
  .finance-bank-row button {
    width: 100%;
    min-height: 40px;
    font-size: 12px;
  }

  .table-wrap {
    overflow-x: visible;
  }

  .table-wrap table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  .table-wrap tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(86px, 0.8fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .table-wrap td:last-child {
    grid-template-columns: 1fr;
  }

  .table-wrap td:last-child::before {
    display: none;
  }

  .table-wrap td .actions,
  .table-wrap td:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-wrap td .button,
  .table-wrap td button {
    width: 100%;
    min-height: 40px;
  }

  .production-status-select {
    width: 100%;
    min-width: 0;
  }

  .clear-search-button,
  .kanban-copy-button,
  .filament-drag-handle {
    min-width: 36px;
    width: 36px;
  }

  .kanban-board {
    grid-auto-columns: minmax(270px, 86vw);
    gap: 10px;
    padding: 2px 2px 12px;
    scroll-padding-inline: 12px;
  }

  .kanban-column {
    min-width: 0;
  }

  .kanban-card {
    padding: 11px;
  }

  .kanban-card-header,
  .kanban-card-field,
  .kanban-card-actions,
  .kanban-card-delivery {
    min-width: 0;
  }

  .kanban-delivery-strip {
    gap: 8px;
    padding-bottom: 8px;
  }

  .kanban-delivery-chip {
    flex: 0 0 122px;
    min-height: 48px;
  }

  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-item,
  .product-card,
  .filament-card {
    min-width: 0;
    overflow: hidden;
  }

  .catalog-item img,
  .product-card img,
  .filament-card img {
    width: 100%;
  }

  .product-card-title,
  .filament-card h3 {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.15;
  }

  .product-card-footer,
  .filament-card-footer {
    gap: 8px;
  }

  .product-card-footer .catalog-item-facts,
  .filament-card-footer .catalog-item-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .product-card-footer .catalog-item-facts div {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2px;
  }

  .product-card-footer .catalog-item-facts dt,
  .product-card-footer .catalog-item-facts dd {
    min-width: 0;
    text-align: left;
    line-height: 1.15;
  }

  .product-card-footer .catalog-item-facts dd {
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .product-card-footer .actions,
  .filament-card-footer .actions,
  .product-card-actions,
  .filament-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .product-card-footer .button,
  .filament-card-footer .button {
    width: 100%;
    min-height: 38px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .modal,
  .delivery-modal,
  .edit-modal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    border-radius: 14px 14px 10px 10px;
  }

  .delivery-cost-summary,
  .login-switcher {
    grid-template-columns: 1fr;
  }

  .toast,
  .alert,
  .notice {
    max-width: calc(100vw - 24px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .content {
    padding: 18px 18px calc(94px + env(safe-area-inset-bottom));
  }

  .nav {
    max-width: 520px;
    margin: 0 auto;
  }

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

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

  .finance-overview-grid,
  .dashboard-summary-row,
  .production-metrics,
  .movement-value-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-invoice-grid,
  .finance-invoice-grid-closed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kanban-board {
    grid-auto-columns: minmax(300px, 38vw);
  }
}

@media (min-width: 375px) and (max-width: 767px) {
  .content {
    padding-inline: 12px;
  }

  .finance-shortcuts .finance-shortcut-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .movement-value-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movement-value-summary .metric:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1023px) {
  button,
  .button,
  .icon-button,
  input,
  select,
  textarea,
  form.finance-entry-form input,
  form.finance-entry-form select,
  .compact-filters input,
  .compact-filters select,
  .mini-filters input,
  .mini-filters select,
  .production-compact-form input,
  .production-compact-form select,
  .movement-compact-form input,
  .movement-compact-form select {
    min-height: 44px !important;
    font-size: 16px;
  }

  .button.ghost,
  .button.secondary,
  .table-wrap td .button,
  .table-wrap td button,
  .finance-bank-row .button,
  .finance-bank-row button {
    min-height: 44px !important;
  }

  .finance-entry-form textarea,
  form.finance-entry-form textarea {
    min-height: 96px !important;
  }
}

@media (max-width: 374px) {
  .content {
    padding-inline: 10px;
  }

  .topbar {
    padding-inline: 10px;
  }

  .nav button {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-inline: 8px;
  }

  .nav-label {
    font-size: 12px;
  }

  .finance-shortcuts,
  .production-shortcuts,
  .finance-overview-grid,
  .dashboard-summary-row,
  .production-metrics,
  .movement-value-summary,
  .finance-invoice-summary,
  .catalog-card-grid,
  .products-gallery,
  .filaments-gallery,
  .period-analysis-grid {
    grid-template-columns: 1fr;
  }

  .finance-shortcut-card,
  .production-shortcut-card {
    min-height: 74px;
  }

  .table-wrap td {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .finance-bank-row {
    grid-template-columns: 1fr;
  }

  .finance-bank-row > div:last-child {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-auto-columns: minmax(258px, 88vw);
  }
}

@container invoice-card (max-width: 780px) {
  .finance-invoice-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 14px;
  }

  .finance-invoice-head {
    min-width: 0;
    grid-column: 1;
  }

  .finance-invoice-row > strong {
    grid-column: 2;
    justify-self: end;
    white-space: nowrap;
  }

  .finance-invoice-row > small {
    grid-column: 1;
  }

  .finance-invoice-row > .pill {
    grid-column: 2;
    justify-self: end;
  }

  .finance-pay-controls,
  .finance-invoice-row > .muted,
  .finance-invoice-actions {
    grid-column: 1 / -1;
  }

  .finance-invoice-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-invoice-actions .button {
    width: 100%;
  }
}

@container invoice-card (max-width: 440px) {
  .finance-pay-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  [data-production-metric-filters] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-comparison-fields {
    grid-template-columns: 1fr 1fr;
  }

  .production-previous-period {
    grid-column: 1 / -1;
    width: 100%;
  }

  .order-volume-legend {
    position: static;
    justify-content: center;
    margin-bottom: 4px;
  }
}

@media (max-width: 480px) {
  [data-production-metric-filters] {
    grid-template-columns: 1fr;
  }

  .production-comparison-fields {
    grid-template-columns: 1fr;
  }

  .production-previous-period {
    grid-column: auto;
  }
}

.site-catalog-navigation{margin-bottom:16px}.site-catalog-navigation .section-title>a{text-decoration:none}.site-catalog-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.site-catalog-frame-shell{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#070b12}.site-catalog-frame-shell iframe{display:block;width:100%;min-height:700px;border:0;background:#070b12}@media(max-width:700px){.site-catalog-shortcuts{grid-template-columns:1fr 1fr}.site-catalog-navigation .section-title{align-items:flex-start}.site-catalog-navigation .section-title>a{padding:8px 10px;font-size:11px}}

/* Mobile navigation and high-density production Kanban */
@media (max-width: 767px) {
  .shell {
    padding-bottom: 0;
  }

  .topbar {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
    padding: calc(9px + env(safe-area-inset-top)) 10px 9px;
  }

  .mobile-menu-toggle {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    width: 40px;
    min-width: 40px;
    min-height: 40px !important;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #0b1220;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #f8fafc;
    transition: transform .18s ease, opacity .18s ease;
  }

  .mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
  .mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .topbar > div:first-of-type {
    min-width: 0;
  }

  .topbar h1 {
    overflow: hidden;
    font-size: clamp(18px, 5vw, 22px);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .logout-button {
    min-height: 40px !important;
    padding: 7px 9px;
  }

  .top-profile,
  .topbar-actions .icon-button {
    width: 40px;
    height: 40px;
    min-height: 40px !important;
  }

  .sidebar {
    display: block;
    inset: calc(60px + env(safe-area-inset-top)) auto auto 10px;
    z-index: 70;
    width: min(330px, calc(100vw - 20px));
    padding: 8px;
    border: 1px solid rgba(20, 184, 166, .36);
    border-radius: 12px;
    background: rgba(4, 10, 22, .98);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(.98);
    transform-origin: top left;
    transition: opacity .16s ease, transform .16s ease;
  }

  .mobile-menu-open .sidebar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .sidebar .nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    max-width: none;
    margin: 0;
  }

  .sidebar .nav button {
    min-height: 44px;
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 7px 9px;
  }

  .content {
    padding: 10px 8px calc(18px + env(safe-area-inset-bottom));
  }

  .production-main-nav {
    gap: 8px;
    padding: 10px !important;
  }

  .production-main-nav .section-title {
    margin-bottom: 2px;
  }

  .production-main-nav .section-title p {
    display: none;
  }

  .production-main-nav .section-title h2 {
    font-size: 16px;
  }

  .production-shortcuts {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 1px 1px 5px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .production-shortcuts::-webkit-scrollbar {
    display: none;
  }

  .production-shortcuts .finance-shortcut-card {
    flex: 0 0 auto;
    width: max-content;
    min-width: 112px;
    min-height: 48px;
    grid-template-columns: 26px auto;
    gap: 7px;
    padding: 7px 10px;
    scroll-snap-align: start;
  }

  .production-shortcuts .finance-shortcut-card span {
    width: 26px;
    height: 26px;
  }

  .production-shortcuts .finance-shortcut-card strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .production-shortcuts .finance-shortcut-card small {
    display: none;
  }

  .kanban-shell {
    padding: 9px 7px !important;
  }

  .kanban-shell > h2 {
    margin-bottom: 7px;
    font-size: 17px;
  }

  .kanban-filters {
    gap: 7px;
    margin: 5px 0 8px;
  }

  .kanban-filters > label {
    font-size: 10px;
  }

  .kanban-filters input {
    min-height: 38px !important;
    padding-block: 7px;
    font-size: 14px !important;
  }

  .kanban-delivery-strip {
    grid-template-columns: 31px minmax(0, 1fr) 31px;
    gap: 4px;
    padding-bottom: 3px;
  }

  .kanban-days-button {
    min-width: 31px;
    min-height: 42px !important;
    padding: 0;
    font-size: 15px !important;
  }

  .kanban-delivery-summary {
    gap: 4px;
  }

  .kanban-delivery-chip {
    flex-basis: 98px;
    min-height: 44px !important;
    padding: 5px 6px;
    gap: 1px 5px;
  }

  .kanban-delivery-chip span { font-size: 9px; }
  .kanban-delivery-chip small { font-size: 8px; }
  .kanban-delivery-chip strong { font-size: 17px; }
  .kanban-delivery-chip em { font-size: 8px; }

  .kanban-toolbar {
    display: none;
  }

  .kanban-board {
    grid-auto-columns: clamp(145px, 44vw, 180px);
    gap: 7px;
    padding: 1px 1px 7px;
    scroll-padding-inline: 1px;
    scroll-snap-type: x proximity;
  }

  .kanban-column {
    gap: 5px;
    padding: 5px;
    border-top-width: 3px;
    scroll-snap-align: start;
  }

  .kanban-title {
    gap: 4px;
    font-size: 9px;
  }

  .kanban-title span {
    gap: 4px;
  }

  .kanban-title span::before {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
  }

  .kanban-title strong {
    min-width: 18px;
    padding: 2px 4px;
    font-size: 9px;
  }

  .kanban-items {
    gap: 6px;
  }

  .kanban-card {
    gap: 3px;
    padding: 6px;
    border-radius: 7px;
    font-size: 9px;
    line-height: 1.18;
  }

  .kanban-card:hover {
    transform: none;
  }

  .kanban-card strong,
  .kanban-card b,
  .kanban-card span,
  .kanban-card small {
    font-size: inherit;
    line-height: inherit;
  }

  .kanban-copy-line {
    gap: 2px;
    padding-right: 24px;
  }

  .kanban-copy-button,
  .kanban-drag-handle {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px !important;
    padding: 0;
    font-size: 9px !important;
  }

  .kanban-card .deadline-ok,
  .kanban-card .deadline-late {
    width: max-content;
    max-width: 100%;
    padding: 3px 5px;
    font-size: 9px;
  }

  .kanban-card-footer {
    gap: 4px;
  }

  .kanban-card-footer em {
    font-size: 11px;
  }

  .kanban-card .production-status-select {
    min-height: 28px !important;
    padding: 3px 20px 3px 5px;
    font-size: 8px !important;
  }

  .kanban-details-toggle {
    min-height: 27px !important;
    padding: 4px 3px;
    font-size: 8px !important;
  }

  .kanban-details {
    font-size: 9px;
  }
}

@media (max-width: 359px) {
  .kanban-board {
    grid-auto-columns: clamp(138px, 45vw, 154px);
  }

  .production-shortcuts .finance-shortcut-card {
    min-width: 104px;
    padding-inline: 8px;
  }
}

@media (max-width: 767px) {
  .production-overview-unified {
    display: grid;
    gap: 9px;
  }

  .production-full-filter {
    display: block;
  }

  .production-overview-unified .daily-goal {
    grid-template-columns: 1fr;
    gap: 7px;
    min-height: 0;
    margin: 0;
    padding: 11px 12px 13px;
    text-align: left;
  }

  .production-overview-unified .daily-goal-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1px 8px;
    align-items: end;
  }

  .production-overview-unified .daily-goal-main > span,
  .production-overview-unified .daily-goal-main > small {
    grid-column: 1;
  }

  .production-overview-unified .daily-goal-main > strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    margin: 0;
    font-size: 25px;
  }

  .production-overview-unified .daily-goal-message {
    font-size: 14px;
    text-align: left;
  }

  .production-overview-unified .daily-goal-visual {
    gap: 5px;
  }

  .production-overview-unified .daily-goal-track {
    height: 9px;
  }

  .production-overview-unified .daily-goal-ticks,
  .production-overview-unified .daily-goal-footer {
    display: none;
  }

  .production-mobile-filter-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    align-items: center;
    min-height: 48px;
    padding: 7px 8px 7px 11px;
    border: 1px solid rgba(20, 184, 166, .30);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(7, 20, 35, .96));
  }

  .production-mobile-filter-summary span {
    color: #f8fafc;
    font-size: 12px;
    font-weight: 900;
  }

  .production-mobile-filter-summary em {
    grid-column: 1;
    color: var(--muted);
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
  }

  .production-mobile-filter-summary button {
    grid-row: 1 / span 2;
    grid-column: 2;
    min-height: 34px !important;
    padding: 5px 10px;
    border: 1px solid rgba(45, 212, 191, .48);
    border-radius: 8px;
    background: rgba(20, 184, 166, .14);
    color: #dffcf7;
    font-size: 11px !important;
    font-weight: 900;
  }

  .production-full-filter .collapsible-panel:not(:has(.collapsible-body)) {
    display: none;
  }

  .production-full-filter .collapsible-panel {
    padding: 10px !important;
  }

  .production-full-filter .collapsible-title {
    margin-bottom: 8px;
  }

  .production-full-filter .collapsible-title h2 {
    font-size: 15px;
  }

  .production-full-filter .collapsible-title .button {
    min-height: 34px !important;
    padding: 5px 9px;
    font-size: 11px !important;
  }

  .production-full-filter [data-production-metric-filters] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .production-full-filter [data-production-metric-filters] label,
  .production-full-filter [data-production-metric-filters] input,
  .production-full-filter [data-production-metric-filters] select {
    font-size: 11px !important;
  }

  .production-full-filter [data-production-metric-filters] input,
  .production-full-filter [data-production-metric-filters] select {
    min-height: 38px !important;
  }

  .production-full-filter .production-comparison-toggle,
  .production-full-filter .production-comparison-fields {
    grid-column: 1 / -1;
  }

  .production-overview-unified .production-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .production-overview-unified .production-metrics .metric {
    min-height: 69px;
    padding: 8px 7px;
    gap: 2px;
  }

  .production-overview-unified .production-metrics .metric:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 82px;
    border-color: rgba(45, 212, 191, .76);
    background: linear-gradient(135deg, rgba(15, 118, 110, .38), rgba(8, 47, 73, .52));
    box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .10), 0 10px 28px rgba(20, 184, 166, .10);
  }

  .production-overview-unified .production-metrics .metric span {
    font-size: 10px;
  }

  .production-overview-unified .production-metrics .metric strong {
    font-size: 17px;
  }

  .production-overview-unified .production-metrics .metric:nth-child(3) strong {
    font-size: 27px;
  }

  .production-overview-unified .production-metrics .metric small {
    max-width: 100%;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .production-overview-unified .production-volume-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .production-volume-card {
    padding: 11px !important;
  }

  .production-volume-card > h2 {
    margin-bottom: 8px;
    font-size: 16px;
    text-align: left;
  }

  .production-volume-card .order-volume-chart {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .production-volume-card .order-volume-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
    padding: 8px 9px;
    text-align: left;
  }

  .production-volume-card .order-volume-summary > span,
  .production-volume-card .order-volume-summary > small {
    grid-column: 2;
  }

  .production-volume-card .order-volume-current {
    grid-row: 1 / span 2;
    grid-column: 1;
    padding-right: 10px;
  }

  .production-volume-card .order-volume-current strong {
    font-size: 28px;
  }

  .production-volume-card .order-volume-chart svg,
  .production-volume-row .order-volume-chart svg {
    height: 155px;
    min-height: 155px;
  }

  .production-side-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--surface-line);
    border-radius: 10px;
    background: var(--surface-glass);
  }

  .production-mobile-section-title {
    display: block;
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 16px;
    text-align: left !important;
  }

  .production-side-metrics .metric {
    min-height: 76px;
    padding: 8px 6px;
  }

  .production-side-metrics .metric span { font-size: 9px; }
  .production-side-metrics .metric strong { font-size: 16px; }
  .production-side-metrics .metric small {
    max-width: 100%;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .production-insight-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .production-chart-card {
    gap: 9px;
    padding: 11px !important;
  }

  .production-chart-card > h2 {
    font-size: 16px;
  }

  .production-best-sellers .mobile-ranked-list:not(.expanded) .production-rank-item:nth-child(n + 7) {
    display: none;
  }

  .production-best-sellers .production-rank-list {
    gap: 2px;
  }

  .production-best-sellers .production-rank-item {
    min-height: 48px;
    padding: 6px 2px;
  }

  .production-best-sellers .production-rank-info strong {
    font-size: 11px;
  }

  .production-mobile-rank-toggle {
    display: block;
    width: 100%;
    min-height: 38px !important;
    margin-top: 5px;
    border: 1px solid rgba(45, 212, 191, .62);
    border-radius: 9px;
    background: rgba(20, 184, 166, .12);
    color: #dffcf7;
    font-size: 12px !important;
    font-weight: 900;
  }
}

/* Compact mobile orders workspace */
@media (max-width: 767px) {
  .production-orders-mobile {
    display: grid;
    gap: 9px;
  }

  .production-orders-mobile > .collapsible-panel {
    padding: 10px !important;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    margin: 0;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title h2 {
    margin: 0;
    font-size: 16px;
    text-align: left;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title p {
    display: none;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title .actions {
    flex-wrap: nowrap;
    gap: 5px;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title .pill {
    padding: 5px 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  .production-orders-mobile > .collapsible-panel > .collapsible-title .button {
    min-height: 34px !important;
    padding: 5px 9px;
    font-size: 10px !important;
  }

  .production-orders-mobile > .collapsible-panel:first-child:not(:has(.collapsible-body)) {
    border-color: rgba(20, 184, 166, .38);
    background: linear-gradient(135deg, rgba(20, 184, 166, .12), rgba(15, 23, 42, .94));
  }

  .production-orders-mobile > .collapsible-panel:first-child:not(:has(.collapsible-body)) .collapsible-title h2::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 25px;
    height: 25px;
    margin-right: 7px;
    border-radius: 7px;
    background: rgba(20, 184, 166, .18);
    color: #2dd4bf;
  }

  .production-orders-mobile .collapsible-body {
    margin-top: 9px;
  }

  .production-orders-mobile .order-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 0;
  }

  .production-orders-mobile .order-form label {
    min-width: 0;
    gap: 3px;
    font-size: 9px;
  }

  .production-orders-mobile .order-form input,
  .production-orders-mobile .order-form select {
    min-height: 38px !important;
    padding: 6px 7px;
    font-size: 12px !important;
  }

  .production-orders-mobile .order-form textarea {
    min-height: 58px !important;
    padding: 7px;
    font-size: 12px !important;
  }

  .production-orders-mobile .order-form .full,
  .production-orders-mobile .order-form .custom-product-fields,
  .production-orders-mobile .order-form .shipping-charge-field {
    grid-column: 1 / -1;
  }

  .production-orders-mobile .order-form .custom-product-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 7px;
  }

  .production-orders-mobile .order-form .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .production-orders-mobile .order-form .actions .button {
    width: 100%;
    min-height: 38px !important;
    font-size: 12px !important;
  }

  .production-orders-mobile .orders-panel-body {
    gap: 7px;
  }

  .production-orders-mobile .orders-panel-body > h3 {
    display: none;
  }

  .production-orders-mobile .orders-panel-body .table-wrap {
    max-width: none;
    padding: 0;
    overflow: visible;
  }

  .production-orders-mobile .orders-table {
    display: block;
    min-width: 0;
  }

  .production-orders-mobile .orders-table tbody {
    display: grid;
    gap: 7px;
  }

  .production-orders-mobile .orders-table tr {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px 8px;
    padding: 9px;
    border: 1px solid rgba(51, 65, 85, .78);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(9, 17, 31, .96));
  }

  .production-orders-mobile .orders-table td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 11px;
    line-height: 1.2;
  }

  .production-orders-mobile .orders-table td::before {
    display: block;
    color: rgba(148, 163, 184, .78);
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .production-orders-mobile .orders-table td:nth-child(1),
  .production-orders-mobile .orders-table td:nth-child(6),
  .production-orders-mobile .orders-table td:nth-child(2),
  .production-orders-mobile .orders-table td:nth-child(3) {
    grid-column: span 3;
  }

  .production-orders-mobile .orders-table td:nth-child(4),
  .production-orders-mobile .orders-table td:nth-child(5),
  .production-orders-mobile .orders-table td:nth-child(12) {
    grid-column: 1 / -1;
  }

  .production-orders-mobile .orders-table td:nth-child(7),
  .production-orders-mobile .orders-table td:nth-child(8),
  .production-orders-mobile .orders-table td:nth-child(10) {
    grid-column: span 2;
  }

  .production-orders-mobile .orders-table td:nth-child(9),
  .production-orders-mobile .orders-table td:nth-child(11) {
    display: none;
  }

  .production-orders-mobile .orders-table td:nth-child(2),
  .production-orders-mobile .orders-table td:nth-child(3),
  .production-orders-mobile .orders-table td:nth-child(4) {
    color: #f8fafc;
    font-weight: 800;
  }

  .production-orders-mobile .orders-table .production-status-select {
    width: 100%;
    min-width: 0;
    min-height: 34px !important;
    padding: 5px 27px 5px 8px;
    border-radius: 7px;
    font-size: 10px !important;
  }

  .production-orders-mobile .orders-table .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .production-orders-mobile .orders-table .actions .button {
    width: 100%;
    min-height: 34px !important;
    padding: 5px 7px;
    font-size: 10px !important;
  }

  .production-orders-mobile .orders-load-more {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding-top: 2px;
    font-size: 10px;
  }

  .production-orders-mobile .orders-load-more .button {
    min-height: 34px !important;
    font-size: 10px !important;
  }
}

/* Keep hidden fixed notifications completely outside the mobile workspace. */
.toast {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
