:root {
  --accent: #0c5c44;
  --accent-hover: #0a4d39;
  --accent-soft: rgba(12, 92, 68, 0.12);
  --accent-ring: rgba(12, 92, 68, 0.28);
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --ink-tertiary: #86868b;
  --separator: rgba(0, 0, 0, 0.08);
  --danger: #ff3b30;
  --danger-soft: rgba(255, 59, 48, 0.1);
  --success: #34c759;
  --success-soft: rgba(52, 199, 89, 0.14);
  --sidebar-w: 260px;
  --sidebar-w-collapsed: 72px;
  --header-h: 52px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-body {
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ——— App shell ——— */
.app {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--separator);
  transition: width 0.28s var(--ease), transform 0.28s var(--ease);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1rem 1rem;
  min-height: 64px;
  border-bottom: 1px solid var(--separator);
}

.brand-mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent) 0%, #14805f 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.brand-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s var(--ease);
}

.brand-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-text span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  color: var(--ink-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  padding: 0.65rem 0.6rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  overflow-y: auto;
}

.nav-section-label {
  margin: 0.55rem 0.7rem 0.2rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.nav-section-label:first-child { margin-top: 0.15rem; }

.nav-group { margin: 0; }
.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-secondary);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 510;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-group-toggle:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }
.nav-group.is-current > .nav-group-toggle { color: var(--accent); }
.nav-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex: 0 0 auto;
  opacity: 0.55;
  transition: transform 0.2s var(--ease);
}
.nav-group.is-open > .nav-group-toggle .nav-chevron { transform: rotate(180deg); }
.nav-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.22s var(--ease), opacity 0.18s var(--ease), padding 0.22s var(--ease);
}
.nav-group.is-open > .nav-group-body {
  max-height: 420px;
  opacity: 1;
  padding: 0.12rem 0 0.2rem;
}
.nav-link.nav-sub {
  padding: 0.55rem 0.7rem 0.55rem 1.05rem;
  font-size: 0.88rem;
}
.nav-link.nav-sub .nav-ico { width: 18px; height: 18px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  font-size: 0.94rem;
  font-weight: 510;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  text-decoration: none;
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  opacity: 0.9;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s var(--ease);
}

.sidebar-foot {
  padding: 0.75rem;
  border-top: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-foot form { margin: 0; }

.collapse-btn,
.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink-secondary);
  font-weight: 510;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.collapse-btn:hover,
.logout-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.28s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-mobile {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  background: rgba(245, 245, 247, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--separator);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.top-mobile-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.content {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  flex: 1;
}

/* Collapsed desktop sidebar */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-w-collapsed);
}

body.sidebar-collapsed .main {
  margin-left: var(--sidebar-w-collapsed);
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .collapse-label,
body.sidebar-collapsed .logout-label {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

body.sidebar-collapsed .nav-link,
body.sidebar-collapsed .collapse-btn,
body.sidebar-collapsed .logout-btn {
  justify-content: center;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .nav-chevron {
  display: none;
}
body.sidebar-collapsed .nav-group-toggle { display: none; }
body.sidebar-collapsed .nav-group-body {
  max-height: none;
  opacity: 1;
  overflow: visible;
  padding: 0.08rem 0 0;
}
body.sidebar-collapsed .nav-link.nav-sub {
  justify-content: center;
  padding: 0.65rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

/* ——— Page bits ——— */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.page-head p {
  margin: 0.4rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 36rem;
}

.panel {
  background: var(--surface-solid);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
}

.panel + .panel { margin-top: 0.85rem; }

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

@media (min-width: 860px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat {
  background: var(--surface-solid);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem;
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat span {
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-weight: 510;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.9rem 0.55rem;
  border-bottom: 1px solid var(--separator);
  vertical-align: middle;
}

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-tertiary);
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-on { background: var(--success-soft); color: #1b7a35; }
.badge-off { background: rgba(142, 142, 147, 0.16); color: var(--ink-secondary); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.actions form { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: 980px;
  border: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), opacity 0.15s var(--ease);
  white-space: nowrap;
}

.btn:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

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

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-secondary);
}

.btn-ghost:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }

.btn-solid {
  background: #fff;
  border: 1px solid #d2d2d7;
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  font-weight: 650;
}

.btn-solid:hover {
  background: #f5f5f7;
  border-color: #b7b7be;
  color: var(--ink);
}

.btn-delete {
  background: #fff;
  border: 1px solid #f0c2be;
  color: #c4281c;
  font-weight: 650;
}

.btn-delete:hover {
  background: #fff1f0;
  border-color: #e24b42;
  color: #9f1d14;
}

.lead-head-actions {
  width: auto;
  max-width: 100%;
}
.lead-head-actions .btn {
  min-height: 40px;
  padding-inline: 0.95rem;
}
.lead-create-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.15rem;
}
@media (max-width: 760px) {
  .admin-head.page-head,
  .admin-shell > .admin-head {
    align-items: stretch;
  }
  .lead-head-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .lead-head-actions > .btn {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    min-width: 0;
  }
  .lead-create-actions {
    width: 100%;
    margin-right: 0;
  }
  .lead-create-actions .btn,
  .lead-create-actions .lead-act {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
    min-width: 0;
  }
}
.lead-act-form {
  display: inline;
  margin: 0;
}
.lead-act {
  border: 0;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-height: 40px;
  padding-inline: 0.9rem;
  border-radius: 11px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.lead-act:hover { filter: brightness(1.06); }
.lead-act-contract {
  background: #0c5c44;
}
.lead-act-contract:hover { background: #0a4d39; }
.lead-act-pay {
  background: #1a7a58;
}
.lead-act-pay:hover { background: #166b4c; }
.lead-act-ship {
  background: #6b3fa0;
}
.lead-act-ship:hover { background: #5a3488; }
.lead-act-quote {
  background: #2f9e6f;
}
.lead-act-quote:hover { background: #278a60; }

.lead-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #f0c2be;
  background: #fff;
  color: #c4281c;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.lead-icon-btn:hover {
  background: #fff1f0;
  border-color: #e24b42;
}

.lead-icon-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drawer.drawer-lead {
  width: min(480px, 100vw);
}

.drawer.drawer-lead > form.drawer-body {
  min-height: 0;
}

#lead-edit-notes-wrap[hidden] {
  display: none !important;
}

.btn-sm {
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

.form-grid.two {
  max-width: none;
}

@media (min-width: 720px) {
  .form-grid.two { grid-template-columns: 1fr 1fr; }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > span.label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: -0.01em;
}

.field .hint {
  font-size: 0.78rem;
  color: var(--ink-tertiary);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}

input:hover { background: rgba(0, 0, 0, 0.03); }

input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 510;
  color: var(--ink);
  user-select: none;
}

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

.flash {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 510;
}

.flash-success {
  background: var(--success-soft);
  color: #1b7a35;
}

.flash-error {
  background: var(--danger-soft);
  color: #c41e16;
}

.empty {
  padding: 2rem 0.5rem;
  text-align: center;
  color: var(--ink-secondary);
}

.empty strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

/* Login */
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
}

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(720px 360px at 50% -8%, rgba(12, 92, 68, 0.16), transparent 58%),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  padding: 1.75rem 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--separator);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 18px 40px rgba(12, 92, 68, 0.08);
}

.login-head {
  text-align: center;
  margin-bottom: 1.15rem;
}

.login-card .login-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #14805f, var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 1rem;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 18px rgba(12, 92, 68, 0.22);
}

.login-card h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.login-card .sub {
  margin: 0.4rem auto 0;
  max-width: 22rem;
  color: var(--ink-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-error {
  margin: 0 0 1rem;
  text-align: left;
}

.login-form {
  gap: 0.85rem;
  max-width: none;
}

.login-form .field > span.label {
  color: var(--ink);
  font-weight: 650;
}

.login-pass {
  position: relative;
  display: block;
}

.login-pass input {
  padding-right: 5.1rem;
}

.login-pass-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  min-height: 36px;
  min-width: 4.4rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.login-pass-toggle:hover {
  background: var(--accent-soft);
}

.login-pass-toggle:focus-visible,
.login-form input:focus-visible,
.login-card .btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.login-card .btn-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 0.2rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.login-card .btn-primary:disabled {
  opacity: 0.72;
  cursor: progress;
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.4rem 1.1rem 1.2rem;
    border-radius: 18px;
  }
  .login-card h1 { font-size: 1.5rem; }
}

/* Mobile */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-105%);
    width: min(86vw, 300px);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
  }

  .main { margin-left: 0 !important; }

  .top-mobile { display: flex; }

  body.sidebar-collapsed .sidebar {
    width: min(86vw, 300px);
  }

  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .collapse-label,
  body.sidebar-collapsed .logout-label {
    opacity: 1;
    width: auto;
    pointer-events: auto;
  }

  body.sidebar-collapsed .nav-section-label,
  body.sidebar-collapsed .nav-chevron { display: revert; }
  body.sidebar-collapsed .nav-group-toggle { display: flex; }
  body.sidebar-collapsed .nav-group:not(.is-open) > .nav-group-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }

  .collapse-btn { display: none; }

  #sidebar-close { display: grid !important; }

  .content { padding: 1.15rem 1rem 2.5rem; }

  .actions { justify-content: flex-start; }

  th.hide-sm, td.hide-sm { display: none; }

  .only-sm { display: block !important; }
}

.only-sm { display: none; }

/* ——— Wide admin pages ——— */
.page-wide .content,
.page-leads .content {
  width: 100%;
  max-width: none;
  padding-left: clamp(1rem, 2vw, 1.75rem);
  padding-right: clamp(1rem, 2vw, 1.75rem);
}

.admin-shell,
.leads-page {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-width: 0;
}

.admin-shell-form {
  max-width: 720px;
}

.admin-head {
  align-items: center;
  margin-bottom: 1rem;
}

.admin-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.count-pill,
.leads-count {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-secondary);
  background: rgba(0, 0, 0, 0.045);
  padding: 0.35rem 0.7rem;
  border-radius: 980px;
  white-space: nowrap;
}

.list-panel {
  padding: 0;
  overflow: hidden;
}

.entity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--separator);
}

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

.entity-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.entity-meta {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-meta .dot {
  margin: 0 0.25rem;
  color: var(--ink-tertiary);
}

.entity-side {
  display: flex;
  align-items: center;
}

.entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.entity-actions form {
  margin: 0;
}

.form-panel {
  padding: 1.25rem 1.35rem 1.4rem;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form .form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .admin-form .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}

/* Lead detail */
.detail-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 960px) {
  .detail-grid {
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    align-items: start;
  }
}

.detail-media {
  padding: 1rem;
}

.detail-card-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--separator);
  background: #fff;
}

.detail-qr {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.detail-qr img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: #fff;
}

.detail-cols {
  display: grid;
  gap: 0.85rem;
}

.detail-block {
  padding: 1rem 1.15rem 1.1rem;
}

.detail-block-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.detail-dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.detail-dl > div {
  display: grid;
  gap: 0.2rem;
}

.detail-dl dt {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  letter-spacing: 0.02em;
}

.detail-dl dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-word;
}

.detail-notes {
  white-space: pre-wrap;
}

.lead-address-form {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.lead-address-form textarea {
  min-height: 4.75rem;
}

.detail-qr-text {
  word-break: break-all;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.ready-note-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.ready-note-add-row input {
  flex: 1 1 220px;
  min-height: 44px;
}

@media (max-width: 720px) {
  .entity-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem 0.65rem;
  }

  .entity-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.leads-head-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.leads-kind-seg {
  height: 44px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  align-items: stretch;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  padding: 3px;
  border-radius: 12px;
}

.leads-kind-seg button {
  height: auto;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.84rem;
}

.leads-kind-seg button em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink-tertiary);
  background: rgba(0, 0, 0, 0.06);
  padding: 0.08rem 0.4rem;
  border-radius: 980px;
}

.leads-kind-seg button.is-active em {
  color: inherit;
  background: rgba(255, 255, 255, 0.22);
}

.leads-fair-filters {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.leads-fair-filters[hidden],
#leads-normal-actions[hidden] {
  display: none !important;
}

.kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 980px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.kind-fair {
  background: rgba(12, 92, 68, 0.12);
  color: #0c5c44;
}

.kind-normal {
  background: rgba(20, 32, 27, 0.08);
  color: #3d4742;
}

.lead-side-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.lead-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(12, 92, 68, 0.12);
  color: #0c5c44;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead-row.is-normal .lead-thumb-wrap {
  width: 46px;
  height: 46px;
}

.detail-grid.is-normal-lead {
  grid-template-columns: 1fr;
}

/* ——— Müşteriler (leads) ——— */
.leads-head {
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.leads-head.is-fair-leads .quotes-toolbar {
  width: 100%;
}
.drawer-section {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.leads-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  min-height: 42px;
  width: 100%;
}

.leads-filter-select {
  display: flex;
  align-items: center;
  flex: 0 1 11.5rem;
  min-width: 8.5rem;
  height: 42px;
  margin: 0;
}

.leads-filter-temp {
  flex-basis: 10.5rem;
  max-width: 12rem;
}

.leads-filter-select select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2386868b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.85rem center;
  padding: 0 2.1rem 0 0.9rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.leads-filter-select select:hover {
  background-color: #fafafa;
}

.leads-filter-select select:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
  background-color: #fff;
}

.leads-toolbar-end {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  height: 42px;
}

.leads-toolbar-end .btn {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 0 0.95rem;
  white-space: nowrap;
}

.leads-toolbar-end .btn-cta {
  padding: 0 1.1rem;
}

.lead-opt {
  font-style: normal;
  font-weight: 600;
  color: var(--ink-tertiary);
  letter-spacing: 0;
  text-transform: none;
  margin-left: 0.25rem;
}

.lead-ready-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.lead-prod-search {
  position: relative;
  display: block;
  margin: 0 0 0.5rem;
}

.lead-prod-search svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  pointer-events: none;
}

.lead-prod-search input[type="search"] {
  width: 100%;
  padding-left: 2.55rem;
  padding-right: 4.6rem;
  -webkit-appearance: none;
  appearance: none;
}

.lead-prod-search input[type="search"]::-webkit-search-decoration,
.lead-prod-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.lead-prod-count {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.18rem 0.5rem;
  border-radius: 980px;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--ink-secondary);
  pointer-events: none;
}

.lead-prod-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fafafa;
}

.lead-prod-group {
  border-bottom: 1px solid var(--separator);
}

.lead-prod-group:last-child { border-bottom: 0; }

.lead-prod-group summary {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  background: #f3f3f5;
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--ink-secondary);
  cursor: pointer;
  list-style: none;
}

.lead-prod-group summary::-webkit-details-marker { display: none; }

.lead-prod-group summary em {
  font-style: normal;
  font-weight: 650;
  color: var(--ink-tertiary);
}

.lead-prod-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  margin: 0;
  padding: 0 0.75rem;
  border-top: 1px solid var(--separator);
  background: #fff;
  cursor: pointer;
}

.lead-prod-row span {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 550;
  line-height: 1.3;
}

.lead-prod-row input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  accent-color: var(--accent);
}

.lead-prod-row.is-on { background: rgba(12, 92, 68, 0.05); }
.lead-prod-row.is-on span { color: var(--accent); font-weight: 650; }

@media (max-width: 1100px) {
  .leads-head.is-fair-leads .leads-toolbar-row {
    flex-wrap: wrap;
  }
  .leads-head.is-fair-leads .quotes-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .leads-head.is-fair-leads .leads-filter-select {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
    max-width: none;
  }
  .leads-head.is-fair-leads .leads-toolbar-end {
    flex: 1 1 100%;
    justify-content: stretch;
    height: auto;
  }
  .leads-head.is-fair-leads .leads-toolbar-end .stat-chip {
    flex: 0 0 auto;
  }
  .leads-head.is-fair-leads .leads-toolbar-end .btn-cta {
    flex: 1 1 auto;
  }
}

@media (max-width: 760px) {
  .leads-toolbar-row { flex-wrap: wrap; }
  .leads-toolbar-row .quotes-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .leads-filter-select {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
    max-width: none;
  }
  .leads-toolbar-end {
    flex: 1 1 100%;
    height: auto;
    flex-wrap: wrap;
  }
  .leads-toolbar-end .btn,
  .leads-toolbar-end .btn-cta {
    flex: 1 1 auto;
    min-width: 0;
  }
  .leads-toolbar-end .stat-chip {
    flex: 0 0 auto;
  }
  .leads-head .fairs-head-copy p {
    max-width: none;
  }
}

.temp-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

a.temp-chip,
button.temp-chip,
.temp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  border-radius: 980px;
  border: 1px solid var(--separator);
  background: #f3f3f5;
  color: #3a3a3c !important;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none !important;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
}

a.temp-chip:hover,
button.temp-chip:hover,
.temp-chip:hover {
  background: #e8e8ed;
  color: #1d1d1f !important;
}

a.temp-chip.is-active,
button.temp-chip.is-active,
.temp-chip.is-active {
  color: #fff !important;
  border-color: transparent;
}

a.temp-chip-all.is-active,
button.temp-chip-all.is-active { background: #1d1d1f; }
a.temp-chip-hot.is-active,
button.temp-chip-hot.is-active { background: #c0392b; }
a.temp-chip-warm.is-active,
button.temp-chip-warm.is-active { background: #d68910; }
a.temp-chip-cold.is-active,
button.temp-chip-cold.is-active { background: #2980b9; }

.temp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.4rem;
  padding: 0.22rem 0.55rem;
  border-radius: 980px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.temp-hot { background: rgba(192, 57, 43, 0.14); color: #a93226; }
.temp-warm { background: rgba(214, 137, 16, 0.16); color: #9a7b0a; }
.temp-cold { background: rgba(41, 128, 185, 0.14); color: #1a5276; }
.temp-none { background: rgba(142, 142, 147, 0.14); color: var(--ink-tertiary); }

.leads-list-panel {
  padding: 0;
  overflow: hidden;
}

.customers-table-panel {
  margin-top: 0;
}

.customers-table-panel .table-scroll {
  min-height: 0;
  overflow-x: hidden;
}

.customers-table-panel .table-scroll.is-loading,
.leads-list.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.customers-table-panel .empty[hidden],
.customers-table-panel .table-scroll[hidden] {
  display: none !important;
}

.customers-table {
  width: 100%;
  table-layout: auto;
}

.customers-table th:first-child,
.customers-table td.customer-name-cell {
  width: 100%;
  min-width: 0;
}

.customers-table th.col-actions,
.customers-table td.col-actions {
  width: 1%;
  white-space: nowrap;
  padding-right: 1.15rem;
  vertical-align: middle;
}

.customer-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.customer-avatar {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(12, 92, 68, 0.12), rgba(12, 92, 68, 0.04));
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  border: 1px solid rgba(12, 92, 68, 0.12);
}

.customer-name-text {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.customer-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.customer-actions .btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 0.65rem;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.76rem;
}

.fair-customers-table th,
.fair-customers-table td {
  vertical-align: middle;
}

.fair-customers-table th:nth-child(2),
.fair-customers-table td.fair-temp-cell {
  width: 8.5rem;
  white-space: nowrap;
  text-align: left;
}

.fair-customers-table th.col-actions,
.fair-customers-table td.col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
  padding-right: 1rem;
}

.fair-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}

.fair-actions .btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 0.7rem;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.78rem;
  white-space: nowrap;
}

.fair-customers-table tbody tr.fair-customer-row:hover td {
  background: rgba(12, 92, 68, 0.03);
}

.customer-btn-detail {
  background: #fff;
  border: 1px solid var(--separator);
  color: var(--ink);
}

.customer-btn-detail:hover {
  background: rgba(12, 92, 68, 0.06);
  border-color: rgba(12, 92, 68, 0.28);
  color: var(--accent);
}

.customers-table tbody tr.customer-row {
  transition: background 0.14s var(--ease);
}

.customers-table tbody tr.customer-row:hover td {
  background: rgba(12, 92, 68, 0.03);
}

.leads-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lead-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--separator);
}

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

.lead-row-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto 18px;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 1rem;
  color: inherit !important;
  text-decoration: none !important;
  transition: background 0.12s var(--ease);
}

.lead-row-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem 0.55rem 0;
}

.lead-row-actions .btn {
  white-space: nowrap;
}

.lead-row-link:hover {
  background: rgba(0, 0, 0, 0.025);
}

.lead-thumb-wrap {
  width: 72px;
  height: 46px;
  flex-shrink: 0;
}

.lead-thumb {
  width: 72px !important;
  height: 46px !important;
  max-width: 72px !important;
  max-height: 46px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--separator);
  display: block;
  background: #eee;
}

.lead-thumb-empty {
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  background: rgba(0, 0, 0, 0.04);
  border-style: dashed;
}

.lead-main {
  min-width: 0;
}

.lead-title {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-meta,
.lead-sub {
  font-size: 0.78rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.12rem;
}

.lead-meta .dot {
  margin: 0 0.25rem;
  color: var(--ink-tertiary);
}

.lead-sub {
  color: var(--ink-tertiary);
}

.lead-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 7.5rem;
}

.lead-side-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  font-size: 0.72rem;
  color: var(--ink-tertiary);
  text-align: right;
  line-height: 1.25;
}

.lead-chevron {
  color: var(--ink-tertiary);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}

.leads-list.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.leads-loading {
  padding: 1rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.leads-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0 0.5rem;
}

.leads-pager-info {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  min-width: 7.5rem;
  text-align: center;
}

.leads-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.flash[data-toast="1"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ——— Toast (global) ——— */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 1.85rem;
  transform: translateX(-50%) translateY(16px) scale(0.96);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: min(280px, calc(100vw - 2rem));
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.85rem 1.05rem;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #fff;
  background: rgba(29, 29, 31, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s var(--ease),
    transform 0.22s var(--ease);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.app-toast-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
}

.app-toast-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.app-toast-msg {
  flex: 1;
  line-height: 1.3;
}

.app-toast-success {
  background: linear-gradient(145deg, #0c5c44 0%, #0f6d51 100%);
}

.app-toast-error {
  background: linear-gradient(145deg, #a93226 0%, #c0392b 100%);
}

.app-toast-info {
  background: linear-gradient(145deg, #1d1d1f 0%, #3a3a3c 100%);
}

/* ——— Confirm dialog ——— */
.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

.confirm-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--separator);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  padding: 1.35rem 1.35rem 1.2rem;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.22s var(--ease);
}

.confirm-backdrop.is-open .confirm-card {
  transform: translateY(0) scale(1);
}

.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(169, 50, 38, 0.1);
  color: #a93226;
  margin-bottom: 0.9rem;
}

.confirm-icon svg {
  width: 22px;
  height: 22px;
}

.confirm-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.confirm-msg {
  margin: 0.45rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.confirm-actions .btn {
  min-width: 88px;
}

/* ——— Data table ——— */
.table-panel {
  padding: 0;
  overflow: hidden;
}

/* Fuarlar: sayfa yüksekliğini dolduran sabit beyaz kutu */
.page-wide .content:has(.fairs-shell) {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.fairs-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: none;
}

.fairs-shell .admin-head {
  flex: 0 0 auto;
}

.fairs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
  flex: 0 0 auto;
}

.fairs-head-copy h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.fairs-head-copy p {
  margin: 0.4rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 36rem;
}

.fairs-head-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.45rem 0.95rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--separator);
  box-shadow: var(--shadow);
}

.stat-chip-val {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-chip-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-tertiary);
  text-transform: lowercase;
}

.btn-cta {
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  gap: 0.45rem;
  border-radius: 12px;
  font-weight: 650;
  box-shadow: 0 6px 16px rgba(12, 92, 68, 0.22);
}

.btn-cta svg {
  flex: 0 0 auto;
}

.quotes-head {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.quotes-toolbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  min-height: 42px;
}
.quotes-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 12rem;
  display: flex;
  align-items: center;
  height: 42px;
}
.quotes-search svg {
  position: absolute;
  left: 0.85rem;
  color: var(--ink-tertiary);
  pointer-events: none;
}
.quotes-search input {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--separator);
  background: #fff;
  border-radius: 12px;
  padding: 0 0.9rem 0 2.35rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 42px;
  box-shadow: var(--shadow);
}
.quotes-search input::-webkit-search-decoration,
.quotes-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.quotes-search input:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.quotes-toolbar-end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  height: 42px;
}
.quotes-toolbar-end .stat-chip {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  margin: 0;
  border-radius: 12px;
  padding: 0 0.95rem;
}
.quotes-toolbar-end .segmented {
  height: 42px;
  box-sizing: border-box;
  align-items: stretch;
  flex-wrap: nowrap;
  padding: 3px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.055);
}
.quotes-toolbar-end .segmented button {
  height: auto;
  padding: 0 0.95rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
}
.quotes-create {
  display: flex;
  margin: 0;
  height: 42px;
}
.quotes-create .btn-cta {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 0 1.1rem;
}
.quotes-toolbar-end > .btn {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 0 1.05rem;
}
.quotes-toolbar-end > .btn-ghost {
  border: 1px solid var(--separator);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.quotes-toolbar-end > .btn-ghost:hover {
  background: #f7f7f8;
}
.quotes-toolbar-end > .btn-cta {
  padding: 0 1.1rem;
}
.quotes-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0 0.5rem;
}
.quotes-pager-info {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  min-width: 7.5rem;
  text-align: center;
}
.quotes-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .quotes-toolbar {
    flex-wrap: wrap;
  }
  .quotes-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .quotes-toolbar-end {
    width: 100%;
    flex-wrap: wrap;
    height: auto;
  }
  .quotes-toolbar-end .segmented { flex: 1 1 auto; }
  .quotes-create { flex: 1 1 auto; }
  .quotes-create .btn-cta { width: 100%; }
}

/* Switch (aktif fuar) */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #f5f5f7;
  border: 1px solid var(--separator);
  cursor: pointer;
  user-select: none;
}

.switch-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.switch-copy strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.switch-copy span {
  font-size: 0.78rem;
  color: var(--ink-tertiary);
  font-weight: 500;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 980px;
  background: #d1d1d6;
  transition: background 0.18s var(--ease);
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.drawer-foot {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.55rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--separator);
}

.drawer-foot .btn {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 650;
}

.drawer-foot .btn-ghost {
  background: #f2f2f4;
  border: 1px solid var(--separator);
  color: var(--ink);
}

.drawer-foot .btn-ghost:hover {
  background: #e8e8ed;
  color: var(--ink);
}

.drawer-foot .btn-primary {
  box-shadow: 0 6px 16px rgba(12, 92, 68, 0.2);
}

.fairs-table-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.fairs-table-panel .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.fairs-table-panel .empty {
  flex: 1;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 2.5rem 1rem;
}

.fairs-table-panel .empty[hidden],
.fairs-table-panel .table-wrap[hidden],
#fairs-table[hidden],
.staff-table-panel .empty[hidden],
.staff-table-panel .table-wrap[hidden],
#staff-table[hidden],
.ready-notes-table-panel .empty[hidden],
.ready-notes-table-panel .table-wrap[hidden],
#ready-notes-table[hidden],
.products-table-panel .empty[hidden],
.products-table-panel .products-list-wrap[hidden] {
  display: none !important;
}

/* Staff page uses same shell layout as fairs */
.page-wide .content:has(.staff-shell) {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.staff-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: none;
}

.staff-table-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.staff-table-panel .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.staff-table-panel .empty {
  flex: 1;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 2.5rem 1rem;
}

/* Ready notes page uses same shell layout as fairs/staff */
.page-wide .content:has(.ready-notes-shell) {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.ready-notes-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: none;
}

.ready-notes-table-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.ready-notes-table-panel .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ready-notes-table-panel .empty {
  flex: 1;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 2.5rem 1rem;
}

/* Products page — collapse tree + sortable */
.page-wide .content:has(.products-shell) {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.products-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: none;
}

.products-table-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 0;
}

.products-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.55rem 0.7rem 0.95rem;
}

.products-table-panel .empty {
  flex: 1;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 2.5rem 1rem;
  gap: 0.35rem;
  text-align: center;
}

.products-loading {
  padding: 1.5rem 1.1rem;
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}

.products-tree {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.prod-cat {
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  animation: prod-in 0.24s var(--ease) both;
}

.prod-cat.is-open {
  border-color: rgba(12, 92, 68, 0.18);
  box-shadow: inset 3px 0 0 var(--accent), 0 8px 22px rgba(12, 92, 68, 0.06);
}

.prod-cat-head {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 52px;
  padding: 0.4rem 0.5rem 0.4rem 0.28rem;
  background: #fff;
}

.prod-cat-index {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  display: grid;
  place-content: center;
  font-variant-numeric: tabular-nums;
}

.prod-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  padding: 0.3rem 0.25rem;
  cursor: pointer;
  text-align: left;
  color: inherit;
  border-radius: 10px;
}

.prod-toggle:hover {
  background: rgba(0, 0, 0, 0.03);
}

.prod-chevron {
  flex-shrink: 0;
  color: var(--ink-tertiary);
  transition: transform 0.18s var(--ease);
}

.prod-cat.is-open .prod-chevron {
  transform: rotate(90deg);
}

.prod-cat-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-cat-count {
  flex-shrink: 0;
  min-width: 1.65rem;
  height: 22px;
  padding: 0 0.5rem;
  margin-right: 0.15rem;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.055);
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.prod-cat-actions,
.prod-item-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.prod-icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-tertiary);
  display: grid;
  place-content: center;
  cursor: pointer;
}

.prod-icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.prod-icon-btn.is-add:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.prod-icon-btn.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.prod-cat-body {
  border-top: 1px solid var(--separator);
  padding: 0.4rem 0.55rem 0.6rem 0.55rem;
  background: linear-gradient(180deg, #fbfbfc, #fff 40%);
}

.prod-cat-body[hidden] {
  display: none !important;
}

.prod-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.prod-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.35rem 0.35rem 0.45rem 0.15rem;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
}

.prod-item-main {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.prod-prices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem;
  padding: 0 0.15rem 0.1rem 2.55rem;
}

.prod-prices .price-unit {
  gap: 0.28rem;
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: 12px;
}

.prod-prices .price-ccy input {
  min-height: 36px;
  height: 36px;
}

@media (max-width: 720px) {
  .prod-prices {
    padding-left: 0.15rem;
    grid-template-columns: 1fr;
  }
}

.prod-item:hover,
.prod-item:focus-within {
  background: #f4f6f5;
}

.prod-item-index {
  flex-shrink: 0;
  width: 22px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}

.prod-item-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.prod-price-meta {
  flex-shrink: 0;
  min-width: 2.4rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #f1f2f1;
  color: var(--ink-tertiary);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.prod-item.is-priced .prod-price-meta {
  background: var(--accent-soft);
  color: var(--accent);
}

.prod-empty-add {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-tertiary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.prod-empty-add:hover {
  border-color: rgba(12, 92, 68, 0.35);
  color: var(--accent);
  background: var(--accent-soft);
}

.prod-drag {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: grab;
  display: grid;
  place-content: center;
}

.prod-drag:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink-secondary);
}

.prod-drag:active {
  cursor: grabbing;
}

.products-tree.is-filtering .prod-drag {
  display: none;
}

.prod-mark {
  background: rgba(12, 92, 68, 0.16);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.08em;
}

.prod-ghost {
  opacity: 0.5;
}

.prod-chosen {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.prod-cat.prod-chosen,
.prod-item.prod-chosen {
  border-color: rgba(12, 92, 68, 0.35);
}

@keyframes prod-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (hover: hover) and (pointer: fine) {
  .prod-item-actions {
    opacity: 0;
    transition: opacity 0.14s var(--ease);
  }
  .prod-item:hover .prod-item-actions,
  .prod-item:focus-within .prod-item-actions {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prod-cat { animation: none; }
}

@media (max-width: 720px) {
  .products-list-wrap {
    padding: 0.4rem 0.45rem 0.75rem;
  }

  .prod-cat-index,
  .prod-item-index {
    display: none;
  }

  .prod-item-actions {
    opacity: 1;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--separator);
  vertical-align: middle;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-tertiary);
  font-weight: 650;
  background: #fafafa;
  border-bottom: 1px solid var(--separator);
}

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

.data-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.018);
}

.data-table .cell-title {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.data-table .cell-dates {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-secondary);
  font-size: 0.84rem;
}

.data-table .col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.table-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.table-actions form { display: inline-flex; margin: 0; }
.table-actions .btn {
  flex: 0 0 auto;
}

.table-loading-row td {
  text-align: center;
  color: var(--ink-tertiary);
  font-weight: 600;
  padding: 2rem 1rem;
}

/* ——— Right drawer ——— */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--surface-solid);
  border-left: 1px solid var(--separator);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.12);
  transform: translateX(104%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem 0.95rem;
  border-bottom: 1px solid var(--separator);
  flex: 0 0 auto;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.drawer-head p {
  margin: 0.25rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.85rem;
}

.drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1.1rem 1.2rem 1.35rem;
  align-content: start;
  align-items: start;
  height: auto;
}

/* Form satırlarının drawer yüksekliğine şişmesini engelle */
form.drawer-body.admin-form {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  grid-auto-rows: max-content;
}

.drawer .field {
  gap: 0.35rem;
  align-content: start;
}

.drawer .field > span.label {
  font-size: 0.78rem;
}

.drawer input[type="text"],
.drawer input[type="email"],
.drawer input[type="password"],
.drawer input[type="date"],
.drawer input[type="number"],
.drawer input[type="tel"],
.drawer input[type="search"],
.drawer select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
  padding: 0 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--separator);
  background: #f5f5f7;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
  align-self: start;
}

.drawer input:hover {
  background: #efeff2;
}

.drawer input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.drawer .form-row {
  gap: 0.75rem;
  align-items: start;
}

.drawer .check {
  margin-top: 0.15rem;
}

.drawer-actions {
  margin-top: 0.35rem;
  padding-top: 0.15rem;
}

body.drawer-open,
body.confirm-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .customers-table,
  .customers-table thead,
  .customers-table tbody,
  .customers-table tr,
  .customers-table th,
  .customers-table td {
    display: block;
    width: 100%;
  }
  .customers-table thead {
    display: none;
  }
  .customers-table tbody tr.customer-row {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid var(--separator);
  }
  .customers-table tbody tr.customer-row:last-child {
    border-bottom: 0;
  }
  .customers-table td {
    padding: 0;
    border-bottom: 0;
  }
  .customers-table td.col-actions {
    width: 100%;
    margin-top: 0.7rem;
    text-align: left;
  }
  .customers-table th.col-actions,
  .customers-table td.col-actions {
    width: 100%;
  }
  .customer-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .fair-customers-table,
  .fair-customers-table thead,
  .fair-customers-table tbody,
  .fair-customers-table tr,
  .fair-customers-table th,
  .fair-customers-table td {
    display: block;
    width: 100%;
  }
  .fair-customers-table thead { display: none; }
  .fair-customers-table tbody tr.fair-customer-row {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid var(--separator);
  }
  .fair-customers-table tbody tr.fair-customer-row:last-child { border-bottom: 0; }
  .fair-customers-table td {
    padding: 0;
    border-bottom: 0;
    width: 100%;
  }
  .fair-customers-table td.fair-temp-cell {
    width: auto;
    margin-top: 0.45rem;
  }
  .fair-customers-table td.col-actions {
    margin-top: 0.7rem;
    text-align: left;
  }
  .fair-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }
  .fair-actions .btn { width: 100%; justify-content: center; }
  .customer-btn-delete {
    grid-column: 1 / -1;
  }
  .customer-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .leads-page .page-head {
    gap: 0.65rem;
  }
  .leads-page .fairs-head-copy h1 {
    font-size: 1.55rem;
  }
  .leads-page .fairs-head-copy p {
    font-size: 0.88rem;
    margin-top: 0.3rem;
  }
  .leads-filter-select,
  .leads-filter-temp {
    flex: 1 1 100%;
  }
  .leads-toolbar-end {
    gap: 0.45rem;
  }
  .leads-toolbar-end .stat-chip {
    min-height: 42px;
  }
  .leads-toolbar-end .btn-cta {
    width: auto;
    flex: 1 1 auto;
  }
  .leads-pager {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .leads-pager-info {
    min-width: 0;
    flex: 1 1 100%;
    order: -1;
  }

  .lead-row {
    grid-template-columns: 1fr;
  }

  .lead-row-actions {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 0.85rem 0.75rem;
    border-top: 0;
  }
  .lead-row-actions .btn,
  .lead-row-actions .lead-icon-btn {
    min-height: 36px;
  }

  .lead-row-link {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.75rem 0.85rem 0.45rem;
  }

  .lead-thumb-wrap,
  .lead-thumb {
    width: 56px !important;
    height: 36px !important;
    max-width: 56px !important;
    max-height: 36px !important;
  }

  .lead-chevron {
    display: none;
  }

  .lead-side {
    grid-column: 2;
    min-width: 0;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 0.15rem;
  }

  .lead-side-badges {
    justify-content: flex-start;
  }

  .lead-side-meta {
    display: flex;
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.detail-product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.detail-product-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 980px;
  background: rgba(12, 92, 68, 0.1);
  color: #0C5C44;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
}

.detail-product-chip em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.68rem;
  color: #6E6E73;
}

/* =========================================================
   Teklif modülü (ayarlar · alanlar · fiyat listesi · teklif)
   ========================================================= */

textarea,
select:not(.drawer select) {
  width: 100%;
  border: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
select:not(.drawer select) { min-height: 44px; }
textarea { resize: vertical; line-height: 1.45; }
textarea:focus,
select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.drawer textarea { min-height: 96px; background: #f5f5f7; border-color: transparent; }
.drawer textarea:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.7; cursor: not-allowed; }
input[readonly] { background: rgba(0, 0, 0, 0.035); }

.table-scroll { overflow-x: auto; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table th.num { text-align: right; }
.cell-muted { color: var(--ink-tertiary); }
.small { font-size: 0.78rem; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-soft); color: var(--danger); }
.col-actions .btn + .btn { margin-left: 0.25rem; }

.segmented {
  display: inline-flex;
  padding: 3px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 980px;
  gap: 2px;
  flex-wrap: wrap;
}
.segmented button,
.segmented a {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.8rem;
  border-radius: 980px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.segmented button.is-active,
.segmented a.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

/* durum rozetleri */
.quote-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 980px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
.quote-status-draft { background: rgba(0, 0, 0, 0.07); color: var(--ink-secondary); }
.quote-status-sent { background: rgba(10, 132, 255, 0.14); color: #0a5bb5; }

/* lead detay: teklif listesi */
.lead-rel-tabs {
  margin: 0 0 0.85rem;
}
.lead-rel { margin-bottom: 0.85rem; padding: 0; overflow: hidden; }
.lead-rel[hidden] { display: none !important; }
.lead-balance-note {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #d7e5df;
  background: #f3f8f5;
  color: #0c5c44;
  font-size: 0.86rem;
  line-height: 1.45;
}
.lead-balance-note[hidden] { display: none !important; }
.lead-balance-note strong { font-weight: 700; }
.lead-balance-note ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.lead-balance-note li { margin: 0.1rem 0; }
.lead-balance-note.is-empty {
  border-color: #e8ddd3;
  background: #fbf6f0;
  color: #8a5a2b;
}
.lead-report { margin-bottom: 0.85rem; padding: 0; overflow: hidden; }
.lead-report[hidden] { display: none !important; }
.lead-report-body { border-top: 1px solid var(--separator); padding: 0.85rem 1rem 1rem; }
.lead-report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.lead-report-stat {
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #fafbfa;
}
.lead-report-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  margin-bottom: 0.35rem;
}
.lead-report-stat-value {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lead-report-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 7px;
  background: #eef4f1;
  color: #0c5c44;
  font-size: 0.86rem;
  font-weight: 650;
}
.lead-report-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.lead-report-block h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.lead-report-block .table-scroll {
  border: 1px solid var(--separator);
  border-radius: 10px;
  overflow: hidden;
}
.lead-report-block .data-table { margin: 0; }
@media (max-width: 960px) {
  .lead-report-grid,
  .lead-report-cols { grid-template-columns: 1fr; }
}
.lead-rel-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}
.lead-rel-filters select.lead-rel-status {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--separator);
  border-radius: 10px;
  padding: 0 1.9rem 0 0.7rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2366756d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  box-shadow: none;
}
.lead-rel-filters select.lead-rel-status:focus {
  outline: none;
  border-color: #0c5c44;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.lead-rel-filters .lead-rel-search {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
  height: 38px;
  box-sizing: border-box;
}
.lead-rel-filters .lead-rel-search input {
  width: 100%;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
}
.lead-rel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem 0.8rem;
}
.lead-rel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lead-rel-count {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-tertiary);
}
.lead-rel-search {
  position: relative;
  width: min(240px, 48vw);
  flex: 0 0 auto;
}
.lead-rel-search svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  pointer-events: none;
}
.lead-rel-search input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--separator);
  background: #f6f6f7;
  padding: 0 0.75rem 0 2.05rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
}
.lead-rel-search input:focus {
  outline: none;
  border-color: #0c5c44;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.lead-rel .table-scroll { border-top: 1px solid var(--separator); }
.lead-rel-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  padding: 0.7rem 1rem 0.85rem;
  border-top: 1px solid var(--separator);
}
.lead-rel-pager [data-rel-info] {
  min-width: 6.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-secondary);
}
.lead-rel-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.lead-rel .col-actions { white-space: nowrap; }
@media (max-width: 640px) {
  .lead-rel-head { flex-wrap: wrap; }
  .lead-rel-filters {
    width: 100%;
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .lead-rel-filters select.lead-rel-status,
  .lead-rel-filters .lead-rel-search {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }
  .lead-rel-search { width: 100%; }
  .lead-rel-tabs {
    margin-left: 0;
    margin-right: 0;
  }
}
.lead-quote-list { display: grid; gap: 0.35rem; }
.lead-quote-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s var(--ease);
}
.lead-quote-row:hover { background: rgba(0, 0, 0, 0.035); }
.lead-quote-total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lead-quote-date { color: var(--ink-tertiary); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.lead-contract-list { display: grid; gap: 0.35rem; }
.lead-contract-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
}
.lead-contract-row strong { min-width: 8rem; }
.lead-contract-meta {
  color: var(--ink-tertiary);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.lead-contract-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
.lead-contract-empty { color: var(--ink-tertiary); margin: 0; }

/* ayarlar */
.settings-shell { max-width: none; width: 100%; }
.settings-dirty {
  font-size: 0.76rem;
  font-weight: 650;
  color: #b26a00;
}
.settings-tabs {
  display: flex;
  gap: 0.1rem;
  margin: -0.35rem 0 1.15rem;
  padding: 0 0.15rem;
  border-bottom: 1px solid var(--separator);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
  appearance: none;
  flex: 0 0 auto;
  border: 0;
  background: none;
  margin-bottom: -1px;
  padding: 0.72rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  text-decoration: none;
}
a.settings-tab { color: var(--ink-secondary); }
a.settings-tab:hover { color: var(--ink); text-decoration: none; }
a.settings-tab.is-active { color: var(--accent); }
.settings-tab:hover { color: var(--ink); }
.settings-tab:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 8px 8px 0 0;
}
.settings-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.settings-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.settings-pane[hidden] { display: none !important; }
.settings-pane.is-active { display: block; }
.settings-mod-pane.is-active { display: block; }
.settings-mod {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.settings-mod-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  width: 100%;
}
.settings-mod-search {
  flex: 1 1 auto;
  min-width: 10rem;
  height: 42px;
  margin: 0;
}
.settings-mod-search-static {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink-secondary);
  font-size: 0.88rem;
  line-height: 1.3;
  overflow: hidden;
}
.settings-mod-search-static span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-mod-search-static strong {
  color: var(--ink);
  font-weight: 700;
}
.settings-mod-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  height: 42px;
}
.settings-mod-actions .stat-chip {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  margin: 0;
  border-radius: 12px;
  padding: 0 0.9rem;
}
.settings-mod-actions .btn,
.settings-mod-actions .btn-cta {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border-radius: 12px;
  white-space: nowrap;
}
.settings-mod-panel {
  margin: 0;
  overflow: hidden;
  min-height: 280px;
}
.settings-mod-panel .table-wrap,
.settings-mod-panel .products-list-wrap {
  min-height: 240px;
}
.settings-mod-panel .empty {
  padding: 2.25rem 1.25rem;
}
.settings-mod-panel .empty strong {
  display: block;
  margin-bottom: 0.35rem;
}
.settings-mod-panel .empty span {
  display: block;
  color: var(--ink-tertiary);
  font-size: 0.88rem;
  line-height: 1.45;
}
.settings-cards {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}
@media (max-width: 1100px) {
  .settings-mod-chip-secondary { display: none; }
}
@media (max-width: 900px) {
  .page-settings .page-head {
    gap: 0.65rem;
  }
  .page-settings .fairs-head-bar {
    width: 100%;
  }
  .page-settings .fairs-head-bar .btn-cta {
    width: 100%;
  }
  .settings-tabs {
    margin: 0 0 0.9rem;
    padding: 0;
    gap: 0;
  }
  .settings-tab {
    padding: 0.65rem 0.8rem;
    font-size: 0.84rem;
    min-height: 42px;
  }
  .settings-mod-bar {
    flex-wrap: wrap;
    height: auto;
  }
  .settings-mod-search,
  .settings-mod-search-static {
    flex: 1 1 100%;
    min-width: 0;
  }
  .settings-mod-actions {
    width: 100%;
    height: auto;
    flex-wrap: wrap;
  }
  .settings-mod-actions .btn,
  .settings-mod-actions .btn-cta {
    flex: 1 1 auto;
    min-width: 0;
  }
  .settings-mod-actions .stat-chip {
    flex: 0 0 auto;
  }
  .settings-cards {
    gap: 0.9rem;
  }
  .settings-card-head .detail-block-title {
    font-size: 1rem;
  }
  #pane-firma .form-row,
  #pane-posta .form-row {
    grid-template-columns: 1fr;
  }
  .settings-dock {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (min-width: 980px) {
  .settings-cards { grid-template-columns: 1fr 1fr; gap: 1.35rem; }
  .settings-card-wide { grid-column: 1 / -1; }
}
.settings-card {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.settings-cards > .panel + .panel { margin-top: 0; }
.settings-card .admin-form,
.settings-card .fx-editor,
.settings-card .field { flex: 1; }
#pane-birimler textarea[hidden],
#pane-teslimat textarea[hidden] { display: none !important; min-height: 0; }
.settings-card-head { margin-bottom: 0.95rem; }
.settings-card-head .detail-block-title { margin: 0 0 0.2rem; font-size: 1.05rem; }
.settings-lead { margin: 0; font-size: 0.8rem; color: var(--ink-tertiary); line-height: 1.45; }
.settings-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: -0.25rem 0 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(12, 92, 68, 0.1), rgba(12, 92, 68, 0.03));
  border: 1px solid rgba(12, 92, 68, 0.12);
}
.settings-preview-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: grid;
  place-items: center;
}
.settings-preview-copy { min-width: 0; }
.settings-preview-copy strong { display: block; letter-spacing: -0.02em; }
.settings-preview-copy span { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: var(--ink-secondary); }
.settings-cards-firma {
  grid-template-columns: 1fr;
}
#pane-firma .admin-form {
  gap: 1.25rem;
}
#pane-firma .form-row {
  gap: 1.15rem 1.25rem;
}
#pane-firma .form-row > .field {
  min-width: 0;
}
.settings-card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.settings-loc-block,
.settings-factory-body {
  display: grid;
  gap: 1.25rem;
}
.settings-loc-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.settings-loc-block + .settings-factory { margin-top: 0; }
.settings-factory {
  border: 1px dashed var(--separator);
  border-radius: 16px;
  padding: 0.35rem 1.05rem 0.35rem;
  background: rgba(0, 0, 0, 0.015);
}
.settings-factory summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.settings-factory summary::-webkit-details-marker { display: none; }
.settings-factory summary em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  background: rgba(0, 0, 0, 0.045);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.settings-factory-body {
  padding: 0.15rem 0 1rem;
}
.bank-list {
  display: grid;
  gap: 1.15rem;
  margin: 0 0 1rem;
}
.bank-card {
  display: grid;
  gap: 1.25rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.015);
}
.bank-card.is-default {
  border-color: rgba(12, 92, 68, 0.32);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.06);
}
.bank-card .form-row {
  display: grid;
  gap: 1.15rem 1.25rem;
}
@media (min-width: 640px) {
  .bank-card .form-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.bank-card-top {
  align-items: end;
}
.bank-card-top .field {
  min-width: 0;
}
.bank-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-height: 44px;
}
@media (min-width: 640px) {
  .bank-card-actions { justify-content: flex-end; }
}
.bank-card select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  font: inherit;
  color: inherit;
}
.bank-card [data-bank="iban"].is-invalid,
.bank-card [data-bank="swiftCode"].is-invalid {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.bank-card-actions .btn.is-default {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.asset-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 820px) {
  .asset-grid { grid-template-columns: minmax(0, 420px); }
}
.asset-drop {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px dashed var(--separator);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.015);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.asset-drop:hover,
.asset-drop.is-over {
  border-color: rgba(12, 92, 68, 0.4);
  background: var(--accent-soft);
}
.asset-drop.is-busy { opacity: 0.65; pointer-events: none; }
.asset-drop-inline {
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
}
.asset-drop-inline .asset-preview {
  min-height: 96px;
  height: 96px;
}
.asset-drop-inline .asset-preview img {
  max-height: 88px;
}
.asset-drop-inline .asset-actions { margin-top: 0.35rem; }
@media (max-width: 640px) {
  .asset-drop-inline { grid-template-columns: 1fr; }
}
.asset-preview {
  min-height: 132px;
  border-radius: 12px;
  background:
    linear-gradient(45deg, rgba(0,0,0,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.04) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.asset-preview img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  display: block;
}
.asset-preview.has-file .asset-placeholder { display: none; }
.asset-placeholder {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  text-align: center;
  padding: 0.75rem;
}
.asset-meta { display: grid; gap: 0.2rem; }
.asset-meta strong { font-size: 0.92rem; }
.asset-meta span { font-size: 0.76rem; color: var(--ink-tertiary); }
.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.settings-dock {
  position: sticky;
  bottom: 0.75rem;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 0.7rem 0.9rem 0.7rem 1.1rem;
  border-radius: 16px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}
.settings-dock[hidden] { display: none; }
.settings-dock span { font-size: 0.86rem; font-weight: 600; }
.settings-panel-head { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.settings-step {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.fx-editor { display: grid; gap: 0.85rem; }
.fx-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 7.5rem minmax(120px, 0.9fr) auto;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink-tertiary);
  letter-spacing: 0.02em;
  padding: 0 0.1rem;
}
#fx-list,
#tax-list {
  display: grid;
  gap: 0.75rem;
}
.fx-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 7.5rem minmax(120px, 0.9fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.fx-row .field { margin: 0; }
.fx-row .fx-remove {
  min-height: 40px;
  height: 40px;
  padding: 0 0.75rem;
  color: var(--ink-tertiary);
}
.fx-row [data-fx="code"] {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 750;
  font-variant: tabular-nums;
}
.fx-add { justify-self: start; }
.fx-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}
.fx-mode {
  display: grid;
  gap: 0.18rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--separator);
  background: #fff;
  cursor: pointer;
  color: inherit;
  font: inherit;
  min-height: 4.4rem;
}
.fx-mode strong {
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.fx-mode span {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-tertiary);
}
.fx-mode:hover { border-color: rgba(12, 92, 68, 0.28); }
.fx-mode.is-active {
  border-color: rgba(12, 92, 68, 0.45);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.fx-mode.is-active span { color: var(--accent); }
.fx-mode.is-busy { opacity: 0.65; pointer-events: none; }
.fx-modes.is-busy { pointer-events: none; opacity: 0.72; }
.fx-status {
  min-height: 1.2rem;
  margin: -0.35rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}
.fx-status.is-ok { color: var(--accent); font-weight: 650; }
.fx-editor [data-fx="rate"][readonly] {
  background: rgba(0, 0, 0, 0.035);
  color: var(--ink-secondary);
}
@media (max-width: 760px) {
  .fx-modes { grid-template-columns: 1fr; }
}
.tax-head-row,
.tax-row {
  grid-template-columns: minmax(0, 1.6fr) 7.5rem auto;
}
.tax-row [data-tax="rate"] {
  font-variant-numeric: tabular-nums;
}
.settings-cards-expenses {
  grid-template-columns: 1fr;
}
.expense-panel .settings-card-head {
  margin-bottom: 1.15rem;
}
.expense-board {
  display: grid;
  gap: 0.85rem;
}
.expense-col-head {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 7.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0 0.15rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--ink-tertiary);
}
.expense-list {
  display: grid;
  gap: 0.65rem;
}
.expense-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 7.5rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.expense-row:focus-within {
  border-color: rgba(12, 92, 68, 0.4);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.expense-index {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: #f1f2f1;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  justify-self: center;
}
.expense-name-field {
  margin: 0;
  min-width: 0;
}
.expense-name-field input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 0.35rem 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: none;
}
.expense-name-field input:focus {
  outline: none;
  box-shadow: none;
}
.expense-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
}
.expense-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-tertiary);
  cursor: pointer;
}
.expense-icon-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}
.expense-icon-btn:disabled {
  opacity: 0.28;
  cursor: default;
}
.expense-icon-btn.is-danger:hover:not(:disabled) {
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}
.expense-empty {
  margin: 0;
  padding: 1.1rem 0.85rem;
  border: 1px dashed var(--separator);
  border-radius: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.015);
}
.expense-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 0.25rem;
}
.expense-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.expense-footer .hint {
  margin: 0;
  flex: 1 1 12rem;
}
@media (max-width: 640px) {
  .expense-col-head {
    display: none;
  }
  .expense-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    grid-template-areas:
      "idx name"
      "idx actions";
    gap: 0.35rem 0.65rem;
    padding: 0.7rem 0.75rem;
  }
  .expense-index { grid-area: idx; align-self: start; margin-top: 0.35rem; }
  .expense-name-field { grid-area: name; }
  .expense-actions {
    grid-area: actions;
    justify-content: flex-start;
  }
}
.settings-cards.settings-cards-mail {
  grid-template-columns: 1fr;
}
.opt-count {
  flex: 0 0 auto;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #f1f2f1;
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.settings-cards-lists > .settings-card {
  height: 480px;
  max-height: 480px;
  overflow: hidden;
}
.settings-cards-lists .settings-card-head {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}
.opt-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.opt-search {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fff;
  color: var(--ink-tertiary);
}
.opt-search:focus-within {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.opt-search input[type="search"] {
  width: 100%;
  height: 36px;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
}
.opt-search input[type="search"]:focus {
  outline: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.opt-search input[type="search"]::-webkit-search-decoration,
.opt-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.opt-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.opt-item.is-hidden { display: none; }
.opt-mark {
  background: rgba(12, 92, 68, 0.16);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.08em;
}
.opt-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.opt-items[hidden],
.opt-empty[hidden],
.opt-none[hidden] { display: none !important; }
.opt-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.3rem 0.35rem 0.3rem 0.8rem;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fff;
}
.unit-abbr {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(12, 92, 68, 0.1);
  color: #0c5c44;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.unit-lock {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.unit-fixed.is-off { opacity: 0.55; }
.unit-fixed .btn { flex: 0 0 auto; }
.opt-item.is-editing {
  border-color: rgba(12, 92, 68, 0.4);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.opt-item-text {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.opt-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.15rem;
}
.opt-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.opt-icon-btn:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.opt-icon-btn.is-danger:hover { background: var(--danger-soft); color: var(--danger); }
.opt-icon-btn.is-ok:hover { background: var(--accent-soft); color: var(--accent); }
.opt-item [data-opt-act="commit"],
.opt-item [data-opt-act="cancel"] { display: none; }
.opt-item.is-editing [data-opt-act="edit"],
.opt-item.is-editing [data-opt-act="delete"] { display: none; }
.opt-item.is-editing [data-opt-act="commit"],
.opt-item.is-editing [data-opt-act="cancel"] { display: inline-flex; }
input.opt-edit-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  min-height: 44px;
}
.opt-empty,
.opt-none {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  color: var(--ink-tertiary);
  font-size: 0.85rem;
}
.opt-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.opt-add input {
  flex: 1;
  min-width: 0;
  height: 44px;
  min-height: 44px;
}
.opt-add .btn {
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px;
  padding: 0 1rem;
}
.settings-cards-mail .settings-card .admin-form,
.settings-cards-mail .settings-card .field {
  flex: none;
}
.mail-form,
.mail-tpl {
  gap: 1rem;
}
#pane-posta .field > .label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.25rem;
  line-height: 1.25rem;
}
#pane-posta .form-row {
  align-items: start;
  gap: 1rem 1.15rem;
}
#pane-posta .form-row > .field {
  display: grid;
  grid-template-rows: 1.25rem 44px auto;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
}
#pane-posta .form-row > .field > input,
#pane-posta .field > input,
#pane-posta textarea {
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}
#pane-posta textarea {
  height: auto;
  min-height: 14rem;
}
@media (min-width: 640px) {
  #pane-posta #mail-custom-fields {
    grid-template-columns: minmax(0, 1fr) 9.5rem;
  }
}
.mail-provider {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
}
.mail-provider button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  padding: 0 0.6rem;
  border-radius: 10px;
}
.mail-secure-switch:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .mail-provider { grid-template-columns: 1fr 1fr; }
  .mail-secure-switch {
    height: auto;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
  }
  .mail-secure-switch .switch-copy { flex-wrap: wrap; }
  .mail-secure-switch .switch-copy span { white-space: normal; }
}
.mail-secure-switch {
  margin: 0;
  box-sizing: border-box;
  min-height: 44px;
  height: 44px;
  padding: 0 0.85rem;
}
.mail-secure-switch .switch-copy {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.mail-secure-switch .switch-copy span { white-space: nowrap; }
.mail-test-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  min-height: 44px;
}
.mail-test-row .btn {
  min-height: 44px;
  height: 44px;
  padding: 0 1rem;
}
.mail-ok { color: var(--accent); font-weight: 650; }
.mail-pass-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 0.45rem;
  height: 1.15rem;
  border-radius: 980px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 750;
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1;
}
#mail-pass.is-saved {
  box-shadow: inset 0 0 0 1px rgba(12, 92, 68, 0.22);
}
.mail-tpl {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
}
.mail-tokens {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.mail-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--separator);
  background: #fff;
  border-radius: 980px;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-secondary);
  cursor: pointer;
  line-height: 1;
}
.mail-token:hover { border-color: rgba(12, 92, 68, 0.35); color: var(--accent); }
#mail-body { min-height: 14rem; resize: vertical; }
.mail-form input[readonly] {
  background: rgba(0, 0, 0, 0.035);
  color: var(--ink-secondary);
}

.send-mail-banner {
  flex-shrink: 0;
  padding: 0.65rem 1.15rem;
  background: #fff6e5;
  color: #8a5a00;
  font-size: 0.82rem;
  font-weight: 650;
  border-bottom: 1px solid var(--separator);
}
.send-mail-banner a { color: inherit; text-decoration: underline; }
.send-lead.is-disabled { opacity: 0.55; cursor: not-allowed; }
.send-lead.is-disabled:hover { border-color: var(--separator); }

.setup-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.setup-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0.2rem 0.7rem 0.2rem 0.3rem;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}
.setup-steps li.is-here { background: var(--accent-soft); color: var(--accent); }
.setup-steps em {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
}
.setup-steps a { color: inherit; text-decoration: none; }
.setup-steps a:hover { text-decoration: underline; }

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

/* teklif alanları (şema builder) */
.qf-grid { display: grid; gap: 0.85rem; }
@media (min-width: 1100px) { .qf-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.qf-panel-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.85rem; }
.qf-panel-desc { margin: 0.15rem 0 0; color: var(--ink-tertiary); font-size: 0.82rem; line-height: 1.45; }
.qf-panel-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.qf-version { font-size: 0.72rem; font-weight: 700; color: var(--ink-tertiary); padding: 0.15rem 0.5rem; border: 1px solid var(--separator); border-radius: 980px; }
.qf-list { display: grid; gap: 0.4rem; }
.qf-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.012);
}
.qf-row.sortable-ghost { opacity: 0.4; }
.qf-handle {
  cursor: grab;
  width: 14px;
  height: 22px;
  border-radius: 4px;
  background:
    radial-gradient(circle, var(--ink-tertiary) 1.1px, transparent 1.2px) 0 0 / 6px 6px;
  opacity: 0.45;
  align-self: center;
}
.qf-type {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 0.4rem;
  margin-right: 0.35rem;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink-secondary);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.qf-row-title { font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.qf-row-meta { font-size: 0.78rem; color: var(--ink-tertiary); margin-top: 0.15rem; }
.qf-row-meta code { font-size: 0.74rem; background: rgba(0, 0, 0, 0.05); padding: 0.05rem 0.35rem; border-radius: 5px; }
.qf-row-actions { display: flex; gap: 0.2rem; }
.qf-tag { font-size: 0.66rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 980px; text-transform: uppercase; letter-spacing: 0.04em; }
.qf-tag-req { background: rgba(0, 0, 0, 0.07); color: var(--ink-secondary); }
.qf-tag-dim { background: var(--accent-soft); color: var(--accent); }
.qf-toggles { display: grid; gap: 0.6rem; }
.qf-toggles small { color: var(--ink-tertiary); font-weight: 400; }
.qf-dim-block { display: grid; gap: 0.75rem; padding: 0.85rem; border: 1px dashed var(--separator); border-radius: var(--radius-md); }
.qf-dim-block > .label { font-size: 0.74rem; font-weight: 700; color: var(--ink-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }

/* fiyat listesi */
.page-wide .content:has(.pricing-shell) {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}
.pricing-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: none;
}
.pricing-list {
  display: grid;
  gap: 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0.1rem 1rem;
}
.pricing-loading {
  padding: 1.5rem 0.2rem;
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}
.pricing-shell > .empty {
  flex: 1;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 2.5rem 1rem;
  gap: 0.35rem;
  text-align: center;
}
.pricing-shell > .empty[hidden] { display: none !important; }
.price-group {
  display: grid;
  gap: 0.65rem;
}
.price-group-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink-secondary);
}
.price-group-index {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  display: grid;
  place-content: center;
  font-variant-numeric: tabular-nums;
}
.price-group-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.price-card {
  background: #fff;
  border: 1px solid var(--separator);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.price-card.is-filled {
  border-color: rgba(12, 92, 68, 0.16);
  box-shadow: inset 3px 0 0 var(--accent), 0 8px 22px rgba(12, 92, 68, 0.05);
}
.price-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem 0.65rem;
}
.price-card-head strong {
  display: block;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
}
.price-card-meta {
  flex-shrink: 0;
  min-width: 1.65rem;
  height: 22px;
  padding: 0 0.5rem;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.055);
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.price-card.is-filled .price-card-meta {
  background: var(--accent-soft);
  color: var(--accent);
}
.price-units {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 0.55rem;
  padding: 0.15rem 0.85rem 0.9rem;
}
.price-unit {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 14px;
  background: #f6f7f6;
  border: 1px solid transparent;
}
.price-unit.is-empty {
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.12);
}
.price-unit:not(.is-empty) {
  background: #fff;
  border-color: rgba(12, 92, 68, 0.16);
}
.price-unit .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.price-ccys { display: grid; gap: 0.32rem; }
.price-ccy {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 0.4rem;
}
.price-ccy > span {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.price-ccy.is-override > span { color: var(--accent); }
.price-unit input,
.price-ccy input {
  min-height: 40px;
  height: 40px;
  padding: 0 0.7rem;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.price-unit.is-empty input { font-weight: 500; color: var(--ink-tertiary); }
.price-unit.is-saving input { opacity: 0.65; }
.price-unit.is-saved {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.1);
}
.price-mark {
  background: rgba(12, 92, 68, 0.16);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.08em;
}
.price-line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.price-line:first-child { border-top: 0; }
.price-line-dims { min-width: 0; }
.price-line-meta {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-line-meta strong { color: var(--ink); font-size: 0.92rem; }
.price-line-actions { display: flex; gap: 0.15rem; justify-content: flex-end; }
.price-group-start td { border-top: 2px solid rgba(0, 0, 0, 0.06); }
.price-base { font-size: 0.78rem; color: var(--ink-tertiary); font-style: italic; }
.price-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0.3rem 0.2rem 0;
  padding: 0.15rem 0.5rem;
  border-radius: 980px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
}
.price-dim-chip em { font-style: normal; font-weight: 400; opacity: 0.75; }

/* teklif düzenleme */
.page-quote-edit .content { padding-bottom: 5.75rem; }
.quote-edit-shell { max-width: none; width: 100%; }

.quote-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-tertiary);
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: color 0.15s var(--ease);
}
.quote-back:hover { color: var(--accent); }
.quote-head h1 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.quote-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.quote-meta > * {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 0.55rem;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.045);
  color: var(--ink-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}
.quote-meta a:hover { background: var(--accent-soft); color: var(--accent); }

.quote-pdf-group { display: inline-flex; }
.quote-pdf-group .btn { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 0; }
.quote-pdf-group .btn:first-child { border-radius: 980px 0 0 980px; }
.quote-pdf-group .btn:last-child {
  border-radius: 0 980px 980px 0;
  margin-left: -1px;
  padding-left: 0.7rem;
  padding-right: 0.75rem;
}
.quote-pdf-group .btn[hidden] { display: none !important; }
.quote-pdf-group [data-pdf-slot="1"] { margin-left: -1px; min-width: 3.1rem; justify-content: center; }

.quote-save { position: relative; }
.quote-dirty-dot {
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffcc00;
  margin-left: 0.35rem;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.3);
}
.quote-save.is-dirty .quote-dirty-dot { display: inline-block; }
.quote-save.is-saving { opacity: 0.7; }

.quote-mode-bar {
  display: grid;
  grid-template-columns: minmax(15rem, 1.3fr) minmax(9rem, 0.8fr) minmax(11rem, 1fr);
  align-items: end;
  gap: 0.75rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.95rem;
  background: var(--surface-solid);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
}
.quote-mode-bar > .field { margin: 0; }
.quote-pdf-langs button { min-width: 5.4rem; flex: 1; }
.quote-mode-type .quote-mode { width: 100%; }
.quote-mode-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.quote-mode-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-tertiary);
}
.quote-mode button { min-width: 7.2rem; flex: 1; }
.quote-grid[data-market="domestic"] .export-only { display: none !important; }
.quote-grid[data-market="export"] #q-tax-rate { opacity: 0.72; pointer-events: none; }
.cif-only { display: none; font-style: normal; font-weight: 650; color: var(--accent); }
.quote-grid.is-cif .cif-only,
.quote-grid.is-insured .cif-only { display: inline; }

.cap-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.6rem;
  border-radius: 980px;
  background: rgba(12, 92, 68, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}
.cap-badge[hidden] { display: none !important; }

.quote-freight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  flex-wrap: nowrap;
  margin-bottom: 0.75rem;
}
.quote-freight-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.quote-freight-title .detail-block-title {
  margin: 0;
  white-space: nowrap;
}
.quote-ccy {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 4.15rem;
  height: 28px;
  cursor: pointer;
}
.quote-ccy::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.42rem;
  width: 8px;
  height: 8px;
  transform: translateY(-55%) rotate(45deg);
  border-right: 1.6px solid var(--ink-secondary);
  border-bottom: 1.6px solid var(--ink-secondary);
  pointer-events: none;
}
.quote-freight-panel select.quote-ccy-select {
  display: block;
  width: 4.15rem;
  max-width: 4.15rem;
  min-width: 4.15rem;
  height: 28px;
  min-height: 28px;
  padding: 0 1.15rem 0 0.5rem;
  border: 1px solid var(--separator);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.04);
  background-image: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 26px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-shadow: none;
}
.quote-freight-panel select.quote-ccy-select:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
}
.quote-freight-panel select.quote-ccy-select:focus {
  outline: none;
  background: #fff;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.quote-freight-panel select.quote-ccy-select:disabled {
  opacity: 0.7;
  cursor: default;
}
.quote-freight-bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
}
.quote-freight-mode { flex: 0 0 auto; }
.quote-freight-mode button { min-width: 5.6rem; }
.quote-freight-bar-end strong {
  flex: 0 0 auto;
  min-width: 5.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
  white-space: nowrap;
}
.quote-freight-mode-hint {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--ink-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quote-freight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
}
.quote-freight-grid .field { margin: 0; gap: 0.22rem; }
.quote-freight-grid .label {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-tertiary);
}
.quote-freight-grid .quote-amt {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 0.7rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--surface-solid);
  box-sizing: border-box;
}
.quote-freight-grid .quote-amt:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.quote-freight-ship {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem 1.1rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: rgba(12, 92, 68, 0.035);
}
.quote-ship-field {
  flex: 1 1 16rem;
  margin: 0;
  gap: 0.22rem;
}
.quote-freight-ship .label {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-tertiary);
}
.quote-ship-ctl {
  display: flex;
  align-items: stretch;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--surface-solid);
  overflow: hidden;
}
.quote-ship-ctl:focus-within {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.quote-freight-panel .quote-ship-ctl input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 38px;
  min-height: 0;
  margin: 0;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.quote-freight-panel .quote-ship-ctl input:focus {
  outline: none;
  box-shadow: none;
}
.quote-freight-panel .quote-ship-ctl .quote-load-pick {
  flex: 0 0 5.6rem;
  width: 5.6rem;
  border-left: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.03);
}
.quote-freight-panel .quote-ship-ctl select {
  display: block;
  width: 100%;
  max-width: none;
  height: 38px;
  min-height: 0;
  margin: 0;
  padding: 0 1.5rem 0 0.6rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.quote-freight-panel .quote-ship-ctl select:focus {
  outline: none;
  box-shadow: none;
}
.quote-ship-cost {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  flex: 0 0 auto;
  min-width: 8.5rem;
  padding-bottom: 0.15rem;
}
.quote-ship-cost span {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-tertiary);
}
.quote-ship-cost strong {
  font-size: 1.05rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}
.quote-ship-hint {
  margin: -0.45rem 0 0.7rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-tertiary);
}
.quote-freight-load {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.7rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--separator);
}
.quote-freight-load.is-single {
  grid-template-columns: minmax(0, 22rem);
}
.quote-freight-load .field { margin: 0; gap: 0.22rem; }
.quote-freight-load .label {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-tertiary);
}
.quote-freight-panel .quote-load-ctl {
  display: flex;
  align-items: stretch;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--surface-solid);
  overflow: hidden;
}
.quote-freight-panel .quote-load-ctl:focus-within {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.quote-freight-panel .quote-load-pick {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.quote-freight-panel .quote-load-pick::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.65rem;
  width: 7px;
  height: 7px;
  transform: translateY(-60%) rotate(45deg);
  border-right: 1.6px solid var(--ink-secondary);
  border-bottom: 1.6px solid var(--ink-secondary);
  pointer-events: none;
}
.quote-freight-panel .quote-load-ctl select {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 38px;
  min-height: 0;
  margin: 0;
  padding: 0 1.6rem 0 0.7rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.quote-freight-panel .quote-load-ctl select:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}
.quote-freight-panel .quote-load-ctl .quote-amt {
  flex: 0 0 6.6rem;
  width: 6.6rem;
  height: 38px;
  min-height: 0;
  margin: 0;
  padding: 0 0.7rem;
  border: 0;
  border-left: 1px solid var(--separator);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.03);
  box-shadow: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.quote-freight-panel .quote-load-ctl .quote-amt:focus {
  outline: none;
  box-shadow: none;
  background: #fff;
}
@media (max-width: 860px) {
  .quote-freight-grid { grid-template-columns: 1fr 1fr; }
  .quote-freight-bar { flex-wrap: wrap; }
  .quote-freight-mode-hint { text-align: left; }
  .quote-freight-load { grid-template-columns: 1fr 1fr; }
  .quote-freight-load.is-single { grid-template-columns: 1fr; }
  .quote-freight-ship { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .quote-freight-grid { grid-template-columns: 1fr; }
  .quote-freight-bar-end { width: 100%; flex-wrap: wrap; }
  .quote-freight-mode-hint { flex-basis: 100%; }
  .quote-freight-mode { flex: 1; }
  .quote-freight-mode button { flex: 1; }
  .quote-freight-load { grid-template-columns: 1fr; }
  .quote-ship-cost { width: 100%; align-items: flex-start; }
}
.money-field {
  display: flex;
  align-items: stretch;
  min-height: 40px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--surface-solid);
  overflow: hidden;
}
.money-field:focus-within {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.money-sym {
  display: grid;
  place-items: center;
  min-width: 2.6rem;
  padding: 0 0.5rem;
  background: rgba(0, 0, 0, 0.035);
  color: var(--ink-tertiary);
  font-weight: 750;
  font-size: 0.82rem;
}
.money-ccy {
  flex: 0 0 auto;
  min-width: 3.7rem;
  max-width: 4.8rem;
  height: 40px;
  border: 0;
  border-right: 1px solid var(--separator);
  border-radius: 0;
  background-color: rgba(0, 0, 0, 0.035);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236e6e73' d='M1.2 1.4L6 6.2l4.8-4.8' stroke='%236e6e73' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.32rem center;
  background-size: 10px;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  padding: 0 1.2rem 0 0.45rem;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.money-ccy:disabled { opacity: 0.72; cursor: default; }
.money-ccy:focus { outline: none; }
.money-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  height: 40px;
  min-height: 40px;
  padding: 0 0.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  background: transparent;
  box-shadow: none;
}
.money-field input:focus { outline: none; box-shadow: none; }
.freight-mode {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.freight-mode legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--ink-secondary);
  letter-spacing: 0.01em;
}
.freight-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: var(--surface-solid);
  cursor: pointer;
}
.freight-opt:has(input:checked) {
  border-color: rgba(12, 92, 68, 0.38);
  background: rgba(12, 92, 68, 0.05);
}
.freight-opt input { margin-top: 0.18rem; accent-color: var(--accent); }
.freight-opt strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}
.freight-opt em {
  display: block;
  margin-top: 0.18rem;
  font-style: normal;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ink-tertiary);
}

.qi-pack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 0.75rem 1rem;
  align-items: end;
  padding: 0.65rem 0.75rem;
  background: rgba(12, 92, 68, 0.035);
  border-radius: 12px;
}
.qi-pack .label {
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  height: 14px;
  color: var(--ink-tertiary);
}
.qi-pack-types { display: grid; gap: 0.28rem; min-width: 0; }
.qi-pack-seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.qi-pack-seg .qi-chip {
  min-height: 36px;
  height: 36px;
  padding: 0 0.75rem;
  background: #fff;
}
.qi-pack-seg .qi-chip.is-none {
  background: transparent;
  border-style: dashed;
  color: var(--ink-tertiary);
  font-weight: 550;
}
.qi-pack-seg .qi-chip.is-none.is-on {
  background: #fff;
  border-style: dashed;
  border-color: var(--separator);
  color: var(--ink-tertiary);
  font-weight: 550;
}
.qi-pack-plus { display: grid; gap: 0.28rem; min-width: 0; }
.qi-pack-plus-wrap {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  height: 40px;
  min-height: 40px;
  padding: 0 0.65rem;
  background: #fff;
  border: 1px solid var(--separator);
  border-radius: 10px;
  box-sizing: border-box;
}
.qi-pack-plus-wrap em {
  font-style: normal;
  font-weight: 700;
  color: var(--ink-tertiary);
  font-size: 0.9rem;
}
.qi-row .qi-pack-plus-wrap input[type="number"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 38px;
  min-height: 0;
  max-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.qi-row .qi-pack-plus-wrap input[type="number"]::-webkit-outer-spin-button,
.qi-row .qi-pack-plus-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qi-allin {
  margin: -0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--accent);
}
.quote-terms-panel {
  padding: 1.15rem 1.2rem 1.05rem;
}
.quote-terms-panel > .detail-block-title {
  margin-bottom: 1rem;
}
.quote-terms-body {
  display: grid;
  gap: 1.1rem;
}
.quote-terms-mode {
  margin: 0;
}
.quote-terms-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1rem;
}
@media (min-width: 700px) {
  .quote-terms-meta {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1100px) {
  .quote-terms-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .quote-terms-panel .transport-seg {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.quote-terms-meta .field {
  margin: 0;
  min-width: 0;
}
.quote-terms-notes {
  margin: 0;
}
.quote-terms-ccy {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.02);
}
.quote-ccy-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.quote-ccy-field {
  margin: 0;
  min-width: 0;
}
.quote-ccy-field select {
  width: 100%;
}
.quote-fx-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  white-space: nowrap;
}
.quote-fx-refresh.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
.quote-fx-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}
.quote-fx-status.is-ok {
  color: var(--accent);
  font-weight: 650;
}
.qi-ccy-tag {
  margin-left: 0.25rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-tertiary);
}
@media (max-width: 560px) {
  .quote-ccy-controls {
    grid-template-columns: 1fr;
  }
  .quote-fx-refresh {
    width: 100%;
  }
}
#q-delivery-notes { min-height: 72px; }
.transport-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.transport-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.45rem;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--ink-secondary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}
.transport-seg button span { font-size: 1rem; line-height: 1; }
.transport-seg button.is-active {
  border-color: rgba(12, 92, 68, 0.4);
  background: rgba(12, 92, 68, 0.07);
  color: var(--ink);
}
.transport-seg button:disabled { opacity: 0.65; cursor: default; }
.incoterm-hint {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.22rem 0.55rem;
  border-radius: 980px;
  background: rgba(12, 92, 68, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.3;
}
.incoterm-hint[hidden] { display: none !important; }
.freight-term-hint {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(12, 92, 68, 0.07);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
}
.freight-term-hint.is-info {
  background: rgba(12, 92, 68, 0.07);
  color: var(--ink-secondary);
}
.freight-term-hint.is-warn,
.quote-grid.is-exw .freight-term-hint {
  background: rgba(178, 106, 0, 0.1);
  color: #8a5200;
}
.freight-term-hint[hidden] { display: none !important; }
.quote-freight-grid .field.is-needed .quote-amt {
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08);
}
.quote-freight-grid .field.is-needed .label { color: var(--accent); }
.quote-freight-grid .field.is-duty .quote-amt {
  border-color: rgba(178, 106, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(178, 106, 0, 0.12);
}
.quote-freight-grid .field.is-duty .label { color: #8a5200; }
.field-badge {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-tertiary);
}
.field-badge.is-warn { color: #8a5200; }
.field-badge[hidden] { display: none !important; }
.ins-cover {
  font-style: normal;
  font-weight: 650;
  color: var(--accent);
}

.quote-grid { display: grid; gap: 0.85rem; }
.quote-main, .quote-side { display: grid; gap: 0.85rem; }
.quote-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.quote-panel-head .detail-block-title { margin: 0; }
.qi-count {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 0.4em;
  margin-left: 0.3rem;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.07);
  color: var(--ink-secondary);
  font-size: 0.7rem;
  text-align: center;
  letter-spacing: 0;
}
.qi-count:empty { display: none; }

.quote-items-panel { padding: 1.05rem 1.1rem 1.15rem; }
.qi-list { display: grid; gap: 0.55rem; }
.qi-row {
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 0.7rem 0.8rem 0.75rem;
  display: grid;
  gap: 0.55rem;
  background: #fff;
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease), opacity 0.14s var(--ease), transform 0.14s var(--ease);
}
.qi-row:focus-within { border-color: rgba(12, 92, 68, 0.32); box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.08); }
.qi-row.is-new { animation: qi-in 0.22s var(--ease); }
.qi-row.is-leaving { opacity: 0; transform: translateX(8px); }
@keyframes qi-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.qi-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 0.5rem; align-items: center; }
.qi-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qi-product { font-weight: 650; }
.product-combo {
  position: relative;
  min-width: 0;
  width: 100%;
}
.product-combo-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: #fff;
  padding: 0 0.7rem 0 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.product-combo-trigger.is-empty {
  font-weight: 500;
  color: var(--ink-tertiary);
}
.product-combo-trigger:hover {
  border-color: rgba(12, 92, 68, 0.35);
}
.product-combo.is-open .product-combo-trigger {
  border-color: #0c5c44;
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.product-combo-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-combo-chevron {
  flex: 0 0 auto;
  color: var(--ink-tertiary);
  transition: transform 0.15s var(--ease);
}
.product-combo.is-open .product-combo-chevron {
  transform: rotate(180deg);
}
.product-combo.is-disabled .product-combo-trigger {
  opacity: 0.65;
  cursor: not-allowed;
  background: #f6f6f7;
}
.product-combo-panel {
  position: fixed;
  z-index: 400;
  margin: 0;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  box-sizing: border-box;
}
.product-combo-panel[hidden] { display: none !important; }
.product-combo-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--separator);
  color: var(--ink-tertiary);
}
.product-combo-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  padding: 0;
}
.product-combo-list {
  max-height: 220px;
  overflow: auto;
  padding: 0.3rem;
}
.product-combo-option {
  display: grid;
  gap: 0.08rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  cursor: pointer;
}
.product-combo-option strong {
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink);
}
.product-combo-option span {
  font-size: 0.74rem;
  color: var(--ink-tertiary);
}
.product-combo-option:hover,
.product-combo-option.is-selected {
  background: rgba(12, 92, 68, 0.08);
}
.product-combo-empty {
  padding: 0.75rem 0.65rem;
  font-size: 0.82rem;
  color: var(--ink-tertiary);
  text-align: center;
}
#ship-product-combo.field { gap: 0.35rem; }
#ship-product-combo .product-combo-trigger { min-height: 40px; }
.qi-line-total {
  font-variant-numeric: tabular-nums;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.qi-remove { width: 32px; height: 32px; border-radius: 8px; background: transparent; color: var(--ink-tertiary); }
.qi-remove:hover { background: var(--danger-soft); color: var(--danger); }

.qi-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
}
.qi-field { gap: 0.28rem; min-width: 0; }
.qi-field.is-wide { flex: 1 1 100%; }
.qi-field.is-chips { flex: 1 1 auto; }
.qi-field > .label {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-tertiary);
}
.qi-field .label .req { color: var(--danger); font-style: normal; }
.qi-field .dim-mark {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.05rem 0.32rem;
  margin-left: 0.2rem;
}

.qi-nums {
  display: grid;
  grid-template-columns: 80px 104px minmax(168px, 1.35fr) 100px 80px minmax(148px, 1.15fr);
  gap: 0.45rem;
  align-items: end;
  padding-top: 0.2rem;
  border-top: 1px dashed var(--separator);
}
.qi-nums .field { gap: 0.28rem; min-width: 0; }
.qi-nums .label {
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  height: 14px;
  display: flex;
  align-items: center;
  color: var(--ink-tertiary);
  white-space: nowrap;
}
.qi-row .qi-nums input[type="number"],
.qi-row .qi-nums select,
.qi-row .qi-head select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 0.7rem;
  font-size: 0.86rem;
  line-height: 40px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}
.qi-row .qi-nums select {
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236e6e73' d='M1.2 1.4L6 6.2l4.8-4.8' stroke='%236e6e73' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 11px;
}
.qi-row .qi-nums input[type="number"]::-webkit-outer-spin-button,
.qi-row .qi-nums input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qi-row .qi-nums input[type="number"] { -moz-appearance: textfield; }
.qi-row .qi-nums .money-field {
  height: 40px;
  min-height: 40px;
  background: rgba(0, 0, 0, 0.02);
}
.qi-row .qi-nums .money-field select,
.qi-row .qi-nums .money-field input[type="number"] {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border: 0;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
}
.qi-row .qi-nums .money-field select.money-ccy {
  background-color: rgba(0, 0, 0, 0.035);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236e6e73' d='M1.2 1.4L6 6.2l4.8-4.8' stroke='%236e6e73' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.28rem center;
  background-size: 10px;
  padding: 0 1.15rem 0 0.4rem;
}
.qi-row .qi-nums .money-field .qi-price {
  padding: 0 0.65rem;
  font-variant-numeric: tabular-nums;
}
.qi-row .qi-nums .money-field .quote-ccy {
  width: 4.35rem;
  height: 40px;
  flex: 0 0 auto;
  border-right: 1px solid var(--separator);
}
.qi-row .qi-nums .money-field .quote-ccy::after {
  right: 0.48rem;
}
.qi-row .qi-nums .money-field .quote-ccy select,
.qi-row .qi-nums .money-field select.qi-ccy {
  display: block;
  width: 4.35rem;
  max-width: 4.35rem;
  min-width: 4.35rem;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.045);
  background-image: none;
  padding: 0 1.2rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 40px;
  cursor: pointer;
  box-shadow: none;
}
.qi-ctl { position: relative; display: block; }
.qi-ctl .qi-price-note {
  position: absolute;
  top: -7px;
  right: 8px;
  z-index: 1;
}
.qi-price { width: 100%; font-variant-numeric: tabular-nums; }
.qi-price[readonly] { background: rgba(12, 92, 68, 0.06); border-color: transparent; color: var(--ink); font-weight: 650; }
.qi-mode-field { min-width: 0; }
.qi-mode {
  display: flex;
  align-items: stretch;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.055);
  border-radius: 10px;
  box-sizing: border-box;
}
.qi-mode.is-static {
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ink-secondary);
}
.qi-mode button {
  flex: 1;
  border: 0;
  background: transparent;
  height: 100%;
  padding: 0 0.4rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.qi-mode button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.qi-price-note { font-size: 0.62rem; font-weight: 700; padding: 0.04rem 0.38rem; border-radius: 980px; }
.qi-price-note.ok { background: var(--success-soft); color: #1f8a3a; }
.qi-price-note.warn { background: rgba(255, 149, 0, 0.16); color: #b26a00; }
.qi-price-note.manual { background: rgba(0, 0, 0, 0.07); color: var(--ink-secondary); }

.qi-multi { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.qi-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--separator);
  border-radius: 980px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 550;
  cursor: pointer;
  background: #fff;
  color: var(--ink-secondary);
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease), transform 0.12s var(--ease);
}
.qi-chip:hover { border-color: rgba(12, 92, 68, 0.4); color: var(--ink); }
.qi-chip:active { transform: scale(0.97); }
.qi-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; }
.qi-chip:disabled { cursor: default; opacity: 0.7; transform: none; }

.qi-add {
  width: 100%;
  margin-top: 0.65rem;
  min-height: 44px;
  border: 1.5px dashed rgba(12, 92, 68, 0.32);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.qi-add:hover { background: var(--accent-soft); border-color: var(--accent); }
.qi-list:empty + .qi-add { min-height: 72px; }

.quote-pair { display: grid; gap: 0.85rem; }
.quote-pair > .panel { min-width: 0; margin-top: 0; }
.quote-ops { display: grid; gap: 0.85rem; }
.quote-ops > .panel { min-width: 0; margin-top: 0; }
@media (min-width: 900px) {
  .quote-pair {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .quote-pair-copy { grid-template-columns: 1fr 1fr 1fr; }
  .quote-pair > .panel {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .quote-pair > .panel .admin-form { flex: 1; }
  .quote-pair-copy .quote-notes-panel .admin-form,
  .quote-pair-copy .quote-notes-panel .field {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .quote-pair-copy textarea { flex: 1; min-height: 8.5rem; }
  .quote-pair-copy .quote-totals .qt-grand { margin-top: auto; }
}
.quote-notes-grid { display: grid; gap: 0.85rem; }
@media (min-width: 760px) { .quote-notes-grid { grid-template-columns: 1fr 1fr; } }

.quote-customer-form { gap: 0.55rem; }
.quote-customer-panel input { min-height: 40px; }
.quote-cust-kicker {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.quote-cust-kicker:first-child { margin-top: 0; }

.send-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(12, 18, 16, 0.46);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.send-backdrop.is-open { opacity: 1; pointer-events: auto; }
.send-open { overflow: hidden; }
.send-card {
  width: min(1080px, calc(100vw - 1.5rem));
  height: min(86vh, 820px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--separator);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.22s var(--ease);
}
.send-backdrop.is-open .send-card { transform: none; }
.send-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.05rem 1.2rem 0.8rem;
  border-bottom: 1px solid var(--separator);
  flex-shrink: 0;
}
.send-head h2 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.send-head p { margin: 0; font-size: 0.8rem; color: var(--ink-secondary); max-width: 40rem; line-height: 1.4; }
.send-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.send-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
}
.send-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.8rem 0.95rem;
  gap: 0.5rem;
}
.send-col-fairs {
  border-right: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.018);
}
.send-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.send-col-head .label { margin: 0; }
.send-col-meta {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.send-fairs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding-right: 0.1rem;
}
.send-fair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.48rem 0.6rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.send-fair-main { display: grid; gap: 0.06rem; min-width: 0; }
.send-fair strong {
  font-size: 0.84rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-fair span { font-size: 0.7rem; color: var(--ink-tertiary); }
.send-fair-n {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--ink-tertiary);
  min-width: 1.5rem;
  text-align: right;
}
.send-fair:hover { background: rgba(0, 0, 0, 0.04); }
.send-fair.is-active {
  border-color: rgba(12, 92, 68, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}
.send-fair.is-active span { color: inherit; }
.send-fair.is-active .send-fair-n { color: var(--accent); }
.send-fair.is-muted { opacity: 0.62; }
.send-leads-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.send-leads-toolbar > div { display: flex; align-items: baseline; gap: 0.4rem; }
.send-search {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--separator);
  padding: 0 0.75rem;
  background: #fff;
}
.send-col-leads .send-leads {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.28rem;
}
.send-lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--separator);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.send-lead:hover { border-color: rgba(12, 92, 68, 0.28); }
.send-lead:has(input:checked) {
  border-color: rgba(12, 92, 68, 0.4);
  background: var(--accent-soft);
}
.send-lead input { width: 16px; height: 16px; accent-color: var(--accent); }
.send-lead-copy { display: grid; gap: 0.06rem; min-width: 0; }
.send-lead-copy strong {
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-lead-copy em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-empty { margin: 0.4rem 0; color: var(--ink-tertiary); font-size: 0.84rem; }
.send-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
  max-height: 5.2rem;
  overflow: auto;
  padding: 0.5rem 1.05rem;
  border-top: 1px solid var(--separator);
  background: rgba(12, 92, 68, 0.035);
  flex-shrink: 0;
}
.send-picked-label {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-right: 0.15rem;
}
.send-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 14rem;
  padding: 0.18rem 0.45rem 0.18rem 0.55rem;
  border: 0;
  border-radius: 980px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--separator);
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-chip span {
  color: var(--ink-tertiary);
  font-size: 0.95rem;
  line-height: 1;
}
.send-chip:hover { box-shadow: 0 0 0 1px rgba(12, 92, 68, 0.4); color: var(--accent); }
.send-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.1rem 0.95rem;
  border-top: 1px solid var(--separator);
  flex-shrink: 0;
}
.send-count { margin-right: auto; font-size: 0.82rem; font-weight: 650; color: var(--ink-secondary); }
.send-count.is-warn { color: #a93226; }
.send-prod {
  display: grid;
  gap: 0.4rem;
  position: relative;
  flex: 0 0 auto;
}
.send-prod-field {
  position: relative;
  display: block;
  margin: 0;
}
.send-prod-field svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  pointer-events: none;
}
.send-prod-field input {
  width: 100%;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--separator);
  padding: 0 0.75rem 0 2.15rem;
  background: #fff;
  font: inherit;
  font-size: 0.86rem;
}
.send-prod-field input:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.send-prod-menu {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  padding: 0.3rem;
}
.send-prod-cat {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0.55rem 0.2rem;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  background: #fff;
}
.send-prod-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.send-prod-item span {
  font-size: 0.84rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-prod-item em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.send-prod-item:hover,
.send-prod-item.is-hi { background: rgba(0, 0, 0, 0.045); }
.send-prod-item.is-on {
  background: var(--accent-soft);
  color: var(--accent);
}
.send-prod-item.is-on em { color: var(--accent); }
.send-prod-more {
  margin: 0.2rem 0.45rem 0.35rem;
  font-size: 0.72rem;
  color: var(--ink-tertiary);
}
.send-prod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
}
.send-prod-clear {
  border: 0;
  background: none;
  padding: 0.1rem 0.2rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--accent);
  cursor: pointer;
}
.send-prod-clear:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .send-card { height: min(94vh, 100%); border-radius: 16px; }
  .send-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(132px, 34%) minmax(0, 1fr);
  }
  .send-col-fairs { border-right: none; border-bottom: 1px solid var(--separator); }
  .send-lead { grid-template-columns: auto minmax(0, 1fr); }
  .send-lead .temp-badge { grid-column: 2; justify-self: start; }
}

.quote-totals {
  display: grid;
  gap: 0.4rem;
  background:
    linear-gradient(180deg, rgba(12, 92, 68, 0.045), transparent 56%),
    var(--surface-solid);
}
.qt-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.86rem; color: var(--ink-secondary); }
.qt-row em { font-style: normal; font-size: 0.76rem; color: var(--ink-tertiary); }
.qt-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.qt-grand { padding-top: 0.55rem; margin-top: 0.2rem; border-top: 1px solid var(--separator); font-size: 0.92rem; color: var(--ink); }
.qt-grand strong { font-size: 1.4rem; color: var(--accent); letter-spacing: -0.03em; }

.q-fields { display: grid; gap: 0.85rem; }

.quote-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 20;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.5rem 0.5rem 1.05rem;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--separator);
  border-radius: 22px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
}
.quote-bar-info { display: flex; align-items: baseline; gap: 0.55rem; min-width: 0; }
.quote-bar-count { font-size: 0.76rem; color: var(--ink-tertiary); white-space: nowrap; }
.quote-bar-count::after { content: '·'; margin-left: 0.55rem; }
.quote-bar-label { font-size: 0.78rem; color: var(--ink-secondary); white-space: nowrap; }
.quote-bar-total { font-size: 1.12rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-bar-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.quote-bar-dirty { font-size: 0.74rem; font-weight: 650; color: #b26a00; white-space: nowrap; }
.quote-bar-kbd {
  font-size: 0.68rem;
  color: var(--ink-tertiary);
  border: 1px solid var(--separator);
  border-radius: 6px;
  padding: 0.08rem 0.38rem;
}

@media (prefers-reduced-motion: reduce) {
  .qi-row.is-new, .qi-row.is-leaving, .qi-chip { animation: none; transform: none; }
}

@media (max-width: 760px) {
  .price-line { grid-template-columns: 1fr auto; }
  .price-line-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .qi-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .qi-head .qi-line-total { grid-column: 1 / span 2; justify-self: start; }
  .qi-head .qi-remove { grid-row: 1; grid-column: 3; }
  .qi-nums { grid-template-columns: 1fr 1fr; }
  .qi-nums .qi-price-field { grid-column: 1 / -1; }
  .qi-nums .qi-mode-field { grid-column: 1 / 2; }
  .qi-nums .qi-tax-field { grid-column: 1 / -1; }
  .qi-pack { grid-template-columns: 1fr; padding: 0.6rem; }
  .quote-mode-bar { padding: 0.65rem 0.8rem; grid-template-columns: 1fr; }
  .quote-bar { border-radius: 16px; padding: 0.55rem 0.7rem; bottom: 0.5rem; flex-direction: column; align-items: stretch; }
  .quote-bar-count, .quote-bar-kbd, .quote-bar-label { display: none; }
  .quote-bar-actions { justify-content: stretch; }
  .quote-bar-actions .btn { flex: 1; justify-content: center; }
  .quote-bar-actions .quote-pdf-group { flex: 1; }
}

/* ——— Toplu mail ——— */
.mail-head {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.page-mail .fairs-head-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  height: 42px;
}
.page-mail .fairs-head-bar .stat-chip {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  margin: 0;
  border-radius: 12px;
  padding: 0 0.95rem;
}
.page-mail .fairs-head-bar .btn-cta {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 1.05rem;
  border-radius: 12px;
}
.drawer.drawer-wide {
  width: min(760px, 100vw);
}
.drawer-wide [hidden] {
  display: none !important;
}
.mail-stepper {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid var(--separator);
  flex: 0 0 auto;
}
.mail-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-tertiary);
}
.mail-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 750;
}
.mail-step.is-active { color: var(--accent); }
.mail-step.is-active i {
  background: var(--accent);
  color: #fff;
}
.mail-step.is-done { color: var(--ink-secondary); }
.mail-step.is-done i {
  background: var(--accent-soft);
  color: var(--accent);
}
.mail-step-line {
  flex: 0 0 2.2rem;
  height: 1px;
  background: var(--separator);
}
.mail-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 1.05rem 1.2rem 1.2rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mail-panel.is-active { display: flex; }
.mail-compose-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-secondary);
}
.mail-panel .mail-body-field {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mail-panel #bulk-mail-text {
  flex: 1;
  min-height: 16rem;
  resize: vertical;
}
.mail-panel-pick {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.mail-pick-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
}
.mail-pick-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem;
}
.mail-pick-fairs {
  border-right: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.018);
}
.mail-pick-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.mail-pick-col-head strong {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.mail-pick-col-head span {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-tertiary);
  font-variant-numeric: tabular-nums;
}
.mail-pick-search {
  width: 100%;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--separator);
  padding: 0 0.75rem;
  background: #fff;
  font: inherit;
  font-size: 0.86rem;
}
.mail-pick-search:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.mail-pick-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mail-pick-actions {
  display: flex;
  gap: 0.65rem;
}
.mail-text-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--accent);
  cursor: pointer;
}
.mail-text-btn:hover { text-decoration: underline; }
.mail-pick-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.mail-lead-list {
  display: grid;
  align-content: start;
  gap: 0.28rem;
}
.mail-foot {
  display: none;
  margin: 0;
  padding: 0.85rem 1.2rem 1.05rem;
  border-top: 1px solid var(--separator);
  flex: 0 0 auto;
}
.mail-foot.is-active { display: grid; }
#mail-foot-view.is-active { grid-template-columns: 1fr; }
.mail-open {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.mail-open:hover { color: var(--accent); }
.mail-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.08rem 0.5rem;
  border-radius: 980px;
  font-size: 0.74rem;
  font-weight: 750;
  white-space: nowrap;
}
.mail-status-ok { background: var(--accent-soft); color: var(--accent); }
.mail-status-fail { background: rgba(169, 50, 38, 0.12); color: #a93226; }
.mail-status-mixed { background: rgba(178, 106, 0, 0.14); color: #8a5200; }
.mail-view-meta {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}
.mail-view-recs {
  display: grid;
  gap: 0.32rem;
}
.mail-rec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.7rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: #fff;
}
.mail-rec strong {
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-rec span {
  grid-column: 1;
  font-size: 0.74rem;
  color: var(--ink-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-rec em {
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--accent);
}
.mail-rec.is-fail em { color: #a93226; }
.mail-panel-view #mail-view-body {
  min-height: 9rem;
  resize: vertical;
}
@media (max-width: 760px) {
  .drawer.drawer-wide { width: 100vw; }
  .mail-pick-split {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(140px, 32%) minmax(0, 1fr);
  }
  .mail-pick-fairs { border-right: none; border-bottom: 1px solid var(--separator); }
}

.contract-from-quote {
  padding: 0.85rem 0.95rem !important;
}
.contract-from-quote-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px dashed rgba(12, 92, 68, 0.35);
  border-radius: 14px;
  background: rgba(12, 92, 68, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.contract-from-quote-btn:hover {
  border-color: rgba(12, 92, 68, 0.55);
  background: rgba(12, 92, 68, 0.07);
}
.contract-from-quote-btn strong {
  display: block;
  font-size: 0.95rem;
}
.contract-from-quote-btn em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  line-height: 1.35;
}
.contract-from-quote-btn svg { flex: 0 0 auto; color: var(--accent); }
.quote-pick-backdrop {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
}
.quote-pick-backdrop[hidden] { display: none !important; }
.quote-pick-card {
  width: min(760px, 100%);
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.2);
}
.quote-pick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.quote-pick-head h2 { margin: 0; font-size: 1.15rem; }
.quote-pick-head p {
  margin: 0.3rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.86rem;
}
.quote-pick-search { width: 100%; }
.quote-pick-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  border: 1px solid var(--separator);
  border-radius: 12px;
}
.quote-pick-pager {
  margin: 0;
  justify-content: flex-end;
}

.contracts-toolbar {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.contracts-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}
.contracts-filter-field {
  display: grid;
  gap: 0.28rem;
  min-width: 9.5rem;
}
.contracts-filter-field > .label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink-secondary);
}
.contracts-filter-field > select,
.contracts-buyer-combo > input {
  min-height: 40px;
  height: 40px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  padding: 0 0.75rem;
  background: var(--surface-solid, #fff);
  font: inherit;
  box-sizing: border-box;
}
.contracts-buyer-filter {
  position: relative;
  min-width: 14rem;
  flex: 1 1 14rem;
  max-width: 20rem;
}
.contracts-buyer-combo {
  position: relative;
  display: flex;
  align-items: center;
}
.contracts-buyer-combo > input {
  width: 100%;
  padding-right: 2.2rem;
}
.contracts-buyer-combo .icon-btn {
  position: absolute;
  right: 0.25rem;
  width: 30px;
  height: 30px;
}
@media (max-width: 900px) {
  .contracts-filters { width: 100%; }
  .contracts-buyer-filter { max-width: none; }
}

.drawer.drawer-contract {
  width: min(920px, 100vw);
  overflow: hidden;
}
.drawer.drawer-contract > form.drawer-body.contract-form {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem 1.4rem;
  align-content: start;
}
.drawer.drawer-contract .contract-section {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.012);
}
.drawer.drawer-contract .contract-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0;
}
.drawer.drawer-contract .contract-section-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.drawer.drawer-contract .contract-section-head .hint {
  margin: 0.2rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
}
.drawer.drawer-contract .contract-section > .field,
.drawer.drawer-contract .contract-section > .form-row,
.drawer.drawer-contract .contract-section > .buyer-search {
  margin: 0;
}
.drawer.drawer-contract .form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: start;
}
.drawer.drawer-contract .field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.drawer.drawer-contract .field > input,
.drawer.drawer-contract .field > select,
.drawer.drawer-contract .field > textarea,
.drawer.drawer-contract .combo > input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
}
.drawer.drawer-contract .field > textarea { min-height: 72px; }
.drawer.drawer-contract .qi-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.drawer.drawer-contract .qi-add {
  margin: 0;
  width: 100%;
}
.drawer.drawer-contract .qi-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.drawer.drawer-contract .qi-row {
  padding: 0.85rem 0.9rem;
}
.drawer.drawer-contract .qi-nums {
  gap: 0.65rem;
}
.drawer.drawer-contract .qi-ccy-label {
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  border-right: 1px solid var(--separator);
}
.drawer.drawer-contract .contract-freight-head strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.1rem;
}
.drawer.drawer-contract .contract-freight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.drawer.drawer-contract .quote-freight-load {
  margin-top: 0.15rem;
}
.drawer.drawer-contract .contract-unit-cost {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}
.drawer.drawer-contract .contract-unit-cost strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.drawer.drawer-contract .contract-convert-field {
  min-width: 10rem;
  margin: 0;
}
.drawer.drawer-contract .contract-summary-table th,
.drawer.drawer-contract .contract-summary-table td { white-space: nowrap; }
.drawer.drawer-contract .contract-summary-table td:first-child { white-space: normal; }
.drawer.drawer-contract .contract-foot {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.85rem 1.25rem calc(1.15rem + env(safe-area-inset-bottom));
  background: var(--surface-solid, #fff);
  border-top: 1px solid var(--separator);
}
@media (max-width: 720px) {
  .drawer.drawer-contract .form-row,
  .drawer.drawer-contract .contract-freight-grid,
  .drawer.drawer-contract .contract-freight-load {
    grid-template-columns: 1fr;
  }
  .drawer.drawer-contract .contract-section-head {
    flex-direction: column;
  }
  .drawer.drawer-contract .contract-convert-field {
    width: 100%;
  }
}
.buyer-search { position: relative; }
.buyer-results {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: calc(100% - 0.15rem);
  display: grid;
  max-height: 220px;
  overflow: auto;
  background: var(--surface-solid, #fff);
  border: 1px solid var(--separator);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.buyer-results[hidden],
.combo-list[hidden] { display: none !important; }
.buyer-results.buyer-menu {
  position: fixed;
  z-index: 200;
  right: auto;
}
.combo { position: relative; }
.combo-list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% - 0.15rem);
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 0.3rem;
  border: 1px solid var(--separator);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}
.combo-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.combo-list.product-menu {
  position: fixed;
  z-index: 200;
  margin: 0;
}
.combo-list button:hover,
.combo-list button.is-active { background: rgba(12, 92, 68, 0.08); }
.pdf-lang-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
}
.pdf-lang-backdrop[hidden] { display: none !important; }
.pdf-lang-card {
  width: min(380px, 100%);
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
.pdf-lang-card h2 {
  margin: 0;
  font-size: 1.15rem;
}
.pdf-lang-card p {
  margin: 0.4rem 0 1rem;
  color: var(--ink-secondary);
}
.pdf-lang-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
}
.combo-list .combo-empty {
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  color: var(--ink-tertiary);
}
.pay-combo .combo-list button {
  display: grid;
  gap: 0.1rem;
}
.pay-combo .combo-list button span {
  font-size: 0.78rem;
  color: var(--ink-tertiary);
}
.buyer-results button {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-bottom: 1px solid var(--separator);
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.buyer-results button:hover,
.buyer-results button.is-active { background: rgba(0, 0, 0, 0.04); }
.buyer-results span { font-size: 0.75rem; color: var(--ink-tertiary); }
.contract-foot .btn:disabled {
  opacity: 0.72;
  cursor: default;
}
.btn.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: none;
}
.btn-spin {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  flex: 0 0 auto;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.contract-status {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.contract-status-draft { background: rgba(0, 0, 0, 0.06); color: var(--ink-secondary); }
.contract-status-saved { background: rgba(180, 120, 0, 0.14); color: #8a5a00; }
.contract-status-sent { background: rgba(0, 113, 227, 0.12); color: #0b5cab; }
.contract-status-completed { background: var(--success-soft); color: #1b7a35; }
.contract-status-signed { background: var(--success-soft); color: #1b7a35; }
.contract-status-cancelled { background: var(--danger-soft); color: var(--danger); }
.contracts-shell .col-actions { white-space: nowrap; }
@media (max-width: 760px) {
  .drawer.drawer-contract { width: 100vw; }
}

.super-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem;
}
.super-create-card { margin-bottom: 0.85rem; }
.super-create-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.super-create {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.super-create-submit { display: flex; align-items: end; }
.super-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}
.super-pass {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.super-pass input {
  width: 9.5rem;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--separator);
  background: #f6f6f7;
  padding: 0 0.65rem;
  font: inherit;
  font-size: 0.82rem;
}
.super-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.super-status-active { background: var(--success-soft); color: #1b7a35; }
.super-status-suspended { background: var(--danger-soft); color: var(--danger); }
a.stat-link {
  color: inherit;
  text-decoration: none;
}
a.stat-link:hover { border-color: var(--accent-ring); }
.saas-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}
.saas-board-rich {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.saas-board > .stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 7rem;
  height: 100%;
}
.saas-board > .stat strong { margin-bottom: 0; }
.saas-board > .stat span {
  display: block;
  min-height: 1.2rem;
  line-height: 1.2rem;
}
.saas-board-rich > .panel {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.saas-board-rich > .panel .saas-home-head {
  flex: 0 0 auto;
  margin-bottom: 0.7rem;
}
.saas-board-rich > .panel .saas-home-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
}
.saas-board-rich > .panel .quick-actions {
  flex: 0 0 auto;
  margin-top: 0.75rem;
}
.saas-board-health,
.saas-board-usage {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.saas-board-due,
.saas-board-audit {
  height: 20rem;
  min-height: 20rem;
  max-height: 20rem;
  overflow: hidden;
}
.saas-board-health { grid-column: 1 / 3; }
.saas-board-usage { grid-column: 3 / 5; }
.saas-board-due,
.saas-board-audit { grid-column: span 2; }
.saas-board-note {
  grid-column: 1 / -1;
  height: 14rem;
  min-height: 14rem;
  max-height: 14rem;
  overflow: hidden;
}
.saas-board-empty { margin: 0; }
.saas-home-chip {
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
}
.saas-health-grid,
.saas-usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}
.saas-health-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--separator);
  color: inherit;
  text-decoration: none;
}
.saas-health-card strong {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.saas-health-card span {
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}
.saas-health-card.is-danger { background: rgba(180, 35, 24, 0.08); border-color: rgba(180, 35, 24, 0.16); }
.saas-health-card.is-warn { background: rgba(154, 103, 0, 0.1); border-color: rgba(154, 103, 0, 0.18); }
.saas-health-card.is-soft { background: rgba(12, 92, 68, 0.08); border-color: rgba(12, 92, 68, 0.14); }
.saas-usage-grid > div {
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--separator);
}
.saas-usage-grid strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.saas-usage-grid span {
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}
.saas-audit-home {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.saas-audit-home li {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--separator);
}
.saas-audit-home li:first-child { border-top: 0; padding-top: 0; }
.saas-audit-home span { color: var(--ink-secondary); font-size: 0.86rem; }
.saas-audit-home em {
  font-style: normal;
  color: var(--ink-tertiary);
  font-size: 0.78rem;
}
.saas-home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.7rem;
  margin-bottom: 0.85rem;
}
.saas-home-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.saas-home-copy {
  margin: 0 0 0.85rem;
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}
.saas-home-banner {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #fff6df;
  border: 1px solid rgba(154, 103, 0, 0.22);
  color: #6b4b00;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}
.saas-home-more {
  margin: 0.75rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.85rem;
}
.saas-due-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.saas-due-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--separator);
  color: inherit;
  text-decoration: none;
}
.saas-due-list li:first-child .saas-due-row { border-top: 0; padding-top: 0; }
.saas-due-row strong { display: block; letter-spacing: -0.02em; }
.saas-due-row small {
  display: block;
  margin-top: 0.12rem;
  color: var(--ink-secondary);
  font-size: 0.78rem;
}
.saas-due-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}
.saas-due-meta em {
  font-style: normal;
  color: var(--ink-secondary);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.saas-due-row:hover strong { color: var(--accent); }
.impersonate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #0c5c44;
  color: #fff;
}
.impersonate-bar .btn { background: #fff; color: #0c5c44; }
@media (max-width: 1100px) {
  .saas-health-grid,
  .saas-usage-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .saas-board,
  .saas-board-rich { grid-template-columns: 1fr 1fr; }
  .saas-board-health,
  .saas-board-usage,
  .saas-board-due,
  .saas-board-audit,
  .saas-board-note {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .saas-board,
  .saas-board-rich { grid-template-columns: 1fr; }
  .saas-health-grid,
  .saas-usage-grid { grid-template-columns: 1fr 1fr; }
  .saas-due-row { align-items: flex-start; }
  .saas-due-meta { flex-direction: column; align-items: flex-end; }
}
@media (max-width: 760px) {
  .super-create { grid-template-columns: 1fr; }
}
.saas-toolbar { align-items: center; margin-bottom: 0.65rem; }
.saas-toolbar .segmented { flex: 0 0 auto; height: 42px; align-items: center; box-sizing: border-box; }
.saas-customer .lead-row-link { grid-template-columns: minmax(0, 1fr) auto; }
.saas-customer .lead-title {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.saas-customer .lead-title a {
  color: inherit;
  text-decoration: none;
}
.saas-customer .lead-title a:hover { color: var(--brand, #0c5c44); }
.saas-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.saas-stat {
  background: #fff;
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.saas-stat strong { display: block; font-size: 1.35rem; letter-spacing: -0.03em; }
.saas-stat span { color: var(--ink-secondary); font-size: 0.8rem; }
.saas-detail-grid { display: grid; gap: 0.85rem; }
.saas-readonly {
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink-secondary);
}
.saas-extend { margin-top: 1rem; }
.saas-extend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.45rem 0 0.35rem;
}
.saas-extend-row form { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; }
.saas-extend-custom { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.saas-extend-custom input {
  width: 5.5rem;
  height: 36px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  padding: 0 0.6rem;
}
@media (max-width: 800px) {
  .saas-stats { grid-template-columns: 1fr 1fr; }
  .saas-toolbar { flex-wrap: wrap; }
}
#saas-drawer form[hidden] { display: none !important; }
#saas-drawer > form.drawer-body { flex: 0 0 auto; }
#saas-pack-form { padding-bottom: 0; }
#saas-pack-extend { padding-top: 5px; }
#saas-drawer .saas-extend-row { margin-top: 0; }
#saas-drawer .saas-extend-custom { margin-top: 0.55rem; }
#saas-drawer .drawer-foot { grid-template-columns: 1fr; margin-top: 0.15rem; padding-top: 0.7rem; }
.saas-limit {
  position: relative;
  flex: 0 0 auto;
  height: 42px;
}
.saas-limit select {
  height: 42px;
  min-width: 6.6rem;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2366756d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  padding: 0 1.8rem 0 0.85rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.saas-limit select:focus {
  outline: none;
  border-color: rgba(12, 92, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.12);
}
.saas-table-panel { padding: 0; overflow: hidden; }
.saas-table-panel .empty { margin: 1.2rem; }
.saas-table-wrap { overflow-x: auto; }
.saas-table thead th {
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-secondary);
  background: #f6f8f7;
  padding: 0.78rem 1rem;
}
.saas-table td { padding: 0.9rem 1rem; }
.saas-table th:first-child,
.saas-table td:first-child { padding-left: 1.15rem; }
.saas-table th:last-child,
.saas-table td:last-child { padding-right: 1rem; }
.saas-table tbody tr:last-child td { border-bottom: 0; }
.saas-sort {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.saas-sort:hover { color: var(--ink); }
.saas-sort i {
  font-style: normal;
  color: var(--ink-tertiary);
  font-size: 0.72rem;
}
.saas-days {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.6rem;
  border-radius: 980px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.saas-days-ok { color: #0c5c44; background: rgba(12, 92, 68, 0.1); }
.saas-days-soon { color: #9a6700; background: rgba(154, 103, 0, 0.12); }
.saas-days-out { color: #b42318; background: rgba(180, 35, 24, 0.1); }
.saas-days-none { color: var(--ink-tertiary); font-weight: 600; background: rgba(0, 0, 0, 0.04); }
.saas-firm a { color: inherit; text-decoration: none; }
.saas-firm a:hover { color: #0c5c44; }
.saas-firm small {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 500;
}
.saas-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.saas-pager-size {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-secondary);
  font-size: 0.85rem;
}
.saas-pager-size select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--separator);
  background: #fff;
  padding: 0 0.55rem;
  font: inherit;
}
.saas-pager-nav { display: inline-flex; align-items: center; gap: 0.55rem; }
.saas-pager-nav .btn[disabled],
.saas-pager-nav .is-disabled { opacity: 0.4; pointer-events: none; }
.maintenance-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0;
  padding: 0.55rem 1.25rem;
  background: #fff6df;
  border-bottom: 1px solid rgba(154, 103, 0, 0.28);
  color: #6b4b00;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
@media (max-width: 900px) {
  .maintenance-bar { top: var(--header-h); }
}
.saas-account {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}
.saas-account > .panel { margin-top: 0; }
.saas-account-users { grid-column: 1 / -1; }
.saas-account-intro { margin-bottom: 0.95rem; }
.saas-account-intro h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.saas-account-intro p {
  margin: 0.28rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.86rem;
  line-height: 1.4;
}
.saas-account-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}
.saas-account-add .form-actions { margin: 0; }
.saas-account-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.saas-account-card > .admin-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.saas-account-card .form-actions { margin-top: auto; padding-top: 0.35rem; }
.saas-account-text { flex: 1; }
.saas-account-text textarea { min-height: 7.5rem; resize: vertical; }
@media (max-width: 980px) {
  .saas-account,
  .saas-account-add { grid-template-columns: 1fr; }
}
.field-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}
.field-check input { width: 1.05rem; height: 1.05rem; }

/* ——— Fuar müşteri ekle drawer ——— */
.leads-head .quotes-toolbar-end .btn-cta {
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
  white-space: nowrap;
}
.fair-lead-drawer form.drawer-body.admin-form {
  gap: 0.85rem;
  padding-top: 0.85rem;
}
.fair-lead-panel {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-width: 0;
}
.fair-lead-panel[hidden],
.fair-lead-ocr-pick[hidden],
.fair-lead-ocr-preview[hidden],
.fair-lead-ocr-status[hidden],
.fair-lead-notes-chips[hidden],
.fair-lead-selected[hidden] {
  display: none !important;
}
.fair-lead-panel > .field,
.fair-lead-panel > .form-row,
.fair-lead-panel > .drawer-section,
.fair-lead-panel > .fair-lead-ocr,
.fair-lead-panel > .fair-lead-summary,
.fair-lead-panel > .fair-lead-temps,
.fair-lead-panel > .fair-lead-notes-chips,
.fair-lead-panel > .fair-lead-selected,
.fair-lead-panel > .fair-lead-products {
  margin: 0;
}
.fair-lead-panel > .drawer-section {
  margin-top: 0.15rem;
}
.fair-lead-panel > .drawer-section:first-child {
  margin-top: 0;
}
.fair-lead-drawer .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}
.fair-lead-drawer .form-row > .field {
  min-width: 0;
  margin: 0;
}
.fair-lead-steps {
  padding: 0 1.2rem 0.15rem;
}
.fair-lead-step-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(12, 92, 68, 0.12);
  overflow: hidden;
}
.fair-lead-step-bar span {
  display: block;
  height: 100%;
  width: 50%;
  background: var(--brand, #0c5c44);
  border-radius: 999px;
  transition: width 0.22s ease;
}
.fair-lead-step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--ink-tertiary);
  font-weight: 650;
}
.fair-lead-panel.is-enter {
  animation: fairLeadPanelIn 0.28s ease;
}
@keyframes fairLeadPanelIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
.fair-lead-ocr {
  display: grid;
  gap: 0.65rem;
}
.fair-lead-ocr-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.fair-lead-ocr-pick.is-busy {
  opacity: 0.72;
  pointer-events: none;
}
.fair-lead-ocr-btn {
  position: relative;
  width: 100%;
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px dashed rgba(12, 92, 68, 0.38);
  background: linear-gradient(165deg, rgba(12, 92, 68, 0.1), rgba(12, 92, 68, 0.02));
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.fair-lead-ocr-btn:hover {
  border-color: rgba(12, 92, 68, 0.6);
  background: rgba(12, 92, 68, 0.1);
  transform: translateY(-1px);
}
.fair-lead-ocr-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.fair-lead-ocr-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand, #0c5c44);
  box-shadow: 0 6px 16px rgba(12, 92, 68, 0.16);
  flex: 0 0 auto;
}
.fair-lead-ocr-icon::before,
.fair-lead-ocr-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 1.5px solid rgba(12, 92, 68, 0.28);
  animation: fairLeadRipple 2.4s ease-out infinite;
}
.fair-lead-ocr-icon::after { animation-delay: 1.2s; }
@keyframes fairLeadRipple {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.45); opacity: 0; }
}
.fair-lead-ocr-btn > span:last-child {
  min-width: 0;
}
.fair-lead-ocr-btn strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
}
.fair-lead-ocr-btn em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.74rem;
  color: var(--ink-tertiary);
  line-height: 1.3;
}
.fair-lead-ocr-preview {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--separator);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}
.fair-lead-ocr-media {
  position: relative;
  overflow: hidden;
}
.fair-lead-ocr-preview img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: #f3f3f4;
}
.fair-lead-ocr-sweep {
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 34%;
  background: linear-gradient(
    180deg,
    rgba(12, 92, 68, 0) 0%,
    rgba(12, 92, 68, 0.28) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(12, 92, 68, 0.18) 55%,
    rgba(12, 92, 68, 0) 100%
  );
  animation: fairLeadSweep 1.35s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fairLeadSweep {
  from { transform: translateY(0); }
  to { transform: translateY(320%); }
}
.fair-lead-ocr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  padding: 0.7rem;
}
.fair-lead-ocr-actions .btn {
  width: 100%;
  min-height: 36px;
  justify-content: center;
}
.fair-lead-ocr-status {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  background: #f3f3f5;
  color: var(--ink-secondary);
}
.fair-lead-ocr-status.is-ok {
  color: #0c5c44;
  background: rgba(12, 92, 68, 0.1);
}
.fair-lead-ocr-status.is-err {
  color: #a93226;
  background: rgba(192, 57, 43, 0.1);
}
.fair-lead-ocr-status.is-warn {
  color: #9a7b0a;
  background: rgba(214, 137, 16, 0.12);
}
.fair-lead-ocr-status.is-info {
  color: var(--ink-secondary);
  background: rgba(0, 0, 0, 0.04);
}
.fair-lead-drawer .fair-lead-field-pop {
  animation: fairLeadFieldPop 0.55s ease;
  border-color: rgba(12, 92, 68, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(12, 92, 68, 0.14);
}
@keyframes fairLeadFieldPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
.fair-lead-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(12, 92, 68, 0.06);
  min-width: 0;
}
.fair-lead-summary > div:last-child {
  min-width: 0;
}
.fair-lead-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand, #0c5c44);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  flex: 0 0 auto;
}
.fair-lead-summary strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-lead-summary span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.8rem;
  color: var(--ink-tertiary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-lead-req,
.fair-lead-opt {
  font-style: normal;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 0.35rem;
  color: var(--ink-tertiary);
  font-size: 0.72rem;
}
.fair-lead-temps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.fair-lead-temp {
  border: 1px solid var(--separator);
  background: #fff;
  border-radius: 12px;
  padding: 0.75rem 0.65rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-height: 72px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fair-lead-temp strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.25;
}
.fair-lead-temp span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--ink-tertiary);
  line-height: 1.3;
}
.fair-lead-temp[data-temp="hot"].is-active {
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}
.fair-lead-temp[data-temp="warm"].is-active {
  border-color: #d68910;
  background: rgba(214, 137, 16, 0.1);
  box-shadow: 0 0 0 2px rgba(214, 137, 16, 0.12);
}
.fair-lead-temp[data-temp="cold"].is-active {
  border-color: #2980b9;
  background: rgba(41, 128, 185, 0.08);
  box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.12);
}
.fair-lead-notes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.fair-lead-note-chip {
  border: 1px solid var(--separator);
  background: #fff;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.fair-lead-note-chip:hover {
  border-color: rgba(12, 92, 68, 0.4);
  color: var(--brand, #0c5c44);
}
.fair-lead-note-chip.is-used {
  border-color: rgba(12, 92, 68, 0.35);
  background: rgba(12, 92, 68, 0.08);
  color: var(--brand, #0c5c44);
}
.fair-lead-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.fair-lead-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: rgba(12, 92, 68, 0.12);
  color: var(--brand, #0c5c44);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
}
.fair-lead-selected-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-lead-selected-chip i {
  font-style: normal;
  opacity: 0.75;
  font-weight: 800;
}
.fair-lead-products {
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: #fff;
  max-height: 280px;
  overflow: auto;
}
.fair-lead-products-empty {
  margin: 0;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  text-align: center;
}
.fair-lead-cat + .fair-lead-cat {
  border-top: 1px solid var(--separator);
}
.fair-lead-cat-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 0;
  background: #fafafa;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.fair-lead-cat-head:hover {
  background: #f3f4f5;
}
.fair-lead-cat-chevron {
  flex: 0 0 auto;
  color: var(--ink-tertiary);
  transition: transform 0.18s ease;
}
.fair-lead-cat.is-open .fair-lead-cat-chevron {
  transform: rotate(180deg);
  color: var(--brand, #0c5c44);
}
.fair-lead-cat.is-open > .fair-lead-cat-head {
  background: rgba(12, 92, 68, 0.06);
  color: var(--brand, #0c5c44);
}
.fair-lead-cat-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-lead-cat-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  flex: 0 0 auto;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
}
.fair-lead-cat.is-open .fair-lead-cat-meta {
  background: rgba(12, 92, 68, 0.12);
  color: var(--brand, #0c5c44);
}
.fair-lead-cat-body {
  animation: fairLeadCatOpen 0.18s ease;
}
@keyframes fairLeadCatOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.fair-lead-product {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem 0.65rem 2.2rem;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fair-lead-product:hover {
  background: rgba(12, 92, 68, 0.04);
}
.fair-lead-product span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fair-lead-product i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--separator);
  flex: 0 0 auto;
  position: relative;
}
.fair-lead-product.is-on {
  background: rgba(12, 92, 68, 0.07);
  color: var(--brand, #0c5c44);
  font-weight: 650;
}
.fair-lead-product.is-on i {
  border-color: var(--brand, #0c5c44);
  background: var(--brand, #0c5c44);
}
.fair-lead-product.is-on i::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.fair-lead-drawer .fair-lead-foot {
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.15rem;
  padding-top: 0.85rem;
}
.fair-lead-drawer .fair-lead-foot .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.fair-lead-drawer .fair-lead-foot[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .fair-lead-temps { grid-template-columns: 1fr; }
  .fair-lead-ocr-pick { grid-template-columns: 1fr; }
  .fair-lead-ocr-btn { min-height: 76px; }
  .fair-lead-drawer .form-row { grid-template-columns: 1fr; }
  .fair-lead-drawer {
    width: 100vw;
  }
  .fair-lead-drawer .drawer-head,
  .fair-lead-steps {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .fair-lead-drawer .drawer-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
