:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #eef5f3;
  --ink: #17201d;
  --muted: #66746f;
  --line: #dce7e3;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #d9f1ed;
  --amber: #c77700;
  --amber-soft: #fff2d6;
  --red: #b42318;
  --red-soft: #fde7e5;
  --blue: #2563eb;
  --blue-soft: #e5edff;
  --shadow: 0 18px 50px rgba(23, 32, 29, 0.08);
  --radius: 8px;
  --radius-sm: 6px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

a {
  color: inherit;
  text-decoration: none;
}

noscript {
  display: block;
  padding: 24px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 32%),
    linear-gradient(135deg, #f7faf9 0%, #eaf2ef 100%);
}

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.landing-page {
  min-height: 100vh;
  background: #f7faf9;
}

.landing-nav {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 231, 227, 0.9);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.landing-brand span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 850;
}

.landing-brand strong {
  font-size: 18px;
}

.landing-nav-links,
.landing-nav-actions,
.landing-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-nav-links {
  gap: 24px;
  color: #43544f;
  font-size: 14px;
  font-weight: 700;
}

.landing-nav-links a:hover {
  color: var(--accent);
}

.landing-hero {
  position: relative;
  display: grid;
  min-height: clamp(520px, 72vh, 680px);
  align-items: center;
  overflow: hidden;
  padding: clamp(44px, 7vw, 86px) clamp(20px, 6vw, 82px);
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(247, 250, 249, 0.98) 0%, rgba(247, 250, 249, 0.9) 34%, rgba(247, 250, 249, 0.24) 62%, rgba(247, 250, 249, 0.06) 100%),
    url("./assets/landing-hero-artisania.png");
  background-position: center;
  background-size: cover;
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.landing-hero h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-hero p {
  max-width: 600px;
  margin: 22px 0 0;
  color: #40514c;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
}

.landing-hero-actions {
  flex-wrap: wrap;
  margin-top: 26px;
}

.landing-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.landing-feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 28px 0 72px;
}

.landing-feature-strip article,
.landing-steps article {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.landing-feature-strip .icon {
  color: var(--accent);
}

.landing-feature-strip strong,
.landing-steps strong {
  display: block;
  margin-top: 12px;
  font-size: 16px;
}

.landing-feature-strip p,
.landing-steps p,
.landing-workflow p,
.landing-trust p,
.landing-final-cta p {
  margin: 8px 0 0;
  color: var(--muted);
}

.landing-workflow,
.landing-trust {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: start;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.landing-pricing {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.landing-section-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.landing-workflow h2,
.landing-trust h2,
.landing-section-head h2,
.landing-final-cta h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.landing-section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

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

.landing-steps article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 14px;
}

.landing-steps span {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: span 2;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 850;
}

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

.landing-proof-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 720;
}

.landing-proof-list .icon {
  color: var(--accent);
}

.landing-demo,
.landing-use-cases,
.landing-security,
.landing-faq {
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.landing-demo-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

.landing-demo-input,
.landing-demo-preview {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.landing-demo-input {
  display: grid;
  gap: 14px;
  align-content: start;
}

.landing-demo-input label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.landing-demo-input textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.landing-demo-preview {
  display: grid;
  gap: 14px;
  box-shadow: 0 18px 38px rgba(23, 32, 29, 0.07);
}

.landing-demo-doc-head,
.landing-demo-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-demo-doc-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-demo-doc-head strong {
  font-size: 22px;
}

.landing-demo-table {
  display: grid;
  border-top: 1px solid var(--line);
}

.landing-demo-table > div {
  display: grid;
  grid-template-columns: minmax(96px, 0.55fr) minmax(0, 1.6fr) minmax(90px, 0.45fr) minmax(94px, 0.45fr);
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.landing-demo-table span,
.landing-demo-table small,
.landing-demo-preview p,
.landing-use-grid p,
.landing-faq-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.landing-demo-table strong {
  min-width: 0;
}

.landing-demo-table b,
.landing-demo-total strong {
  text-align: right;
  white-space: nowrap;
}

.landing-demo-total {
  padding: 14px;
  background: #eef8f5;
  border-radius: var(--radius-sm);
}

.landing-use-grid,
.landing-faq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.landing-use-grid article,
.landing-faq-grid article {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.landing-use-grid strong,
.landing-faq-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.landing-final-cta {
  padding: 58px 0 78px;
  text-align: center;
}

.landing-final-cta h2,
.landing-final-cta p {
  margin-right: auto;
  margin-left: auto;
}

.landing-final-cta .button {
  margin-top: 22px;
}

.brand-block,
.brand,
.topbar-actions,
.inline-actions,
.panel-head,
.editor-head,
.line-toolbar,
.user-chip,
.tenant-card,
.task-row,
.metric-card,
.timeline-row,
.document-card,
.health-tile,
.suggestion-card {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 14px;
  margin-bottom: 24px;
}

.brand-block h1,
.topbar h1,
.panel h2,
.modal h2,
.editor-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand-block h1 {
  font-size: 28px;
}

.brand-block p,
.topbar p,
.panel-head p,
.editor-head p,
.auth-foot,
.metric-card p,
.metric-card small,
table small,
.project-card p,
.project-card small,
.document-card p,
.document-card small,
.timeline-row p,
.health-tile p,
.suggestion-card p,
.config-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), #1b8a5a);
  border-radius: var(--radius);
  font-weight: 800;
  overflow: hidden;
  text-transform: uppercase;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.brand-mark.logo-placeholder {
  color: #e8fffb;
  background: linear-gradient(135deg, #0f766e, #23423c);
}

.brand-mark.logo-placeholder .icon {
  width: 22px;
  height: 22px;
}

.brand-mark.small.logo-placeholder .icon {
  width: 18px;
  height: 18px;
}

.logo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inline-link {
  color: var(--accent);
  font-weight: 680;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.auth-tabs button {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 760;
}

.auth-tabs button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(23, 32, 29, 0.08);
}

.auth-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form label,
.form-grid label,
.template-settings label,
.quote-bottom label {
  display: grid;
  gap: 6px;
  color: #384640;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfdcd7;
  border-radius: var(--radius-sm);
  outline: none;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #52625d 50%),
    linear-gradient(135deg, #52625d 50%, transparent 50%),
    linear-gradient(to right, #e4efeb, #e4efeb);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 34px) 50%;
  background-repeat: no-repeat;
  background-size:
    6px 6px,
    6px 6px,
    1px 22px;
}

select:hover {
  border-color: #aebfba;
  background-color: #fbfdfc;
}

input,
select {
  min-height: 40px;
  padding: 8px 10px;
}

select {
  padding-right: 38px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
}

.button,
.icon-button,
.link-button,
.table-link,
.quote-list-item {
  border: 0;
  background: none;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  color: var(--ink);
  background: #edf4f2;
  border: 1px solid #d7e4e0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 720;
  white-space: nowrap;
}

.button:hover {
  background: #e4efeb;
}

.button:disabled,
.button.disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.button.loading {
  pointer-events: none;
}

.button-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: buttonSpin 0.75s linear infinite;
}

@keyframes buttonSpin {
  to {
    transform: rotate(360deg);
  }
}

.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.ghost {
  background: transparent;
}

.button.muted-action {
  color: #7a8783;
  background: #f4f7f6;
  border-color: #dce7e3;
}

.button.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f4b7b0;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.button.full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.icon-button.danger {
  color: var(--red);
}

.icon-button.danger:hover {
  color: #fff;
  background: var(--red);
}

.link-button,
.table-link {
  color: var(--accent);
  font-weight: 750;
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.auth-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-demo strong {
  display: block;
  font-size: 13px;
}

.auth-demo p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

.app-shell:has(.sidebar:hover),
.app-shell:has(.sidebar:focus-within) {
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  padding: 18px 10px;
  color: #eef8f5;
  background: linear-gradient(180deg, #073f3d 0%, #052f33 100%);
  border-right: 1px solid #0a504d;
  transition: padding 180ms ease;
}

.app-shell:has(.sidebar:hover) .sidebar,
.app-shell:has(.sidebar:focus-within) .sidebar {
  padding: 18px 16px;
}

.brand {
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius);
  justify-content: center;
  min-width: 0;
}

.app-shell:has(.sidebar:hover) .brand,
.app-shell:has(.sidebar:focus-within) .brand {
  justify-content: flex-start;
}

.brand span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-6px);
  transition:
    max-width 180ms ease,
    opacity 140ms ease,
    transform 180ms ease;
}

.app-shell:has(.sidebar:hover) .brand span:last-child,
.app-shell:has(.sidebar:focus-within) .brand span:last-child {
  max-width: 150px;
  opacity: 1;
  transform: translateX(0);
}

.brand strong,
.brand small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  color: #a8cbc5;
  font-size: 12px;
}

.brand strong {
  overflow: visible;
  line-height: 1.2;
  white-space: normal;
}

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

.nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: #c9dfdb;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
}

.nav-item span {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transform: translateX(-6px);
  transition:
    max-width 180ms ease,
    opacity 140ms ease,
    transform 180ms ease;
}

.app-shell:has(.sidebar:hover) .nav-item,
.app-shell:has(.sidebar:focus-within) .nav-item {
  justify-content: flex-start;
}

.app-shell:has(.sidebar:hover) .nav-item span,
.app-shell:has(.sidebar:focus-within) .nav-item span {
  max-width: 150px;
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.22);
}

.sidebar-footer {
  margin-top: auto;
}

.tenant-card {
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.tenant-card div {
  display: grid;
  min-width: 0;
}

.tenant-card strong {
  font-size: 13px;
}

.tenant-card small {
  overflow: hidden;
  color: #a8cbc5;
  font-size: 11px;
  text-overflow: ellipsis;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: #16a34a;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.status-dot.warn {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.status-dot.neutral {
  background: #64748b;
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  background: rgba(244, 247, 246, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.global-search {
  position: relative;
  flex: 1 1 360px;
  max-width: 560px;
  z-index: 8;
}

.global-search > .icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: var(--muted);
}

.global-search input {
  padding-left: 38px;
  background: #fff;
}

.global-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: none;
  max-height: 390px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #d7e4e0;
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(23, 32, 29, 0.14);
}

.global-search-results.is-open {
  display: grid;
}

.global-search-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
}

.global-search-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.global-search-result-row .global-search-result {
  min-width: 0;
}

.global-search-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  color: var(--accent);
  background: #eef8f5;
  border: 1px solid #cfe5df;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 850;
}

.global-search-add:hover,
.global-search-add:focus {
  background: #dff3ee;
}

.global-search-add .icon {
  width: 15px;
  height: 15px;
}

.global-search-result:hover,
.global-search-result:focus {
  background: #eef8f5;
}

.global-search-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.global-search-icon .icon {
  position: static;
  color: inherit;
}

.global-search-result span:last-child {
  min-width: 0;
}

.global-search-result strong,
.global-search-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result strong {
  font-size: 13px;
}

.global-search-result small,
.global-search-empty {
  color: var(--muted);
  font-size: 12px;
}

.global-search-empty {
  padding: 10px 12px;
}

.global-search-section {
  padding: 8px 10px 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 24px;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  padding: 10px;
}

.notification-button span {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.notification-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 130px));
  overflow-y: auto;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #d7e4e0;
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(23, 32, 29, 0.14);
}

.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 8px;
}

.notification-head small {
  color: var(--muted);
  font-size: 12px;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius-sm);
}

.notification-item strong,
.notification-item p {
  margin: 0;
}

.notification-item strong {
  display: block;
  font-size: 13px;
}

.notification-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.user-chip {
  gap: 9px;
  padding: 5px 7px 5px 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.user-chip > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  background: #23423c;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 800;
}

.screen {
  padding: 22px 24px 34px;
}

.screen:has(.split-layout) {
  padding: 18px 20px 34px;
}

.dashboard-grid,
.admin-grid,
.settings-grid,
.split-layout {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.metric-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.subscription-upgrade-reminder {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #ecf8f5 0%, #ffffff 64%);
  border-color: #9fd5cc;
}

.subscription-upgrade-reminder > div:first-child {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.subscription-upgrade-reminder > div:first-child > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.subscription-upgrade-reminder h2,
.subscription-upgrade-reminder p {
  margin: 0;
}

.subscription-upgrade-reminder h2 {
  font-size: 18px;
}

.subscription-upgrade-reminder p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.analytics-panel {
  grid-column: 1 / -1;
}

.analytics-head {
  align-items: flex-start;
}

.analytics-actions,
.period-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.period-control {
  flex-wrap: wrap;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid #d5e4df;
  border-radius: var(--radius);
}

.period-control label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #465751;
  font-size: 12px;
  font-weight: 750;
}

.period-control input {
  min-height: 32px;
  width: 142px;
  padding: 5px 8px;
  font-size: 12px;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-kpis article {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.analytics-kpis span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.analytics-kpis strong {
  display: block;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.05;
}

.analytics-kpis p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.conversion-kpi {
  background: #f8fbff;
  border-color: #d8e3f7;
}

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

.analytics-chart {
  --plot-height: 190px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.analytics-chart:fullscreen,
.analytics-chart.chart-expanded {
  --plot-height: min(54vh, 520px);
  width: 100vw;
  height: 100vh;
  padding: 24px;
  overflow: auto;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.analytics-chart.chart-expanded {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.analytics-chart:last-child {
  grid-column: 1 / -1;
}

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

.analytics-chart h3 {
  margin: 0;
  font-size: 15px;
}

.analytics-chart p,
.analytics-footnote {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.analytics-chart-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.analytics-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: #42534e;
  font-size: 12px;
  font-weight: 750;
}

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

.analytics-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-fullscreen-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.series-0 {
  background: var(--accent);
}

.series-1 {
  background: #e0a11b;
}

.bar-chart-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bar-chart-body {
  display: flex;
  min-width: 0;
  gap: 8px;
}

.chart-y-axis {
  position: relative;
  width: 54px;
  height: var(--plot-height);
  flex: 0 0 54px;
  margin-top: 42px;
  color: #5e6d68;
  font-size: 11px;
  font-weight: 760;
  text-align: right;
}

.chart-y-axis::after {
  position: absolute;
  top: 0;
  right: -7px;
  bottom: 0;
  width: 1px;
  background: #cfded9;
  content: "";
}

.chart-y-axis span {
  position: absolute;
  right: 2px;
  max-width: 52px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.bar-chart {
  min-width: var(--chart-width, 680px);
}

.bar-plot {
  display: grid;
  min-height: calc(var(--plot-height) + 70px);
  grid-template-columns: repeat(var(--month-count), minmax(42px, 1fr));
  gap: 8px;
  align-items: end;
  padding: 42px 4px 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to top, rgba(220, 231, 227, 0.72) 1px, transparent 1px) 0 42px / 100% calc(var(--plot-height) / 4);
}

.bar-group {
  position: relative;
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
}

.bar-pair {
  display: flex;
  height: var(--plot-height);
  align-items: end;
  justify-content: center;
  gap: 4px;
}

.dashboard-bar {
  display: block;
  width: 13px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.dashboard-bar:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.chart-tooltip {
  position: absolute;
  top: -36px;
  left: 50%;
  z-index: 5;
  min-width: 172px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfe0db;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 26px rgba(23, 32, 29, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.chart-tooltip::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid #cfe0db;
  border-bottom: 1px solid #cfe0db;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.chart-tooltip > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.chart-tooltip span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  white-space: nowrap;
}

.chart-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-tooltip b {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
}

.chart-tooltip em {
  color: var(--accent);
  font-style: normal;
  font-weight: 850;
}

.bar-group:hover .chart-tooltip,
.bar-group.show-tooltip .chart-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bar-group small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-footnote {
  margin-top: 12px;
  text-align: right;
}

.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(23, 32, 29, 0.02);
}

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

.main-panel {
  min-height: 360px;
}

.dashboard-grid.setup-complete .main-panel {
  grid-column: 1 / -1;
  min-height: auto;
}

.ai-panel {
  align-self: start;
}

.panel-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2,
.modal h2,
.editor-head h2 {
  font-size: 18px;
}

.metric-card {
  gap: 12px;
  padding: 16px;
}

.metric-card > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.metric-card strong {
  display: block;
  margin-bottom: 2px;
  font-size: 22px;
}

.task-list,
.quote-list,
.timeline,
.suggestion-list,
.setup-list {
  display: grid;
  gap: 10px;
}

.setup-panel {
  align-self: start;
}

.setup-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  background: #fbfdfc;
  border: 1px solid #e3ece8;
  border-radius: var(--radius);
}

.setup-step > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: #cbd8d3;
  border-radius: 999px;
}

.setup-step.done > span {
  background: var(--accent);
}

.setup-step strong {
  font-size: 13px;
}

.setup-step small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.task-row {
  gap: 12px;
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid #e3ece8;
  border-radius: var(--radius);
}

.task-row > div {
  flex: 1;
  min-width: 0;
}

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

.operational-panel {
  grid-column: 1 / -1;
}

.operational-grid,
.invoice-summary-grid,
.client-summary-grid,
.project-summary-grid,
.document-summary-grid,
.ai-quality-grid,
.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.operational-grid article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
}

.operational-grid article.attention {
  background: #fff8ea;
  border-color: #f1d197;
}

.operational-grid article > .icon {
  color: var(--accent);
}

.operational-grid strong,
.operational-grid p,
.operational-grid small {
  margin: 0;
}

.operational-grid strong {
  display: block;
  font-size: 20px;
}

.operational-grid p {
  color: var(--ink);
  font-weight: 800;
}

.operational-grid small {
  color: var(--muted);
  font-size: 12px;
}

.task-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius-sm);
}

.task-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.task-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.task-icon.red {
  color: var(--red);
  background: var(--red-soft);
}

.inline-actions,
.button-row,
.line-toolbar,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row.compact {
  justify-content: flex-end;
  gap: 8px;
}

.assistant-generate-row {
  align-items: center;
  justify-content: space-between;
}

.assistant-action-cluster {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.assistant-generate-row > .button {
  flex: 0 0 auto;
}

.optional-audit-button {
  color: #0f5f58;
  background: #ecf8f5;
  border-color: #b9ded7;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.optional-audit-button small {
  margin-left: 4px;
  color: #6a7a75;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.optional-audit-button:not(:disabled):hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.optional-audit-button:not(:disabled) {
  animation: auditOptionalPulse 2.6s ease-in-out infinite;
}

.optional-audit-hint {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  padding: 8px 10px;
  color: #52625d;
  background: #f7fbfa;
  border: 1px solid #d7e8e3;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.optional-audit-hint .icon {
  flex: 0 0 auto;
  color: var(--accent);
}

.email-template-help {
  margin-bottom: 14px;
  padding: 10px 12px;
  color: #52625d;
  background: #f8fbfa;
  border: 1px solid #d7e8e3;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
}

.email-template-help code {
  color: #0f5f58;
  font-weight: 850;
}

.toolbar {
  display: flex;
  align-items: end;
  margin-bottom: 14px;
}

.search-field {
  position: relative;
  display: block;
  width: min(520px, 100%);
}

.search-field .icon {
  position: absolute;
  top: 11px;
  left: 12px;
  color: var(--muted);
}

.search-field input {
  padding-left: 38px;
}

.compact-select {
  display: grid;
  min-width: 180px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.clients-table {
  min-width: 1080px;
}

.clients-table td:nth-child(7) strong {
  white-space: nowrap;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e4ece9;
}

th {
  color: #51615c;
  background: #f8fbfa;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-sort {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.table-sort small {
  display: inline-flex;
  min-width: 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.table-sort:hover,
.table-sort.active {
  color: var(--accent-strong);
}

.catalog-tree {
  display: grid;
  gap: 16px;
}

.catalog-folder {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f9fcfb;
  border: 1px solid #e0ebe6;
  border-radius: var(--radius);
}

.catalog-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-folder-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.catalog-folder-title .icon {
  color: var(--accent);
}

.catalog-folder h3 {
  margin: 0;
  font-size: 15px;
}

.catalog-folder h3 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.folder-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.catalog-folder table,
.catalog-table {
  min-width: 880px;
  table-layout: fixed;
}

.catalog-col-designation {
  width: auto;
}

.catalog-col-category {
  width: 118px;
}

.catalog-col-unit {
  width: 76px;
}

.catalog-col-price {
  width: 104px;
}

.catalog-col-vat {
  width: 56px;
}

.catalog-col-date {
  width: 104px;
}

.catalog-col-actions {
  width: 150px;
}

.catalog-table td,
.catalog-table th {
  padding-right: 8px;
  padding-left: 8px;
  overflow: visible;
  text-overflow: clip;
}

.catalog-table th,
.catalog-table td:nth-child(4),
.catalog-table td:nth-child(5),
.catalog-table td:nth-child(6),
.catalog-table td:nth-child(7) {
  white-space: nowrap;
}

.catalog-table td:first-child,
.catalog-table td:nth-child(2),
.catalog-table td:nth-child(3) {
  overflow-wrap: anywhere;
}

.catalog-table td:first-child strong,
.catalog-table td:first-child small {
  overflow: visible;
  text-overflow: clip;
}

.catalog-table .row-actions {
  display: grid;
  grid-template-columns: 88px 34px;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.catalog-table .row-actions .button {
  width: 88px;
}

.catalog-table .row-actions .icon-button {
  justify-self: center;
}

td strong,
td small,
td span {
  display: block;
}

.invoice-row-late td {
  background: #fff8f6;
}

.invoice-row-late td:first-child {
  border-left: 3px solid var(--red);
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  color: #31514b;
  background: #edf6f4;
  border: 1px solid #d3e7e2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-draft,
.status-ready,
.status-client {
  color: #31514b;
  background: #edf6f4;
}

.status-sent,
.status-viewed,
.status-partial,
.status-issued {
  color: #8a5200;
  background: var(--amber-soft);
  border-color: #f1d197;
}

.status-accepted,
.status-paid {
  color: #0f684e;
  background: #ddf7ea;
  border-color: #b7ebd0;
}

.status-rejected,
.status-expired,
.status-cancelled,
.status-late {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f2b8b1;
}

.status-invoiced {
  color: #1f4f9c;
  background: var(--blue-soft);
  border-color: #c8d7ff;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: #f8fbfa;
  border: 1px dashed #cfddd8;
  border-radius: var(--radius);
  text-align: center;
}

.empty-state.compact {
  padding: 14px;
  font-size: 13px;
}

.timeline-row {
  position: relative;
  gap: 12px;
}

.timeline-row > span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 999px;
}

.split-layout {
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.list-panel {
  position: sticky;
  top: 108px;
}

.quote-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.quote-list-head > div {
  min-width: 0;
}

.quote-list-head p {
  grid-column: 1 / -1;
  max-width: none;
  line-height: 1.25;
}

.quote-search-field {
  position: relative;
  display: block;
  margin-bottom: 12px;
}

.quote-search-field .icon {
  position: absolute;
  top: 10px;
  left: 11px;
  color: var(--muted);
}

.quote-search-field input {
  min-height: 38px;
  padding-left: 36px;
  background: #fff;
}

.quote-list {
  min-width: 0;
  gap: 7px;
}

.quote-list-item {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 6px;
  overflow: hidden;
  padding: 9px 10px;
  color: inherit;
  border: 1px solid #e2ebe7;
  border-radius: var(--radius);
  text-align: left;
}

.quote-list-item.active,
.quote-list-item:hover {
  background: var(--accent-soft);
  border-color: #bddfd8;
}

.quote-list-item > span {
  min-width: 0;
}

.quote-card-main,
.quote-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
}

.quote-card-main strong,
.quote-card-main small,
.quote-card-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-card-main strong {
  min-width: 0;
  font-size: 14px;
}

.quote-card-main > small {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.quote-card-meta > small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.quote-list-item .badge {
  flex: none;
  justify-self: end;
  min-height: 21px;
  max-width: 100%;
  padding: 3px 7px;
  overflow: visible;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

.quote-list-item strong small {
  display: inline;
  margin-left: 4px;
  color: var(--muted);
  font-weight: 800;
}

.editor-panel {
  min-width: 0;
}

.editor-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.editor-head h2 span {
  color: var(--muted);
  font-size: 14px;
}

.version-chain {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.version-chain > span,
.version-chain > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.version-chain > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.version-comparison {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: #52625d;
  font-size: 12px;
  font-weight: 750;
}

.version-comparison > span {
  padding: 3px 7px;
  background: #f4f8f7;
  border: 1px solid #e0ebe7;
  border-radius: 999px;
}

.version-comparison .icon {
  color: var(--accent);
}

.version-pill {
  min-height: 26px;
  padding: 3px 9px;
  color: var(--accent);
  background: #f1f8f6;
  border: 1px solid #cfe5df;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.version-pill.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.notice {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  color: #7a4b00;
  background: var(--amber-soft);
  border: 1px solid #edd19a;
  border-radius: var(--radius);
  font-weight: 680;
}

.quote-steps {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: #edf4f2;
  border: 1px solid #d8e6e1;
  border-radius: var(--radius);
}

.quote-steps button {
  min-height: 34px;
  padding: 7px 12px;
  color: #50615c;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
}

.quote-steps button.active {
  color: #fff;
  background: var(--accent);
}

.quote-builder-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.quote-builder-toolbar .quote-steps {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.quote-client-picker {
  position: relative;
  display: grid;
  flex: 1 1 390px;
  max-width: 560px;
  gap: 7px;
  padding: 9px 10px;
  background: #fbfdfc;
  border: 1px solid #d7e5e1;
  border-radius: var(--radius-sm);
}

.quote-client-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.quote-client-picker-head span {
  color: var(--muted);
  font-weight: 760;
  text-transform: uppercase;
}

.quote-client-picker-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-client-search {
  position: relative;
}

.quote-client-search .icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: translateY(-50%);
}

.quote-client-search input {
  min-height: 34px;
  padding-left: 34px;
}

.quote-client-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 24;
  display: grid;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8e6e1;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.quote-client-results:empty {
  display: none;
}

.quote-client-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.quote-client-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf3f1;
  text-align: left;
}

.quote-client-result:last-child {
  border-bottom: 0;
}

.quote-client-result:hover {
  background: #f1f8f6;
}

.quote-client-result span:first-child {
  min-width: 0;
}

.quote-client-result strong,
.quote-client-result small {
  display: block;
}

.quote-client-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-client-result small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-selected-mark {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

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

.quote-meta {
  margin-bottom: 16px;
}

.span-2 {
  grid-column: span 2;
}

.address-fieldset {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
  background: #fbfdfc;
}

.address-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.address-fieldset-head {
  display: flex;
  justify-content: flex-end;
}

.address-fieldset .address-street {
  min-width: 0;
}

.address-fieldset.compact {
  padding: 12px;
}

.toggle-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
}

.toggle-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.toggle-row span {
  color: var(--ink);
  font-weight: 750;
}

.client-site-address {
  display: grid;
  grid-column: span 2;
}

.client-site-address .address-fieldset {
  grid-column: 1 / -1;
}

.client-site-address.hidden {
  display: none;
}

.line-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.quote-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.quote-lines-area,
.quote-ai-panel,
.quote-preview {
  min-width: 0;
}

.quote-lines-area {
  overflow-x: auto;
}

.catalog-line-search {
  position: relative;
  display: grid;
  flex: 1 1 420px;
  min-width: min(100%, 320px);
  gap: 8px;
}

.catalog-line-search-field {
  display: grid;
  gap: 6px;
  color: #384640;
  font-size: 13px;
  font-weight: 650;
}

.catalog-line-results {
  display: grid;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d8e6e1;
  border-radius: var(--radius-sm);
}

.catalog-line-results:empty {
  display: none;
}

.catalog-line-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-line-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf3f1;
  text-align: left;
}

.catalog-line-result:last-child {
  border-bottom: 0;
}

.catalog-line-result:hover {
  background: #f1f8f6;
}

.catalog-line-result span:first-child {
  min-width: 0;
}

.catalog-line-result strong,
.catalog-line-result small {
  display: block;
}

.catalog-line-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-line-result small {
  color: var(--muted);
  font-size: 12px;
}

.catalog-line-result > span:last-child {
  flex: 0 0 auto;
  font-weight: 800;
  white-space: nowrap;
}

.quote-line-head,
.quote-line-row {
  display: grid;
  grid-template-columns: 30px minmax(72px, 0.65fr) minmax(320px, 3.4fr) 56px 60px 86px 66px 106px 30px 30px 30px;
  gap: 6px;
  align-items: center;
  min-width: 928px;
}

.quote-line-head {
  padding: 8px 10px;
  color: #51615c;
  background: #f8fbfa;
  border: 1px solid #e2ebe7;
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote-line-list {
  display: grid;
  gap: 0;
  min-width: 928px;
  overflow: hidden;
  border: 1px solid #e2ebe7;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.quote-line-row {
  padding: 5px 10px;
  background: #fff;
  border-bottom: 1px solid #edf3f1;
  border-radius: 0;
}

.quote-line-row:last-child {
  border-bottom: 0;
}

.quote-line-row:hover {
  background: #fbfdfc;
}

.line-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #697b76;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: grab;
}

.line-drag-handle:hover {
  color: var(--accent);
  background: #eef8f5;
  border-color: #d4e7e2;
}

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

.line-drag-handle[draggable="false"] {
  opacity: 0.35;
  cursor: not-allowed;
}

.quote-line-row.dragging {
  opacity: 0.45;
  background: #eef8f5;
}

.quote-line-row.drag-over-before {
  box-shadow: inset 0 3px 0 var(--accent);
}

.quote-line-row.drag-over-after {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.quote-line-row input,
.quote-line-row select {
  min-height: 28px;
  padding: 3px 4px;
  background-color: transparent;
  border-color: transparent;
  border-radius: 5px;
  box-shadow: none;
}

.quote-line-row select {
  padding-right: 18px;
  background-position:
    calc(100% - 10px) 50%,
    calc(100% - 6px) 50%,
    calc(100% - 20px) 50%;
  background-size:
    4px 4px,
    4px 4px,
    1px 16px;
}

.quote-line-row input:hover,
.quote-line-row select:hover {
  background-color: #f7fbfa;
  border-color: #d9e7e2;
}

.quote-line-row input:focus,
.quote-line-row select:focus {
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.quote-line-row input[data-field="description"] {
  font-weight: 650;
}

.quote-line-row strong {
  overflow: visible;
  font-size: 14px;
  text-align: right;
  text-overflow: clip;
  white-space: nowrap;
}

.quote-line-row .icon-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
}

.line-info-button {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #cfe5df;
}

.line-info-button:hover {
  color: #fff;
  background: var(--accent);
}

.line-info-button.has-alert {
  color: #8a4f00;
  background: #fff4d6;
  border-color: #f0cf86;
}

.line-info-button.has-alert:hover {
  color: #fff;
  background: #8a4f00;
}

.quote-line-row.has-quality-alert {
  background: #fffdf7;
}

.quote-line-row.line-locked {
  background: #f7fbfa;
}

.quote-line-description-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.line-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 16px;
}

.line-meta-chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  color: #52625d;
  background: #edf5f2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.line-meta-chip.good {
  color: #0f5f58;
  background: #dff5ee;
}

.line-meta-chip.medium {
  color: #7a5200;
  background: #fff1bf;
}

.line-meta-chip.bad {
  color: #9f1f17;
  background: #ffe1dd;
}

.line-meta-chip.locked {
  color: #194b7a;
  background: #dfeeff;
}

.lock-line-button {
  color: #194b7a;
  background: #eef6ff;
  border-color: #cfe1f7;
}

.lock-line-button.active {
  color: #fff;
  background: #194b7a;
  border-color: #194b7a;
}

.line-info-panel {
  display: grid;
  gap: 14px;
}

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

.line-info-main {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #f2faf7;
  border: 1px solid #d3e8e3;
  border-radius: var(--radius-sm);
}

.line-info-main strong {
  color: var(--ink);
  font-size: 16px;
}

.line-info-main span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.line-info-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius-sm);
}

.line-info-grid article span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.line-info-grid article.line-info-alert {
  grid-column: 1 / -1;
  background: #fff8e8;
  border-color: #f0cf86;
}

.line-info-grid article.line-info-alert span {
  color: #8a4f00;
}

.line-info-grid article.line-info-price-library {
  grid-column: 1 / -1;
  background: #eef8f5;
  border-color: #abd7cf;
}

.line-info-grid article.line-info-price-library span {
  color: var(--accent);
}

.price-reference-panel {
  display: grid;
  gap: 14px;
}

.quote-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-top: 16px;
}

.quote-bottom.compact {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.totals-box {
  display: grid;
  align-self: start;
  gap: 8px;
  padding: 14px;
  background: #f8fbfa;
  border: 1px solid #dce8e4;
  border-radius: var(--radius);
}

.totals-box div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.totals-box span {
  color: var(--muted);
}

.totals-box .grand {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

.quote-ai-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #f1fbf8 0%, #ffffff 100%);
  border: 1px solid #b9ded7;
  border-radius: var(--radius);
}

.quote-ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
  align-items: stretch;
}

.transcription-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #d8e8e3;
  border-radius: var(--radius-sm);
}

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

.mini-section-head h3 {
  margin: 0;
  font-size: 16px;
}

.mini-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dictation-button.attention {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  animation: dictationPulse 1.35s ease-in-out infinite;
}

.dictation-button.attention:hover {
  background: var(--accent-strong);
}

.assistant-understanding {
  display: grid;
  gap: 9px;
  padding: 12px;
  background: #f7fbfa;
  border: 1px solid #d7e8e3;
  border-radius: var(--radius-sm);
}

.assistant-understanding-head {
  display: grid;
  min-width: 0;
}

.assistant-understanding h4,
.assistant-understanding p {
  margin: 0;
}

.assistant-understanding h4 {
  font-size: 13px;
}

.assistant-understanding p,
.assistant-understanding li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.assistant-understanding ul {
  margin: 0;
  padding-left: 18px;
}

.assistant-score-stack {
  display: flex;
  flex: 1 1 220px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.assistant-score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
}

.assistant-score-pill.good {
  color: #0f5f58;
  background: #dff5ee;
}

.assistant-score-pill.medium {
  color: #7a5200;
  background: #fff1bf;
}

.assistant-score-pill.bad {
  color: #9f1f17;
  background: #ffe1dd;
}

.quote-photo-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfefe;
  border: 1px solid #d5e7e2;
  border-radius: var(--radius-sm);
}

.quote-readiness-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #f8fbfa;
  border: 1px solid #d7e8e3;
  border-radius: var(--radius-sm);
}

.quote-readiness-panel.medium {
  background: #fffaf0;
  border-color: #efcf88;
}

.quote-readiness-panel.bad {
  background: #fff4f1;
  border-color: #f1b9b0;
}

.quote-readiness-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-readiness-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quote-readiness-head strong {
  font-size: 13px;
}

.quote-readiness-head span:not(.assistant-score-pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.quote-readiness-list > div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 7px;
  align-items: start;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid #e0ece8;
  border-radius: var(--radius-sm);
}

.quote-readiness-list > div .icon {
  grid-row: span 2;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--amber);
}

.quote-readiness-list > div.done .icon {
  color: var(--accent);
}

.quote-readiness-list span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.quote-readiness-list small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.quote-photo-panel.locked {
  background: #fffaf0;
  border-color: #f2d39b;
}

.quote-photo-head,
.quote-photo-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-photo-head h3 {
  margin: 0;
  font-size: 14px;
}

.quote-photo-head p,
.quote-photo-actions small {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quote-photo-head > span {
  display: inline-flex;
  min-width: 46px;
  justify-content: center;
  padding: 5px 8px;
  color: #0f5f58;
  background: #dff5ee;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.quote-photo-upload {
  position: relative;
  overflow: hidden;
}

.quote-photo-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.quote-photo-upload.disabled input {
  cursor: not-allowed;
}

.quote-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.quote-photo-tile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  background: #fff;
  border: 1px solid #dce9e5;
  border-radius: var(--radius-sm);
}

.quote-photo-tile img {
  width: 64px;
  height: 52px;
  object-fit: cover;
  background: #eff6f4;
  border-radius: 6px;
}

.quote-photo-tile div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.quote-photo-tile strong,
.quote-photo-tile span,
.quote-photo-tile small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-photo-tile strong {
  font-size: 13px;
}

.quote-photo-tile span,
.quote-photo-tile small {
  color: var(--muted);
  font-size: 11px;
}

.quote-audit-panel {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #fff;
  border: 1px solid #cfe4df;
  border-radius: var(--radius-sm);
}

.quote-audit-panel.stale {
  border-color: #efcf88;
  background: #fffaf0;
}

.quote-audit-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.quote-audit-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quote-audit-head strong {
  color: var(--ink);
  font-size: 13px;
}

.quote-audit-head span,
.quote-audit-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quote-audit-issues {
  display: grid;
  gap: 6px;
}

.quote-audit-issue {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  background: #f8fbfa;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius-sm);
}

.quote-audit-issue.high {
  background: #fff0ed;
  border-color: #f4b4aa;
}

.quote-audit-issue.medium {
  background: #fff8e8;
  border-color: #efcf88;
}

.quote-audit-issue strong {
  font-size: 12px;
}

.quote-audit-issue span,
.quote-audit-suggestions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.quote-audit-ok {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #0f5f58;
  font-size: 12px;
  font-weight: 850;
}

.quote-audit-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.quote-audit-suggestions strong {
  color: var(--ink);
  font-size: 12px;
}

.quote-audit-suggestions span {
  padding: 3px 7px;
  background: #eef8f5;
  border-radius: 999px;
}

.understanding-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.understanding-chips span {
  padding: 3px 8px;
  color: #0f5f58;
  font-size: 12px;
  font-weight: 800;
  background: #e2f5f0;
  border-radius: 999px;
}

.assistant-understanding-muted {
  color: var(--muted);
}

.assistant-assumption-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.assistant-assumption-list > strong {
  color: #6b4a00;
  font-size: 12px;
  font-weight: 850;
}

.assistant-warning-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 8px 10px;
  color: #7a4700;
  background: #fff7df;
  border: 1px solid #efcf88;
  border-radius: var(--radius-sm);
}

.assistant-warning-item svg {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.assistant-warning-item p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.3;
}

.quote-ai-head,
.quote-section-head,
.suggestion-frame-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.quote-ai-head h2,
.quote-section-head h2,
.suggestion-frame h3 {
  margin: 0;
}

.suggestion-frame h3 {
  font-size: 15px;
}

.quote-ai-head p,
.quote-section-head p,
.suggestion-frame p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.suggestion-frame-head p {
  font-size: 12px;
  line-height: 1.35;
}

.quote-ai-panel textarea {
  min-height: 110px;
}

.quote-ai-panel .panel-head {
  margin-bottom: 0;
}

.live-mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #cfe5df;
  border-radius: var(--radius-sm);
}

.live-mode-toggle input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.live-mode-toggle span {
  display: grid;
  gap: 2px;
}

.live-mode-toggle strong {
  font-size: 13px;
}

.live-mode-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.live-generation-status {
  display: grid;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  color: #3d524d;
  background: #edf6f4;
  border: 1px solid #d3e7e2;
  border-radius: var(--radius-sm);
}

.live-generation-status.busy {
  padding: 13px 14px;
  color: #173b36;
  background: linear-gradient(180deg, #e7f6f3 0%, #f6fcfa 100%);
  border-color: #8bcac0;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.13);
}

.live-status-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-status-main > span {
  width: 9px;
  height: 9px;
  background: #8fb3ab;
  border-radius: 999px;
}

.live-generation-status.active .live-status-main > span {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.1);
}

.live-generation-status.busy .live-status-main > span {
  width: 12px;
  height: 12px;
  animation: pulseDot 1.2s ease-in-out infinite;
}

.live-generation-status p {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

.live-generation-status.busy p {
  font-size: 14px;
  font-weight: 820;
}

.ai-linear-progress {
  height: 8px;
  overflow: hidden;
  background: #d6eae6;
  border-radius: 999px;
}

.ai-linear-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #24a08f 70%, #65cdbd 100%);
  border-radius: inherit;
  transform: scaleX(0.04);
  transform-origin: left center;
  animation: aiLinearProgress 24s linear forwards;
}

@keyframes aiLinearProgress {
  from {
    transform: scaleX(0.04);
  }
  to {
    transform: scaleX(0.94);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes dictationPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.32);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.08);
    transform: translateY(-1px);
  }
}

@keyframes auditOptionalPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08), 0 0 0 0 rgba(15, 118, 110, 0.18);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08), 0 0 0 5px rgba(15, 118, 110, 0.05);
  }
}

.suggestion-frame {
  display: grid;
  gap: 9px;
  padding: 11px;
  background: #ffffff;
  border: 2px dashed #b9dcd6;
  border-radius: var(--radius);
}

.suggestion-frame.has-suggestions {
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.12);
}

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

.ai-note-box {
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid #dce8e4;
  border-radius: var(--radius-sm);
}

.ai-note-box.warning {
  color: #7a4b00;
  background: var(--amber-soft);
  border-color: #edd19a;
}

.ai-note-box strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.ai-note-box ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: inherit;
  font-size: 13px;
}

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

.missing-detail-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: #fbfdfc;
  border: 1px solid #dde9e5;
  border-radius: var(--radius-sm);
}

.missing-detail-card > span {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.missing-detail-card p {
  margin: 1px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.missing-detail-card .icon-button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
}

.catalog-ai-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: #f1fbf8;
  border: 1px solid #b9ded7;
  border-radius: var(--radius);
}

.catalog-progress-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #cfe5df;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}

.catalog-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.catalog-progress-head span {
  color: var(--accent-strong);
  font-weight: 800;
}

.catalog-progress-track {
  height: 9px;
  overflow: hidden;
  background: #e7f1ee;
  border-radius: 999px;
}

.catalog-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #27a36f);
  border-radius: inherit;
  transition: width 0.3s ease;
}

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

.catalog-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.catalog-ai-head h3 {
  margin: 0;
  font-size: 16px;
}

.catalog-ai-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.catalog-suggestion-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dce8e4;
  border-radius: var(--radius-sm);
}

.catalog-suggestion-card > div {
  min-width: 0;
}

.catalog-suggestion-card strong,
.catalog-suggestion-card small {
  display: block;
}

.catalog-suggestion-card p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-suggestion-card small,
.suggestion-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quote-section-head {
  margin-bottom: 12px;
}

.settings-import {
  display: grid;
  gap: 10px;
}

.quote-format-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.quote-history-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbfa;
  border: 1px solid #dce8e4;
  border-radius: var(--radius);
}

.quote-history-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.quote-history-head .icon {
  color: var(--accent);
}

.quote-history-head h3 {
  margin: 0;
  font-size: 15px;
}

.quote-history-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.history-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.history-search .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.history-search input {
  min-height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.history-list {
  display: grid;
  max-height: 480px;
  overflow-y: auto;
  gap: 8px;
}

.history-entry {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius-sm);
}

.history-entry span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.history-entry p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.preview-paper {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dce8e4;
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(23, 32, 29, 0.08);
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.preview-head div {
  display: grid;
}

.preview-head small,
.preview-paper p {
  color: var(--muted);
  font-size: 13px;
}

.preview-paper h3,
.preview-paper p {
  margin: 0;
}

.preview-lines {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.preview-lines span {
  min-width: 0;
  overflow: hidden;
  color: #3d4d48;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-col {
  min-height: 420px;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid #e1eae6;
  border-radius: var(--radius);
}

.kanban-col.drag-over {
  background: #edf8f5;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.16);
}

.kanban-col h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 14px;
}

.kanban-col h3 span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: #e9f2ef;
  border-radius: 999px;
  font-size: 12px;
}

.project-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #dde8e4;
  border-radius: var(--radius);
}

.project-card[draggable="true"] {
  cursor: grab;
}

.project-card.dragging {
  opacity: 0.58;
  cursor: grabbing;
}

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

.project-card-head > div {
  min-width: 0;
}

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

.document-warning-panel {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 12px;
  color: #7a4b00;
  background: var(--amber-soft);
  border: 1px solid #f1d197;
  border-radius: var(--radius);
}

.document-warning-panel .icon {
  flex: 0 0 auto;
  margin-top: 1px;
}

.document-warning-panel strong,
.document-warning-panel p {
  margin: 0;
}

.document-warning-panel p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
}

.document-card {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #fbfdfc;
  border: 1px solid #dfe9e5;
  border-radius: var(--radius);
}

.document-open-area {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 12px;
}

.document-link[href] {
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.document-link[href]:hover,
.document-link[href]:focus-visible {
  border-color: #9ed1c9;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.11);
  transform: translateY(-1px);
}

.document-card.compact {
  padding: 9px 10px;
  background: #fff;
}

.document-card.compact .document-open-area {
  gap: 10px;
}

.document-card.compact .doc-icon {
  width: 30px;
  height: 30px;
}

.document-card.compact strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.document-card.compact p {
  font-size: 12px;
}

.doc-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.doc-title-row strong {
  min-width: 0;
}

.document-linked-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  color: #31514b;
  background: #edf6f4;
  border-radius: 999px;
  font-weight: 800;
}

.document-linked-label .icon {
  width: 13px;
  height: 13px;
}

.doc-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.doc-status {
  display: inline-flex;
  width: fit-content;
  flex: 0 0 auto;
  padding: 4px 8px;
  color: #31514b;
  background: #edf6f4;
  border: 1px solid #d3e7e2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.doc-status.error {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f2b8b1;
}

.document-delete-button {
  flex: 0 0 auto;
}

.document-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.document-share-picker {
  display: grid;
  gap: 8px;
}

.document-share-results {
  display: grid;
  max-height: 260px;
  gap: 6px;
  margin-top: 8px;
  overflow-y: auto;
}

.suggestion-card {
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #fbfdfc;
  border: 1px solid #dde9e5;
  border-radius: var(--radius);
}

.suggestion-card > span {
  color: var(--accent-strong);
  font-weight: 800;
  white-space: nowrap;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.55fr);
}

.admin-grid .wide {
  grid-column: 1 / -1;
}

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

.admin-log-list article {
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
}

.admin-log-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.admin-log-list audio {
  display: block;
  width: 100%;
  margin: 8px 0;
}

.admin-accounts-panel {
  min-width: 0;
}

.admin-account-search {
  margin-bottom: 12px;
}

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

.admin-account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
}

.admin-account-card.active {
  background: var(--accent-soft);
  border-color: #a9d8cf;
  box-shadow: 0 10px 26px rgba(15, 118, 110, 0.08);
}

.admin-account-card > button {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.admin-account-card strong,
.admin-account-card span,
.admin-account-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-account-card > div {
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
}

.admin-log-list p,
.admin-log-list small,
.timeline-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-cost-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-cost-row > div {
  min-width: 0;
}

.admin-cost-row .cost-badge {
  color: var(--accent-strong);
  background: #e8f6f2;
  border-color: #b9ded7;
}

.admin-log-label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 800;
}

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

.health-grid {
  display: grid;
  gap: 10px;
}

.health-tile {
  gap: 12px;
  padding: 13px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
}

.health-tile > div {
  min-width: 0;
}

.health-tile strong,
.health-tile p {
  overflow-wrap: anywhere;
}

.health-tile.health-ok {
  background: #f2fbf7;
  border-color: #c9eadb;
}

.health-tile.health-warn {
  background: #fff8ea;
  border-color: #f1d197;
}

.health-tile.health-neutral {
  background: #fbfdfc;
}

.service-health-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.settings-import-panel {
  align-self: stretch;
}

.settings-import p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-maintenance-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  background: #fbfdfc;
  border: 1px solid #e1ebe7;
  border-radius: var(--radius);
}

.settings-maintenance-note .icon {
  flex: 0 0 auto;
  color: var(--accent);
}

.settings-maintenance-note strong,
.settings-maintenance-note p {
  margin: 0;
}

.settings-maintenance-note p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.subscription-settings-panel {
  grid-column: 1 / -1;
}

.subscription-usage-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbfa;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
}

.subscription-usage-panel.compact {
  gap: 10px;
  padding: 12px;
}

.subscription-usage-panel h3 {
  margin: 0;
  font-size: 17px;
}

.subscription-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subscription-usage-head span,
.subscription-usage-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.subscription-usage-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.subscription-pending-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #7a5200;
  background: #fff5d6;
  border: 1px solid #f1d58f;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 760;
}

.subscription-pending-note .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

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

.usage-meter {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius-sm);
}

.usage-meter div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

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

.usage-meter strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.usage-meter-track {
  height: 7px;
  overflow: hidden;
  background: #eef5f2;
  border-radius: 999px;
}

.usage-meter-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.usage-meter.warn .usage-meter-track span {
  background: #d98b00;
}

.usage-meter.danger .usage-meter-track span {
  background: var(--red);
}

.subscription-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.subscription-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
}

.subscription-card.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13, 130, 117, 0.08);
}

.subscription-card.highlight {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

.subscription-card-head span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  color: #0c6f64;
  background: #e5f5f1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.subscription-card h3 {
  margin: 14px 0 0;
  font-size: 24px;
}

.subscription-card-head strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.subscription-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.subscription-limits {
  display: grid;
  gap: 7px;
}

.subscription-limits span {
  padding: 9px 10px;
  color: #24443d;
  background: #f3faf8;
  border: 1px solid #dcebe6;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
}

.subscription-card ul {
  display: grid;
  flex: 1;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subscription-card li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  color: #33443f;
  font-size: 14px;
  line-height: 1.35;
}

.subscription-card li .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.subscription-comparison {
  display: grid;
  margin-top: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
}

.subscription-comparison-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(120px, 1fr));
  min-width: 0;
  border-top: 1px solid #edf3f1;
}

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

.subscription-comparison-row.head {
  color: var(--ink);
  background: #f3faf8;
  font-weight: 850;
}

.subscription-comparison-row > * {
  min-width: 0;
  padding: 12px 14px;
  border-left: 1px solid #edf3f1;
  overflow-wrap: anywhere;
}

.subscription-comparison-row > *:first-child {
  border-left: 0;
  color: #485a54;
  font-weight: 800;
}

.subscription-comparison-row > span:not(:first-child) {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.subscription-comparison-check {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.subscription-comparison-check .icon {
  width: 16px;
  height: 16px;
}

.subscription-comparison-missing {
  color: #9aa7a3;
  font-size: 20px;
  font-weight: 850;
}

.subscription-comparison-value {
  color: #20302c;
  font-weight: 850;
}

.subscription-locked-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: #fff8e8;
  border: 1px solid #efd39b;
  border-radius: var(--radius);
}

.subscription-locked-note .icon {
  color: #9b6500;
}

.subscription-locked-note strong,
.subscription-locked-note p {
  margin: 0;
}

.subscription-locked-note p {
  margin-top: 3px;
  color: #7a5a1a;
  font-size: 13px;
  line-height: 1.4;
}

.settings-document-list {
  display: grid;
  gap: 8px;
  max-height: min(560px, calc(100vh - 340px));
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.settings-document-list::-webkit-scrollbar {
  width: 9px;
}

.settings-document-list::-webkit-scrollbar-track {
  background: #edf4f2;
  border-radius: 999px;
}

.settings-document-list::-webkit-scrollbar-thumb {
  background: #a9c8c1;
  border: 2px solid #edf4f2;
  border-radius: 999px;
}

.settings-document-list::-webkit-scrollbar-thumb:hover {
  background: #7fb0a7;
}

.settings-document-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
}

.settings-document-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.settings-document-head strong span {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  padding: 0 7px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.help-hero {
  gap: 16px;
}

.help-search {
  max-width: 760px;
}

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

.help-quick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 96px;
  padding: 14px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}

.help-quick:hover {
  border-color: #b8d6ce;
  box-shadow: 0 10px 24px rgba(23, 32, 29, 0.08);
}

.help-quick .icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent);
}

.help-quick strong,
.help-article h3,
.help-support h2 {
  margin: 0;
  color: var(--ink);
}

.help-quick small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.help-results {
  display: grid;
  gap: 12px;
}

.help-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.help-article {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.help-article-head span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 8px;
  color: var(--accent-strong);
  background: #edf6f4;
  border: 1px solid #d4e7e2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.help-article h3 {
  font-size: 18px;
}

.help-article-body {
  color: #384640;
  font-size: 14px;
  line-height: 1.65;
}

.help-article-body p,
.help-article-body ol {
  margin: 0 0 10px;
}

.help-article-body p:last-child,
.help-article-body ol:last-child {
  margin-bottom: 0;
}

.help-article-body ol {
  padding-left: 21px;
}

.help-article-body li + li {
  margin-top: 6px;
}

.help-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.help-tags span {
  padding: 4px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.help-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fbfa;
}

.help-support p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account-danger-panel {
  grid-column: 1 / -1;
  border-color: #f3b8b1;
  background: #fffafa;
}

.danger-notice {
  display: flex;
  gap: 12px;
  padding: 14px;
  color: #7a2118;
  background: var(--red-soft);
  border: 1px solid #f3b8b1;
  border-radius: var(--radius);
}

.danger-notice .icon {
  margin-top: 2px;
  color: var(--red);
}

.danger-notice strong,
.danger-notice p {
  margin: 0;
}

.danger-notice p {
  margin-top: 4px;
  color: #7a403b;
  font-size: 13px;
}

.templates-panel {
  grid-column: 1 / -1;
}

.template-settings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.logo-uploader span,
.logo-current p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.logo-uploader,
.logo-current {
  grid-column: span 2;
}

.logo-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid #e0ebe6;
  border-radius: var(--radius);
}

.logo-current > div {
  flex: 1;
  min-width: 0;
}

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

.template-preview {
  min-width: 0;
}

.preview-paper.compact {
  min-height: 220px;
}

.preview-paper.template-clean {
  border-top: 6px solid var(--accent);
}

.preview-paper.template-sidebar {
  grid-template-columns: 42px minmax(0, 1fr);
  background: linear-gradient(90deg, #073f3d 0 42px, #ffffff 42px);
}

.preview-paper.template-sidebar > * {
  grid-column: 2;
}

.preview-paper.template-technical {
  border-color: #263d37;
  box-shadow: none;
}

.preview-paper.template-technical .preview-head {
  border-bottom: 2px solid #263d37;
}

.preview-paper.template-premium {
  background: linear-gradient(180deg, #0b5f59 0 54px, #ffffff 54px);
  border: 0;
}

.preview-paper.template-premium .preview-head {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.preview-paper.template-compact {
  gap: 8px;
  padding: 12px;
  font-size: 12px;
  box-shadow: none;
}

.template-preview-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.template-preview-head h3,
.template-preview-head p {
  margin: 0;
}

.template-preview-head h3 {
  font-size: 15px;
}

.template-preview-head p {
  color: var(--muted);
  font-size: 13px;
}

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

.template-choice {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 10px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.template-choice:hover,
.template-choice.active {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.12);
}

.template-choice.active {
  background: #f1fbf8;
}

.template-choice-paper {
  display: grid;
  min-height: 132px;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mini-head {
  display: grid;
  gap: 2px;
  font-size: 11px;
}

.mini-head span {
  color: var(--muted);
}

.mini-head strong {
  font-size: 14px;
}

.mini-line {
  display: block;
  height: 8px;
  background: #dfe9e5;
  border-radius: 999px;
}

.mini-line.short {
  width: 64%;
}

.mini-total {
  align-self: end;
  justify-self: end;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.template-choice.template-clean .template-choice-paper {
  border-top: 6px solid var(--accent);
}

.template-choice.template-sidebar .template-choice-paper {
  padding-left: 34px;
  background: linear-gradient(90deg, #073f3d 0 24px, #ffffff 24px);
}

.template-choice.template-technical .template-choice-paper {
  border-color: #263d37;
  box-shadow: inset 0 0 0 1px #263d37;
}

.template-choice.template-technical .mini-line {
  background: #cbd8d4;
}

.template-choice.template-premium .template-choice-paper {
  background: linear-gradient(180deg, #0b5f59 0 34px, #ffffff 34px);
  padding-top: 42px;
}

.template-choice.template-premium .mini-total {
  color: #c77700;
}

.template-choice.template-compact .template-choice-paper {
  min-height: 112px;
  gap: 5px;
  padding: 8px;
}

.template-choice.template-compact .mini-line {
  height: 6px;
}

.template-choice-text {
  display: grid;
  gap: 3px;
}

.template-choice-text strong {
  font-size: 13px;
}

.template-choice-text small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.config-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.config-list div {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: #f8fbfa;
  border: 1px solid #e0ebe6;
  border-radius: var(--radius);
}

.config-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 760;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 29, 0.38);
}

.modal {
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.confirm-backdrop {
  z-index: 35;
  background:
    radial-gradient(circle at 50% 38%, rgba(15, 118, 110, 0.18), transparent 32%),
    rgba(23, 32, 29, 0.52);
  backdrop-filter: blur(6px);
}

.confirm-dialog {
  display: grid;
  width: min(460px, 100%);
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(23, 32, 29, 0.2);
}

.confirm-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--red);
  background: var(--red-soft);
  border-radius: var(--radius);
}

.confirm-dialog.success .confirm-icon {
  color: var(--accent);
  background: var(--accent-soft);
}

.confirm-content h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.confirm-content p {
  margin: 8px 0 0;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 420px;
  padding: 12px 14px;
  color: #103d37;
  background: #dff8ef;
  border: 1px solid #b7ead8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 760;
}

.toast.warning {
  color: #7a4b00;
  background: var(--amber-soft);
  border-color: #edd19a;
}

@media (max-width: 1220px) {
  .landing-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .analytics-chart:last-child {
    grid-column: auto;
  }

  .dashboard-grid,
  .settings-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .help-quick-grid {
    grid-template-columns: 1fr;
  }

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

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

  .subscription-plan-grid {
    grid-template-columns: 1fr;
  }

  .split-layout {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  }

  .quote-workspace,
  .quote-format-grid,
  .quote-ai-grid {
    grid-template-columns: 1fr;
  }

  .quote-line-head,
  .quote-line-row {
    grid-template-columns: 30px minmax(66px, 0.65fr) minmax(250px, 3fr) 52px 56px 78px 64px 100px 30px 30px 30px;
  }
}

@media (max-width: 900px) {
  .landing-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .landing-nav-links,
  .landing-nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .landing-hero-bg {
    background-image:
      linear-gradient(180deg, rgba(247, 250, 249, 0.98) 0%, rgba(247, 250, 249, 0.9) 48%, rgba(247, 250, 249, 0.5) 100%),
      url("./assets/landing-hero-artisania.png");
    background-position: 62% center;
  }

  .landing-hero-content {
    max-width: 620px;
  }

  .landing-workflow,
  .landing-trust {
    grid-template-columns: 1fr;
    padding: 48px 0;
  }

  .landing-demo-grid {
    grid-template-columns: 1fr;
  }

  .landing-use-grid,
  .landing-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell,
  .app-shell:has(.sidebar:hover),
  .app-shell:has(.sidebar:focus-within) {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
  }

  .sidebar,
  .app-shell:has(.sidebar:hover) .sidebar,
  .app-shell:has(.sidebar:focus-within) .sidebar {
    position: static;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    overflow-x: hidden;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand,
  .app-shell:has(.sidebar:hover) .brand,
  .app-shell:has(.sidebar:focus-within) .brand {
    width: fit-content;
    justify-content: flex-start;
  }

  .brand span:last-child,
  .app-shell:has(.sidebar:hover) .brand span:last-child,
  .app-shell:has(.sidebar:focus-within) .brand span:last-child {
    max-width: none;
    opacity: 1;
    transform: none;
  }

  .nav-list {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav-item {
    flex: 0 0 auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .nav-item span,
  .app-shell:has(.sidebar:hover) .nav-item span,
  .app-shell:has(.sidebar:focus-within) .nav-item span {
    max-width: none;
    opacity: 1;
    transform: none;
  }

  .main {
    width: 100%;
    max-width: 100vw;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-actions .notification-button {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
  }

  .notification-panel {
    position: fixed;
    top: 92px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .global-search {
    width: 100%;
    max-width: none;
    flex: 0 1 auto;
  }

  .screen {
    padding: 16px;
  }

  .split-layout,
  .quote-bottom,
  .template-settings,
  .template-preview-grid,
  .template-choice-grid,
  .subscription-meters,
  .help-quick-grid {
    grid-template-columns: 1fr;
  }

  .subscription-comparison {
    overflow-x: auto;
  }

  .subscription-comparison-row {
    min-width: 720px;
  }

  .quote-photo-head,
  .quote-photo-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-photo-grid {
    grid-template-columns: 1fr;
  }

  .quote-readiness-list {
    grid-template-columns: 1fr;
  }

  .logo-uploader,
  .logo-current {
    grid-column: span 1;
  }

  .list-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  html,
  body,
  #app,
  .landing-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .landing-nav {
    gap: 12px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .landing-nav-links {
    display: none;
  }

  .landing-feature-strip {
    grid-template-columns: 1fr;
    padding-bottom: 46px;
  }

  .landing-hero {
    display: block;
    width: 100%;
    max-width: 100vw;
    padding-right: 16px;
    padding-left: 16px;
  }

  .landing-hero h1 {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: 28px;
    line-height: 1.06;
  }

  .landing-hero p {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: 16px;
  }

  .landing-hero-content {
    width: min(340px, calc(100vw - 32px));
    max-width: min(340px, calc(100vw - 32px));
    min-width: 0;
  }

  .landing-hero-actions,
  .landing-nav-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .landing-section {
    width: min(358px, calc(100vw - 28px));
    max-width: min(358px, calc(100vw - 28px));
  }

  .landing-demo,
  .landing-use-cases,
  .landing-security,
  .landing-faq {
    padding: 42px 0;
  }

  .landing-demo-table > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .landing-demo-table b,
  .landing-demo-total strong {
    text-align: left;
  }

  .landing-use-grid,
  .landing-faq-grid {
    grid-template-columns: 1fr;
  }

  .subscription-locked-note {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .subscription-locked-note .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .landing-steps article {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .landing-steps span {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .metric-row,
  .analytics-kpis,
  .analytics-grid,
  .form-grid,
  .address-fieldset {
    grid-template-columns: 1fr;
  }

  .analytics-head,
  .analytics-chart-head,
  .subscription-upgrade-reminder,
  .analytics-actions,
  .period-control {
    align-items: stretch;
    flex-direction: column;
  }

  .period-control input,
  .analytics-actions .button,
  .subscription-upgrade-reminder .button {
    width: 100%;
  }

  .analytics-footnote {
    text-align: left;
  }

  .span-2 {
    grid-column: span 1;
  }

  .panel,
  .auth-panel {
    padding: 14px;
  }

  .panel-head,
  .editor-head,
  .quote-ai-head,
  .quote-section-head,
  .suggestion-frame-head,
  .task-row,
  .catalog-folder-head,
  .suggestion-card {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-list-head {
    grid-template-columns: 1fr;
  }

  .catalog-folder-title,
  .folder-actions {
    width: 100%;
  }

  .folder-actions {
    justify-content: flex-start;
  }

  .button {
    width: 100%;
    white-space: normal;
  }

  .auth-foot,
  .auth-demo,
  .help-support,
  .help-results-head {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .quote-steps {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .quote-builder-toolbar {
    flex-direction: column;
  }

  .quote-client-picker {
    width: 100%;
    max-width: none;
  }

  .quote-line-head {
    display: none;
  }

  .quote-line-list,
  .quote-line-row {
    min-width: 0;
  }

  .quote-line-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
  }

  .quote-line-row .line-drag-handle {
    grid-column: 1;
  }

  .quote-line-row > input[data-field="section"] {
    grid-column: 2 / -1;
  }

  .quote-line-row input[data-field="description"] {
    grid-column: 1 / -1;
  }

  .quote-line-description-cell {
    grid-column: 1 / -1;
  }

  .quote-line-row > input[data-field="quantity"],
  .quote-line-row > input[data-field="unit"],
  .quote-line-row > input[data-field="unitPrice"],
  .quote-line-row > select[data-field="vatRate"] {
    grid-column: span 2;
    min-width: 0;
  }

  .quote-line-row > strong {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid #edf3f1;
  }

  .line-info-grid {
    grid-template-columns: 1fr;
  }

  .quote-line-row .icon-button {
    justify-self: start;
  }

  .user-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-account-card,
  .admin-cost-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-account-card > div {
    justify-items: start;
    text-align: left;
  }

  .admin-cost-row {
    display: grid;
  }

  .operational-grid article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .operational-grid article .button {
    grid-column: 1 / -1;
  }

  .metric-card {
    min-height: 96px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}
