﻿:root {
  --bg: #f5f7f2;
  --ink: #18221d;
  --muted: #667266;
  --line: #dbe2d6;
  --panel: #ffffff;
  --accent: #ff4f30;
  --accent-dark: #d93f25;
  --accent-2: #146c63;
  --soft: #fff0ec;
  --warn: #fff3d8;
  --ok: #e6f5df;
  --shadow: 0 14px 40px rgba(30, 47, 41, 0.08);
}

.Ofison-helper {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 90;
  width: 66px;
  height: 66px;
  touch-action: none;
}

.Ofison-helper-panel {
  position: absolute;
  left: 0;
  bottom: 76px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 116px));
  background: #fff;
  border: 1px solid rgba(23, 34, 30, .14);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(23, 32, 51, .24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
}

.Ofison-helper-panel.hidden {
  display: none !important;
}

.Ofison-helper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff5f2;
  border-bottom: 1px solid rgba(255, 79, 48, .22);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.Ofison-helper-head:active {
  cursor: grabbing;
}

.Ofison-helper-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.Ofison-helper-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff4f30, #17221e);
  color: white;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ffd1c8;
  overflow: hidden;
}

.Ofison-helper-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 38%;
}

.Ofison-helper-person strong {
  display: block;
  color: #17221e;
  font-size: 15px;
}

.Ofison-helper-person span {
  display: block;
  color: #6d7772;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.Ofison-helper-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: #17221e;
  border: 1px solid #ffc7c7;
  text-align: center;
  cursor: pointer;
}

.Ofison-helper-messages {
  padding: 12px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  background: #fffdfb;
  min-height: 0;
}

.Ofison-helper-message {
  max-width: 88%;
  padding: 10px 11px;
  border-radius: 8px;
  line-height: 1.4;
  font-size: 14px;
  white-space: pre-line;
}

.Ofison-helper-message.bot {
  justify-self: start;
  background: #fff2ef;
  border: 1px solid #ffd1c8;
  color: #4d1c12;
}

.Ofison-helper-message.user {
  justify-self: end;
  background: #ff4f30;
  color: #fff;
}

.Ofison-helper-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 12px 10px;
  background: #fffdfb;
}

.Ofison-helper-suggestions button {
  padding: 7px 9px;
  min-height: 30px;
  font-size: 12px;
  background: #fff;
  color: #17221e;
  border: 1px solid rgba(23, 34, 30, .14);
}

.Ofison-helper-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(23, 34, 30, .14);
  background: #fff;
}

.Ofison-helper-form textarea {
  min-height: 42px;
  max-height: 110px;
  resize: vertical;
  padding: 9px 10px;
  font-size: 14px;
}

.Ofison-helper-form button {
  align-self: end;
  min-height: 42px;
}

.Ofison-helper-bubble {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid #ffd1c8;
  box-shadow: 0 14px 36px rgba(23, 32, 51, .24);
  cursor: grab;
  touch-action: none;
  user-select: none;
  position: relative;
}

.Ofison-helper-bubble:active {
  cursor: grabbing;
}

.Ofison-helper-bubble .Ofison-helper-avatar {
  width: 54px;
  height: 54px;
}

.Ofison-helper-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ff4f30;
  color: #fff;
  border: 2px solid #fff;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .Ofison-helper {
    left: 14px;
    bottom: 14px;
  }

  .Ofison-helper-panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 104px);
  }
}

@media print {
  .Ofison-helper {
    display: none !important;
  }
}

.status-draft {
  --status: #ffd000;
  --status-bg: #fff6a8;
  --status-border: #ffd000;
  --status-text: #6b5200;
}

.status-sent {
  --status: #ff8a00;
  --status-bg: #ffe0ad;
  --status-border: #ff8a00;
  --status-text: #733800;
}

.status-opened {
  --status: #00b8c8;
  --status-bg: #c9fbff;
  --status-border: #00b8c8;
  --status-text: #005a63;
}

.status-accepted {
  --status: #22c55e;
  --status-bg: #d6ffe5;
  --status-border: #22c55e;
  --status-text: #09642d;
}

.status-rejected {
  --status: #ef2b20;
  --status-bg: #ffd8d5;
  --status-border: #ef2b20;
  --status-text: #8a120b;
}

.status-closed {
  --status: #2578ff;
  --status-bg: #dceaff;
  --status-border: #2578ff;
  --status-text: #063f9f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

.auth-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  background: #17221e;
  color: white;
}

.auth-view.hidden {
  display: none;
}

.auth-card {
  align-self: center;
  margin: 32px;
  padding: 24px;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-brand img {
  width: 48px;
  height: 48px;
}

.auth-brand h1 {
  margin: 2px 0 0;
  font-size: 25px;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-side {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 48px;
  background: radial-gradient(circle at 20% 20%, rgba(255,79,48,.26), transparent 28%), #17221e;
}

.auth-side strong {
  max-width: 620px;
  font-size: 46px;
  line-height: 1.05;
}

.auth-side span {
  color: #dbe7e0;
  font-size: 18px;
}

.app.locked {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: #17221e;
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 10px 28px rgba(255, 79, 48, 0.32);
}
.brand h1 { font-size: 20px; margin: 0 0 4px; }
.brand p, .eyebrow { margin: 0; color: var(--muted); font-size: 13px; }
.sidebar .brand p { color: #aebbb4; }

.nav { display: grid; gap: 8px; }
.nav-item {
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dbe7e0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item span { width: 20px; text-align: center; }
.nav-item .help-trigger {
  margin-left: auto;
}

.main { padding: 28px; overflow: auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.topbar h2 { margin: 2px 0 0; font-size: 30px; }
.search-wrap { flex: 0 1 460px; }
.search-wrap input, label input, label select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.account-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
}

.account-badge div {
  min-width: 170px;
}

.account-badge strong,
.account-badge span {
  display: block;
}

.account-badge span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

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

.primary, .secondary, .danger {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.primary:active, .secondary:active, .danger:active,
.primary.button-pressed, .secondary.button-pressed, .danger.button-pressed {
  transform: translateY(3px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .16);
}
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.primary:disabled { background: #d8d8d8; color: #777; cursor: default; }
.secondary { background: white; color: var(--ink); border-color: var(--line); }
.danger { background: #fff0ed; color: #9f2e1d; border-color: #ffc6ba; }
.wide { width: 100%; }

.button-bubble-host {
  position: relative;
}

.button-action-bubble {
  position: absolute;
  z-index: 10050;
  transform: translate(-50%, -100%) translateY(-6px);
  min-width: 150px;
  max-width: 280px;
  padding: 9px 12px;
  border: 1px solid #111;
  border-radius: 8px;
  background: white;
  color: #111;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 12px 28px rgba(12, 18, 15, .14);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.button-action-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  background: white;
  transform: translateX(-50%) rotate(45deg);
}

.button-action-bubble.visible {
  opacity: 1 !important;
  transform: translate(-50%, -100%) translateY(-12px) !important;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric, .panel, .quote-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--status, var(--accent));
}
.metric[class*="status-"] {
  background: linear-gradient(180deg, var(--status-bg), #fff 58%);
  border-color: var(--status-border);
}
.metric[class*="status-"] span:first-child {
  color: var(--status-text);
  font-weight: 800;
}
.metric strong { display: block; font-size: 30px; margin-top: 8px; }
.metric span { color: var(--muted); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h3 { margin: 0; font-size: 18px; }
.section-head select { max-width: 260px; }
.head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.compact { margin-top: 18px; }

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.quote-template-panel {
  margin-bottom: 22px;
}

.email-prepared-panel {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #ffb9ad;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff0ec, #fffaf8 54%, #ffffff);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
}

.email-prepared-panel h3 {
  margin: 8px 0 4px;
}

.email-prepared-panel p {
  margin: 0 0 10px;
  color: var(--muted);
}

.email-prepared-panel input {
  width: 100%;
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.email-prepared-actions {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.quote-email-panel {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 14px 0 0;
  padding: 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fff7f4;
  box-shadow: 0 16px 38px rgba(255, 79, 48, .16);
}

.quote-email-panel h3 {
  margin: 8px 0 5px;
}

.quote-email-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.quote-email-panel input {
  width: 100%;
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.quote-email-actions {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.email-launch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 950;
  text-decoration: none;
}

.email-launch-link.secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.template-list {
  display: grid;
  gap: 10px;
}

.template-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.template-card strong,
.template-card span {
  display: block;
}

.template-card span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.template-card > div:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-tile {
  min-width: 150px;
  max-width: 230px;
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 20px rgba(30, 47, 41, 0.06);
  padding: 10px 10px 10px 14px;
  cursor: pointer;
}

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

.project-tile.active {
  border-color: var(--project-color, var(--accent));
  background: #fff7f4;
  box-shadow: inset 0 0 0 2px var(--project-color, var(--accent)), 0 8px 20px rgba(30, 47, 41, 0.06);
}

.project-tile.uncategorized::before {
  background: #6c756f;
}

.project-tile strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-tile small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.project-tile > span:not(.project-color-dot) {
  display: none;
}

.project-edit {
  grid-column: 2;
  grid-row: 1;
}

.project-delete {
  grid-column: 2;
  grid-row: 2;
  border-color: #ffd0c6;
  color: #9b291c;
}

.project-edit,
.project-delete {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-height: 28px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
}

.project-delete {
  border-color: #ffd0c6;
  color: #9b291c;
}

.project-quotes-head {
  margin-top: 6px;
}

.billing-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background: linear-gradient(135deg, #ff4f30 0%, #ff8a3d 52%, #ffe36f 100%);
  color: #fffaf5;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 20px 42px rgba(255, 79, 48, .22);
}

.billing-hero h3 {
  margin: 6px 0 8px;
  font-size: 28px;
  max-width: 760px;
}

.billing-hero p:not(.eyebrow) {
  margin: 0;
  color: #fff7ef;
  max-width: 720px;
}

.billing-badge {
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255,255,255,.22);
  color: white;
  border: 1px solid rgba(255,255,255,.5);
  font-weight: 800;
  padding: 10px 12px;
}

.saas-foundation {
  margin-bottom: 18px;
}

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

.saas-card {
  display: grid;
  gap: 9px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfa;
}

.saas-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.saas-card strong {
  font-size: 18px;
}

.saas-card p,
.saas-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.user-chips,
.plan-entitlements,
.integration-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-content: flex-start;
}

.user-chips em,
.plan-entitlements b,
.integration-list b {
  border-radius: 8px;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--line);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.plan-entitlements b {
  color: #2d5f42;
}

.storage-meter {
  height: 10px;
  border-radius: 999px;
  background: #eef1ec;
  overflow: hidden;
}

.storage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #146c63);
}

.integration-list b {
  display: grid;
  gap: 2px;
  min-width: 124px;
}

.integration-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.integration-demo {
  color: #146c63;
}

.integration-planned {
  color: #8a4700;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.plan-switcher {
  position: fixed;
  top: 18px;
  right: 28px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: min(620px, calc(100vw - 340px));
  min-width: 420px;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.plan-switcher > div:first-child {
  display: none;
}

.plan-switcher h3,
.plan-switcher p {
  margin: 0;
}

.plan-switcher p:not(.eyebrow) {
  color: var(--muted);
  margin-top: 6px;
}

.plan-toggle {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: rgba(247,248,245,.96);
  box-shadow: 0 14px 34px rgba(30,47,41,.16);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.plan-toggle button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
  line-height: 1.15;
  padding: 7px 8px;
}

.plan-toggle button.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(255, 79, 48, .22);
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.package-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.package-card.featured {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow);
}

.package-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent), 0 18px 34px rgba(255,79,48,.18);
}

.package-label {
  width: fit-content;
  border-radius: 8px;
  background: #fff0ec;
  color: #a73320;
  padding: 6px 9px;
  font-weight: 900;
}

.package-card h3,
.package-card p {
  margin: 0;
}

.package-card p {
  color: var(--muted);
  line-height: 1.45;
}

.package-card ul {
  margin: 0;
  padding-left: 18px;
  color: #23362f;
  display: grid;
  gap: 6px;
}

.package-card li {
  line-height: 1.35;
}

.unified-package-grid {
  align-items: stretch;
}

.unified-package-card {
  grid-template-rows: auto auto auto 1fr auto auto;
}

.selectable-price-options {
  margin-top: 4px;
}

.selectable-price-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
}

.selectable-price-options button:hover,
.selectable-price-options button.active {
  border-color: var(--accent);
  background: #fff1ed;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.selectable-price-options button.active::after {
  content: "Kiválasztva";
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.upgrade-panel {
  border: 1px solid #ffd2c8;
  border-radius: 8px;
  background: #fff7f5;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.upgrade-panel h3,
.upgrade-panel p {
  margin: 0;
}

.upgrade-panel p {
  color: var(--muted);
  max-width: 720px;
}

.upgrade-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.price-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow);
}

.price-card span {
  color: var(--accent);
  font-weight: 800;
}

.price-card strong {
  font-size: 30px;
}

.price-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
}

.price-options {
  display: grid;
  gap: 8px;
}

.price-options div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  padding: 8px 10px;
}

.price-options .best-price {
  border-color: #ffd1c8;
  background: #fff7f4;
}

.price-options .best-price small {
  color: #a73320;
}

.price-options small {
  color: var(--muted);
  font-weight: 800;
}

.price-options b {
  font-size: 16px;
  white-space: nowrap;
}

.billing-notes {
  padding: 20px;
}

.billing-notes h3 {
  margin-top: 0;
}

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

.feature-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-weight: 700;
}

.billing-feature-section {
  margin-top: 18px;
}

.billing-feature-list {
  display: grid;
  gap: 10px;
}

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.comparison-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(112px, 1fr));
  align-items: stretch;
  border-top: 1px solid var(--line);
}

.comparison-row:first-child {
  border-top: 0;
}

.comparison-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8f5;
}

.comparison-head > div {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 14px 10px;
  border-left: 1px solid var(--line);
}

.comparison-head > div:first-child {
  border-left: 0;
}

.comparison-head strong {
  font-size: 16px;
}

.tier-head {
  position: relative;
  overflow: hidden;
}

.tier-head::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .78;
  pointer-events: none;
}

.tier-head.bronze::before {
  background: radial-gradient(circle at 50% 20%, #ffe5bb, #f7c17d 45%, #fff7ee);
}

.tier-head.silver::before {
  background: radial-gradient(circle at 50% 20%, #ffffff, #dce2e5 48%, #f8faf9);
}

.tier-head.diamond::before {
  background: radial-gradient(circle at 50% 16%, #ffffff, #dff7ff 45%, #fbfdff);
}

.tier-name,
.tier-object,
.tier-head button {
  position: relative;
  z-index: 1;
}

.tier-name {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255,255,255,.78);
  color: #16251f;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 8px 22px rgba(30,47,41,.08);
}

.tier-object {
  width: min(96px, 72%);
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(30,47,41,.18));
}

.tier-head.diamond .tier-object {
  width: min(118px, 84%);
}

.comparison-head small {
  color: var(--muted);
  line-height: 1.35;
}

.comparison-head button {
  justify-self: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #23362f;
  font-weight: 800;
  cursor: pointer;
  padding: 0 10px;
}

.comparison-head .active-plan {
  background: #fff0ec;
  box-shadow: inset 0 3px 0 var(--accent);
}

.comparison-head .active-plan button {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.comparison-feature {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-right: 1px solid var(--line);
  background: white;
  text-align: left;
  padding: 14px;
  cursor: pointer;
}

.comparison-feature:hover {
  background: #fffaf8;
}

.feature-name {
  font-weight: 900;
  color: #16251f;
}

.feature-short {
  color: var(--muted);
  line-height: 1.35;
}

.feature-tag {
  width: fit-content;
  border-radius: 8px;
  background: #fff0ec;
  color: #a73320;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 900;
}

.comparison-cell {
  display: grid;
  place-items: center;
  min-height: 82px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.comparison-cell.current {
  background: #fffaf8;
}

.comparison-cell span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 900;
}

.comparison-cell.included span {
  background: #e8f6ec;
  color: #21633b;
}

.comparison-cell.not-included span {
  background: #f1f2ef;
  color: #9aa39d;
}

.billing-feature-row {
  position: relative;
}

.billing-feature-row.locked {
  opacity: .82;
}

.billing-feature-button {
  width: 100%;
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.billing-feature-button strong,
.billing-feature-button small {
  display: block;
}

.billing-feature-button strong {
  font-size: 17px;
}

.billing-feature-button small {
  margin-top: 4px;
  color: var(--muted);
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.feature-meta strong {
  border-radius: 8px;
  background: #eef7f0;
  color: #21633b;
  padding: 7px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.billing-feature-row.locked .feature-meta strong {
  background: #fff0ec;
  color: #a73320;
}

.feature-meta mark,
.feature-meta em {
  border-radius: 8px;
  padding: 7px 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.feature-meta mark {
  background: #fff0ec;
  color: #a73320;
}

.feature-meta em {
  background: #eef3eb;
  color: #33423a;
}

.feature-bubble {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #ffd1c8;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fffaf8;
  padding: 16px;
  box-shadow: 0 18px 36px rgba(30, 47, 41, 0.07);
}

.billing-feature-row.open .billing-feature-button {
  border-color: #ffd1c8;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}

.billing-feature-row.open .feature-bubble {
  display: block;
}

.comparison-row.open .comparison-feature,
.comparison-row.open .comparison-cell {
  border-bottom: 1px solid #ffd1c8;
}

.comparison-row.open .feature-bubble {
  display: block;
}

.roadmap-hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: 8px;
  background: #17221e;
  color: white;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.roadmap-hero h3 {
  margin: 6px 0 10px;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.roadmap-hero p:not(.eyebrow) {
  margin: 0;
  max-width: 760px;
  color: #dbe7e0;
  line-height: 1.6;
}

.roadmap-score {
  min-height: 150px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,79,48,.28), rgba(255,255,255,.08));
}

.roadmap-score span {
  display: block;
  color: white;
  font-size: 48px;
  font-weight: 950;
}

.roadmap-score small {
  max-width: 140px;
  color: #dbe7e0;
  font-weight: 800;
}

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

.roadmap-card {
  min-height: 258px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid #9ea9a1;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.roadmap-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: 0;
}

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

.roadmap-card-head,
.roadmap-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roadmap-number {
  color: #a4ada7;
  font-size: 24px;
  font-weight: 950;
}

.roadmap-status,
.roadmap-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f1f4ef;
  color: #405049;
  font-size: 12px;
  font-weight: 900;
}

.roadmap-meta {
  margin-top: auto;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.roadmap-done {
  border-top-color: #2eaf5d;
}

.roadmap-prototype {
  border-top-color: #16a6a0;
}

.roadmap-card.roadmap-next {
  margin-top: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  border-top-color: var(--accent);
  background: #fff7f4;
}

.roadmap-planned {
  border-top-color: #b8bec0;
}

.roadmap-next.panel {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #ffc9be;
}

.roadmap-next p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.backend-mvp {
  margin-top: 18px;
}

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

.backend-mvp-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
}

.backend-mvp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.backend-mvp-top span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.backend-mvp-top mark {
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff0ec;
  color: #8b2c1c;
  font-size: 11px;
  font-weight: 900;
}

.backend-mvp-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

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

.data-model {
  margin-top: 18px;
}

.data-model-intro {
  max-width: 880px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.data-model-card {
  min-height: 292px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(30, 47, 41, 0.06);
}

.data-model-card h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

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

.data-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.data-fields span {
  border: 1px solid #ffd2c8;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff7f4;
  color: #713225;
  font-size: 12px;
  font-weight: 850;
}

.data-model-card strong {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #23342c;
  line-height: 1.45;
}

.user-flows {
  margin-top: 18px;
}

.user-flows-intro {
  max-width: 900px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.user-flow-list {
  display: grid;
  gap: 12px;
}

.user-flow-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 16px;
}

.user-flow-number {
  display: grid;
  place-items: center;
  min-height: 100%;
  border-radius: 8px;
  background: #17221e;
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.user-flow-content {
  display: grid;
  gap: 11px;
}

.user-flow-content h4 {
  margin: 0;
  font-size: 21px;
}

.user-flow-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.flow-steps span {
  border: 1px solid #ffd2c8;
  border-radius: 999px;
  padding: 6px 9px;
  background: white;
  color: #713225;
  font-size: 12px;
  font-weight: 850;
}

.flow-note,
.flow-rule {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
}

.flow-note {
  background: #eef7f5;
  color: #204942;
}

.flow-rule {
  background: #fff7f4;
  color: #6c2d20;
}

.flow-note strong,
.flow-rule strong {
  font-size: 13px;
}

.launch-mvp {
  margin-top: 18px;
}

.launch-mvp-intro {
  max-width: 900px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.launch-mvp-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.launch-mvp-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 6px solid #9ea9a1;
  border-radius: 8px;
  background: white;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(30, 47, 41, 0.06);
}

.launch-mvp-column h4 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.launch-mvp-column p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.launch-must {
  border-top-color: var(--accent);
  background: #fffaf8;
}

.launch-next {
  border-top-color: #16a6a0;
}

.launch-later {
  border-top-color: #6f7f78;
}

.launch-mvp-items {
  display: grid;
  gap: 9px;
}

.launch-mvp-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 12px;
}

.launch-mvp-item strong {
  color: #23342c;
  line-height: 1.3;
}

.launch-mvp-item span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.mvp-screens {
  margin-top: 18px;
}

.mvp-screens-intro {
  max-width: 900px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.mvp-screen-timeline {
  display: grid;
  gap: 12px;
}

.mvp-screen-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(30, 47, 41, 0.06);
}

.mvp-screen-index {
  display: grid;
  place-items: center;
  min-height: 100%;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 23px;
  font-weight: 950;
}

.mvp-screen-body {
  display: grid;
  gap: 10px;
}

.mvp-screen-head {
  display: grid;
  gap: 4px;
}

.mvp-screen-head span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.mvp-screen-head h4 {
  margin: 0;
  font-size: 21px;
}

.mvp-screen-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mvp-screen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mvp-screen-tags span {
  border: 1px solid #ffd2c8;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff7f4;
  color: #713225;
  font-size: 12px;
  font-weight: 850;
}

.mvp-screen-body strong {
  color: #23342c;
  line-height: 1.45;
}

.build-order {
  margin-top: 18px;
}

.build-order-intro {
  max-width: 920px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.build-order-list {
  display: grid;
  gap: 12px;
}

.build-order-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf9;
  padding: 14px;
}

.build-order-phase {
  display: grid;
  place-items: center;
  min-height: 100%;
  border-radius: 8px;
  background: #17221e;
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.build-order-body {
  display: grid;
  gap: 12px;
}

.build-order-head h4 {
  margin: 0 0 6px;
  font-size: 21px;
}

.build-order-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.build-order-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.build-order-tasks span {
  border: 1px solid #ffd2c8;
  border-radius: 999px;
  padding: 6px 9px;
  background: white;
  color: #713225;
  font-size: 12px;
  font-weight: 850;
}

.build-order-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.build-order-result div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 12px;
  background: #eef7f5;
  color: #204942;
  line-height: 1.5;
}

.build-order-result div:last-child {
  background: #fff7f4;
  color: #6c2d20;
}

.build-order-result strong {
  font-size: 13px;
}

.test-checklist {
  margin-top: 18px;
}

.test-checklist-intro {
  max-width: 920px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.test-check-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(30, 47, 41, 0.06);
}

.test-check-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-check-top span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 950;
}

.test-check-top mark {
  border-radius: 999px;
  padding: 6px 9px;
  background: #eef7f5;
  color: #204942;
  font-size: 12px;
  font-weight: 900;
}

.test-check-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

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

.closed-test {
  margin-top: 18px;
}

.closed-test-intro {
  max-width: 940px;
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.closed-test-steps {
  display: grid;
  gap: 12px;
}

.closed-test-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(30, 47, 41, 0.06);
}

.closed-test-number {
  display: grid;
  place-items: center;
  min-height: 88px;
  border-radius: 8px;
  background: #203c35;
  color: white;
  font-weight: 950;
  font-size: 19px;
}

.closed-test-body {
  display: grid;
  gap: 9px;
}

.closed-test-body h4 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.closed-test-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.closed-test-body div {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: #fff4ef;
  padding: 10px 12px;
  color: #6c2d20;
}

.closed-test-body strong {
  font-size: 13px;
}

.closed-test-body span {
  line-height: 1.45;
}

.feature-bubble h4 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.feature-bubble p {
  margin: 0;
  color: #3f4b45;
  line-height: 1.65;
}

.customer-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.customer-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.customer-summary span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

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

.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.customer-card-app,
.empty-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

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

.customer-card-head strong,
.customer-card-head span,
.customer-card-head small {
  display: block;
}

.customer-card-head strong {
  font-size: 18px;
}

.customer-card-head span,
.customer-card-head small,
.customer-card-app p,
.empty-panel span {
  color: var(--muted);
}

.customer-card-head small {
  margin-top: 3px;
  font-weight: 800;
}

.customer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.customer-stats span {
  min-height: 58px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfa;
  font-size: 13px;
  font-weight: 800;
}

.customer-statuses {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.customer-card-app p {
  margin: 14px 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  padding: 0;
}

.empty-panel {
  display: grid;
  gap: 6px;
}

.task-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.task-summary article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.task-summary span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

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

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

.dashboard-crm-alerts {
  margin: 16px 0 18px;
}

.crm-alert-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
  background: #fff;
  border: 1px solid #ffc7bb;
  border-left: 7px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.crm-alert-panel h3,
.crm-alert-panel p {
  margin: 8px 0 0;
}

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

.crm-alert-item {
  width: 100%;
  min-height: 58px;
  text-align: left;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  background: #fffaf8;
  color: var(--ink);
  padding: 10px 12px;
}

.crm-alert-item.task-hot,
.task-hot {
  border-left-color: #ffdd00;
  background: #fff8a8;
}

.crm-alert-item.task-warning,
.task-warning {
  border-left-color: #ffdd00;
  background: #fff8a8;
}

.crm-alert-item.task-danger,
.task-danger {
  border-left-color: #ff1f1f;
  background: #ffe1df;
}

.crm-alert-item.task-success,
.task-success {
  border-left-color: #21b35b;
  background: #e5f8eb;
}

.crm-alert-item span {
  color: var(--muted);
  font-size: 13px;
}

.task-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.task-card h4,
.task-card p {
  margin: 0;
}

.task-card h4 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.task-card p,
.task-card small {
  color: var(--muted);
}

.task-card small {
  display: block;
  margin-top: 8px;
  font-weight: 800;
}

.task-next-step {
  display: inline-grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff7f4;
  border: 1px solid #ffd1c8;
}

.task-next-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-next-step strong {
  color: #9f2617;
}

.task-hot .task-next-step,
.task-warning .task-next-step {
  background: #fff3a0;
  border-color: #e5c400;
}

.task-hot .task-next-step strong,
.task-warning .task-next-step strong {
  color: #5f4c00;
}

.task-danger .task-next-step {
  background: #ffd2cf;
  border-color: #ff1f1f;
}

.task-danger .task-next-step strong {
  color: #a50000;
}

.task-success .task-next-step {
  background: #d7f3df;
  border-color: #21b35b;
}

.task-success .task-next-step strong {
  color: #176136;
}

.task-label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.task-hot .task-label {
  color: #6b5700;
}

.task-warning .task-label {
  color: #6b5700;
}

.task-danger .task-label {
  color: #b00000;
}

.task-success .task-label {
  color: #176136;
}

.custom-fields {
  margin-top: 14px;
}

.custom-field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 42px;
  gap: 8px;
  margin-bottom: 8px;
}

.custom-field-row input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.quote-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.column {
  min-height: 250px;
  background: rgba(255,255,255,0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.column[class*="status-"] {
  background: linear-gradient(180deg, var(--status-bg), rgba(255,255,255,0.72) 120px);
  border-color: var(--status-border);
}
.column h4 {
  margin: 0 0 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.column h4::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--status, var(--line));
}
.quote-card {
  padding: 12px;
  margin-bottom: 10px;
  min-width: 0;
  overflow: hidden;
}
.quote-card[class*="status-"] {
  border-color: var(--status-border);
  box-shadow: inset 4px 0 0 var(--status), var(--shadow);
}

.quote-card.needs-attention {
  background: linear-gradient(180deg, color-mix(in srgb, var(--status-bg) 78%, #111 22%), #fff 82%);
  border-color: var(--status);
  box-shadow: inset 6px 0 0 var(--status), 0 14px 34px rgba(12, 18, 15, .16);
}

.activity-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status) 72%, #111 28%);
  color: white;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
  margin: 0 0 8px;
}
.quote-card h5 {
  margin: 0 0 8px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.quote-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.quote-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--soft);
  color: #a73320;
  font-weight: 700;
  font-size: 12px;
}
.badge[class*="status-"] {
  background: var(--status-bg);
  color: var(--status-text);
  border: 1px solid var(--status-border);
}

.help-trigger {
  width: 19px;
  height: 19px;
  min-width: 19px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #ffd1c8;
  border-radius: 999px;
  background: #fff7f4;
  color: #a73320;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.primary .help-trigger,
.secondary .help-trigger,
.danger .help-trigger {
  margin-left: 8px;
  background: rgba(255,255,255,0.22);
  color: inherit;
  border-color: currentColor;
}

.secondary .help-trigger,
.danger .help-trigger {
  background: #fff7f4;
  color: #a73320;
  border-color: #ffd1c8;
}

.label-help-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.help-dialog {
  width: min(560px, calc(100vw - 30px));
}

.help-box {
  padding: 22px;
}

.help-box p {
  margin: 18px 0 0;
  color: #3f4b45;
  line-height: 1.7;
}

.table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.7fr 0.8fr 0.8fr;
  grid-template-areas:
    "actions actions actions actions actions actions"
    "title client category status tracking total";
  gap: 8px 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.row[class*="status-"]:not(.header) {
  background: linear-gradient(90deg, var(--status-bg), color-mix(in srgb, var(--status-bg) 35%, #fff 65%) 92%);
  box-shadow: inset 6px 0 0 var(--status);
}
.row.header {
  grid-template-areas: none;
  grid-template-columns: 1.3fr 1fr 1fr 0.7fr 0.8fr 0.8fr;
  background: #eef3eb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.row.needs-attention {
  background: linear-gradient(90deg, color-mix(in srgb, var(--status-bg, #fff0ec) 82%, var(--status) 18%), color-mix(in srgb, var(--status-bg) 42%, #fff 58%) 92%);
  box-shadow: inset 6px 0 0 var(--status, var(--accent));
  font-weight: 700;
}

.row > .activity-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: var(--status);
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  margin-left: 8px;
}

.row.needs-attention > span:nth-of-type(4)::after {
  content: none;
}
.row:last-child { border-bottom: 0; }
.quote-row-title { grid-area: title; }
.quote-row-tracking { grid-area: tracking; }
.quote-row-total { grid-area: total; font-weight: 900; }
.row > span:nth-of-type(2) { grid-area: client; }
.row > span:nth-of-type(3) { grid-area: category; }
.row > .badge { grid-area: status; }

.split {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

#productsView .products-layout {
  grid-template-columns: 1fr;
}

.product-library-panel {
  order: 1;
}

.product-editor-home {
  order: 2;
}

.product-editor-home .product-editor-panel {
  margin-top: 12px;
}
.panel { padding: 18px; }
.panel h3 { margin-top: 0; }
.settings {
  max-width: 980px;
}

.account-settings-panel {
  max-width: 100%;
  margin-bottom: 18px;
  overflow: hidden;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.account-form,
.add-user-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.account-grid > div,
.account-form {
  min-width: 0;
}

.user-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.user-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.user-list strong,
.user-list span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-delete-inline {
  width: fit-content;
  min-height: 28px;
  margin-top: 7px;
  padding: 4px 9px;
  border-color: #ffd0c6;
  color: #9b291c;
  font-size: 12px;
}

.user-delete-inline:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.user-list span,
.user-list small {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.add-user-form {
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) minmax(120px, 150px) auto;
  align-items: center;
}

.add-user-form input,
.add-user-form select {
  min-width: 0;
  width: 100%;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}
.price-grid {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 8px;
}

.variant-builder {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fbfcfa;
}

.variant-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  margin-bottom: 10px;
}

.variant-head,
.variant-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.variant-option {
  grid-template-columns: minmax(0, 1fr) 170px auto;
  margin-bottom: 8px;
}

.option-money-field {
  position: relative;
  margin: 0;
}

.option-money-field input {
  width: 100%;
  padding-right: 38px;
}

.option-money-field span {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.variant-remove-button,
.option-remove-button {
  min-height: 38px;
  white-space: nowrap;
  border-color: #ffd0c6;
  color: #9b291c;
  background: #fff7f5;
}

.variant-card input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#cancelProductEditBtn {
  display: none;
}
label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #35413b;
  font-weight: 700;
  font-size: 13px;
}

.profile-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
}

.profile-preview span {
  display: block;
  margin-bottom: 6px;
  color: #35413b;
  font-size: 13px;
  font-weight: 700;
}

.save-status {
  display: none;
  margin: 0 0 12px;
  border: 1px solid #b9e7cc;
  border-radius: 8px;
  background: #edfff4;
  color: #17633b;
  font-weight: 900;
  padding: 11px 13px;
}

.save-status.visible {
  display: block;
}

.save-status.error {
  border-color: #f3b5b5;
  background: #fff0f0;
  color: #b42323;
}

.image-preview {
  min-height: 118px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  overflow: hidden;
}

.image-preview img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.image-preview.empty {
  background: #f7f8f5;
}

.reference-settings {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.storage-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.reference-admin-gallery,
.mini-reference-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.reference-admin-gallery figure {
  margin: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: white;
}

.reference-admin-gallery img,
.mini-reference-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.reference-admin-gallery figcaption {
  color: #35413b;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-reference-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.customer-reference-box > span {
  color: var(--muted);
  font-size: 13px;
}

.file-chip {
  width: fit-content;
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff2ee;
  color: var(--primary);
  cursor: pointer;
}

.file-chip input {
  display: none;
}

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

.product-category-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
}

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

.product-category-head h4 {
  margin: 0 0 3px;
  font-size: 17px;
}

.product-category-head span:not(.badge) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.product-grid,
.product-rows {
  display: grid;
  gap: 8px;
}

.product-library-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.product-head-actions .primary {
  min-height: 40px;
  padding-inline: 16px;
}

.product-search {
  margin-bottom: 14px;
}

.product-search label {
  margin-bottom: 0;
}

#productsView .product-search input#productSearchInput {
  border: 4px solid #ff4f30 !important;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(255, 79, 48, 0.12);
}

.product-editor-home {
  display: none;
}

.product-create-slot {
  display: none;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 55%, #ffffff 45%);
  border-radius: 8px;
  background: #fffaf8;
  padding: 14px;
}

.product-create-slot.open {
  display: block;
}

.product-create-slot .product-editor-panel {
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.product {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.product img, .quote-image {
  width: 100%;
  height: 118px;
  object-fit: cover;
  background: #e8eee7;
}
.product-body { padding: 10px; }
.product-body h4 { margin: 0 0 6px; }
.product-body p { margin: 0; color: var(--muted); font-size: 13px; }

.product-row-wrap {
  display: grid;
  gap: 0;
}

.product-row-wrap.editing .product-row {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(255, 79, 48, 0.10);
}

.product-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 10px;
}

.product-row .product-row-media img,
.product-row .product-row-media .quote-image {
  width: 58px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

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

.product-row-main h4 {
  margin: 0 0 4px;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-row-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.product-row-price {
  display: grid;
  gap: 3px;
  text-align: right;
  white-space: nowrap;
}

.product-row-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.product-inline-editor {
  display: none;
  border: 1px solid color-mix(in srgb, var(--primary) 55%, #ffffff 45%);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fffaf8;
  padding: 14px;
}

.product-inline-editor.open {
  display: block;
}

.product-inline-editor .product-editor-panel {
  box-shadow: none;
  border: 0;
  padding: 0;
  background: transparent;
}
.product-category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 8px;
  background: #fff0ec;
  color: #a73320;
  padding: 0 7px;
  font-weight: 800;
}
.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  align-items: center;
  justify-content: flex-end;
}
.product-card-actions .secondary {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: 10px;
}

.icon-danger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #ffb5a8;
  background: #fff4f1;
  color: #c22212;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-danger:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

dialog {
  width: min(980px, calc(100vw - 30px));
  max-height: calc(100dvh - 30px);
  overflow: auto;
  overflow-x: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 90px rgba(0,0,0,0.28);
}
dialog::backdrop { background: rgba(12,18,15,0.42); }
.quote-form { padding: 0 22px 22px; }
.modal-head, .modal-actions, .total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -22px 18px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
}
.modal-head h2 { margin: 2px 0 0; }
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.line-item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "move name name name name product product product product product product remove"
    "move qty qty unit unit net net vat vat gross gross remove"
    "move image image image image preview preview save save save save remove"
    "options options options options options options options options options options options options";
  gap: 8px;
  margin-bottom: 12px;
  min-width: 0;
  padding: 14px;
  background: #fff8dc;
  border: 1px solid #f6d98a;
  border-radius: 8px;
}
.line-item input, .line-item select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.line-product { grid-area: product; }
.line-product-pick {
  grid-area: product;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
.line-name { grid-area: name; }
.line-move-controls {
  grid-area: move;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  min-width: 44px;
}
.line-move-controls .icon-btn {
  width: 100%;
  height: auto;
  min-height: 34px;
}
.line-move-controls .icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.line-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.line-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding-left: 2px;
}
.line-field input {
  flex: 1;
}
.line-qty-field { grid-area: qty; }
.line-unit-field { grid-area: unit; }
.line-net-field { grid-area: net; }
.line-vat-field { grid-area: vat; }
.line-gross-field { grid-area: gross; }
.line-image-field { grid-area: image; }
.line-image-preview {
  grid-area: preview;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: white;
}
.line-image-preview img {
  width: 100%;
  height: 54px;
  object-fit: contain;
  display: block;
  background: #fff;
}
.line-save-product {
  grid-area: save;
  min-height: 40px;
  align-self: end;
}
.line-add-bottom {
  width: 100%;
  margin: 8px 0 0;
}
.remove-line {
  grid-area: remove;
  align-self: stretch;
  justify-self: end;
}

.line-options {
  grid-area: options;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 10px;
  background: #fff7f4;
  border: 1px solid #ffd1c8;
  border-radius: 8px;
}

.line-options label {
  margin: 0;
}

.selected-options {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}
.total-row {
  padding: 14px;
  background: #eef6f3;
  border-radius: 8px;
  margin: 12px 0;
}
.total-row strong { font-size: 24px; }
.share-panel {
  display: none;
  gap: 8px;
  padding: 14px;
  background: #fff7f4;
  border: 1px solid #ffd1c8;
  border-radius: 8px;
}
.share-panel span {
  color: #80301f;
  font-size: 13px;
  font-weight: 700;
}
.share-panel div {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}
.share-panel input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.workflow-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--status-border, var(--line));
  border-radius: 8px;
  background: linear-gradient(180deg, var(--status-bg, #fbfcfa), #fff);
}

.workflow-panel strong,
.workflow-panel span {
  display: block;
}

.workflow-label {
  color: var(--status-text, var(--muted));
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.workflow-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modal-actions { margin-top: 16px; }
.modal-actions > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.quote-row-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.quote-row-actions button {
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
}
.quote-row-actions .status-switch {
  border: 1px solid var(--status-border);
  background: var(--status);
  color: #111;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.quote-row-actions .status-switch.status-rejected,
.quote-row-actions .status-switch.status-closed {
  color: #fff;
}

.quote-action-feedback {
  display: none;
  margin: 14px 0 0;
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #111;
  border-radius: 8px;
  background: white;
  color: #111;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(12, 18, 15, .12);
}

.quote-action-feedback.visible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-action-feedback.error {
  border-color: #b3261e;
  color: #b3261e;
}

.mini-feedback-action {
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
}

.document-action-dialog {
  max-width: 720px;
}

.document-action-box {
  padding: 24px;
}

.document-action-inline {
  display: none;
  margin: 14px 0 0;
  padding: 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #fff7f4;
  box-shadow: 0 16px 38px rgba(255, 79, 48, .16);
}

.document-action-inline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.document-action-inline h3 {
  margin: 7px 0 4px;
}

.document-action-inline p {
  margin: 0;
  color: var(--muted);
}

.document-action-box > p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.document-action-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.document-action-options button {
  min-height: 92px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  flex-direction: column;
}

.document-action-options strong,
.document-action-options span {
  display: block;
}

.document-action-options span {
  margin-top: 5px;
  color: inherit;
  font-size: 13px;
  font-weight: 750;
  opacity: .78;
}

#printArea { display: none; }
.action-notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #111;
  background: white;
  color: #111;
  font-weight: 800;
  box-shadow: 0 18px 45px rgba(10, 24, 20, .16);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}
.action-notice.visible {
  opacity: 1;
  transform: translateY(0);
}
.action-notice.error {
  border-color: #b3261e;
  color: #b3261e;
}
.customer-view { display: none; }

.customer-shell {
  width: min(1100px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.customer-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: end;
  padding: 34px;
  color: white;
  background: linear-gradient(135deg, #FF4F30 0%, #f04425 58%, #c9341c 100%);
  border-radius: 8px;
  margin-bottom: 18px;
  box-shadow: 0 18px 42px rgba(255, 79, 48, .24);
}

.customer-hero .eyebrow,
.customer-muted {
  color: rgba(255,255,255,0.94);
  font-weight: 650;
}

.customer-hero h1 {
  margin: 6px 0 12px;
  font-size: 42px;
  line-height: 1.08;
}

.customer-logo {
  max-width: 160px;
  max-height: 76px;
  object-fit: contain;
  display: block;
  margin-bottom: 18px;
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.customer-total {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 18px;
}

.customer-total[class*="status-"] {
  background: var(--status-bg);
  border-color: var(--status-border);
  color: var(--status-text);
}

.customer-total span,
.customer-total small {
  display: block;
  color: rgba(255,255,255,0.96);
  font-weight: 750;
}

.customer-total[class*="status-"] span,
.customer-total[class*="status-"] small {
  color: var(--status-text);
}

.customer-total strong {
  display: block;
  font-size: 28px;
  margin: 8px 0;
}

.customer-card,
.accept-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

.company-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.company-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.quote-meta-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.print-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.quote-meta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.quote-meta-item span,
.quote-meta-item strong {
  display: block;
}

.quote-meta-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.quote-meta-item strong {
  font-size: 14px;
}

.customer-card a,
.customer-card-app a,
.quote-meta-item a,
.signature-block a,
#printArea a {
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.customer-card a:hover,
.customer-card-app a:hover,
.quote-meta-item a:hover,
.signature-block a:hover {
  color: var(--accent);
}

.offer-confidence-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: linear-gradient(135deg, #FF4F30 0%, #ef4528 58%, #c9341c 100%);
  color: white;
  border-color: #ff8d78;
  box-shadow: 0 16px 38px rgba(255, 79, 48, .22);
}

.offer-confidence-card div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .24);
}

.offer-confidence-card span,
.offer-confidence-card p {
  color: rgba(255,255,255,.96);
}

.offer-confidence-card span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.offer-confidence-card strong {
  display: block;
  font-size: 17px;
  color: white;
  font-weight: 950;
}

.offer-confidence-card p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.customer-card h2,
.accept-strip h2 {
  margin: 0;
}

.customer-items {
  display: grid;
  gap: 12px;
}

.customer-item {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #f6d98a;
  border-radius: 8px;
  padding: 12px;
  background: #fff8dc;
}

.customer-item img,
.customer-image-empty {
  width: 112px;
  height: 82px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef1ec;
}

.customer-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.customer-item p,
.customer-note,
.accept-strip p {
  margin: 0;
  color: var(--muted);
}

.customer-note {
  margin-top: 16px;
  padding: 14px;
  background: #faf7f4;
  border-radius: 8px;
}

.reference-section {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ffd1c8;
  background:
    linear-gradient(135deg, rgba(255,79,48,.08), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #fffaf8, #ffffff);
  box-shadow: 0 18px 48px rgba(56, 28, 20, .08);
}

.reference-section .section-head {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 3px solid #FF4F30;
}

.reference-section .section-head h2 {
  color: #1c2722;
  letter-spacing: 0;
}

.reference-text {
  margin: 0;
  color: #35413b;
  line-height: 1.55;
  max-width: 560px;
  padding: 12px 14px;
  border-left: 5px solid #FF4F30;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  font-weight: 700;
}

.reference-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.reference-gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(33, 45, 39, .1);
}

.reference-gallery figure:first-child {
  grid-column: auto;
  grid-row: auto;
}

.reference-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  display: block;
  background: #eef2ec;
}

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

.gallery-mosaic .reference-gallery figure {
  grid-column: auto;
}

.gallery-mosaic .reference-gallery figure:first-child,
.gallery-mosaic .reference-gallery figure:nth-child(4) {
  grid-column: auto;
}

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

.gallery-showcase .reference-gallery figure:first-child {
  grid-row: auto;
}

.gallery-showcase .reference-gallery figure:first-child img {
  height: auto;
  min-height: 0;
}

.reference-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 420px));
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 880px;
  margin: 4px auto 0;
}

.reference-video-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.video-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid #ffd1c8;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,79,48,.26), transparent 24%),
    linear-gradient(135deg, #24110c, #5b2518 48%, #15100e);
  aspect-ratio: 16 / 9;
  box-shadow: 0 16px 34px rgba(33, 18, 12, .2);
}

.video-thumb,
.reference-videos iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumb {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 18px;
  text-align: center;
  color: white;
}

.video-thumb-fallback strong {
  font-size: 18px;
  line-height: 1.1;
}

.video-thumb-fallback span {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
}

.reference-videos iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: #111;
}

.video-thumb + iframe {
  opacity: 1;
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 79, 48, .94);
  color: white;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  pointer-events: none;
}

.video-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #ffd1c8;
  border-radius: 8px;
  background: white;
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
  padding: 10px 12px;
  text-align: center;
}

.accept-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: white;
  background: linear-gradient(135deg, #FF4F30 0%, #ef4528 58%, #c9341c 100%);
  border-color: #ff8d78;
  box-shadow: 0 16px 38px rgba(255, 79, 48, .22);
}

.accept-strip h2,
.accept-strip p {
  color: white;
}

.accept-strip .primary {
  min-width: 170px;
  background: #8fd14f;
  color: white;
  border-color: #8fd14f;
  box-shadow: 0 10px 22px rgba(32, 89, 13, .24);
}

.accept-strip .primary:hover {
  background: #7cc63f;
  color: white;
  border-color: #7cc63f;
}

.accept-strip .primary.accepting,
.accept-strip .primary:disabled {
  background: #4d8f28;
  color: white;
  border-color: #4d8f28;
  cursor: progress;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.customer-thanks-card {
  border: 1px solid #ffb7aa;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,79,48,.12), rgba(255,255,255,0) 44%),
    #fffaf8;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 18px;
}

.customer-thanks-card span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #FF4F30;
  color: white;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 12px;
  margin-bottom: 14px;
}

.customer-thanks-card h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.customer-thanks-card p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.customer-thanks-card strong {
  display: inline-flex;
  color: #9f2e1d;
  background: #fff0ec;
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  padding: 10px 12px;
}

.customer-change-card {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 22px;
  margin: -6px 0 18px;
}

.customer-change-card span,
.customer-change-dialog span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff0ec;
  color: #9f2e1d;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  margin-bottom: 10px;
}

.customer-change-card h2,
.customer-change-dialog h2 {
  margin: 0 0 8px;
}

.customer-change-card p,
.customer-change-dialog p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.customer-change-card .secondary {
  width: 100%;
  min-height: 48px;
  border-color: #FF4F30;
  color: #9f2e1d;
  font-weight: 900;
}

.customer-change-form {
  display: grid;
  gap: 10px;
}

.customer-change-form textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  line-height: 1.45;
  background: #fffaf8;
}

.quote-message-alert {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #ffb9ad;
  border-radius: 8px;
  background: #fff0ec;
  color: #9f2e1d;
  padding: 10px;
  margin: 10px 0;
}

.quote-message-alert strong {
  font-size: 13px;
}

.quote-message-alert span {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #6f372c;
  font-size: 13px;
  line-height: 1.35;
}

.change-request-panel {
  display: none;
  gap: 12px;
  border: 1px solid #ffb9ad;
  border-radius: 8px;
  background: #fff7f4;
  padding: 16px;
}

.change-request-list {
  display: grid;
  gap: 10px;
}

.change-request-list article {
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.change-request-list strong {
  display: block;
  color: #9f2e1d;
  font-size: 13px;
  margin-bottom: 6px;
}

.change-request-list p {
  margin: 0;
  color: var(--primary);
  line-height: 1.45;
}

.customer-change-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 18, 15, .48);
}

.customer-change-dialog {
  position: relative;
  width: min(560px, 100%);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(12,18,15,.24);
  padding: 30px;
}

.customer-change-dialog .primary {
  margin-top: 18px;
}

.customer-accepted-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  background: rgba(14, 24, 20, .54);
  padding: 18px;
}

.customer-accepted-dialog {
  position: relative;
  width: min(620px, 100%);
  border-radius: 8px;
  background: white;
  border: 2px solid #83b735;
  box-shadow: 0 24px 70px rgba(10, 24, 20, .25);
  padding: 30px;
  text-align: center;
}

.customer-accepted-dialog span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ecf8dc;
  color: #315f08;
  font-size: 12px;
  font-weight: 950;
  padding: 7px 12px;
  margin-bottom: 12px;
}

.customer-accepted-dialog h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.customer-accepted-dialog p {
  margin: 0 auto 16px;
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.customer-accepted-dialog strong {
  display: inline-flex;
  border: 1px solid #cbe8a2;
  border-radius: 8px;
  background: #f7ffed;
  color: #315f08;
  padding: 10px 12px;
  margin-bottom: 18px;
}

.customer-accepted-dialog .primary {
  min-width: 170px;
  background: #83b735;
  color: white;
}

.customer-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.payment-info-box {
  border: 2px solid #ffd0c6;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0 18px;
  background: #fffaf8;
  break-inside: avoid;
  page-break-inside: avoid;
}

.payment-info-box h2 {
  margin: 0 0 12px;
  color: #FF4F30;
  font-size: 18px;
}

.payment-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.payment-info-grid div {
  border: 1px solid #ffd0c6;
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.payment-info-grid span,
.payment-reference-box span {
  display: block;
  color: #6b756f;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.payment-info-grid strong {
  color: #FF4F30;
  font-size: 15px;
  font-weight: 950;
}

.payment-reference-box {
  border: 4px solid #FF4F30;
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: #FF4F30;
}

.payment-reference-box strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: .04em;
}

.signature-block {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 18px;
}

.signature-block img {
  max-width: 130px;
  max-height: 58px;
  object-fit: contain;
}

.signature-block strong,
.signature-block span {
  display: block;
}

.signature-block strong {
  font-size: 17px;
  margin-bottom: 6px;
}

.signature-block span {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1280px) {
  .account-grid {
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  }

  .add-user-form {
    grid-template-columns: minmax(160px, 1fr) minmax(170px, 1fr);
  }

  .add-user-form button {
    width: 100%;
  }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .auth-view { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .sidebar { position: static; }
  .saas-grid { grid-template-columns: 1fr 1fr; }
  .roadmap-grid { grid-template-columns: 1fr 1fr; }
  .backend-mvp-grid { grid-template-columns: 1fr 1fr; }
  .data-model-grid { grid-template-columns: 1fr 1fr; }
  .test-checklist-grid { grid-template-columns: 1fr 1fr; }
  .launch-mvp-grid { grid-template-columns: 1fr; }
  .roadmap-hero { grid-template-columns: 1fr; }
  .status-grid, .quote-columns, .split, .customer-hero, .settings-grid, .profile-preview, .crm-alert-panel { grid-template-columns: 1fr 1fr; }
  .form-grid, .row, .price-grid, .variant-option, .variant-head { grid-template-columns: 1fr; }
  .row {
    grid-template-areas:
      "actions"
      "title"
      "client"
      "category"
      "status"
      "tracking"
      "total";
  }
  .row.header {
    display: none;
  }
  .product-row,
  .product-row-main {
    grid-template-columns: 1fr;
  }
  .product-row .product-row-media {
    display: none;
  }
  .product-row-price {
    text-align: left;
  }
  .product-card-actions {
    justify-content: stretch;
  }
  .product-card-actions .secondary {
    flex: 1 1 120px;
  }
  .line-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "move move"
      "name name"
      "product product"
      "qty vat"
      "net gross"
      "unit image"
      "preview save"
      "options options"
      "remove remove";
  }
  .line-product-pick {
    grid-template-columns: 1fr;
  }
  .remove-line {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 680px) {
  .main { padding: 18px; }
  .topbar, .section-head, .modal-head, .modal-actions, .total-row, .accept-strip, .billing-feature-button { align-items: stretch; flex-direction: column; }
  .template-card,
  .workflow-panel,
  .document-action-options,
  .offer-confidence-card,
  .saas-grid,
  .roadmap-grid,
  .backend-mvp-grid,
  .data-model-grid,
  .test-checklist-grid,
  .account-grid,
  .add-user-form { grid-template-columns: 1fr; }
  .auth-card { margin: 18px; }
  .account-badge { width: 100%; justify-content: space-between; }
  .workflow-actions,
  .template-card > div:last-child { justify-content: stretch; }
  .workflow-actions button,
  .template-card button { width: 100%; }
  .roadmap-hero,
  .roadmap-next.panel { align-items: stretch; flex-direction: column; }
  .user-flow-card { grid-template-columns: 1fr; }
  .mvp-screen-card { grid-template-columns: 1fr; }
  .build-order-card,
  .build-order-result,
  .closed-test-card { grid-template-columns: 1fr; }
  .user-flow-number { min-height: 54px; }
  .mvp-screen-index { min-height: 54px; }
  .build-order-phase { min-height: 54px; }
  .closed-test-number { min-height: 54px; }
  .roadmap-hero h3 { font-size: 26px; }
  .status-grid, .quote-columns, .split, .customer-hero, .customer-item, .company-card, .signature-block, .settings-grid, .profile-preview, .price-grid, .customer-change-card, .email-prepared-panel, .quote-email-panel, .crm-alert-panel { grid-template-columns: 1fr; }
  .custom-field-row { grid-template-columns: 1fr; }
  .project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .project-tile {
    min-width: 0;
    max-width: none;
  }
  .line-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "move"
      "name"
      "product"
      "qty"
      "unit"
      "net"
      "vat"
      "gross"
      "image"
      "preview"
      "save"
      "options"
      "remove";
  }
  .line-product-pick {
    grid-template-columns: 1fr;
  }
  .share-panel div { grid-template-columns: 1fr; }
  .plan-switcher {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    padding: 8px;
    background: rgba(250,251,248,.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 26px rgba(30,47,41,.12);
  }
  .plan-toggle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
  }
  .plan-toggle button {
    min-height: 42px;
    padding: 6px 4px;
    font-size: 11px;
  }
  .comparison-table { border: 0; box-shadow: none; background: transparent; display: grid; gap: 10px; }
  .comparison-row { grid-template-columns: 1fr repeat(3, 48px); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; }
  .comparison-head { position: static; }
  .comparison-head > div { min-height: 96px; padding: 9px 5px; text-align: center; }
  .comparison-head > div:first-child { text-align: left; }
  .comparison-head button { display: none; }
  .tier-name { min-height: 24px; padding: 4px 6px; font-size: 10px; }
  .tier-object { width: 44px; height: 38px; }
  .tier-head.diamond .tier-object { width: 50px; }
  .comparison-feature { min-height: 104px; padding: 12px; }
  .comparison-cell { min-height: 104px; }
  .feature-short { font-size: 13px; }
  .feature-tag { font-size: 11px; }
  .customer-hero h1 { font-size: 32px; }
  .customer-item img, .customer-image-empty { width: 100%; height: 150px; }
  .gallery-mosaic .reference-gallery,
  .gallery-showcase .reference-gallery { grid-template-columns: 1fr; }
  .gallery-mosaic .reference-gallery figure,
  .gallery-mosaic .reference-gallery figure:first-child,
  .gallery-mosaic .reference-gallery figure:nth-child(4) { grid-column: auto; }
  .gallery-showcase .reference-gallery figure:first-child { grid-row: auto; }
  .gallery-showcase .reference-gallery figure:first-child img { min-height: 0; height: 220px; }
  .feature-meta { align-items: flex-start; flex-wrap: wrap; }
  .feature-bubble { margin-left: 0; margin-right: 0; }
}

@media print {
  body * { visibility: hidden; }
  .app,
  dialog {
    display: none !important;
  }
  #printArea, #printArea * { visibility: visible; }
  .customer-view, .customer-view * { visibility: visible; }
  #printArea {
    display: block;
    position: static;
    inset: auto;
    width: 100%;
    min-height: auto;
    box-sizing: border-box;
    padding: 28px;
    background: white;
  }
  .print-header { display: flex; justify-content: space-between; gap: 28px; border-top: 0; border-bottom: 0; padding-top: 8px; padding-bottom: 14px; }
  .print-header > div { min-width: 0; }
  .quote-print-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand client"
      "band band"
      "company meta";
    column-gap: 28px;
    row-gap: 10px;
    align-items: start;
  }
  .print-brand-block { grid-area: brand; }
  .print-client-block { grid-area: client; }
  .print-company-block { grid-area: company; }
  .print-meta-block { grid-area: meta; }
  .print-header-band {
    grid-area: band;
    height: 0;
    border-top: 16px solid #f3f3f3;
    margin: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-logo { max-width: 140px; max-height: 70px; object-fit: contain; display: block; margin-bottom: 12px; }
  .print-document-type { margin: 0 0 8px; font-weight: 900; letter-spacing: .08em; color: #FF4F30; }
  .commercial-document {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 28px;
    padding: 8px 0 18px;
    border-bottom: 2px solid #111;
  }
  .commercial-document > div { min-width: 0; }
  .commercial-party-block {
    padding-right: 0;
  }
  .commercial-side-block {
    display: grid;
    gap: 12px;
    padding-left: 0;
  }
  .commercial-info-box {
    border: 0;
    border-left: 5px solid #111;
    background: #f3f3f3;
    padding: 10px 12px;
    page-break-inside: avoid;
  }
  .commercial-info-box strong {
    color: #111;
  }
  .commercial-info-box p {
    margin: 8px 0 0;
  }
  .commercial-block-divider {
    display: none;
  }
  .commercial-document .print-document-type {
    display: inline-block;
    margin: 6px 0 14px;
    padding: 8px 12px;
    background: #f3f3f3;
    color: #111;
    border: 1px solid #d0d0d0;
    letter-spacing: .1em;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .commercial-document h1 {
    margin-top: 0;
    font-size: 30px;
    line-height: 1.05;
  }
  .commercial-delivery .print-document-type {
    color: #111;
  }
  .print-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 10px; }
  .print-meta-grid .quote-meta-item { padding: 7px 8px; border-color: #ddd; page-break-inside: avoid; }
  .print-meta-grid .quote-meta-item span { font-size: 10px; margin-bottom: 2px; }
  .print-meta-grid .quote-meta-item strong { font-size: 11px; line-height: 1.2; }
  .print-total-box { display: inline-block; margin: 10px 0 0; padding: 10px 14px; border: 2px solid #FF4F30; border-radius: 8px; color: #111; }
  .print-subtitle { margin: 18px 0 0; padding: 12px 14px; border: 0; border-left: 6px solid #111; background: #f3f3f3; }
  .print-items { width: 100%; border-collapse: separate; border-spacing: 0 8px; margin-top: 24px; border-bottom: 0; }
  .print-items th, .print-items td { padding: 10px; text-align: left; }
  .print-items th {
    background: #f3f3f3;
    color: #111;
    border: 1px solid #d0d0d0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-items tbody tr {
    background: #fff8dc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-items tbody td {
    border-top: 1px solid #f0d58a;
    border-bottom: 1px solid #f0d58a;
  }
  .print-items tbody td:first-child {
    border-left: 1px solid #f0d58a;
    border-radius: 8px 0 0 8px;
  }
  .print-items tbody td:last-child {
    border-right: 1px solid #f0d58a;
    border-radius: 0 8px 8px 0;
    font-weight: 800;
  }
  .print-items img { width: 84px; height: 62px; object-fit: cover; }
  .payment-info-box { border: 2px solid #d0d0d0; background: #f3f3f3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .payment-info-grid { grid-template-columns: repeat(3, 1fr); }
  .payment-info-box h2,
  .payment-info-grid strong,
  .payment-reference-box,
  .payment-reference-box strong { color: #FF4F30; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .payment-reference-box { border: 4px solid #FF4F30; }
  .delivery-contact-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0 0;
    padding: 12px;
    border: 2px solid #111;
    border-radius: 8px;
    background: #f3f3f3;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .delivery-contact-box h2 {
    grid-column: 1 / -1;
    margin: -12px -12px 4px;
    padding: 9px 12px;
    color: white;
    background: #111;
    border-radius: 6px 6px 0 0;
    font-size: 16px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .delivery-contact-box div {
    padding: 10px;
    border: 1px solid #222;
    border-radius: 8px;
    background: white;
  }
  .delivery-contact-box span {
    display: block;
    margin-bottom: 4px;
    color: #222;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
  }
  .delivery-contact-box strong {
    color: #111;
    font-size: 13px;
    line-height: 1.25;
  }
  .commercial-print .commercial-document .print-document-type,
  .commercial-print.commercial-delivery .delivery-contact-box h2,
  .commercial-print .print-items th {
    background: #f3f3f3;
    color: #111;
    border: 1px solid #d0d0d0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .commercial-print.commercial-delivery .print-subtitle {
    border-left-color: #d0d0d0;
  }
  .commercial-print.commercial-delivery .commercial-info-box {
    border-left-width: 2px;
  }
  .reference-section { gap: 10px; margin-top: 18px; border: 1px solid #ffb9ad; border-radius: 8px; box-shadow: none; padding: 12px; background: linear-gradient(135deg, #fff2ef, #fffdfb 46%, #ffffff); page-break-inside: avoid; break-inside: avoid; }
  .reference-section .section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -12px -12px 10px; padding: 8px 12px; background: #FF4F30; color: white; border-radius: 8px 8px 0 0; border-bottom: 0; }
  .reference-section .section-head h2 { margin: 0; color: white; font-size: 16px; }
  .reference-section .badge { background: white; color: #a73320; border: 0; }
  .reference-text { font-size: 11px; line-height: 1.35; max-width: none; padding: 8px 10px; border-left-width: 4px; background: white; }
  .reference-gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: stretch; }
  .reference-gallery figure { page-break-inside: avoid; border-radius: 6px; box-shadow: none; border-color: #ead8d2; background: white; }
  .reference-gallery figure:first-child { grid-column: auto; grid-row: auto; }
  .reference-gallery img { aspect-ratio: 4 / 3; height: auto; object-fit: contain; background: #f5f1ee; }
  .reference-videos { grid-template-columns: repeat(auto-fit, minmax(170px, 240px)); justify-content: center; max-width: 500px; margin: 6px auto 0; gap: 8px; }
  .video-preview { aspect-ratio: 16 / 9; border-color: #ffd1c8; background: #20110d; page-break-inside: avoid; }
  .video-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
  .video-thumb-fallback { display: grid; width: 100%; height: 100%; place-content: center; gap: 4px; padding: 12px; color: white; text-align: center; }
  .video-thumb-fallback strong { font-size: 13px; }
  .video-thumb-fallback span { font-size: 9px; }
  .reference-video-card iframe { display: none; }
  .video-play { width: 34px; height: 34px; font-size: 14px; background: #FF4F30; }
  .video-link { min-height: 34px; border-color: #ffd1c8; background: #fff7f4; color: #a73320; font-size: 10px; padding: 6px; word-break: break-word; }
  .delivery-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 44px; page-break-inside: avoid; }
  .delivery-signatures div { min-height: 86px; border-top: 1px solid #222; padding-top: 10px; }
  .delivery-signatures span { display: block; color: #555; margin-top: 6px; }
  .customer-view { display: block !important; }
  .customer-shell { width: 100%; padding: 0; }
  .customer-hero { color: #111; background: white; border-bottom: 2px solid #222; }
  .customer-hero .eyebrow, .customer-muted, .customer-total span, .customer-total small { color: #555; }
  .accept-strip { display: none; }
  .signature-block { grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 14px; box-shadow: none; page-break-inside: avoid; }
  .signature-block img { max-width: 110px; max-height: 48px; }
  .signature-block strong { font-size: 13px; margin-bottom: 4px; }
  .signature-block span { font-size: 11px; line-height: 1.3; }
}

