@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #18211d;
  --ink-2: #2c3631;
  --muted: #65706a;
  --muted-2: #89918d;
  --paper: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f8f8f5;
  --surface-3: #eeefea;
  --line: #dfe2dc;
  --line-soft: #eceee9;
  --sidebar: #17251f;
  --sidebar-2: #20322a;
  --sidebar-ink: #edf2ee;
  --accent: #b76b3d;
  --accent-dark: #92502b;
  --accent-soft: #f4e8df;
  --green: #356b53;
  --green-dark: #254c3b;
  --green-soft: #e1eee7;
  --red: #a84a45;
  --red-soft: #f7e5e3;
  --amber: #9a681b;
  --amber-soft: #f8eed6;
  --blue: #3d687d;
  --blue-soft: #e3eef3;
  --violet: #665980;
  --violet-soft: #ece8f4;
  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-xs: 0 1px 2px rgba(21, 30, 25, 0.05);
  --shadow-sm: 0 6px 18px rgba(21, 30, 25, 0.06);
  --shadow-md: 0 18px 48px rgba(21, 30, 25, 0.11);
  --shadow-lg: 0 26px 80px rgba(14, 26, 20, 0.16);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --sidebar-width: 252px;
  --topbar-height: 64px;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open,
body.mobile-nav-open {
  overflow: hidden;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
.brand-name,
.metric-card > strong,
.hero-stat strong {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  letter-spacing: -0.025em;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #b9bfba;
  background-clip: padding-box;
}

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

.icon {
  flex: 0 0 auto;
}

.text-muted {
  color: var(--muted);
}

.text-danger {
  color: var(--red) !important;
}

.text-success {
  color: var(--green) !important;
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.strong {
  font-weight: 700;
  color: var(--ink);
}

.nowrap {
  white-space: nowrap;
}

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

.stack {
  display: grid;
  gap: 16px;
}

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

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

.spacer {
  flex: 1;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--line-soft);
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.surface-flat {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel-body {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
}

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

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.btn-lg {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 11px;
  font-size: 15px;
}

.btn-icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.btn-primary {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 20%, transparent);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
}

.btn-ghost {
  color: var(--muted);
}

.btn-danger {
  border-color: color-mix(in srgb, var(--red) 28%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

.btn-success {
  background: var(--green);
  color: #fff;
}

.btn-dark {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--sidebar);
  color: #fff;
}

.btn-light {
  border-color: rgba(255, 255, 255, 0.24);
  background: #fff;
  color: var(--sidebar);
}

.icon-button {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: transform 140ms var(--ease-out), color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button .notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
}

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

.brand-light {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  transform: rotate(-7deg);
}

.brand-mark i {
  display: block;
  border-radius: 2px;
  background: var(--accent);
}

.brand-mark i:nth-child(1) {
  height: 72%;
  align-self: end;
  background: #d29363;
}

.brand-mark i:nth-child(2) {
  height: 100%;
  background: var(--accent);
}

.brand-mark i:nth-child(3) {
  height: 57%;
  align-self: end;
  background: #7d4830;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.brand-name em {
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 2px 5px;
  font-family: "DM Sans", sans-serif;
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.09em;
  opacity: 0.58;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-success {
  border-color: #cfe2d6;
  background: var(--green-soft);
  color: var(--green-dark);
}

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

.status-warning {
  border-color: #edddb9;
  background: var(--amber-soft);
  color: #805511;
}

.status-info {
  border-color: #d0e0e7;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-neutral {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: #dfe7e1;
  background-position: center;
  background-size: cover;
  color: var(--green-dark);
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--line);
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 9px;
}

.avatar-md {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

.avatar-xl {
  width: 58px;
  height: 58px;
  font-size: 16px;
}

.avatar-stack {
  display: flex;
  padding-left: 8px;
}

.avatar-stack .avatar {
  margin-left: -8px;
}

.progress-wrap {
  display: flex;
  min-width: 100px;
  align-items: center;
  gap: 8px;
}

.progress-wrap > span {
  min-width: 34px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 240ms var(--ease-out);
}

.progress-amber {
  background: var(--accent);
}

.progress-red {
  background: var(--red);
}

.progress-blue {
  background: var(--blue);
}

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.form-field small {
  color: var(--muted);
  font-size: 11px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--green) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

textarea {
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.select-wrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
  align-items: center;
}

.select-wrap select {
  min-height: 34px;
  appearance: none;
  padding: 6px 32px 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.select-wrap > .icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
}

.field-select,
.field-select select {
  width: 100%;
  min-height: 40px;
}

.input-affix {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-affix:focus-within {
  border-color: color-mix(in srgb, var(--green) 72%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

.input-affix input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}

.input-affix > span {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

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

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

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

.form-section {
  display: grid;
  gap: 16px;
}

.form-section + .form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.form-section-title {
  margin: 0;
  font-size: 14px;
}

.toggle {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 2px;
  background: #c7ccc8;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.toggle::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 180ms var(--ease-out);
}

.toggle[aria-checked="true"],
.toggle.active {
  background: var(--green);
}

.toggle[aria-checked="true"]::after,
.toggle.active::after {
  transform: translateX(16px);
}

/* Public website */
.public-site {
  min-height: 100vh;
  overflow: hidden;
  background: #f8f7f3;
}

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

.public-nav {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(27, 37, 32, 0.08);
  background: rgba(248, 247, 243, 0.9);
  backdrop-filter: blur(18px);
}

.public-nav-inner {
  display: flex;
  height: 68px;
  align-items: center;
  gap: 28px;
}

.public-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: 28px;
}

.public-links a {
  color: #46504b;
  font-size: 13px;
  font-weight: 650;
}

.public-links a.active {
  color: var(--accent-dark);
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

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

.public-main {
  min-height: calc(100vh - 68px);
}

.marketing-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(183, 107, 61, 0.13), transparent 26rem),
    linear-gradient(180deg, #f8f7f3 0%, #f3f1eb 100%);
}

.marketing-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: -7%;
  width: 45%;
  height: 100%;
  opacity: 0.32;
  background-image: repeating-radial-gradient(ellipse at 70% 100%, transparent 0 22px, rgba(85, 65, 48, 0.12) 23px 24px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  padding-bottom: 76px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  border: 1px solid #ded5cc;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.6);
  color: #6a5545;
  font-size: 11px;
  font-weight: 750;
}

.hero-kicker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-copy h1 {
  max-width: 690px;
  margin-bottom: 24px;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy h1 em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-copy > p {
  max-width: 620px;
  margin-bottom: 30px;
  color: #59635d;
  font-size: 17px;
  line-height: 1.65;
}

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

.hero-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}

.hero-proof .avatar-stack {
  padding-left: 0;
}

.hero-proof strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.hero-product {
  position: relative;
  align-self: end;
  min-width: 0;
}

.product-window {
  overflow: hidden;
  border: 1px solid #ccd1ca;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  box-shadow: 0 32px 80px rgba(23, 37, 31, 0.2);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transform-origin: bottom right;
}

.product-window-bar {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #e3e5e0;
  padding: 0 12px;
  background: #fafaf8;
}

.product-window-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0d2ce;
}

.product-demo-shell {
  display: grid;
  height: 440px;
  grid-template-columns: 128px 1fr;
  font-size: 9px;
}

.product-demo-nav {
  padding: 18px 11px;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.72);
}

.product-demo-brand {
  margin-bottom: 24px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.product-demo-nav span {
  display: block;
  margin: 5px 0;
  border-radius: 4px;
  padding: 5px 7px;
}

.product-demo-nav span.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.product-demo-main {
  padding: 18px;
  background: #f5f5f2;
}

.demo-topline,
.demo-card-row,
.demo-split {
  display: grid;
  gap: 9px;
}

.demo-topline {
  grid-template-columns: 1fr auto;
  margin-bottom: 14px;
}

.demo-title-line {
  width: 140px;
  height: 12px;
  border-radius: 3px;
  background: #293730;
}

.demo-button {
  width: 58px;
  height: 19px;
  border-radius: 4px;
  background: var(--green);
}

.demo-card-row {
  grid-template-columns: repeat(4, 1fr);
}

.demo-kpi,
.demo-panel {
  border: 1px solid #e0e3dd;
  border-radius: 7px;
  background: #fff;
}

.demo-kpi {
  height: 68px;
  padding: 10px;
}

.demo-kpi span,
.demo-kpi strong {
  display: block;
  width: 60%;
  height: 5px;
  margin-bottom: 9px;
  border-radius: 3px;
  background: #d9ddd8;
}

.demo-kpi strong {
  width: 82%;
  height: 13px;
  background: #394840;
}

.demo-split {
  grid-template-columns: 1.45fr 1fr;
  margin-top: 9px;
}

.demo-panel {
  height: 166px;
  padding: 13px;
}

.demo-chart {
  position: relative;
  height: 115px;
  margin-top: 10px;
  overflow: hidden;
  border-bottom: 1px solid #e5e7e3;
}

.demo-chart::after {
  content: "";
  position: absolute;
  inset: 22px -20px -18px;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 0 0;
  transform: rotate(-7deg);
}

.demo-list-row {
  display: grid;
  grid-template-columns: 6px 1fr 28px;
  gap: 7px;
  margin: 9px 0;
}

.demo-list-row i,
.demo-list-row span,
.demo-list-row b {
  height: 5px;
  border-radius: 2px;
  background: #d9ddd8;
}

.demo-list-row i {
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.demo-float-card {
  position: absolute;
  z-index: 2;
  right: -24px;
  bottom: 68px;
  width: 178px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.demo-float-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.demo-float-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 18px;
}

.demo-float-card small {
  color: var(--green);
  font-weight: 700;
}

.logo-strip {
  border-top: 1px solid #e4e3de;
  border-bottom: 1px solid #e4e3de;
  background: #fff;
}

.logo-strip-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #7d847f;
}

.logo-strip-inner > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 36px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  filter: grayscale(1);
  opacity: 0.56;
}

.marketing-section {
  padding: 96px 0;
}

.marketing-section.alt {
  border-top: 1px solid #e7e6e1;
  border-bottom: 1px solid #e7e6e1;
  background: #f1f0eb;
}

.marketing-section.dark {
  position: relative;
  overflow: hidden;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.72);
}

.marketing-section.dark h2,
.marketing-section.dark h3,
.marketing-section.dark strong {
  color: #fff;
}

.marketing-heading {
  display: grid;
  max-width: 700px;
  gap: 14px;
  margin-bottom: 46px;
}

.marketing-heading.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.marketing-heading h1,
.marketing-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.marketing-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.dark .marketing-heading p {
  color: rgba(255, 255, 255, 0.62);
}

.problem-grid,
.feature-grid,
.industry-grid,
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e0e0db;
  border-radius: 18px;
  background: #e0e0db;
}

.problem-item,
.feature-item,
.industry-card,
.integration-card {
  padding: 30px;
  background: #fff;
}

.problem-number {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  margin-bottom: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
}

.problem-item h3,
.feature-item h3,
.industry-card h3,
.integration-card h3 {
  margin-bottom: 10px;
  font-size: 17px;
}

.problem-item p,
.feature-item p,
.industry-card p,
.integration-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.feature-icon,
.industry-icon,
.integration-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.flow-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.flow-step {
  position: relative;
  min-width: 0;
  padding: 27px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.flow-step:last-child {
  border-right: 0;
}

.flow-step::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 39px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.flow-step:last-child::after {
  display: none;
}

.flow-step > span {
  display: block;
  margin-bottom: 34px;
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.flow-step strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.flow-step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.marketing-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 70px;
}

.marketing-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.13;
}

.marketing-copy > p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.check-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-weight: 600;
}

.check-list li .icon {
  margin-top: 2px;
  color: var(--green);
}

.marketing-visual {
  position: relative;
  min-height: 440px;
  border: 1px solid #d9dcd6;
  border-radius: 22px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.visual-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.visual-title strong {
  font-size: 15px;
}

.visual-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.visual-column {
  min-height: 320px;
  border-radius: 9px;
  padding: 10px;
  background: var(--surface-2);
}

.visual-column > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.visual-card {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

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

.visual-card strong {
  margin-bottom: 11px;
  font-size: 10px;
}

.visual-card span {
  color: var(--muted);
  font-size: 8px;
}

.testimonial {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 70px;
  align-items: start;
}

.testimonial-quote {
  margin: 0;
  color: #fff;
  font-family: Georgia, serif;
  font-size: clamp(25px, 3.4vw, 42px);
  line-height: 1.35;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.testimonial-person strong,
.testimonial-person span {
  display: block;
}

.testimonial-person span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 58px;
  background: var(--accent);
  color: #fff;
}

.cta-band::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -70px;
  width: 390px;
  height: 390px;
  border: 56px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.cta-band h2 {
  max-width: 650px;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(30px, 4vw, 47px);
}

.cta-band p {
  max-width: 590px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
}

.cta-band .hero-actions {
  position: relative;
  z-index: 1;
}

.public-footer {
  padding: 66px 0 28px;
  background: #121c18;
  color: rgba(255, 255, 255, 0.56);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr);
  gap: 44px;
}

.footer-brand p {
  max-width: 280px;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.7;
}

.footer-column h3 {
  margin-bottom: 18px;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-column a {
  display: block;
  margin: 10px 0;
  font-size: 12px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 22px;
  font-size: 11px;
}

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

.industry-card {
  position: relative;
}

.industry-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 20px;
}

.industry-flow span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 700;
}

.industry-flow span:not(:last-child)::after {
  content: "→";
  color: var(--muted-2);
}

.integration-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #dedfd9;
}

.integration-card {
  min-height: 220px;
}

.integration-logo {
  display: flex;
  height: 54px;
  align-items: center;
  margin-bottom: 25px;
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.integration-logo.billingo {
  color: #f16334;
}

.integration-logo.szamlazz {
  color: #50a43a;
}

.pricing-toggle {
  display: flex;
  width: fit-content;
  margin: 0 auto 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: #fff;
}

.pricing-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 8px 15px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pricing-toggle button.active {
  background: var(--sidebar);
  color: #fff;
}

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

.price-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: #fff;
}

.price-card.featured {
  border: 2px solid var(--green-dark);
  box-shadow: var(--shadow-md);
}

.price-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--green-dark);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.price-card h3 {
  margin-bottom: 4px;
  font-size: 20px;
}

.price-audience {
  color: var(--muted);
  font-size: 12px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 24px 0 4px;
}

.price strong {
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.price span,
.price-billed {
  color: var(--muted);
  font-size: 11px;
}

.price-description {
  min-height: 66px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.price-card .check-list {
  margin: 24px 0 30px;
}

.price-card .check-list li {
  font-size: 12px;
}

.price-card .btn {
  width: 100%;
  margin-top: auto;
}

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 18px;
  text-align: center;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
}

.comparison-table th {
  color: var(--ink);
  font-size: 12px;
}

.comparison-table td {
  color: var(--muted);
  font-size: 12px;
}

.comparison-table .icon {
  display: inline-block;
  color: var(--green);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  padding: 22px 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.faq-question .icon {
  transition: transform 180ms var(--ease-out);
}

.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  max-width: 720px;
  padding: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
}

.contact-methods {
  display: grid;
  gap: 15px;
  margin-top: 32px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-method > span {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.contact-method strong,
.contact-method small {
  display: block;
}

.contact-method small {
  color: var(--muted);
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* Auth and onboarding */
.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
  background: #f7f6f2;
}

.auth-aside {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 44px 54px;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.72);
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  border: 70px solid rgba(183, 107, 61, 0.13);
  border-radius: 50%;
}

.auth-aside-content {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: auto 0;
}

.auth-aside h1,
.auth-aside h2 {
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.14;
}

.auth-aside p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  line-height: 1.75;
}

.auth-quote {
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 12px;
}

.auth-main {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.auth-card {
  width: min(100%, 500px);
}

.auth-card.wide {
  width: min(100%, 720px);
}

.auth-card-header {
  margin-bottom: 30px;
}

.auth-card-header h1 {
  margin-bottom: 8px;
  font-size: 29px;
}

.auth-card-header p {
  margin: 0;
  color: var(--muted);
}

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

.auth-form .btn-lg {
  width: 100%;
  margin-top: 4px;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
}

.auth-link {
  color: var(--green);
  font-weight: 700;
}

.auth-bottom {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-demo-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 22px;
  border: 1px solid #d7e4db;
  border-radius: 10px;
  padding: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
}

.signup-steps {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}

.signup-step {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
}

.signup-step::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--line);
}

.signup-step:last-child {
  flex: 0;
}

.signup-step:last-child::after {
  display: none;
}

.signup-step > span {
  display: flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.signup-step.active > span,
.signup-step.complete > span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.signup-step.complete::after {
  background: var(--green);
}

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

.signup-plan {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
}

.signup-plan input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.signup-plan:has(input:checked) {
  border-color: var(--green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 15%, transparent);
}

.signup-plan strong,
.signup-plan span,
.signup-plan small {
  display: block;
}

.signup-plan span {
  margin: 10px 0 3px;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.signup-plan small {
  color: var(--muted);
}

.signup-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface-2);
}

.signup-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.signup-summary-row span {
  color: var(--muted);
}

.success-check {
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.auth-success {
  text-align: center;
}

.auth-success .signup-summary {
  margin: 26px 0;
  text-align: left;
}

.onboarding-page {
  min-height: 100vh;
  background: var(--paper);
}

.onboarding-topbar {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  background: var(--surface);
}

.onboarding-layout {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 68px);
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 54px;
  margin: 0 auto;
  padding: 52px 0;
}

.onboarding-sidebar h1 {
  margin-bottom: 10px;
  font-size: 25px;
}

.onboarding-sidebar > p {
  color: var(--muted);
}

.onboarding-progress-card {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}

.onboarding-progress-card strong {
  display: block;
  margin-bottom: 10px;
}

.onboarding-progress-card .progress-track {
  height: 8px;
}

.workflow-steps {
  display: grid;
  gap: 2px;
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
}

.workflow-step > span {
  display: flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step strong {
  font-size: 12px;
}

.workflow-step small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.workflow-step.complete > span {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.workflow-step.active {
  background: var(--accent-soft);
}

.workflow-step.active > span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.onboarding-content {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.onboarding-content h2 {
  margin-bottom: 8px;
  font-size: 23px;
}

.onboarding-content > p {
  margin-bottom: 28px;
  color: var(--muted);
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
}

/* ERP application shell */
.app-shell {
  min-height: 100vh;
  background: var(--paper);
}

.app-sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow: hidden;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.68);
}

.sidebar-brand {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
}

.sidebar-close {
  display: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
}

.workspace-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.workspace-icon {
  display: flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
}

.workspace-switcher > div {
  min-width: 0;
  flex: 1;
  text-align: left;
}

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

.workspace-switcher strong {
  font-size: 11px;
}

.workspace-switcher small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px 18px;
  scrollbar-width: thin;
}

.nav-group {
  margin-top: 16px;
}

.nav-group-title {
  display: block;
  margin-bottom: 5px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.31);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 35px;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  border-radius: 7px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 600;
}

.nav-item .icon {
  color: rgba(255, 255, 255, 0.43);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.105);
  color: #fff;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-item.active .icon {
  color: #d99567;
}

.nav-count {
  display: inline-flex;
  min-width: 18px;
  height: 17px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

.sidebar-footer {
  padding: 10px 12px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-mini {
  margin-bottom: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.onboarding-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 700;
}

.onboarding-mini .progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  padding: 7px;
  cursor: pointer;
}

.sidebar-user > div {
  min-width: 0;
  flex: 1;
}

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

.sidebar-user strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 10px;
}

.sidebar-user small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 8px;
}

.app-content-wrap {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.app-topbar {
  position: sticky;
  z-index: 35;
  top: 0;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.89);
  backdrop-filter: blur(18px);
}

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

.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb a,
.breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb span:last-child {
  color: var(--ink-2);
  font-weight: 650;
}

.topbar-search {
  display: flex;
  width: min(340px, 35vw);
  height: 36px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.topbar-search span {
  flex: 1;
  font-size: 11px;
  text-align: left;
}

.shortcut {
  display: inline-flex;
  min-width: 23px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.quick-create {
  min-height: 36px;
}

.app-main {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 24px 26px 48px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.page-heading {
  min-width: 0;
}

.page-heading h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.2;
}

.page-heading > p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: 16px;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

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

.metric-card {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease-out);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.metric-icon {
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--green);
}

.metric-card > strong {
  display: block;
  margin: 7px 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-foot {
  display: flex;
  min-height: 18px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 750;
}

.trend-positive {
  color: var(--green);
}

.trend-negative {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 14px;
  margin-bottom: 14px;
}

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

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

.chart-wrap {
  min-width: 0;
  padding: 8px 4px 0;
}

.chart-wrap svg {
  width: 100%;
  height: 214px;
  overflow: visible;
}

.chart-grid {
  stroke: var(--line-soft);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-point {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.chart-summary {
  display: flex;
  align-items: flex-end;
  gap: 13px;
}

.chart-summary strong {
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.chart-summary > span {
  margin-bottom: 4px;
}

.bar-chart {
  display: grid;
  gap: 15px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
}

.bar-label span {
  color: var(--muted);
}

.bar-label strong {
  color: var(--ink-2);
  font-size: 10px;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

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

.donut-layout {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 20px;
}

.donut {
  position: relative;
  width: 150px;
  height: 150px;
}

.donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.donut-center strong {
  font-family: "Manrope", sans-serif;
  font-size: 20px;
}

.donut-center span {
  color: var(--muted);
  font-size: 9px;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.chart-legend > div {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.chart-legend > div > span {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.chart-legend em {
  color: var(--muted);
  font-style: normal;
}

.spark {
  width: 78px;
  height: 24px;
}

.spark polyline {
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.spark-red polyline {
  stroke: var(--red);
}

.spark-amber polyline {
  stroke: var(--accent);
}

.quick-list {
  display: grid;
}

.quick-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.quick-list-item:last-child {
  border-bottom: 0;
}

.quick-list-icon {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.quick-list-item > div {
  min-width: 0;
}

.quick-list-item strong,
.quick-list-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-list-item strong {
  font-size: 11px;
}

.quick-list-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.quick-list-item time,
.quick-list-item > span:last-child {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.capacity-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 35px;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.capacity-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.capacity-person span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capacity-row > strong {
  font-size: 10px;
  text-align: right;
}

.tabs {
  display: flex;
  min-width: 0;
  gap: 3px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 8px 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.tab::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  background: var(--accent);
}

.tab > span {
  display: inline-flex;
  min-width: 18px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 8px;
}

/* Data table */
.data-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.table-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.table-tools,
.table-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.table-search {
  display: flex;
  width: min(250px, 28vw);
  min-width: 170px;
  height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: var(--surface);
  color: var(--muted);
}

.table-search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 10%, transparent);
}

.table-search input {
  min-width: 0;
  min-height: 30px;
  border: 0;
  padding: 0;
  box-shadow: none !important;
  font-size: 11px;
}

.selected-count {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.table-scroll {
  max-width: 100%;
  overflow: auto;
}

.data-table-card table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table-card thead {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--surface-2);
}

.data-table-card th {
  height: 37px;
  border-bottom: 1px solid var(--line);
  padding: 0 11px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table-card th button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.data-table-card th.no-sort button {
  cursor: default;
}

.data-table-card th.sort-active button {
  color: var(--ink);
}

.data-table-card th.sort-desc .icon {
  transform: rotate(180deg);
}

.data-table-card td {
  height: 49px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 11px;
  color: var(--ink-2);
  font-size: 11px;
  vertical-align: middle;
}

.data-table-card tbody tr:last-child td {
  border-bottom: 0;
}

.data-table-card tbody tr[data-route],
.data-table-card tbody tr[data-row-action] {
  cursor: pointer;
}

.data-table-card tbody tr.selected {
  background: color-mix(in srgb, var(--green-soft) 65%, var(--surface));
}

.data-table-card tr[hidden] {
  display: none;
}

.data-table-card .check-cell {
  width: 36px;
  padding-right: 4px;
  text-align: center;
}

.table-primary {
  display: grid;
  min-width: 150px;
  gap: 2px;
}

.table-primary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-primary span,
.table-secondary {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-person {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 8px;
}

.table-person > div {
  min-width: 0;
}

.table-person strong,
.table-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-person strong {
  font-size: 11px;
}

.table-person span {
  color: var(--muted);
  font-size: 9px;
}

.table-footer {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding: 7px 12px;
  color: var(--muted);
  font-size: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination button,
.pagination span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}

.pagination button {
  cursor: pointer;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.4;
}

.table-compact td {
  height: 42px;
}

/* Detail and operational views */
.record-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.record-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 14px;
}

.record-title-icon {
  display: flex;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.record-title h1 {
  margin: 0 0 5px;
  font-size: 21px;
}

.record-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 13px;
  color: var(--muted);
  font-size: 10px;
}

.record-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.record-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 14px;
}

.detail-main,
.detail-sidebar {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.kv-list {
  display: grid;
}

.kv {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv > span {
  color: var(--muted);
}

.kv > div,
.kv > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.summary-item {
  padding: 15px 17px;
  border-right: 1px solid var(--line-soft);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item > span,
.summary-item > strong {
  display: block;
}

.summary-item > span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.summary-item > strong {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.timeline {
  display: grid;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: var(--line);
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}

.timeline-success {
  border-color: #cee1d5;
  background: var(--green-soft);
  color: var(--green);
}

.timeline-warning {
  border-color: #ead9b4;
  background: var(--amber-soft);
  color: var(--amber);
}

.timeline-info {
  border-color: #cee0e8;
  background: var(--blue-soft);
  color: var(--blue);
}

.timeline-item > div {
  min-width: 0;
}

.timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.timeline-top strong {
  font-size: 11px;
}

.timeline-top time,
.timeline-item > div > span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.timeline-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.note-card {
  border-left: 3px solid var(--accent);
  border-radius: 0 9px 9px 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  color: #684630;
  font-size: 11px;
  line-height: 1.6;
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid #ead8b3;
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--amber-soft);
  color: #74501a;
  font-size: 11px;
}

.alert-banner.success {
  border-color: #cee2d5;
  background: var(--green-soft);
  color: var(--green-dark);
}

.alert-banner.danger {
  border-color: #eccfcd;
  background: var(--red-soft);
  color: var(--red);
}

.alert-banner > div {
  flex: 1;
}

.alert-banner strong,
.alert-banner span {
  display: block;
}

.alert-banner span {
  margin-top: 2px;
  opacity: 0.78;
}

.state-panel {
  display: flex;
  min-height: 260px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 34px;
  text-align: center;
}

.state-icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--muted);
}

.state-panel h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.state-panel p {
  max-width: 360px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 11px;
}

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

.skeleton-stack {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line-soft);
}

.skeleton-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr 0.6fr;
  gap: 20px;
  padding: 17px;
  background: var(--surface);
}

.skeleton-row span {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--surface-3) 25%, #f4f5f2 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s linear infinite;
  animation-delay: var(--delay);
}

@keyframes skeleton {
  to { background-position: -200% 0; }
}

/* Kanban */
.view-switcher {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  background: var(--surface);
}

.view-switcher button {
  display: flex;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.view-switcher button.active {
  background: var(--surface-3);
  color: var(--ink);
}

.kanban-board {
  display: grid;
  grid-auto-columns: minmax(245px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-width: 245px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  background: #efefeb;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 3px 2px;
}

.kanban-column-header strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.kanban-column-header strong::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.kanban-column-header span {
  color: var(--muted);
  font-size: 9px;
}

.kanban-card {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, box-shadow 160ms ease;
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.kanban-card > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.kanban-card > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 9px;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.kanban-value {
  margin-top: 12px;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-weight: 750;
}

/* Quote editor and document preview */
.quote-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  align-items: start;
  gap: 15px;
}

.line-items {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.line-item-head,
.line-item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 70px 70px 105px 70px 110px 30px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
}

.line-item-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.line-item-row {
  border-bottom: 1px solid var(--line-soft);
}

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

.line-item-name strong,
.line-item-name small {
  display: block;
}

.line-item-name strong {
  font-size: 10px;
}

.line-item-name small {
  color: var(--muted);
  font-size: 8px;
}

.line-item-row input,
.line-item-row select {
  min-height: 31px;
  padding: 5px 7px;
  font-size: 9px;
}

.quote-totals {
  display: grid;
  gap: 8px;
  width: min(100%, 330px);
  margin: 18px 0 0 auto;
}

.quote-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

.quote-total-row.grand {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.document-preview {
  position: sticky;
  top: 82px;
  overflow: hidden;
  border: 1px solid #d8d8d3;
  border-radius: 12px;
  background: #e8e8e4;
  box-shadow: var(--shadow-sm);
}

.preview-toolbar {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
  background: var(--surface);
  font-size: 10px;
  font-weight: 650;
}

.document-paper {
  width: calc(100% - 28px);
  min-height: 560px;
  margin: 14px;
  padding: 30px;
  background: #fff;
  color: #2d322f;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
}

.doc-header h2 {
  margin: 0;
  font-size: 18px;
}

.doc-number {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.doc-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.doc-addresses span,
.doc-addresses strong {
  display: block;
}

.doc-addresses span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.doc-addresses strong {
  font-size: 10px;
}

.doc-addresses p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 8px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
}

.doc-table th,
.doc-table td {
  border-bottom: 1px solid #e6e7e3;
  padding: 8px 5px;
  font-size: 8px;
  text-align: right;
}

.doc-table th:first-child,
.doc-table td:first-child {
  text-align: left;
}

.doc-table th {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.doc-total {
  width: 55%;
  margin: 18px 0 0 auto;
}

.doc-total > div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 8px;
}

.doc-total > div:last-child {
  margin-top: 4px;
  border-top: 1px solid #ccd0cb;
  padding-top: 8px;
  font-size: 10px;
  font-weight: 800;
}

.doc-footer-note {
  margin-top: 36px;
  border-top: 1px solid #e2e4df;
  padding-top: 12px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.6;
}

/* BOM */
.bom-name {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: calc(var(--level, 0) * 18px);
}

.bom-toggle {
  display: flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: var(--surface-3);
  color: var(--muted);
}

.bom-level-icon {
  display: flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* Projects and costs */
.project-health {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-health::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.project-health.risk::before {
  background: var(--red);
}

.project-health.watch::before {
  background: var(--amber);
}

.cost-compare {
  display: grid;
  gap: 17px;
}

.cost-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 88px 88px 60px;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.cost-bars {
  position: relative;
  height: 13px;
}

.cost-bars span {
  position: absolute;
  left: 0;
  height: 5px;
  border-radius: 999px;
}

.cost-bars .planned {
  top: 0;
  background: #cbd0cc;
}

.cost-bars .actual {
  bottom: 0;
  background: var(--accent);
}

.variance-positive {
  color: var(--green);
}

.variance-negative {
  color: var(--red);
}

/* Manufacturing */
.production-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.production-stage {
  min-width: 190px;
  border-top: 3px solid var(--green);
  border-radius: 3px 3px 11px 11px;
  padding: 11px;
  background: #ebece8;
}

.production-stage.warning {
  border-top-color: var(--amber);
}

.production-stage.danger {
  border-top-color: var(--red);
}

.production-stage h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 10px;
  font-size: 10px;
  text-transform: uppercase;
}

.production-stage h3 span {
  color: var(--muted);
  font-size: 9px;
}

.production-card {
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.production-card > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.production-card > strong {
  display: block;
  margin: 4px 0 11px;
  font-size: 10px;
}

.production-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.operation-list {
  display: grid;
}

.operation-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1.2fr) minmax(90px, 0.8fr) minmax(110px, 1fr) 100px 95px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

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

.operation-index {
  display: flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.operation-row.complete .operation-index {
  border-color: #c9dfd2;
  background: var(--green-soft);
  color: var(--green);
}

.operation-row.active {
  background: color-mix(in srgb, var(--blue-soft) 42%, transparent);
}

.operation-name strong,
.operation-name span {
  display: block;
}

.operation-name strong {
  font-size: 11px;
}

.operation-name span,
.operation-cell span {
  color: var(--muted);
  font-size: 9px;
}

.operation-cell strong {
  display: block;
  font-size: 10px;
}

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

.machine-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: var(--surface);
}

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

.machine-icon {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--green);
}

.machine-card h3 {
  margin: 12px 0 3px;
  font-size: 13px;
}

.machine-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
}

/* Workshop */
.workshop-shell {
  min-height: 100vh;
  background: #e8e9e5;
}

.workshop-topbar {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  background: var(--sidebar);
  color: #fff;
}

.workshop-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workshop-user strong,
.workshop-user span {
  display: block;
}

.workshop-user span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.workshop-main {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 60px;
}

.workshop-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.workshop-greeting h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.workshop-greeting p {
  margin: 0;
  color: var(--muted);
}

.live-clock {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 750;
}

.workshop-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  overflow: hidden;
  border: 1px solid #cfd3ce;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.workshop-task {
  padding: 26px;
}

.workshop-label {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workshop-task h2 {
  margin: 10px 0 4px;
  font-size: 25px;
}

.workshop-task > p {
  color: var(--muted);
}

.workshop-specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.workshop-spec {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--surface-2);
}

.workshop-spec span,
.workshop-spec strong {
  display: block;
}

.workshop-spec span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.workshop-spec strong {
  font-size: 12px;
}

.workshop-controls {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 9px;
}

.workshop-controls .btn {
  min-height: 54px;
  font-size: 14px;
}

.workshop-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid var(--line);
  padding: 28px;
  background: var(--sidebar);
  color: #fff;
}

.workshop-timer > span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.timer-value {
  margin: 10px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: -0.05em;
}

.timer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
}

.timer-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #75c398;
}

.workshop-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.shop-task-list {
  display: grid;
}

.shop-task-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.shop-task-row:last-child {
  border-bottom: 0;
}

.task-order {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.shop-task-row strong,
.shop-task-row span {
  display: block;
}

.shop-task-row strong {
  font-size: 11px;
}

.shop-task-row span {
  color: var(--muted);
  font-size: 9px;
}

.qr-card {
  padding: 20px;
  text-align: center;
}

.qr-code {
  display: grid;
  width: 126px;
  height: 126px;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  margin: 8px auto 18px;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.qr-code i {
  background: var(--sidebar);
}

.qr-code i.off {
  background: #fff;
}

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

.qr-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.settings-nav {
  position: sticky;
  top: 82px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 6px;
  background: var(--surface);
}

.settings-nav button {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.settings-nav button.active {
  background: var(--surface-3);
  color: var(--ink);
}

.settings-content {
  min-width: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.setting-row strong,
.setting-row span {
  display: block;
}

.setting-row strong {
  font-size: 11px;
}

.setting-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
}

.provider-card.connected {
  border-color: #bad8c5;
  background: color-mix(in srgb, var(--green-soft) 43%, #fff);
}

.provider-logo {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
}

.provider-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

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

.provider-card span {
  color: var(--muted);
  font-size: 10px;
}

.permission-table {
  overflow: auto;
}

.permission-table table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.permission-table th,
.permission-table td {
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  padding: 10px;
  font-size: 9px;
  text-align: center;
}

.permission-table th:first-child,
.permission-table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  background: var(--surface);
  font-weight: 700;
  text-align: left;
}

.permission-table th {
  background: var(--surface-2);
  color: var(--muted);
}

.permission-chip {
  display: inline-flex;
  min-width: 50px;
  justify-content: center;
  border-radius: 5px;
  padding: 4px 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.permission-chip.all {
  background: var(--green-soft);
  color: var(--green);
}

.permission-chip.edit {
  background: var(--blue-soft);
  color: var(--blue);
}

.permission-chip.none {
  background: var(--red-soft);
  color: var(--red);
}

.subscription-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  border-radius: 16px;
  padding: 25px;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.64);
}

.subscription-hero h2 {
  margin: 6px 0;
  color: #fff;
  font-size: 23px;
}

.subscription-hero .eyebrow {
  color: #d99263;
}

.subscription-price {
  text-align: right;
}

.subscription-price strong {
  display: block;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 27px;
}

.subscription-price span {
  font-size: 10px;
}

/* SaaS admin */
.admin-shell {
  --sidebar: #182028;
  --sidebar-2: #202c36;
  --accent: #bf7950;
  --green: #3e7162;
}

.admin-shell .app-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #182028;
}

.admin-environment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  border: 1px solid #cbded3;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 750;
}

.admin-environment i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.system-health {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.system-health i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.admin-company-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-company-logo {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--sidebar);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.health-score {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 800;
}

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

.service-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  background: var(--surface);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.service-card h3 {
  margin: 0;
  font-size: 12px;
}

.service-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-stats span,
.service-stats strong {
  display: block;
}

.service-stats span {
  color: var(--muted);
  font-size: 8px;
}

.service-stats strong {
  font-size: 12px;
}

/* Overlay, modal, command menu, dropdowns, toasts */
.mobile-backdrop {
  position: fixed;
  z-index: 45;
  inset: 0;
  display: none;
  background: rgba(12, 19, 15, 0.54);
  backdrop-filter: blur(2px);
}

.overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(14, 22, 18, 0.48);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(100%, 580px);
  max-height: min(88vh, 850px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  transform-origin: center;
}

.modal.modal-lg {
  width: min(100%, 820px);
}

.modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
  padding: 19px 21px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
}

.modal-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  padding: 21px;
}

.modal-footer {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding: 13px 21px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.confirm-illustration {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 13px;
  background: var(--red-soft);
  color: var(--red);
}

.drawer-overlay {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.drawer {
  width: min(100%, 430px);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(12, 20, 16, 0.16);
  transition: transform 220ms var(--ease-out);
}

.command-overlay {
  align-items: flex-start;
  padding-top: min(14vh, 120px);
}

.command-menu {
  width: min(100%, 620px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.command-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 0 15px;
}

.command-search input {
  min-height: 52px;
  border: 0;
  padding: 0;
  box-shadow: none !important;
  font-size: 14px;
}

.command-results {
  max-height: 420px;
  overflow: auto;
  padding: 7px;
}

.command-group-label {
  padding: 8px 8px 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.command-item {
  display: grid;
  width: 100%;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.command-item.active {
  background: var(--surface-2);
}

.command-item-icon {
  display: flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--muted);
}

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

.command-item strong {
  font-size: 11px;
}

.command-item span,
.command-item > small {
  color: var(--muted);
  font-size: 9px;
}

.command-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  padding: 8px 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
}

.command-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dropdown {
  position: fixed;
  z-index: 90;
  width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform-origin: var(--transform-origin, top right);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.dropdown-label {
  padding: 7px 8px 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dropdown button,
.dropdown a {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  padding: 7px 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.dropdown hr {
  height: 1px;
  margin: 5px 0;
  border: 0;
  background: var(--line-soft);
}

.notification-drawer .notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 19px;
}

.notification-header h2 {
  margin: 0;
  font-size: 17px;
}

.notification-list {
  display: grid;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  gap: 10px;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line-soft);
}

.notification-item.unread {
  background: color-mix(in srgb, var(--blue-soft) 30%, var(--surface));
}

.notification-item.unread::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.notification-icon {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.notification-item strong,
.notification-item span,
.notification-item time {
  display: block;
}

.notification-item strong {
  padding-right: 15px;
  font-size: 11px;
}

.notification-item span {
  margin: 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.notification-item time {
  color: var(--muted-2);
  font-size: 8px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(380px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  transition: opacity 190ms var(--ease-out), transform 190ms var(--ease-out);
  @starting-style {
    opacity: 0;
    transform: translateY(100%);
  }
}

.toast-icon {
  display: flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

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

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 11px;
}

.toast span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.toast button {
  border: 0;
  padding: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

/* Responsive */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: #1f4333;
    box-shadow: 0 7px 18px rgba(37, 76, 59, 0.18);
    transform: translateY(-1px);
  }

  .btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
  }

  .btn-secondary:hover,
  .icon-button:hover {
    border-color: #c9cec8;
    background: var(--surface-2);
    color: var(--ink);
  }

  .btn-ghost:hover {
    background: var(--surface-3);
    color: var(--ink);
  }

  .public-links a:hover,
  .footer-column a:hover {
    color: var(--accent);
  }

  .metric-card[href]:hover {
    border-color: #c9cec8;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
  }

  .nav-item:hover,
  .sidebar-user:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }

  .data-table-card tbody tr:hover {
    background: var(--surface-2);
  }

  .kanban-card:hover {
    border-color: #c9cec8;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
  }

  .dropdown button:hover,
  .dropdown a:hover,
  .command-item:hover {
    background: var(--surface-2);
  }

  .settings-nav button:hover {
    background: var(--surface-2);
    color: var(--ink);
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 230px;
  }

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

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

  .hero-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 34px;
  }

  .hero-copy h1 {
    font-size: 51px;
  }

  .public-links {
    gap: 16px;
    margin-left: 14px;
  }
}

@media (max-width: 1050px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 220ms var(--ease-out);
  }

  .mobile-nav-open .app-sidebar {
    transform: translateX(0);
  }

  .mobile-nav-open .mobile-backdrop {
    display: block;
  }

  .sidebar-close,
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .app-content-wrap {
    margin-left: 0;
  }

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

  .dashboard-grid,
  .dashboard-grid.equal,
  .detail-layout,
  .quote-editor-layout {
    grid-template-columns: 1fr;
  }

  .document-preview {
    position: static;
  }

  .public-links {
    display: none;
  }

  .public-mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .public-actions {
    margin-left: 0;
  }

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

  .hero-copy {
    max-width: 720px;
    padding-bottom: 20px;
  }

  .hero-product {
    width: min(760px, 100%);
    margin: 0 auto;
  }

  .marketing-split,
  .testimonial,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .flow-step:nth-child(4) {
    border-right: 0;
  }

  .flow-step:nth-child(4)::after {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1.5fr repeat(2, 1fr);
  }

  .auth-page {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .auth-aside {
    padding: 38px;
  }

  .workshop-focus,
  .workshop-bottom-grid {
    grid-template-columns: 1fr;
  }

  .workshop-timer {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 24px;
  }

  .timer-value {
    font-size: 36px;
  }

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

@media (max-width: 760px) {
  .public-container {
    width: min(100% - 28px, 1180px);
  }

  .public-nav-inner {
    height: 60px;
  }

  .public-actions .btn-secondary {
    display: none;
  }

  .marketing-hero {
    padding-top: 54px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-copy > p {
    font-size: 15px;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .hero-proof {
    align-items: flex-start;
  }

  .product-window {
    transform: none;
  }

  .product-demo-shell {
    height: 320px;
    grid-template-columns: 74px 1fr;
  }

  .product-demo-nav {
    padding: 12px 6px;
  }

  .product-demo-brand {
    font-size: 8px;
  }

  .product-demo-nav span {
    padding: 4px;
    font-size: 7px;
  }

  .product-demo-main {
    padding: 10px;
  }

  .demo-card-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-kpi:nth-child(n + 3) {
    display: none;
  }

  .demo-split {
    grid-template-columns: 1fr;
  }

  .demo-panel:last-child {
    display: none;
  }

  .demo-float-card {
    right: 8px;
    bottom: 28px;
  }

  .logo-strip-inner {
    justify-content: center;
    flex-direction: column;
    padding: 18px 0;
  }

  .customer-logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
  }

  .marketing-section {
    padding: 68px 0;
  }

  .marketing-heading {
    margin-bottom: 32px;
  }

  .problem-grid,
  .feature-grid,
  .industry-grid,
  .integration-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

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

  .flow-step:nth-child(even) {
    border-right: 0;
  }

  .flow-step:nth-child(even)::after {
    display: none;
  }

  .marketing-visual {
    min-height: 360px;
    padding: 16px;
  }

  .visual-board {
    overflow-x: auto;
  }

  .visual-column {
    min-width: 150px;
  }

  .cta-band {
    padding: 34px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .comparison-table {
    overflow-x: auto;
  }

  .comparison-table table {
    min-width: 650px;
  }

  .auth-page {
    display: block;
  }

  .auth-aside {
    min-height: auto;
    padding: 24px;
  }

  .auth-aside-content,
  .auth-quote {
    display: none;
  }

  .auth-main {
    min-height: calc(100vh - 76px);
    padding: 34px 20px;
  }

  .signup-plan-grid {
    grid-template-columns: 1fr;
  }

  .signup-steps {
    margin-bottom: 25px;
  }

  .onboarding-topbar {
    padding: 0 16px;
  }

  .onboarding-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0;
  }

  .onboarding-sidebar .workflow-steps {
    display: none;
  }

  .onboarding-content {
    padding: 22px;
  }

  .app-topbar {
    height: 58px;
    padding: 0 12px;
  }

  .breadcrumb {
    display: none;
  }

  .topbar-search {
    width: auto;
    flex: 1;
    margin-left: 0;
  }

  .topbar-search span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quick-create span,
  .quick-create .icon + span {
    display: none;
  }

  .quick-create {
    width: 36px;
    padding: 0;
  }

  .app-main {
    padding: 18px 12px 40px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .metrics-grid,
  .metrics-grid.metrics-5,
  .dashboard-grid.three,
  .machine-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-card > strong {
    font-size: 21px;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .table-search {
    width: 100%;
    min-width: 160px;
    flex: 1;
  }

  .table-actions {
    justify-content: flex-end;
  }

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

  .summary-item:nth-child(2) {
    border-right: 0;
  }

  .summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .record-header {
    grid-template-columns: 1fr;
  }

  .record-actions {
    justify-content: flex-start;
  }

  .record-title-icon {
    width: 40px;
    height: 40px;
  }

  .record-title h1 {
    font-size: 18px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .donut-layout {
    grid-template-columns: 125px 1fr;
  }

  .donut {
    width: 125px;
    height: 125px;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .line-items {
    overflow-x: auto;
  }

  .line-item-head,
  .line-item-row {
    min-width: 790px;
  }

  .document-paper {
    min-height: 480px;
    padding: 20px;
  }

  .cost-row {
    grid-template-columns: 80px minmax(100px, 1fr) 65px;
  }

  .cost-row > :nth-child(4),
  .cost-row > :nth-child(5) {
    display: none;
  }

  .operation-row {
    min-width: 760px;
  }

  .workshop-topbar {
    padding: 0 14px;
  }

  .workshop-greeting {
    align-items: flex-start;
    flex-direction: column;
  }

  .workshop-task {
    padding: 20px;
  }

  .workshop-task h2 {
    font-size: 21px;
  }

  .workshop-specs {
    grid-template-columns: 1fr;
  }

  .workshop-controls {
    grid-template-columns: 1fr 1fr;
  }

  .workshop-controls .btn:first-child {
    grid-column: 1 / -1;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .settings-nav button {
    white-space: nowrap;
  }

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

  .subscription-price {
    text-align: left;
  }

  .modal-body,
  .modal-header {
    padding: 17px;
  }

  .modal-footer {
    padding: 12px 17px;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 430px) {
  .public-actions .btn span {
    display: none;
  }

  .public-actions .btn {
    width: 38px;
    padding: 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .product-demo-shell {
    grid-template-columns: 1fr;
  }

  .product-demo-nav {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .topbar-search .shortcut,
  .topbar-search span {
    display: none;
  }

  .topbar-search {
    width: 38px;
    flex: 0 0 auto;
    justify-content: center;
  }

  .app-topbar .btn-primary {
    margin-left: auto;
  }

  .metrics-grid,
  .metrics-grid.metrics-5 {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-item {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-legend {
    width: 100%;
  }

  .record-title-row {
    gap: 10px;
  }

  .record-title-icon {
    display: none;
  }

  .workshop-controls {
    grid-template-columns: 1fr;
  }

  .workshop-controls .btn:first-child {
    grid-column: auto;
  }

  .onboarding-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
