:root {
  --bg: #ffffff;
  --card: #fff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --danger: #dc2626;
  --border: #e5e7eb;
  --radius: 12px;
  --control-radius: 8px;
  --accent: #7c3aed;
  --accent-soft: #f3e8ff;
  --accent-soft-hover: #ede9fe;
  --accent-soft-strong: #ddd6fe;
  --surface-hover: rgba(124, 58, 237, 0.06);
  --danger-soft: rgba(220, 38, 38, 0.08);
  --danger-soft-hover: rgba(220, 38, 38, 0.14);
  --font-sans: "PingFang SC", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-mono: Monaco, "SF Mono", Menlo, Consolas, monospace;
  --control-font-size: 0.875rem;
  --btn-font-size: 0.875rem;
  --btn-font-size-sm: 0.8125rem;
  --btn-font-weight: 600;
  --btn-padding-y: 0.5rem;
  --btn-padding-x: 0.875rem;
  --btn-padding-y-sm: 0.375rem;
  --btn-padding-x-sm: 0.75rem;
  --btn-min-height: 2.25rem;
  --btn-min-height-sm: 2rem;
}
* { box-sizing: border-box; }
html {
  font-family: var(--font-sans);
}
body {
  margin: 0;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: var(--control-font-size);
  overflow-x: hidden;
  max-width: 100vw;
}
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 50;
  overflow: visible;
}
.header-soho-walker {
  position: absolute;
  z-index: 55;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: left, top;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .15));
}
.header-soho-walker-leg--left {
  transform-origin: 17px 22px;
  animation: header-soho-step 0.52s ease-in-out infinite;
}
.header-soho-walker-leg--right {
  transform-origin: 35px 22px;
  animation: header-soho-step 0.52s ease-in-out infinite reverse;
}
.header-soho-walker-arm--left {
  transform-origin: 8px 14px;
  animation: header-soho-arm 0.52s ease-in-out infinite reverse;
}
.header-soho-walker-arm--right {
  transform-origin: 44px 14px;
  animation: header-soho-arm 0.52s ease-in-out infinite;
}
.header-soho-walker.is-waving .header-soho-walker-leg--left,
.header-soho-walker.is-waving .header-soho-walker-leg--right {
  animation: none;
  transform: rotate(0deg);
}
.header-soho-walker.is-waving .header-soho-walker-arm--left,
.header-soho-walker.is-waving .header-soho-walker-arm--right {
  animation: none;
  transform: rotate(12deg);
}
.header-soho-walker.is-waving .header-soho-walker-arm--right {
  animation: header-soho-wave 0.5s ease-in-out infinite;
}
@keyframes header-soho-step {
  0%, 100% { transform: rotate(-22deg); }
  50% { transform: rotate(24deg); }
}
@keyframes header-soho-arm {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-20deg); }
}
@keyframes header-soho-wave {
  0%, 100% { transform: rotate(12deg); }
  50% { transform: rotate(-58deg); }
}
@media (prefers-reduced-motion: reduce) {
  .header-soho-walker { display: none !important; }
}
.site-header-start {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.page-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.page-back-link:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
}
.logo-soho { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; }
.logo-byline { font-size: 0.72rem; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; }
.logo-hero { margin: 0 0 0.5rem; }
.logo-hero .logo-soho { font-size: 2.25rem; }
.logo-hero .logo-byline { font-size: 0.95rem; }
.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.header-nav > a {
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-nav > a:hover { color: var(--primary); }
.nav-icon-btn {
  min-width: 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}
.nav-icon-btn::after {
  display: none !important;
}
.nav-dropdown--settings .nav-dropdown-menu--settings,
.nav-dropdown--user-menu .nav-dropdown-menu--user {
  min-width: 12.5rem;
}
.nav-dropdown-heading {
  margin: 0;
  padding: .35rem .85rem .15rem;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-dropdown-divider {
  height: 1px;
  margin: .35rem 0;
  background: var(--border);
}
.nav-dropdown-item--nested {
  padding-left: 1.25rem;
  font-size: .8125rem;
}
.nav-dropdown-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  cursor: pointer;
  font: inherit;
}
.nav-dropdown-submenu-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .15s ease;
}
.nav-dropdown-submenu.is-open .nav-dropdown-submenu-chevron {
  transform: rotate(90deg);
}
.nav-dropdown-submenu-panel[hidden] {
  display: none !important;
}
.nav-dropdown-account-meta {
  padding: .5rem 1.25rem .65rem;
  border-bottom: 1px solid var(--border);
}
.nav-dropdown-account-line {
  margin: 0;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--primary);
}
.nav-dropdown-account-line + .nav-dropdown-account-line {
  margin-top: .2rem;
}
.app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 4.5rem);
}
.app-shell--plain {
  display: block;
  min-height: auto;
}
.app-main {
  flex: 1;
  min-width: 0;
}
.seller-sidebar {
  --sidebar-width: 13.5rem;
  --sidebar-collapsed-width: 4.25rem;
  flex-shrink: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--border);
  transition: width .2s ease;
  overflow: hidden;
}
.seller-sidebar.is-collapsed {
  width: var(--sidebar-collapsed-width);
  overflow: visible;
  z-index: 200;
}
.seller-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .85rem .55rem;
  flex: 1;
}
.seller-sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
}
.seller-sidebar-link:hover {
  color: var(--primary);
  background: var(--surface-hover);
}
.seller-sidebar-link.is-active {
  color: var(--primary);
  background: var(--accent-soft-hover);
}
.seller-nav-icon {
  flex-shrink: 0;
}
.seller-sidebar-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.seller-sidebar.is-collapsed .seller-sidebar-label {
  display: none;
}
.seller-sidebar.is-collapsed .seller-sidebar-link {
  justify-content: center;
  padding-left: .5rem;
  padding-right: .5rem;
}
.seller-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: .55rem;
  padding: .55rem;
  border: none;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.seller-sidebar-toggle:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.seller-sidebar.is-collapsed .seller-sidebar-toggle {
  margin-left: auto;
  margin-right: auto;
}
.seller-sidebar-toggle-icon--expand {
  display: none;
}
.seller-sidebar.is-collapsed .seller-sidebar-toggle-icon--collapse {
  display: none;
}
.seller-sidebar.is-collapsed .seller-sidebar-toggle-icon--expand {
  display: block;
}
.seller-sidebar [data-sidebar-tooltip] {
  position: relative;
}
.seller-sidebar [data-sidebar-tooltip]::after {
  content: attr(data-sidebar-tooltip);
  position: absolute;
  left: calc(100% + .5rem);
  top: 50%;
  transform: translateY(-50%);
  padding: .35rem .6rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--card);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, visibility .12s ease;
  z-index: 250;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
}
.seller-sidebar.is-collapsed [data-sidebar-tooltip]:hover::after,
.seller-sidebar.is-collapsed [data-sidebar-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
.has-seller-shell .container {
  max-width: none;
}
@media (max-width: 768px) {
  .seller-sidebar {
    --sidebar-width: 4.25rem;
    overflow: visible;
    z-index: 200;
  }
  .seller-sidebar .seller-sidebar-label {
    display: none;
  }
  .seller-sidebar .seller-sidebar-link {
    justify-content: center;
  }
  .seller-sidebar .seller-sidebar-toggle {
    justify-content: center;
  }
  .seller-sidebar [data-sidebar-tooltip]:hover::after,
  .seller-sidebar [data-sidebar-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
  }
}
.nav-btn,
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 500;
  padding: .45rem .9rem;
  border: none;
  border-radius: var(--control-radius);
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
  user-select: none;
  line-height: 1.25;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 7.25rem;
  min-height: 2.125rem;
  transition: background .15s ease, color .15s ease;
}
.nav-btn {
  text-decoration: none;
  cursor: pointer;
}
.nav-btn::after {
  content: "";
  display: inline-block;
  width: .35rem;
  height: .35rem;
  margin-left: .45rem;
  flex-shrink: 0;
  visibility: hidden;
}
.nav-btn:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.nav-dropdown {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  min-width: 7.25rem;
}
.nav-dropdown-trigger {
  cursor: pointer;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  width: 100%;
}
.nav-dropdown-trigger::after {
  content: "";
  display: inline-block;
  width: .35rem;
  height: .35rem;
  margin-left: .45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  flex-shrink: 0;
}
.nav-dropdown.is-open > .nav-dropdown-trigger {
  color: var(--primary);
  background: var(--accent-soft-hover);
}
.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  min-width: 11rem;
  padding: .35rem 0;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 32px rgba(15, 23, 42, .12);
  z-index: 300;
  overflow: hidden;
}
.nav-dropdown-menu[hidden] {
  display: none !important;
}
.nav-dropdown.is-open > .nav-dropdown-menu:not([hidden]) {
  display: flex;
}
.nav-dropdown-item {
  display: block;
  width: 100%;
  padding: .5rem .9rem;
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  white-space: nowrap;
  text-align: left;
  border: none;
  background: transparent;
  box-sizing: border-box;
}
.nav-dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--primary);
}
.nav-dropdown-item.active {
  background: transparent;
  color: var(--text);
  font-weight: 600;
}
.container {
  max-width: 1100px;
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 1.5rem;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.site-footer { text-align: center; color: var(--muted); padding: 2rem; font-size: .875rem; }
.card {
  background: transparent;
  border: none;
  border-radius: var(--radius);
  padding: 1.15rem 0;
  margin-bottom: 1rem;
  max-width: 100%;
  min-width: 0;
  box-shadow: none;
}
.card.columns-panel,
.columns-panel.card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0;
  box-shadow: none;
}
.container > .card:not(.card-table):not(.columns-panel) {
  background: transparent;
  padding: 1.25rem 0;
  border-radius: 0;
}
.card-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.card-panel {
  position: relative;
  padding-top: 2.75rem;
}
.card-back-link {
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  border-radius: 8px;
}
.card-back-link:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2.25rem; margin-bottom: .5rem; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  min-height: var(--btn-min-height);
  border-radius: var(--control-radius);
  border: none;
  background: var(--accent-soft);
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  line-height: 1.25;
  transition: background .15s ease, color .15s ease;
  box-shadow: none;
}
.btn:hover {
  background: var(--accent-soft-hover);
  color: var(--primary-hover);
}
.btn-secondary {
  background: transparent;
  color: var(--muted);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.btn-danger {
  background: transparent;
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-soft-hover);
  color: var(--danger);
}
.btn-sm {
  padding: var(--btn-padding-y-sm) var(--btn-padding-x-sm);
  min-height: var(--btn-min-height-sm);
  font-size: var(--btn-font-size-sm);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: none;
}
.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--primary-hover);
}
.btn:disabled,
.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.grid-2 > .card {
  padding: 1.15rem 0;
  background: transparent;
  border-radius: 0;
}
.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 5.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}
.feature-card strong {
  display: block;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.35;
  transition: color .25s ease;
}
.feature-desc {
  margin: 0;
  font-size: .875rem;
  line-height: 1.5;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(.5rem);
  transition: max-height .4s ease, opacity .3s ease, transform .35s ease, margin-top .3s ease;
}
@media (hover: hover) {
  .feature-card:hover,
  .feature-card:focus-within {
    justify-content: flex-start;
    background: var(--accent-soft);
    transform: none;
  }
  .feature-card:hover strong,
  .feature-card:focus-within strong {
    color: var(--primary);
  }
  .feature-card:hover .feature-desc,
  .feature-card:focus-within .feature-desc {
    max-height: 12rem;
    opacity: 1;
    transform: translateY(0);
    margin-top: .65rem;
  }
}
@media (hover: none) {
  .feature-card {
    justify-content: flex-start;
  }
  .feature-desc {
    max-height: none;
    opacity: 1;
    transform: none;
    margin-top: .65rem;
  }
}
.form-hint { margin: .35rem 0 0; font-size: .8125rem; }
label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
input, select, textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-scroll > table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
th, td { border: 1px solid var(--border); padding: .5rem .65rem; text-align: left; }
th { background: #f1f5f9; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-success { background: #ecfdf5; color: #065f46; }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; background: #e2e8f0; }
.badge-draft { margin-left: .4rem; background: #fef3c7; color: #92400e; vertical-align: middle; }
.quote-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: .85rem 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.quote-status-track {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.quote-status-step {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border-radius: var(--control-radius);
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-hover);
  border: none;
}
.quote-status-step.is-current {
  color: var(--primary);
  background: var(--accent-soft-hover);
  border: none;
}
.quote-status-step.is-complete {
  color: #065f46;
  background: rgba(16, 185, 129, 0.12);
  border: none;
}
.quote-status-step--draft.is-current { color: #92400e; background: rgba(245, 158, 11, 0.14); border: none; }
.quote-status-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.quote-status-badge--draft { background: #fef3c7; color: #92400e; }
.quote-status-badge--saved { background: #dbeafe; color: #1d4ed8; }
.quote-status-badge--sent_to_client { background: #ecfdf5; color: #065f46; }
.quote-status-send-form { margin: 0; }
.inline-form { display: inline; }
.table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}
.flex { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.mt-1 { margin-top: 1rem; }
.text-muted { color: var(--muted); font-size: .875rem; }
.page-title-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
}
.page-title-row h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.page-title-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.page-title-actions .inline-form {
  margin: 0;
}
.columns-save-btn {
  flex-shrink: 0;
  padding: .55rem 1.1rem;
  font-size: .9375rem;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--control-radius);
  border: none;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  flex-shrink: 0;
  transition: color .15s ease, background .15s ease;
}
.icon-link:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.columns-settings-link svg {
  display: block;
}
.columns-scope { margin-bottom: 1rem; }
.columns-template-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.columns-template-tab {
  display: inline-flex;
  align-items: center;
  padding: .45rem .85rem;
  border: none;
  border-radius: var(--control-radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  transition: background .15s ease, color .15s ease;
}
.columns-template-tab:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.columns-template-tab.is-active {
  background: var(--accent-soft-hover);
  color: var(--primary);
}
.columns-template-tab--current {
  gap: .35rem;
  cursor: default;
}
.columns-template-tab-name {
  white-space: nowrap;
}
.columns-template-tab-input {
  width: 9rem;
  min-width: 0;
  padding: .2rem .45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
}
.columns-template-tab-input[hidden] {
  display: none;
}
.columns-template-tab-name[hidden] {
  display: none;
}
.columns-template-tab-edit[hidden] {
  display: none;
}
.columns-template-tab.is-active .field-chip-edit {
  background: var(--accent-soft-strong);
  color: var(--primary);
}
.columns-template-tab.is-active .field-chip-edit:hover {
  background: var(--accent-soft-hover);
  color: var(--primary-hover);
}
.columns-template-tab.is-editing {
  background: var(--accent-soft);
  border: none;
  color: var(--text);
}
.columns-new-template-form {
  margin: 0;
}
.columns-new-template-btn {
  padding: .4rem .75rem;
  font-size: .875rem;
}
.columns-builder-form { margin-top: .5rem; }
.columns-builder {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: start;
}
.columns-panel--available {
  grid-column: 1;
  grid-row: 1;
}
.columns-panel--preview {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.columns-panel--status {
  grid-column: 1;
  grid-row: 2;
}
.columns-panel--formula {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
.columns-panel--available .field-pool {
  min-height: 14rem;
}
.columns-panel h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}
.columns-hint {
  margin: 0 0 .85rem;
  font-size: .8125rem;
}
.columns-add-field {
  display: flex;
  gap: .5rem;
  margin-bottom: .75rem;
}
.columns-add-field-input {
  flex: 1;
  min-width: 0;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
}
.columns-add-field-kind {
  flex-shrink: 0;
  padding: .45rem .6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  background: var(--card);
}
.columns-formula-panel {
  margin-bottom: .75rem;
}
.columns-formula-builder {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-bottom: .75rem;
}
.columns-formula-builder .columns-add-field-input {
  width: 100%;
}
.formula-number-add {
  margin-bottom: 0;
}
.columns-formula-actions {
  display: flex;
  gap: .5rem;
}
.columns-formula-actions .columns-add-field-btn {
  flex: 1;
  width: auto;
}
.formula-op-palette,
.formula-source-palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  min-height: 2.5rem;
  padding: .55rem .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafbfd;
}
.formula-source-palette {
  min-height: 3rem;
}
.formula-source-empty {
  margin: 0;
  font-size: .8125rem;
  width: 100%;
}
.formula-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text);
  cursor: grab;
  user-select: none;
}
.formula-token--op {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.formula-token--eq {
  color: var(--muted);
  background: #f8fafc;
  cursor: grab;
}
.formula-token--paren {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
  min-width: 1.75rem;
}
.field-chip--formula-source {
  cursor: grab;
  min-height: auto;
  padding: .4rem .55rem;
}
.field-chip--formula-number {
  background: #fefce8;
  border-color: #fde68a;
}
.field-chip--formula-number .field-chip-name {
  color: #854d0e;
  font-variant-numeric: tabular-nums;
}
.field-chip--formula-currency {
  align-items: center;
  gap: .25rem;
  padding-right: .35rem;
  background: #ecfdf5;
  border-color: #99f6e4;
  cursor: grab;
}
.field-chip--formula-currency .field-chip-name {
  font-size: .8125rem;
  font-weight: 600;
  color: #0f766e;
  white-space: nowrap;
}
.formula-expr-token--currency {
  font-size: .8125rem;
  font-weight: 600;
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
}
.columns-formula-sublabel {
  margin: -.15rem 0 .45rem;
  font-size: .8125rem;
}
.formula-expr-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  min-height: 3.25rem;
  padding: .55rem .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s ease, background .2s ease;
}
.formula-expr-drop.is-drag-over {
  border-color: var(--primary);
  background: #eff6ff;
}
.formula-expr-placeholder {
  margin: 0;
  width: 100%;
  font-size: .8125rem;
  color: var(--muted);
}
.formula-expr-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: .35rem 1.6rem .35rem .65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: .8125rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
}
.formula-expr-token--field {
  background: #f8fafc;
}
.formula-expr-token--number {
  background: #fefce8;
  border-color: #fde68a;
  color: #854d0e;
  font-variant-numeric: tabular-nums;
}
.formula-expr-token--op {
  min-width: 2rem;
  padding: .35rem .65rem;
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  font-size: .9375rem;
  font-weight: 700;
}
.formula-expr-token--paren {
  min-width: 1.75rem;
  padding: .35rem .55rem;
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
  font-size: .9375rem;
  font-weight: 700;
}
.field-chip--formula-item {
  align-items: flex-start;
}
.field-chip--formula-item.is-formula-editing {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.field-chip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.field-chip-formula-detail {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
}
.formula-expr-token--result {
  cursor: default;
}
.formula-expr-token--eq {
  cursor: default;
}
.formula-expr-token-remove {
  position: absolute;
  top: .1rem;
  right: .15rem;
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.formula-expr-token-remove:hover {
  background: #fee2e2;
  color: var(--danger);
}
.formula-expr-token.is-dragging {
  opacity: .55;
}
.formula-pool {
  min-height: 8rem;
}
.columns-panel--formula .columns-hint {
  margin-bottom: .65rem;
}
.columns-formula-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.field-chip-formula-badge {
  display: inline-block;
  margin-left: .25rem;
  padding: .05rem .35rem;
  border-radius: 999px;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #1d4ed8;
  background: #eff6ff;
  vertical-align: middle;
}
.quote-formula-value {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: default;
}
.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;
}
.field-pool {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafbfd;
  transition: border-color .2s ease, background .2s ease;
}
.field-pool.is-drag-over,
.quote-sheet-header.is-drag-over {
  border-color: var(--primary);
  background: #eff6ff;
}
.field-chip {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .65rem;
  background: var(--surface-hover);
  border: none;
  border-radius: var(--control-radius);
  cursor: grab;
  user-select: none;
  transition: background .15s ease, transform .2s ease, box-shadow .2s ease;
}
.field-chip:active { cursor: grabbing; }
.field-chip.is-dragging {
  opacity: .55;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
  background: var(--accent-soft);
}
.field-chip-grip {
  color: #94a3b8;
  font-size: .75rem;
  letter-spacing: -1px;
  line-height: 1;
}
.field-chip-name {
  flex: 1;
  min-width: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-chip--pool.is-editing .field-chip-name {
  display: none;
}
.field-chip-label-input {
  flex: 1;
  min-width: 0;
  padding: .35rem .45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  cursor: text;
}
.field-chip-label-input[hidden] {
  display: none;
}
.field-chip-label-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}
.field-chip-edit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: none;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, color .15s ease;
}
.field-chip-edit:hover {
  background: var(--accent-soft-hover);
  color: var(--primary);
}
.field-chip-edit[hidden] {
  display: none;
}
.field-chip--sheet {
  flex: 0 0 auto;
  min-width: 7.5rem;
}
.field-chip--sheet.field-chip--sheet-formula {
  align-items: flex-start;
  min-width: 9rem;
  max-width: 15rem;
}
.field-chip--sheet.field-chip--sheet-formula .field-chip-body {
  flex: 1;
  min-width: 0;
}
.field-chip--sheet .field-chip-name {
  flex: 1;
  min-width: 0;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
}
.field-chip-delete,
.field-chip-remove {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.field-chip-delete:hover,
.field-chip-remove:hover {
  background: var(--danger-soft-hover);
  color: var(--danger);
}
.quote-sheet-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.quote-sheet-preview-title {
  padding: .75rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.quote-sheet-table {
  padding: .85rem;
  min-width: 0;
}
.quote-sheet-scroll {
  width: 100%;
  max-width: 100%;
}
.quote-sheet-scroll > .quote-sheet-header {
  width: max-content;
  min-width: 100%;
  max-width: none;
  flex-wrap: nowrap;
}
.quote-sheet-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .5rem;
  min-height: 4.5rem;
  padding: .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color .2s ease, background .2s ease;
  box-sizing: border-box;
}
.quote-sheet-header.is-empty {
  width: 100%;
  flex-wrap: wrap;
}
.quote-sheet-header.is-empty .quote-sheet-placeholder {
  flex: 1 1 100%;
}
.quote-sheet-placeholder {
  flex: 1 1 100%;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .875rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, .65);
}
.product-sheet-preview .product-sheet-scroll {
  width: 100%;
  max-width: 100%;
}
.product-sheet-rows {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: fit-content;
  max-width: 100%;
}
.product-sheet-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .5rem;
  min-height: 4.5rem;
  padding: .65rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  transition: border-color .2s ease, background .2s ease;
  box-sizing: border-box;
}
.product-sheet-row--primary {
  width: max-content;
  max-width: 100%;
}
.product-sheet-row--primary .field-chip--sheet {
  flex: 0 0 7.5rem;
  width: 7.5rem;
  max-width: 7.5rem;
}
.product-sheet-row--secondary {
  width: 100%;
}
.product-sheet-row--secondary .field-chip--sheet-wide {
  flex: 1 1 0;
  min-width: 15rem;
  max-width: none;
}
.product-sheet-row--secondary .field-chip--sheet-wide:only-child {
  flex: 1 1 100%;
}
.product-sheet-row--fixed {
  pointer-events: none;
}
.product-sheet-row--fixed .field-chip--fixed {
  flex: 1 1 100%;
  min-width: 15rem;
  cursor: default;
  background: #eef2ff;
  border-color: #c7d2fe;
}
.field-chip--fixed .field-chip-grip,
.field-chip--fixed .field-chip-remove {
  display: none;
}
.field-chip-fixed-badge {
  margin-left: auto;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #6366f1;
}
.products-table .products-row-attachments td {
  border-top: none;
  padding-top: 0;
  vertical-align: top;
}
.products-row3-cell {
  padding-top: 0;
}
.products-row3-attachments {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .45rem .55rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.products-row3-empty {
  font-size: .8125rem;
}
.product-sheet-row.is-empty {
  width: 100%;
  min-width: 15rem;
}
.product-sheet-row.is-empty .quote-sheet-placeholder {
  flex: 1 1 100%;
}
.products-table .products-row-secondary td {
  border-top: none;
  padding-top: 0;
  vertical-align: top;
}
.products-table tr.product-line-row--editing > td {
  background: #fffbeb;
}
.products-table tr.product-line-row--editing > td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.products-table tr.product-line-row--editing .product-line-no-cell,
.products-table tr.product-line-row--editing .quote-line-status-cell,
.products-table tr.product-line-row--editing .quote-line-actions {
  background: #fffbeb;
}
.products-table tr.product-line-row--editing .products-row3-attachments {
  background: #fef3c7;
  border-color: #fcd34d;
}
.products-table tr.product-line-row--editing input:not(.quote-formula-value):not(:disabled),
.products-table tr.product-line-row--editing select:not(:disabled),
.products-table tr.product-line-row--editing textarea:not(:disabled) {
  background: #fff;
  border-color: #fcd34d;
}
.quote-lines-table tr.quote-line-row--editing > td {
  background: #fffbeb;
}
.quote-lines-table tr.quote-line-row--editing > td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}
.quote-lines-table tr.quote-line-row--editing .quote-line-status-cell,
.quote-lines-table tr.quote-line-row--editing .quote-line-notes-cell,
.quote-lines-table tr.quote-line-row--editing .quote-line-actions {
  background: #fffbeb;
}
.quote-lines-table tr.quote-line-row--editing input:not(.quote-formula-value):not(:disabled),
.quote-lines-table tr.quote-line-row--editing select:not(:disabled),
.quote-lines-table tr.quote-line-row--editing textarea:not(:disabled) {
  background: #fff;
  border-color: #fcd34d;
}
.products-table tr.quote-line-row--locked > td {
  background: #f8fafc;
}
.products-table tr.quote-line-row--locked .product-line-no-cell,
.products-table tr.quote-line-row--locked .quote-line-status-cell,
.products-table tr.quote-line-row--locked .quote-line-actions {
  background: #f8fafc;
}
.products-table .products-row2-cell {
  padding-top: 0;
}
.products-row2-wrap {
  width: 100%;
}
.products-row2-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  margin: 0 0 .35rem;
  padding: .45rem .55rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.products-row2-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.products-row2-toggle-label {
  flex-shrink: 0;
  font-size: .8125rem;
  font-weight: 600;
}
.products-row2-toggle-preview {
  flex: 1;
  min-width: 0;
  font-size: .8125rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.products-row2-toggle-icon {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .2s ease;
}
.products-row-secondary.is-expanded .products-row2-toggle-icon {
  transform: rotate(180deg);
}
.products-row2-expand {
  overflow: hidden;
  transition: max-height .28s ease, opacity .22s ease, margin .22s ease;
}
.products-row-secondary.is-collapsed .products-row2-expand {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}
.products-row-secondary.is-expanded .products-row2-expand {
  max-height: 24rem;
  opacity: 1;
}
.products-row-secondary.is-expanded .products-row2-toggle {
  margin-bottom: .5rem;
}
.product-line-textarea {
  display: block;
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  box-sizing: border-box;
}
.products-row2-fields {
  display: flex;
  gap: .5rem;
  width: 100%;
}
.products-row2-field {
  flex: 1 1 0;
  min-width: 0;
}
.products-row2-field:only-child {
  flex: 1 1 100%;
}
.products-row2-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .25rem;
}
.columns-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1rem;
}
.columns-panel--status .columns-add-field {
  margin-bottom: 0;
}
.columns-panel--status.is-inactive .status-options-list,
.columns-panel--status.is-inactive .columns-add-field {
  opacity: 0.55;
}
.columns-panel--status .status-options-list {
  min-height: 8rem;
}
.status-options-list {
  list-style: none;
  margin: 0 0 .75rem;
  padding: .65rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafbfd;
}
.status-options-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .65rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.status-options-item .columns-add-field-input {
  flex: 1;
  min-width: 0;
  font-size: .875rem;
  font-weight: 600;
}
.status-options-item .status-options-remove {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .columns-builder {
    grid-template-columns: 1fr;
  }
  .columns-panel--available,
  .columns-panel--preview,
  .columns-panel--status,
  .columns-panel--formula {
    grid-column: 1;
    grid-row: auto;
  }
}
code.invite { font-size: 1.1rem; letter-spacing: .1em; background: #f1f5f9; padding: .25rem .5rem; border-radius: 4px; }
.table-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > .quote-lines-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
.quote-lines-table input,
.quote-lines-table select,
.quote-lines-table textarea {
  width: 100%;
  min-width: 5rem;
  box-sizing: border-box;
}
.quote-line-notes-col {
  min-width: 11rem;
  width: 14rem;
}
.quote-line-notes-cell {
  min-width: 11rem;
  vertical-align: top;
}
.quote-line-notes {
  min-height: 2.5rem;
  resize: vertical;
  line-height: 1.4;
  white-space: pre-wrap;
}
.quote-product-picker {
  min-width: 9rem;
}
.quote-product-box {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 9rem;
}
.quote-product-picker .quote-product-name-input {
  flex: 1 1 auto;
  min-width: 0;
}
.quote-line-row--locked input:not(.quote-formula-value):disabled,
.quote-line-row--locked select:disabled,
.quote-line-row--locked textarea:disabled {
  background: #f1f5f9;
  color: var(--text);
  opacity: 1;
  cursor: not-allowed;
}
.quote-lines-table input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.quote-lines-table input[type="number"]::-webkit-outer-spin-button,
.quote-lines-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.quote-lines-table {
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.quote-lines-table th,
.quote-lines-table td {
  background: var(--card);
}
.quote-lines-table th {
  white-space: nowrap;
  font-size: 0.8125rem;
  background: #f1f5f9;
}
.quote-line-status-col {
  min-width: 7.5rem;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 var(--border);
  background: #f1f5f9;
}
.products-table .product-line-no-col {
  min-width: 2.25rem;
  width: 2.25rem;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 4;
  box-shadow: 1px 0 0 var(--border);
  background: #f1f5f9;
}
.products-table .product-line-no-cell {
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 var(--border);
  background: inherit;
}
.products-table .quote-line-status-col {
  left: 2.25rem;
}
.quote-line-status-cell {
  vertical-align: middle;
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}
.products-table .quote-line-status-cell {
  left: 2.25rem;
}
.quote-add-row td {
  background: #f8fafc;
}
.quote-add-row .quote-line-status-cell,
.quote-add-row .product-line-no-cell,
.quote-add-row .quote-line-actions {
  background: #f8fafc;
}
.quote-line-status-cell .quote-status-badge {
  display: block;
  margin-bottom: 0.35rem;
}
.quote-line-send-form {
  margin: 0;
}
.quote-line-send-form .btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
}
.quote-attachments-card {
  margin-bottom: 1rem;
}
.quote-attachments-card--readonly {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.quote-attachments-card--readonly h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}
.quote-attachments-help {
  margin: 0 0 0.85rem;
}
.quote-attachment-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.quote-attachment-upload-form input[type="file"] {
  flex: 1 1 14rem;
  min-width: 0;
}
.quote-attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.85rem;
}
.quote-attachment-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.quote-attachment-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
}
.quote-attachment-link:hover .quote-attachment-name {
  color: var(--primary);
}
.quote-attachment-thumb {
  width: 100%;
  max-height: 8rem;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
}
.quote-attachment-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
  color: #b91c1c;
}
.quote-attachment-name {
  font-size: 0.82rem;
  line-height: 1.3;
  word-break: break-word;
}
.quote-attachments-empty {
  margin: 0;
}
.quote-line-actions-col {
  width: 3.75rem;
  min-width: 3.75rem;
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -1px 0 0 var(--border);
}
.quote-line-menu.nav-dropdown {
  min-width: 0;
  width: auto;
  display: inline-flex;
  justify-content: center;
  vertical-align: middle;
}
.quote-line-menu .nav-dropdown-trigger.nav-icon-btn {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--muted);
}
.quote-line-menu .nav-dropdown-trigger.nav-icon-btn svg {
  display: block;
  flex-shrink: 0;
}
.quote-line-menu.is-open > .nav-dropdown-trigger.nav-icon-btn,
.quote-line-menu .nav-dropdown-trigger.nav-icon-btn:hover {
  color: var(--primary);
  background: var(--accent-soft);
}
.quote-line-actions,
.quote-line-actions-col {
  overflow: visible;
}
.quote-line-menu .nav-dropdown-menu {
  z-index: 1300;
  min-width: 11.5rem;
}
.quote-line-menu-panel.is-floating {
  position: fixed;
  z-index: 1300;
}
.quote-line-menu-panel .quote-line-action-form {
  display: block;
  width: 100%;
  margin: 0;
}
.quote-line-menu-panel .nav-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}
.quote-line-menu-panel .nav-dropdown-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.quote-line-actions-wrap .quote-line-copy-panel {
  margin-top: 0.35rem;
}
.quote-add-row {
  background: #f8fafc;
}
.quote-line-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  vertical-align: middle;
  box-shadow: -1px 0 0 var(--border);
}
.quote-line-actions-wrap {
  position: relative;
}
.quote-line-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.quote-line-save-form {
  display: flex;
  justify-content: center;
  margin: 0;
}
.quote-line-save-btn {
  color: var(--primary);
}
.quote-line-save-btn:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--primary);
}
.quote-line-save-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.quote-line-actions-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--control-radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--primary);
}
.icon-btn-danger {
  color: var(--danger);
  background: transparent;
}
.icon-btn-danger:hover {
  background: var(--danger-soft-hover);
  color: var(--danger);
}
.quote-line-action-form {
  margin: 0;
  flex-shrink: 0;
}
.quote-line-upload-btn {
  cursor: pointer;
  margin: 0;
}
.quote-line-upload-btn input[type="file"] {
  display: none;
}
.product-attachments-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
}
.products-row3-count {
  flex: 1 1 100%;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.quote-line-upload-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}
.product-attachment-card {
  display: inline-block;
  max-width: 100%;
}
.product-attachment-card-media {
  position: relative;
  display: inline-block;
}
.product-attachment-card-media .product-attachment-chip {
  margin-top: 0;
  padding-right: 1.35rem;
}
.product-attachment-delete-form {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  margin: 0;
  z-index: 2;
}
.product-attachment-delete-btn {
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.product-attachment-delete-btn:hover {
  background: #dc2626;
}
.product-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.72rem;
  text-decoration: none;
  max-width: 100%;
}
.product-attachment-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}
.product-attachment-chip-pdf {
  font-weight: 700;
  color: #b91c1c;
}
.products-table .quote-line-actions-col {
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: none;
  padding: 0.35rem 0.5rem;
  text-align: center;
}
.products-table .quote-line-actions {
  width: 5.25rem;
  min-width: 5.25rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  vertical-align: middle;
  overflow: visible;
}
.products-table .quote-line-actions-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.quote-line-menu-panel .quote-line-upload-label {
  display: block;
  width: 100%;
  margin: 0;
  cursor: pointer;
}
.quote-line-menu-panel .nav-dropdown-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.product-actions-stack,
.quote-line-actions-toolbar.product-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.4rem;
  width: 100%;
}
.product-actions-stack .quote-line-action-form {
  display: block;
  width: 100%;
  margin: 0;
  flex-shrink: 0;
}
.product-actions-stack .quote-line-action-form .btn,
.product-actions-stack .quote-line-upload-btn {
  width: 100%;
  box-sizing: border-box;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}
.product-actions-stack .quote-line-upload-btn {
  display: block;
  margin: 0;
  cursor: pointer;
}
.products-table td.quote-line-actions {
  vertical-align: top;
}
.products-add-form {
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  margin: 0;
}
.products-add-btn {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 600;
}
.products-quota-full {
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.product-actions-stack .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.quote-line-copy-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
  min-width: 12rem;
}
.quote-line-copy-panel.is-floating {
  position: fixed;
  top: auto;
  right: auto;
  z-index: 1300;
}
.quote-line-copy-panel[hidden] {
  display: none !important;
}
.quote-line-copy-panel select {
  min-width: 0;
}
.save-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.18);
  animation: save-notice-in 0.2s ease;
}
.save-notice-modal[hidden] {
  display: none !important;
}
.save-notice-dialog {
  pointer-events: auto;
  background: var(--card);
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 1rem 1.35rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  color: #065f46;
  font-weight: 600;
  font-size: 1rem;
}
@keyframes save-notice-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.confirm-modal[hidden] {
  display: none !important;
}
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}
.confirm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.25rem 1.35rem;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.confirm-modal-title {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.confirm-modal-message {
  margin: 0 0 1.1rem;
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.45;
}
.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}
.formula-alert-modal .confirm-modal-actions {
  justify-content: center;
}
.formula-alert-modal .confirm-modal-actions .btn {
  min-width: 5.5rem;
}
.confirm-modal-dialog--wide {
  max-width: 32rem;
}
.delete-account-ack-row {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 0 0 1rem;
}
.delete-account-ack-checkbox {
  margin-top: .15rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}
.confirm-modal-dialog .delete-account-ack-label {
  display: block;
  flex: 1;
  margin: 0;
  font-weight: 400;
  font-size: .875rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}
.delete-account-ack-error {
  margin: -.35rem 0 .85rem;
  font-size: .8125rem;
  color: #b91c1c;
  line-height: 1.4;
}
.delete-account-ack-error[hidden] {
  display: none !important;
}
.nav-dropdown-item--danger {
  color: #b91c1c;
}
.nav-dropdown-item--danger:hover {
  color: #991b1b;
  background: #fef2f2;
}
.account-delete-busy {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .45);
}
.account-delete-busy[hidden] {
  display: none !important;
}
.account-delete-busy-dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}
