@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: 16px;
  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;
}

.subscription-plan-list {
  display: grid;
}

.subscription-plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.subscription-plan-row > div {
  display: grid;
  gap: 3px;
}

.subscription-plan-row small {
  color: var(--text-muted);
}

.subscription-plan-row.is-current strong {
  color: var(--green-dark);
}

.subscription-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.subscription-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--red) 28%, var(--line));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--red) 4%, var(--surface));
}

.subscription-danger p {
  margin: 5px 0 0;
  color: var(--text-muted);
}

@media (max-width: 700px) {
  .subscription-danger {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-danger .button,
  .subscription-management-actions .button {
    width: 100%;
    justify-content: center;
  }
}

.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;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

.stack > * {
  min-width: 0;
}

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

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

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

.detail-list {
  display: grid;
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}

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

.tag-list .tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.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 {
  min-width: 0;
  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: 17px;
  font-weight: 750;
}

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

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

.eyebrow {
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-size: 12px;
  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: 14px;
}

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

.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: 21px;
  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: 10px;
  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: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-dot {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  align-self: center;
  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: 11px;
}

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

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

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

.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: 13px;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

.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);
}

.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: 14px;
  font-weight: 700;
}

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

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: 14px;
  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: 14px;
  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: 16px;
}

.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(1320px, 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: 15px;
  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: 13px;
  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(44px, calc(5vw + 2px), 70px);
  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: 19px;
  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: 14px;
}

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

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

.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);
}

.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 > span {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 6px;
}

.product-window-bar i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #d0d2ce;
}

.product-preview-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  background: #f5f5f2;
  object-fit: cover;
  object-position: left top;
}

.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: 13px;
  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: 15px;
  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(34px, calc(4vw + 2px), 50px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.marketing-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  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;
}

.feature-grid-dynamic {
  grid-template-columns: repeat(var(--feature-columns), minmax(0, 1fr));
}

.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: 13px;
  font-weight: 800;
}

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

.problem-item p,
.feature-item p,
.industry-card p,
.integration-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  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: 14px;
  font-weight: 800;
}

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

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

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

.marketing-split > * {
  min-width: 0;
}

.marketing-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, calc(4vw + 2px), 46px);
  line-height: 1.13;
}

.marketing-copy > p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 17px;
  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: 17px;
}

.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: 11px;
  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: 12px;
}

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

.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(27px, calc(3.4vw + 2px), 44px);
  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: 14px;
}

.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(32px, calc(4vw + 2px), 49px);
}

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

.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: 14px;
  line-height: 1.7;
}

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

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

.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: 13px;
}

.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: 12px;
  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: 26px;
  font-weight: 800;
}

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

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

.integration-logo.kvikk {
  height: auto;
  margin-bottom: 20px;
  color: #8a4d2b;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.kvikk-registration {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 5vw, 64px);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kvikk-registration-copy {
  max-width: 680px;
}

.kvikk-registration h2 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.kvikk-registration p {
  max-width: 66ch;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.kvikk-registration small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.kvikk-carriers span {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 800;
}

.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: 14px;
  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: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

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

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

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

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

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

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

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

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

.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: 14px;
}

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

.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: 15px;
  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);
}

.demo-tour-layout {
  display: grid;
  min-height: 520px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.demo-tour-sidebar {
  padding: 26px;
  background: var(--sidebar);
  color: rgba(255, 255, 255, 0.68);
}

.demo-tour-content {
  min-width: 0;
  padding: 28px;
  background: var(--paper);
}

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

/* 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(34px, calc(4vw + 2px), 50px);
  line-height: 1.14;
}

.auth-aside p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
  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: 14px;
}

.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: 31px;
}

.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: 14px;
}

.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: 14px;
  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: 13px;
}

.admin-auth-page .auth-aside {
  background:
    radial-gradient(circle at 20% 75%, rgba(183, 107, 61, 0.2), transparent 32%),
    linear-gradient(145deg, #17251f, #0d1713);
}

.admin-auth-mark {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  color: #e0a47d;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.admin-auth-steps {
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 32px 0 28px;
}

.admin-auth-steps > i {
  height: 1px;
  background: var(--line);
}

.admin-auth-steps > span {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.admin-auth-steps em {
  position: absolute;
  margin-top: 58px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.admin-demo-credentials,
.admin-demo-code,
.admin-security-note,
.admin-settings-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  border: 1px solid #d7e4db;
  border-radius: 10px;
  padding: 12px 13px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
}

.admin-demo-credentials > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-demo-credentials span,
.admin-demo-credentials code {
  color: var(--ink-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-demo-code {
  display: grid;
  justify-items: center;
  border-color: #ead8b3;
  padding: 16px;
  background: var(--amber-soft);
  color: #74501a;
  text-align: center;
}

.admin-demo-code strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  letter-spacing: 0.22em;
}

.admin-demo-code small {
  color: #87672f;
}

.admin-otp-input {
  min-height: 54px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-align: center;
}

.admin-security-note {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1.55;
}

.admin-auth-back {
  justify-self: center;
  border: 0;
  padding: 4px;
  background: transparent;
  cursor: pointer;
}

.admin-profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: var(--surface-2);
}

.admin-profile-hero > div {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.admin-profile-hero strong,
.admin-profile-hero span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-hero > div > span {
  color: var(--muted);
  font-size: 12px;
}

.admin-profile-security {
  display: grid;
  gap: 9px;
  margin: 20px 0 14px;
}

.admin-profile-security article {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 11px 12px;
}

.admin-profile-security article > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
}

.admin-profile-security article > div {
  display: grid;
  gap: 2px;
}

.admin-profile-security small {
  color: var(--muted);
}

.admin-settings-note {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.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: 12px;
  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: 20px;
  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: 27px;
}

.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: 11px;
  font-weight: 800;
}

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

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

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

.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: 25px;
}

.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;
}

.onboarding-skip-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 3px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.onboarding-skip-options strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 14px;
}

.onboarding-skip-options > span {
  grid-column: 1;
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
}

.onboarding-skip-options .btn {
  grid-row: 1 / 3;
}

/* 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: 13px;
}

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

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(151, 177, 164, 0.62) rgba(255, 255, 255, 0.035);
  scrollbar-gutter: stable;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 10px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  margin-block: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(151, 177, 164, 0.62);
  background-clip: padding-box;
}

.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: 11px;
  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: 13px;
  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: 10px;
}

.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: 11px;
  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: 12px;
}

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

.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: 13px;
}

.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(390px, 38vw);
  min-width: 0;
  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 {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-search > .icon,
.topbar-search > .shortcut {
  flex: 0 0 auto;
}

.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: 11px;
  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: 27px;
  font-weight: 750;
  line-height: 1.2;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  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: 18px;
}

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

.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: 12px;
  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: 25px;
  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: 11px;
}

.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 {
  margin: 0;
  min-width: 0;
  padding: 10px 4px 0;
}

.chart-main {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px max-content minmax(0, 1fr);
  grid-template-rows: 214px auto auto;
  column-gap: 8px;
}

.chart-plot {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}

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

.chart-axis-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chart-axis-title-y {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.chart-axis-title-x {
  grid-column: 3;
  grid-row: 3;
  padding-top: 7px;
  text-align: center;
}

.chart-y-scale {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 1px 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.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: grid;
  grid-column: 3;
  grid-row: 2;
  grid-template-columns: repeat(var(--chart-columns), minmax(0, 1fr));
  padding-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.chart-labels span {
  justify-self: center;
  white-space: nowrap;
}

.chart-labels span:first-child {
  justify-self: start;
}

.chart-labels span:last-child {
  justify-self: end;
}

.chart-label-hidden {
  visibility: hidden;
}

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

.chart-summary strong {
  font-family: "Manrope", sans-serif;
  font-size: 27px;
  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: 12px;
}

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

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

.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: 22px;
}

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

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

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

.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: 13px;
}

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

.quick-list-item time,
.quick-list-item > span:last-child {
  color: var(--muted);
  font-size: 11px;
  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: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capacity-row > strong {
  font-size: 12px;
  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: 13px;
  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: 10px;
}

/* 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: 13px;
}

.selected-count {
  color: var(--green);
  font-size: 12px;
  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: 11px;
  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: 13px;
  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;
}

@media (max-width: 600px) {
  .data-table-card table {
    display: block;
    min-width: 0;
  }

  .data-table-card thead {
    display: block;
    position: static;
    overflow-x: auto;
  }

  .data-table-card thead tr {
    display: flex;
    width: max-content;
  }

  .data-table-card th button {
    min-height: 44px;
  }

  .data-table-card tbody,
  .data-table-card tbody tr {
    display: block;
  }

  .data-table-card tbody tr[data-row-index] {
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .data-table-card tbody td[data-label] {
    display: grid;
    grid-template-columns: minmax(80px, 36%) minmax(0, 1fr);
    gap: 12px;
    height: auto;
    min-height: 36px;
    align-items: start;
    border: 0;
    padding: 6px 0;
    overflow-wrap: anywhere;
  }

  .data-table-card tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
  }

  .data-table-card .table-primary {
    min-width: 0;
  }

  .data-table-card tbody .check-cell {
    display: block;
    width: auto;
    height: auto;
    border: 0;
    padding: 0 0 8px;
    text-align: right;
  }

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

  .data-table-card [data-table-empty] td {
    display: block;
    height: auto;
  }
}

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

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

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

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

.table-person > .avatar {
  display: inline-flex;
  align-self: center;
}

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

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

.table-person > div > strong {
  font-size: 13px;
}

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

.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: 12px;
}

.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: 23px;
}

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

.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: 13px;
}

.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: 11px;
  font-weight: 650;
}

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

.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: 13px;
}

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

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

.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: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.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: 13px;
}

.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: 17px;
}

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

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

.remote-loading-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--surface-2);
}

.remote-loading-shell > div {
  display: grid;
  max-width: 380px;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.remote-loading-shell svg {
  margin-bottom: 8px;
  color: var(--green);
  animation: remote-spin 800ms linear infinite;
}

.remote-loading-shell strong {
  font-size: 17px;
}

.remote-loading-shell span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.remote-revocation-failed svg {
  animation: none;
}

.remote-revocation-failed > div > svg {
  color: var(--red);
}

.remote-revocation-failed .btn svg {
  margin-bottom: 0;
  color: currentColor;
}

.remote-revocation-failed .btn span {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.remote-state {
  min-height: min(520px, 70vh);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.remote-account-action {
  width: 100%;
  justify-content: center;
}

.remote-access-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line-soft);
}

.remote-access-summary > div {
  min-width: 0;
  padding: 13px 15px;
  background: var(--surface);
}

.remote-access-summary span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.remote-access-summary strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-access-summary .remote-feature-list {
  grid-column: 1 / -1;
  padding-block: 11px;
}

.remote-feature-list p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.remote-feature-list code {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 10px;
}

.remote-action-denied {
  opacity: 0.58;
  cursor: not-allowed;
}

.admin-enrollment-secret {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  background: var(--surface-2);
}

.admin-enrollment-secret > span,
.admin-enrollment-secret > small,
.dropdown-meta,
.dropdown-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-enrollment-secret code {
  overflow-wrap: anywhere;
  color: var(--green-dark);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dropdown-meta,
.dropdown-empty {
  display: block;
  padding: 7px 12px;
}

@keyframes remote-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .remote-access-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .remote-state {
    min-height: 420px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .remote-loading-shell svg {
    animation: none;
  }
}

.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: 12px;
  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: 12px;
  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: 11px;
}

.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: 13px;
}

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

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

.kanban-value {
  margin-top: 12px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  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: 10px;
  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: 12px;
}

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

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

.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: 13px;
}

.quote-total-row.grand {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--ink);
  font-size: 16px;
  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: 12px;
  font-weight: 650;
}

.document-paper {
  display: flex;
  flex-direction: column;
  width: calc(100% - 28px);
  aspect-ratio: 210 / 297;
  margin: 14px;
  padding: 36px 40px;
  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: 20px;
}

.doc-number {
  color: var(--muted);
  font-size: 11px;
  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: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

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

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

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

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

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

.doc-table th {
  color: var(--muted);
  font-size: 9px;
  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: 10px;
}

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

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

.doc-footer {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.6fr) auto;
  align-items: end;
  gap: 16px;
  margin-top: auto;
  border-top: 2px solid #d8dbd5;
  padding-top: 10px;
}

.doc-footer-page {
  max-width: 200px;
}

.doc-footer-page strong {
  display: block;
  margin-bottom: 3px;
  color: #1c1e1c;
  font-size: 11px;
}

.doc-footer-page span,
.doc-footer-brand span {
  display: block;
  color: #8a938c;
  font-size: 9px;
  font-style: italic;
  line-height: 1.55;
}

.doc-footer-brand {
  text-align: center;
}

.doc-footer-logo {
  justify-self: end;
}

.doc-footer-logo .brand {
  pointer-events: none;
}

.doc-footer-logo .brand-name {
  font-size: 14px;
}

.doc-note {
  margin-top: 18px;
}

.doc-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

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

.doc-company-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.doc-title-copy h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.doc-subject {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 1;
  justify-content: flex-end;
  gap: 8px;
  max-width: 56%;
}

.doc-meta-card {
  min-width: 86px;
  border: 1px solid #e2e4df;
  border-radius: 8px;
  padding: 8px 11px;
}

.doc-meta-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.doc-meta-card strong {
  font-size: 10.5px;
  white-space: normal;
}

.party-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.party-card {
  border: 1px solid #e2e4df;
  border-radius: 8px;
  padding: 11px 13px;
}

.party-card h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.party-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11.5px;
}

.party-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 9px;
}

.doc-table .doc-item-name {
  font-weight: 600;
}

.doc-table .doc-item-details {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.doc-table .doc-right {
  text-align: right;
  white-space: nowrap;
}

.summary-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  margin-top: 20px;
}

.doc-terms h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.doc-terms p {
  margin: 3px 0;
  font-size: 9.5px;
  line-height: 1.55;
}

.doc-terms p span {
  font-weight: 700;
}

.totals-block .total-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  font-size: 10px;
}

.totals-block .total-line.final {
  margin-top: 5px;
  border-top: 2px solid #18211d;
  padding-top: 8px;
  font-size: 12px;
  font-weight: 800;
}

.doc-signature {
  max-width: 250px;
  margin: 34px 0 0 auto;
}

.signature-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #2d322f;
  padding-top: 6px;
}

.signature-name {
  font-size: 10px;
  font-weight: 700;
}

.signature-label {
  color: var(--muted);
  font-size: 8.5px;
}

.doc-continue {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6e7e3;
}

.doc-continue strong {
  font-size: 11px;
  letter-spacing: 0.3px;
}

.doc-continue span {
  color: var(--muted);
  font-size: 9px;
  font-style: italic;
}

.doc-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.doc-note p {
  margin: 0;
  color: #2d322f;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 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: 12px;
}

.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: 12px;
  text-transform: uppercase;
}

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

.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: 10px;
  font-weight: 700;
}

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

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

.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: 11px;
  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: 13px;
}

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

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

.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: 15px;
}

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

/* 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: 12px;
}

.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: 26px;
}

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

.live-clock {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  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: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.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: 11px;
}

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

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

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

.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: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.timer-value {
  margin: 10px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: 46px;
  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: 12px;
}

.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: 13px;
  font-weight: 800;
}

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

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

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

.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: 12px;
}

/* 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: 12px;
  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;
}

.workspace-invite-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px minmax(280px, max-content);
  align-items: center;
}

.workspace-invite-person {
  min-width: 0;
}

.workspace-invite-person strong {
  overflow-wrap: anywhere;
}

.workspace-invite-status {
  justify-self: start;
}

.workspace-invite-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.workspace-invite-actions time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.workspace-invite-actions .btn-ghost {
  color: var(--red);
}

.workspace-member-role-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(250px, auto);
  align-items: end;
}

.workspace-role-controls {
  display: grid;
  grid-template-columns: 158px auto;
  align-items: end;
  gap: 10px;
}

.workspace-row-feedback {
  grid-column: 1 / -1;
  min-height: 0;
}

.workspace-permission-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.workspace-permission-toolbar p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-permission-list {
  display: grid;
}

.workspace-permission-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid var(--line-soft);
}

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

.workspace-permission-row strong {
  font-size: 13px;
}

.workspace-permission-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-permission-row .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.workspace-permission-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.workspace-catalog-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.workspace-catalog-toolbar p {
  margin: 0;
}

.workspace-catalog-toolbar p + p {
  margin-top: 5px;
}

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

.workspace-catalog-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.workspace-catalog-item:focus-within {
  border-color: var(--green);
  box-shadow: 0 5px 18px rgb(24 62 49 / 8%);
}

.workspace-catalog-item .form-field {
  min-width: 0;
}

.workspace-catalog-number {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.workspace-catalog-empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.workspace-catalog-actions {
  justify-content: flex-end;
  margin-top: 22px;
}

.document-template-variables {
  margin-bottom: 18px;
  border-block: 1px solid var(--line-soft);
  padding: 12px 0;
}

.document-template-variables summary {
  cursor: pointer;
  font-weight: 700;
}

.document-template-variables > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.document-template-variables code {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 5px 8px;
  color: var(--green-dark);
  font-size: 12px;
}

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

.document-template-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.document-template-card:focus-within {
  border-color: var(--green);
  box-shadow: 0 7px 22px rgb(24 62 49 / 9%);
}

.document-template-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.document-template-card-head > div:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.document-template-card-head strong {
  overflow-wrap: anywhere;
}

.document-template-index {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.document-template-editor > .form-grid {
  padding: 16px;
}

.document-logo-editor {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.document-logo-editor p {
  max-width: 65ch;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.document-logo-preview {
  display: grid;
  min-height: 82px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
}

.document-logo-preview img {
  display: block;
  width: 100%;
  max-height: 82px;
  object-fit: contain;
}

.document-logo-preview > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.document-logo-upload {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

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

.document-logo-upload:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.document-template-label-editor {
  border-top: 1px solid var(--line-soft);
}

.document-template-label-editor summary {
  padding: 14px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.document-template-label-editor .form-grid {
  padding: 0 16px 16px;
}

.document-template-live-layout {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(420px, 1.08fr);
  align-items: start;
  gap: 16px;
  padding: 16px;
  background: var(--surface-2);
}

.document-template-editor {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.document-template-live-preview {
  top: 16px;
  min-width: 0;
}

.document-template-live-preview .preview-toolbar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.document-template-live-preview .document-template-preview-shell {
  padding: 14px;
}

.document-template-live-preview .template-preview-paper {
  width: 100%;
  min-height: auto;
  aspect-ratio: 210 / 297;
  padding: clamp(20px, 4.2vw, 38px);
  font-size: clamp(8px, 0.9vw, 11px);
}

.document-template-live-preview .template-preview-hero {
  grid-template-columns: minmax(0, 1fr) minmax(140px, 38%);
  gap: 16px;
}

.document-template-live-preview .template-preview-identity {
  grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1fr);
  gap: 12px;
}

.document-template-live-preview .template-preview-brand {
  min-width: 0;
}

.document-template-live-preview .template-preview-title h1 {
  font-size: clamp(19px, 2.2vw, 27px);
}

.document-template-live-preview .template-preview-meta strong {
  font-size: clamp(8px, 0.85vw, 10px);
}

.template-preview-logo {
  display: block;
  width: 100%;
  max-width: 128px;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.template-preview-paper [data-template-edit] {
  min-width: 12px;
  border-radius: 3px;
  cursor: text;
  outline: 1px dashed transparent;
  outline-offset: 2px;
}

.template-preview-paper [data-template-edit]:focus {
  background: #fff8e9;
  outline-color: #9d633b;
  text-transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .template-preview-paper [data-template-edit]:hover {
    outline-color: rgb(157 99 59 / 55%);
  }
}

.document-template-blocks {
  border-top: 1px solid var(--line-soft);
}

.document-template-block {
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.document-template-block-head {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(180px, 260px) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.document-template-block-head > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.document-template-block-head .form-field {
  min-width: 0;
}

.document-template-block textarea {
  min-height: 86px;
  resize: vertical;
}

.document-template-add-block {
  padding: 14px 16px;
}

.document-template-preview-shell {
  padding: 20px;
  overflow: auto;
  background: #e9e9e5;
}

.template-preview-paper {
  --document-ink: #241d18;
  --document-muted: #7b7168;
  --document-sage: #667152;
  --document-line: #dfc7a5;
  --document-soft: #fbf7ef;
  --document-dark: #251b13;
  display: flex;
  flex-direction: column;
  width: min(100%, 794px);
  min-height: 1123px;
  margin: 0 auto;
  padding: 46px 48px 34px;
  background: #fffefa;
  color: var(--document-ink);
  box-shadow: 0 10px 30px rgb(24 33 29 / 14%);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.template-preview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 226px;
  gap: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid #ded8cf;
}

.template-preview-identity {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.template-preview-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-preview-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.template-preview-brand strong {
  font-size: 15px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.template-preview-brand small {
  color: var(--document-sage);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.template-preview-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}

.template-preview-mark i {
  display: block;
  width: 8px;
  height: 28px;
  border-radius: 2px;
  background: #bd8c4d;
  transform: rotate(-8deg);
}

.template-preview-mark i:nth-child(2) {
  height: 22px;
  background: #7d512f;
}

.template-preview-mark i:nth-child(3) {
  height: 25px;
  background: var(--document-sage);
}

.template-preview-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.template-preview-title p {
  margin: 8px 0 0;
  color: var(--document-muted);
}

.template-preview-meta {
  display: grid;
  gap: 7px;
}

.template-preview-meta > div {
  padding: 10px 12px;
  border: 1px solid #c8c1b8;
  border-radius: 10px;
  background: #f4f3f1;
}

.template-preview-meta span,
.template-preview-lead > span,
.template-preview-paper dt,
.template-preview-note > strong {
  display: block;
  color: var(--document-sage);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.template-preview-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}

.template-preview-paper main {
  display: grid;
  gap: 14px;
  padding-top: 30px;
}

.template-preview-lead,
.template-preview-details,
.template-preview-note {
  border: 1px solid var(--document-line);
  border-radius: 14px;
  background: var(--document-soft);
}

.template-preview-lead {
  padding: 14px 16px;
}

.template-preview-lead h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.25;
}

.template-preview-paragraph {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.template-preview-paper dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin: 0;
  padding: 16px;
}

.template-preview-paper dl div {
  min-width: 0;
}

.template-preview-paper dd {
  margin: 4px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.template-preview-items h2 {
  margin: 4px 0 9px;
  color: var(--document-sage);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.template-preview-paper table {
  width: 100%;
  border-collapse: collapse;
}

.template-preview-paper th,
.template-preview-paper td {
  padding: 9px 10px;
  text-align: left;
}

.template-preview-paper th:not(:first-child),
.template-preview-paper td:not(:first-child) {
  white-space: nowrap;
}

.template-preview-paper th {
  background: var(--document-dark);
  color: #fffdfa;
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.template-preview-paper th:first-child {
  border-radius: 12px 0 0 0;
}

.template-preview-paper th:last-child {
  border-radius: 0 12px 0 0;
}

.template-preview-paper td {
  border-bottom: 1px solid var(--document-line);
  background: #fffefa;
}

.template-preview-paper td small {
  display: block;
  margin-top: 3px;
  color: var(--document-muted);
}

.template-preview-paper .right {
  text-align: right;
}

.template-preview-paper td.right {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.template-preview-total {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--document-line);
  border-radius: 12px;
  background: var(--document-soft);
  font-size: 13px;
}

.template-preview-total-line {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.template-preview-total-line strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.template-preview-total-final {
  margin-top: 2px;
  border-top: 1px solid var(--document-line);
  padding-top: 9px;
  font-size: 14px;
}

.template-preview-note {
  padding: 14px 16px;
}

.template-preview-note p {
  margin: 7px 0 0;
  color: var(--document-muted);
}

.template-preview-signature {
  width: 240px;
  margin: 36px 0 18px;
  border-top: 1px solid var(--document-line);
  padding-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.template-preview-paper footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  border-top: 1px solid var(--document-line);
  padding-top: 12px;
  color: var(--document-muted);
  font-size: 8px;
}

.template-preview-paper footer div {
  display: grid;
  gap: 3px;
}

.template-preview-paper footer strong {
  color: var(--document-ink);
  font-size: 9px;
}

.print-frame {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .workspace-invite-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  .workspace-invite-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .workspace-member-role-row,
  .workspace-permission-toolbar,
  .workspace-permission-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .workspace-role-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .workspace-permission-toolbar {
    gap: 10px;
  }

  .workspace-permission-row {
    gap: 10px;
    padding: 14px 0;
  }

  .workspace-catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .workspace-catalog-toolbar .btn {
    align-self: flex-start;
  }

  .workspace-catalog-item {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .document-logo-editor {
    grid-template-columns: 1fr;
  }

  .document-template-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .document-template-card-head .cluster {
    display: grid;
    grid-template-columns: 1fr;
  }

  .document-template-block-head {
    grid-template-columns: 1fr;
  }

  .document-template-block-head .btn {
    justify-self: start;
  }

  .document-template-preview-shell {
    padding: 10px;
  }

  .template-preview-paper {
    min-height: 680px;
    padding: 20px;
  }

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

  .document-template-live-preview .template-preview-hero,
  .document-template-live-preview .template-preview-identity {
    grid-template-columns: 1fr;
  }

  .template-preview-hero {
    gap: 18px;
  }

  .template-preview-paper dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .document-template-live-layout {
    grid-template-columns: 1fr;
  }

  .document-template-live-preview {
    position: static;
  }
}

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

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

.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: 12px;
}

.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: 11px;
  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: 10px;
  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: 25px;
}

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

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

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

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

.trial-campaign-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  padding: 17px 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(210, 147, 99, 0.26), transparent 17rem),
    linear-gradient(135deg, #203d31, #17251f);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.trial-campaign-banner::after {
  content: "";
  position: absolute;
  right: 25%;
  bottom: -54px;
  width: 130px;
  height: 130px;
  border: 22px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  pointer-events: none;
}

.trial-campaign-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  color: #e0a47d;
}

.trial-campaign-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.trial-campaign-copy > span {
  display: block;
  margin-bottom: 3px;
  color: #e0a47d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trial-campaign-copy > strong {
  display: block;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
}

.trial-campaign-copy p {
  margin: 3px 0 0;
  font-size: 13px;
}

.trial-campaign-action {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 8px;
}

.trial-campaign-action > strong {
  grid-row: 1 / 3;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 27px;
  letter-spacing: -0.05em;
}

.trial-campaign-action > span {
  align-self: end;
  font-size: 11px;
  font-weight: 700;
}

.trial-campaign-action .btn {
  grid-column: 3;
  grid-row: 1 / 3;
  margin-left: 6px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.trial-offer-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  align-items: center;
  gap: 38px;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
  padding: 30px 88px 30px 30px;
  background:
    radial-gradient(circle at 92% 18%, rgba(217, 146, 99, 0.22), transparent 18rem),
    linear-gradient(140deg, #1d382d, #111d18);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
}

.trial-offer-card::before {
  content: "";
  position: absolute;
  right: -75px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border: 44px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
}

.trial-offer-copy,
.trial-offer-price {
  position: relative;
  z-index: 1;
}

.trial-offer-kicker {
  display: inline-flex;
  margin-bottom: 11px;
  border: 1px solid rgba(224, 164, 125, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(224, 164, 125, 0.1);
  color: #e0a47d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trial-offer-copy h2 {
  max-width: 680px;
  margin: 0 0 8px;
  color: #fff;
  font-size: 25px;
  line-height: 1.25;
}

.trial-offer-copy p {
  max-width: 680px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.trial-offer-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.trial-offer-terms span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 700;
}

.trial-offer-price {
  display: grid;
  justify-items: end;
  text-align: right;
}

.trial-offer-price > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trial-offer-price s {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 14px;
}

.trial-offer-price > strong {
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 31px;
  letter-spacing: -0.05em;
}

.trial-offer-price small {
  margin: 2px 0 15px;
  font-size: 11px;
}

.trial-offer-price .btn {
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.trial-offer-discount {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  display: grid;
  width: 68px;
  height: 68px;
  place-content: center;
  border-radius: 0 0 0 18px;
  background: var(--accent);
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.trial-offer-discount small {
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: start;
  gap: 24px;
}

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

.campaign-rules > div {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: var(--surface-2);
}

.campaign-rules span,
.campaign-rules strong {
  display: block;
}

.campaign-rules span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}

.campaign-rules strong {
  font-size: 13px;
}

.campaign-preview {
  position: sticky;
  top: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px;
  background: var(--surface-2);
}

.campaign-preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 3px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.campaign-preview-label strong {
  color: var(--green);
  font-size: 9px;
}

.campaign-preview-card {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(224, 164, 125, 0.22), transparent 12rem),
    var(--sidebar);
  color: rgba(255, 255, 255, 0.68);
}

.campaign-preview-kicker {
  color: #e0a47d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.campaign-preview-card > strong {
  display: block;
  margin: 9px 0 7px;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  line-height: 1.25;
}

.campaign-preview-card p {
  min-height: 60px;
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 1.55;
}

.campaign-preview-offer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.campaign-preview-offer strong {
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.campaign-preview-offer span {
  font-size: 10px;
  line-height: 1.3;
}

.campaign-preview-card .btn {
  width: 100%;
  pointer-events: none;
}

.campaign-checkout-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid #cee2d5;
  border-radius: 12px;
  padding: 16px;
  background: var(--green-soft);
}

.campaign-checkout-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
}

.campaign-checkout-summary span,
.campaign-checkout-summary strong,
.campaign-checkout-summary small {
  display: block;
}

.campaign-checkout-summary span,
.campaign-checkout-summary small {
  color: var(--muted);
  font-size: 12px;
}

.campaign-checkout-summary strong {
  color: var(--green-dark);
  font-family: "Manrope", sans-serif;
  font-size: 27px;
}

/* 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: 11px;
  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: 12px;
  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: 17px;
  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: 11px;
  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: 14px;
}

.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: 10px;
}

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

/* 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: 19px;
}

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

.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);
}

.modal.support-ticket-modal {
  display: grid;
  width: min(1120px, calc(100vw - 40px));
  height: min(88vh, 860px);
  max-height: 860px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.support-ticket-modal .modal-header {
  position: static;
}

.support-ticket-modal .modal-body {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.support-workspace {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 292px;
}

.support-conversation {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--surface);
}

.support-requester-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 13px 17px;
  background: rgba(255, 255, 255, 0.88);
}

.support-requester-bar > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.support-requester-bar > div:nth-child(2) > strong,
.support-requester-bar > div:nth-child(2) > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-requester-bar > div:nth-child(2) > strong {
  font-size: 14px;
}

.support-requester-bar > div:nth-child(2) > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.support-requester-bar a,
.support-details a {
  color: var(--green);
  font-weight: 700;
}

.support-thread {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 18px 28px;
  background: color-mix(in srgb, var(--surface-2) 72%, #fff);
  scrollbar-gutter: stable;
}

.support-thread-empty {
  display: grid;
  min-height: 100%;
  place-content: center;
  justify-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.support-thread-empty > span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--green);
}

.support-thread-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.support-thread-empty p {
  max-width: 34ch;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.support-message {
  display: flex;
  width: fit-content;
  max-width: min(82%, 650px);
  align-items: flex-start;
  gap: 10px;
}

.support-message + .support-message {
  margin-top: 18px;
}

.support-message.agent {
  margin-left: auto;
  flex-direction: row-reverse;
}

.support-message.internal {
  width: 100%;
  max-width: 100%;
}

.support-message > .avatar {
  margin-top: 2px;
}

.support-note-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border: 1px solid #e7d6ac;
  border-radius: 50%;
  background: var(--amber-soft);
  color: #7a571a;
}

.support-message-bubble {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px 13px 13px;
  padding: 11px 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(27, 42, 34, 0.04);
}

.support-message.agent .support-message-bubble {
  border-color: #c9ddd1;
  border-radius: 13px 4px 13px 13px;
  background: var(--green-soft);
}

.support-message.internal .support-message-bubble {
  width: 100%;
  border-color: #e7d6ac;
  border-style: dashed;
  border-radius: 10px;
  background: color-mix(in srgb, var(--amber-soft) 72%, #fff);
}

.support-message-bubble > header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.support-message-bubble > header strong {
  color: var(--ink);
  font-size: 12px;
}

.support-message-bubble > header span,
.support-message-bubble > header time {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.support-message-bubble > header span::before {
  content: "·";
  margin-right: 6px;
}

.support-message-bubble > header time {
  margin-left: auto;
  white-space: nowrap;
}

.support-message-bubble p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.support-message-attachments,
.support-draft-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.support-attachment {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

button.support-attachment {
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.support-attachment.downloadable:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.support-attachment > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.support-attachment strong {
  overflow: hidden;
  max-width: 210px;
  color: var(--ink-2);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-attachment small {
  color: var(--muted);
  font-size: 10px;
}

.support-attachment > button {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.support-composer {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 13px 16px 14px;
  background: #fff;
}

.support-composer.internal-mode {
  background: color-mix(in srgb, var(--amber-soft) 38%, #fff);
}

.support-composer.internal-mode textarea {
  border-color: #d8bd80;
  background: #fffdf8;
}

.support-composer-head,
.support-composer-actions,
.support-composer-tools,
.support-reply-modes {
  display: flex;
  align-items: center;
}

.support-composer-head,
.support-composer-actions {
  justify-content: space-between;
  gap: 12px;
}

.support-composer-tools {
  gap: 10px;
}

.support-composer-tools > span {
  color: var(--muted);
  font-size: 10px;
}

.support-reply-modes {
  gap: 4px;
  border-radius: 8px;
  padding: 3px;
  background: var(--surface-2);
}

.support-reply-modes button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.support-reply-modes button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(27, 42, 34, 0.1);
}

.support-template {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.support-template select {
  min-height: 30px;
  appearance: none;
  padding: 5px 28px 5px 9px;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
}

.support-template > .icon {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

.support-composer textarea {
  min-height: 78px;
  max-height: 150px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.55;
}

.support-draft-attachments {
  margin-top: 0;
}

.support-ticket-sidebar {
  min-width: 0;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
}

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

.support-ticket-sidebar > section {
  display: grid;
  gap: 13px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.support-ticket-sidebar h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 13px;
}

.support-ticket-sidebar .field-label {
  font-size: 11px;
}

.support-ticket-sidebar select {
  min-height: 36px;
  font-size: 12px;
}

.support-details {
  display: grid;
  gap: 0;
  margin: 0;
}

.support-details > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
  font-size: 11px;
}

.support-details > div:last-child {
  border-bottom: 0;
}

.support-details dt {
  color: var(--muted);
}

.support-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-weight: 700;
}

.support-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.support-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.support-sidebar-action .btn {
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .support-attachment.downloadable:hover {
    border-color: #b9d2c4;
    background: #fff;
    color: var(--green-dark);
  }
}

@media (max-width: 900px) {
  .modal.support-ticket-modal {
    width: min(100%, calc(100vw - 16px));
    height: min(94vh, 900px);
    max-height: 94vh;
  }

  .support-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .support-ticket-sidebar {
    display: block;
    max-height: none;
    grid-row: 1;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .support-sidebar-toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 8px 14px;
    background: var(--surface-2);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
  }

  .support-sidebar-toggle > span {
    display: grid;
    gap: 1px;
  }

  .support-sidebar-toggle strong {
    font-size: 12px;
  }

  .support-sidebar-toggle small {
    color: var(--muted);
    font-size: 10px;
  }

  .support-sidebar-toggle > .icon {
    transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .support-ticket-sidebar.expanded {
    max-height: min(42vh, 360px);
    overflow: auto;
  }

  .support-ticket-sidebar.expanded .support-sidebar-toggle > .icon {
    transform: rotate(180deg);
  }

  .support-ticket-sidebar > section {
    display: none;
    align-content: start;
    border-bottom: 1px solid var(--line);
  }

  .support-ticket-sidebar.expanded > section {
    display: grid;
  }

  .support-conversation {
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .overlay:has(.support-ticket-modal) {
    padding: 4px;
  }

  .modal.support-ticket-modal {
    width: 100%;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
    border-radius: 12px;
  }

  .support-requester-bar {
    padding: 10px 12px;
  }

  .support-thread {
    padding: 16px 11px 22px;
  }

  .support-message {
    max-width: 94%;
  }

  .support-composer {
    padding: 10px 11px;
  }

  .support-composer .admin-settings-note {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-composer-head {
    align-items: stretch;
    flex-direction: column;
  }

  .support-template,
  .support-template select {
    width: 100%;
  }

  .support-composer-actions {
    align-items: flex-end;
  }

  .support-composer-tools > span {
    display: none;
  }
}

@media (max-height: 620px) {
  .modal.support-ticket-modal {
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
  }

  .support-ticket-modal .modal-header {
    padding-block: 9px;
  }

  .support-ticket-modal .modal-header p {
    display: none;
  }

  .support-requester-bar {
    padding-block: 2px;
  }

  .support-requester-bar > .avatar {
    width: 24px;
    height: 24px;
    font-size: 9px;
  }

  .support-requester-bar > div:nth-child(2) > span {
    display: none;
  }

  .support-sidebar-toggle {
    min-height: 32px;
    padding-block: 2px;
  }

  .support-thread {
    padding-block: 10px;
  }

  .support-composer {
    gap: 4px;
    max-height: 58vh;
    overflow-y: auto;
    padding-block: 4px;
  }

  .support-draft-attachments {
    max-height: 40px;
    overflow-y: auto;
  }

  .support-composer-head {
    align-items: center;
    flex-direction: row;
  }

  .support-template,
  .support-template select {
    width: auto;
  }

  .support-composer-actions {
    align-items: center;
  }

  .support-composer textarea {
    min-height: 32px;
    max-height: 40px;
  }
}

@media (max-width: 520px) and (max-height: 620px) {
  .support-composer {
    max-height: 52vh;
    overflow-y: auto;
  }

  .support-composer-head {
    align-items: stretch;
    flex-direction: column;
  }

  .support-reply-modes {
    width: 100%;
  }

  .support-reply-modes button {
    min-width: 0;
    flex: 1;
    justify-content: center;
  }

  .support-template,
  .support-template select {
    width: 100%;
  }

  .support-draft-attachments {
    max-height: 64px;
    overflow-y: auto;
  }
}

.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: 16px;
}

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

.command-group-label {
  padding: 8px 8px 5px;
  color: var(--muted);
  font-size: 10px;
  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: 13px;
}

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

.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: 10px;
}

.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: 10px;
  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: 12px;
  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: 19px;
}

.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-item > .notification-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  align-self: start;
  flex: 0 0 32px;
  margin: 0;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1;
}

.notification-item > .notification-icon .icon {
  display: block;
}

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

.notification-item > div > strong {
  padding-right: 15px;
  font-size: 13px;
}

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

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

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

.toast {
  display: grid;
  min-height: 76px;
  grid-template-columns: 36px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  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: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

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

.toast > div {
  min-width: 0;
}

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

.toast > div strong {
  font-size: 15px;
  line-height: 1.3;
}

.toast > div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.toast button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  align-self: center;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

/* Operational readability */
:root {
  --sidebar-width: 276px;
  --topbar-height: 72px;
}

body {
  font-size: 17px;
}

.btn {
  min-height: 44px;
  padding: 10px 15px;
  font-size: 16px;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 15px;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 20px;
  font-size: 18px;
}

.btn-icon,
.icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
}

.panel-header h2,
.panel-header h3 {
  font-size: 19px;
}

.panel-header p,
.panel-link {
  font-size: 15px;
}

.eyebrow {
  font-size: 14px;
}

.status-badge {
  min-height: 29px;
  padding: 5px 10px;
  font-size: 14px;
}

.progress-wrap > span {
  font-size: 14px;
}

.field-label {
  font-size: 15px;
}

.form-field small {
  font-size: 14px;
}

input,
select,
textarea {
  min-height: 46px;
  padding: 11px 13px;
  font-size: 16px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 19px;
  min-height: 19px;
}

.select-wrap select {
  min-height: 42px;
  padding: 8px 36px 8px 12px;
  font-size: 15px;
}

.toggle {
  width: 44px;
  height: 26px;
}

.toggle::after {
  width: 22px;
  height: 22px;
}

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

.public-links a {
  font-size: 16px;
}

.problem-item p,
.feature-item p,
.industry-card p,
.integration-card p,
.faq-answer,
.price-description {
  font-size: 16px;
}

.footer-brand p,
.footer-column a,
.comparison-table th,
.comparison-table td {
  font-size: 15px;
}

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

.workflow-step small {
  font-size: 14px;
}

.workspace-switcher {
  min-height: 54px;
  padding: 10px;
}

.workspace-icon {
  width: 36px;
  height: 36px;
}

.workspace-icon .icon {
  display: block;
  width: 19px;
  height: 19px;
}

.workspace-switcher > .icon:last-child {
  display: block;
  width: 16px;
  height: 16px;
}

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

.workspace-switcher small {
  font-size: 14px;
}

.nav-group-title {
  margin-bottom: 7px;
  font-size: 14px;
}

.nav-item {
  min-height: 46px;
  gap: 12px;
  padding: 10px 11px;
  font-size: 16px;
  line-height: 1.2;
}

.nav-item-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke-width: 1.9;
}

.nav-item > span:not(.nav-count) {
  display: flex;
  min-height: 20px;
  align-items: center;
}

.nav-count {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sidebar-footer {
  flex: 0 0 auto;
  padding: 12px;
  background: var(--sidebar);
}

.onboarding-mini {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px;
}

.onboarding-mini-top {
  margin-bottom: 9px;
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-user {
  width: 100%;
  min-height: 56px;
  border: 1px solid transparent;
  padding: 9px 10px;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.sidebar-user .avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.sidebar-user > .icon:last-child {
  width: 16px;
  height: 16px;
}

.sidebar-user strong {
  font-size: 16px;
  line-height: 1.3;
}

.sidebar-user small {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
}

.breadcrumb {
  font-size: 15px;
}

.topbar-search {
  height: 44px;
  padding: 0 12px;
}

.topbar-search span {
  font-size: 15px;
}

.shortcut {
  height: 24px;
  font-size: 13px;
}

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

.app-main {
  padding: 30px 32px 56px;
}

.page-header {
  margin-bottom: 26px;
}

.page-heading h1 {
  font-size: 32px;
}

.page-heading > p {
  font-size: 16px;
}

.back-link {
  font-size: 15px;
}

.section-header h2 {
  font-size: 20px;
}

.section-header p {
  font-size: 15px;
}

.metric-card {
  padding: 18px;
}

.metric-top {
  font-size: 14px;
}

.metric-card > strong {
  margin: 9px 0 6px;
  font-size: 28px;
}

.metric-foot {
  font-size: 13px;
}

.chart-labels,
.bar-label,
.bar-label strong,
.chart-legend > div,
.donut-center span {
  font-size: 14px;
}

.quick-list-item {
  min-height: 60px;
  padding: 13px 20px;
}

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

.quick-list-item small,
.quick-list-item time,
.quick-list-item > span:last-child {
  font-size: 13px;
}

.capacity-person span,
.capacity-row > strong {
  font-size: 14px;
}

.tab {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 15px;
}

.tab > span {
  height: 20px;
  font-size: 12px;
}

.table-toolbar {
  min-height: 64px;
  padding: 10px 14px;
}

.table-search {
  width: min(300px, 30vw);
  height: 42px;
  padding: 0 11px;
}

.table-search input {
  min-height: 38px;
  font-size: 15px;
}

.selected-count,
.table-footer {
  font-size: 14px;
}

.data-table-card th {
  height: 44px;
  padding: 0 13px;
  font-size: 13px;
}

.data-table-card td {
  height: 58px;
  padding: 10px 13px;
  font-size: 15px;
}

.table-primary strong,
.table-person > div > strong {
  font-size: 15px;
}

.table-primary span,
.table-secondary,
.table-person > div > span {
  font-size: 13px;
}

.table-cell-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.table-footer {
  min-height: 52px;
}

.pagination button,
.pagination span {
  width: 36px;
  height: 36px;
}

.record-title h1 {
  font-size: 27px;
}

.record-meta {
  font-size: 14px;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.kv {
  padding: 12px 0;
  font-size: 15px;
}

.summary-item {
  padding: 18px;
}

.summary-item > span {
  font-size: 14px;
}

.summary-item > strong {
  font-size: 20px;
}

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

.timeline-top time,
.timeline-item > div > span,
.timeline-item p {
  font-size: 13px;
}

.note-card,
.alert-banner,
.state-panel p {
  font-size: 15px;
}

.state-panel h3 {
  font-size: 19px;
}

.view-switcher button {
  min-height: 38px;
  padding: 7px 11px;
  font-size: 14px;
}

.kanban-column-header strong,
.production-stage h3 {
  font-size: 14px;
}

.kanban-column-header span,
.production-stage h3 span {
  font-size: 13px;
}

.kanban-card > strong,
.production-card > strong {
  font-size: 15px;
}

.kanban-card > p,
.kanban-card-footer,
.production-card > span,
.production-card-meta {
  font-size: 13px;
}

.line-items {
  overflow-x: auto;
}

.line-item-head {
  font-size: 12px;
}

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

.line-item-name small {
  font-size: 13px;
}

.line-item-row input,
.line-item-row select {
  min-height: 40px;
  font-size: 14px;
}

.quote-total-row {
  font-size: 15px;
}

.preview-toolbar,
.doc-addresses strong,
.doc-total > div:last-child {
  font-size: 13px;
}

.doc-number,
.doc-addresses p,
.doc-table th,
.doc-table td,
.doc-total > div,
.doc-footer-note {
  font-size: 11px;
}

.operation-name strong,
.operation-cell strong {
  font-size: 15px;
}

.operation-name span,
.operation-cell span {
  font-size: 13px;
}

.operation-index {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.machine-card h3,
.service-card h3 {
  font-size: 17px;
}

.machine-card > p,
.service-stats span,
.service-stats strong {
  font-size: 14px;
}

.workshop-user span,
.workshop-label,
.workshop-timer > span,
.timer-status {
  font-size: 14px;
}

.workshop-greeting h1 {
  font-size: 32px;
}

.workshop-task h2 {
  font-size: 33px;
}

.workshop-spec span,
.shop-task-row span,
.qr-card p {
  font-size: 14px;
}

.workshop-spec strong,
.shop-task-row strong {
  font-size: 16px;
}

.settings-nav button {
  min-height: 44px;
  padding: 9px 11px;
  font-size: 15px;
}

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

.setting-row span,
.provider-card span {
  font-size: 14px;
}

.permission-table th,
.permission-table td {
  font-size: 13px;
}

.permission-chip {
  min-width: 62px;
  min-height: 30px;
  align-items: center;
  font-size: 13px;
}

.admin-environment,
.system-health {
  font-size: 13px;
}

.modal-header h2,
.notification-header h2 {
  font-size: 22px;
}

.modal-header p {
  font-size: 15px;
}

.modal-close {
  width: 40px;
  height: 40px;
}

.command-group-label,
.dropdown-label {
  font-size: 12px;
}

.command-item {
  min-height: 52px;
  padding: 10px;
}

.command-item strong,
.notification-item > div > strong,
.toast > div strong {
  font-size: 15px;
}

.command-item span,
.command-item > small,
.notification-item > div > span,
.notification-item > div > time,
.toast > div span,
.command-footer {
  font-size: 13px;
}

.dropdown button,
.dropdown a {
  min-height: 42px;
  padding: 9px 11px;
  font-size: 15px;
}

button.notification-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.toast {
  padding: 16px;
}

.data-table-card tr[data-bom-hidden="true"] {
  display: none;
}

/* Responsive */
@media (hover: hover) and (pointer: fine) {
  .sidebar-scroll:hover {
    scrollbar-color: rgba(174, 199, 186, 0.78) rgba(255, 255, 255, 0.045);
  }

  .sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(174, 199, 186, 0.78);
    background-clip: padding-box;
  }

  .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: 258px;
  }

  .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: 53px;
  }

  .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: 38px;
  }

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

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

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

  .demo-tour-sidebar .workflow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

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

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

  .hero-copy h1 {
    font-size: clamp(40px, calc(12vw + 2px), 56px);
  }

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

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

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

  .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;
  }

  .kvikk-registration {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 26px;
  }

  .kvikk-actions .btn {
    width: 100%;
  }

  .feature-grid-dynamic,
  .demo-tour-layout,
  .metrics-grid.demo-tour-metrics,
  .demo-tour-sidebar .workflow-steps {
    grid-template-columns: 1fr;
  }

  .demo-tour-sidebar,
  .demo-tour-content {
    padding: 22px;
  }

  .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: 64px;
    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: 44px;
    padding: 0;
  }

  .app-main {
    padding: 22px 14px 44px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 28px;
  }

  .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: 23px;
  }

  .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: 24px;
  }

  .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 {
    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: 28px;
  }

  .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;
  }

  .trial-campaign-banner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .trial-campaign-action {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-left: 54px;
  }

  .trial-offer-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 25px 76px 25px 24px;
  }

  .trial-offer-price {
    justify-items: start;
    text-align: left;
  }

  .campaign-form-layout {
    grid-template-columns: 1fr;
  }

  .campaign-preview {
    position: static;
  }

  .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) {
  .admin-shell .admin-environment {
    display: none;
  }

  .admin-auth-steps {
    margin-top: 26px;
  }

  .admin-demo-code strong {
    font-size: 24px;
    letter-spacing: 0.16em;
  }

  .admin-profile-hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-profile-hero > .status-badge {
    margin-left: 51px;
  }

  .admin-profile-modal .modal-footer,
  .admin-settings-modal .modal-footer,
  .admin-message-modal .modal-footer,
  .admin-flag-modal .modal-footer,
  .campaign-modal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-profile-modal .modal-footer .btn,
  .admin-settings-modal .modal-footer .btn,
  .admin-message-modal .modal-footer .btn,
  .admin-flag-modal .modal-footer .btn,
  .campaign-modal .modal-footer .btn {
    width: 100%;
  }

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

  .public-actions .btn {
    width: 44px;
    padding: 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .topbar-search .shortcut,
  .topbar-search span {
    display: none;
  }

  .topbar-search {
    width: 44px;
    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%;
  }

  .chart-main {
    width: calc(100vw - 70px);
    max-width: 100%;
    grid-template-columns: 14px 30px minmax(0, 1fr);
    column-gap: 6px;
  }

  .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;
  }

  .onboarding-skip-options {
    grid-template-columns: 1fr 1fr;
  }

  .onboarding-skip-options strong,
  .onboarding-skip-options > span {
    grid-column: 1 / -1;
  }

  .onboarding-skip-options .btn {
    grid-row: 3;
    width: 100%;
  }

  .trial-campaign-action {
    margin-left: 0;
  }

  .trial-campaign-action .btn {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    margin: 10px 0 0;
  }

  .trial-offer-card {
    padding: 24px 68px 24px 20px;
  }

  .trial-offer-copy h2 {
    font-size: 22px;
  }

  .trial-offer-price > strong {
    font-size: 27px;
  }

  .campaign-rules {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}

@media (max-width: 760px) {
  .footer-column a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
  }
}
