/* SunLine CRM — стиль сайту SunLine: чорний фон із сонячним світлом, скляні темні картки,
   жовтий акцент #FDDB53, круглі градієнтні кнопки, шрифт Exo 2. Mobile-first. */
:root {
  --bg: #050505;
  --surface: rgba(16, 16, 16, 0.62);
  --surface-solid: #121212;
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f3ea;
  --muted: #a39e92;
  --gold: #FDDB53;
  --gold-strong: #FFE680;
  --gold-deep: #F2B814;
  --gold-soft: rgba(253, 219, 83, 0.12);
  --gold-line: rgba(253, 219, 83, 0.35);
  --gold-grad: linear-gradient(180deg, #FFEC8F 0%, #FDDB53 45%, #F5C21F 100%);
  --danger: #ff6b5b;
  --ok: #5fd68f;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(18px) saturate(140%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* Фон сайту: сонячне світло на чорному, фіксований */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,.55) 70%, rgba(5,5,5,.85) 100%),
    url("/static/img/bg-mobile.jpg") 70% 30% / cover no-repeat,
    var(--bg);
}
@media (min-width: 900px) {
  .bg {
    background:
      linear-gradient(90deg, rgba(5,5,5,.35) 0%, rgba(5,5,5,0) 45%),
      url("/static/img/bg.jpg") center / cover no-repeat,
      var(--bg);
  }
}
a { color: var(--gold); text-decoration: none; }
h1 { font-size: 1.75rem; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-weight: 600; }
.muted { color: var(--muted); }
::selection { background: var(--gold); color: #111; }

/* ---------- Логотип ---------- */
.logo { display: inline-flex; flex-direction: column; line-height: 1; color: var(--text); }
.logo-word { font-size: 1.55rem; font-style: italic; letter-spacing: -0.02em; }
.logo-word b { font-weight: 800; }
.logo-word i { font-weight: 300; }
.logo-sub { align-self: flex-end; font-size: 0.58rem; font-weight: 700; font-style: italic; letter-spacing: 0.08em; margin-top: 2px; color: var(--text); }
.logo-xl .logo-word { font-size: 3rem; }
.logo-xl .logo-sub { font-size: 0.85rem; }

/* ---------- Бічне меню ---------- */
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  width: min(84vw, 300px);
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px calc(16px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, 0.78);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-right: 1px solid var(--border);
  transform: translateX(-102%);
  transition: transform .25s ease;
}
body.menu-open .sidebar { transform: none; box-shadow: var(--shadow); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; transition: background .15s, color .15s;
}
.side-nav a:hover { color: var(--text); background: var(--surface-2); }
.side-nav a.active { color: #141414; background: var(--gold-grad); font-weight: 700; box-shadow: 0 6px 22px rgba(253,219,83,.22); }
.side-label { margin: 16px 14px 6px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); opacity: .7; }
.ico { width: 20px; height: 20px; flex: none; }
.sidebar-bottom { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.sidebar-bottom form { margin: 0; }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px; color: var(--text); }
.me:hover, .me.active { background: var(--surface-2); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { color: var(--muted); font-size: 0.75rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-grad); color: #141414; font-weight: 800;
}
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--gold-line); color: var(--gold); }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.menu-open .scrim { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* Мобільна шапка */
.mobile-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(8, 8, 8, 0.7);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}
.mobile-logo .logo-word { font-size: 1.3rem; }
.mobile-bar .avatar { width: 34px; height: 34px; }

.page { padding: 18px 16px 40px; max-width: 1280px; margin: 0 auto; }

@media (min-width: 1024px) {
  .sidebar { width: var(--sidebar-w); transform: none; }
  .sidebar-close, .scrim, .mobile-bar { display: none; }
  body.has-sidebar .page { margin-left: var(--sidebar-w); padding: 32px 36px 48px; max-width: calc(1280px + var(--sidebar-w)); }
  body.menu-open { overflow: auto; }
}

/* ---------- Картки (скло), кнопки, форми ---------- */
.card {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.glass-strong { background: rgba(12,12,12,.72); box-shadow: var(--shadow); }
.empty { color: var(--muted); }
.empty p { margin: 0 0 12px; }
.empty p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; letter-spacing: 0.01em; cursor: pointer;
  transition: transform .12s, box-shadow .2s, filter .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 0.875rem; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-gold {
  background: var(--gold-grad); color: #141414;
  box-shadow: 0 8px 26px rgba(253, 219, 83, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 10px 32px rgba(253, 219, 83, 0.4), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--border-strong);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--gold-line); color: var(--gold); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  font: inherit; font-size: 16px; /* 16px — щоб iOS не збільшував сторінку */
  color: var(--text);
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDDB53' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select option { background: var(--surface-solid); color: var(--text); }
input::placeholder, textarea::placeholder { color: rgba(163, 158, 146, .65); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 107, 91, 0.12); color: var(--danger);
  border: 1px solid rgba(255, 107, 91, 0.35);
}

/* Вхід */
.no-sidebar .page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login { width: 100%; max-width: 400px; text-align: center; }
.login-tag { margin: 10px 0 26px; color: var(--muted); letter-spacing: 0.04em; }
.login .form { text-align: left; padding: 24px; }

/* ---------- Загальне для сторінок ---------- */
h2 { font-size: 1rem; margin: 0 0 12px; font-weight: 600; color: var(--gold); letter-spacing: 0.01em; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.count { color: var(--muted); font-weight: 500; font-size: 0.85em; margin-left: 4px; }
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: 0.9rem; }
.back:hover { color: var(--gold); }
.hint { margin: 0; color: var(--muted); font-size: 0.85rem; }
.narrow { max-width: 560px; }
.row-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.inline { display: inline-flex; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
textarea { resize: vertical; min-height: 44px; }
.more summary { cursor: pointer; color: var(--gold); margin-bottom: 12px; }
.more[open] { display: flex; flex-direction: column; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); padding: 0; }

/* Статуси — кольорові крапки */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot-new { background: #6ea8fe; }
.dot-in_work { background: var(--gold); }
.dot-awaiting_payment { background: #f0a24b; }
.dot-paid { background: #5fcf8a; }
.dot-shipped { background: #a98bf5; }
.dot-received { background: #3fb6a8; }
.dot-cancelled { background: var(--danger); }

/* ---------- Воронка ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select { padding: 8px 10px; min-height: 40px; flex: 1 1 140px; max-width: 220px; }

.board {
  display: flex; gap: 12px; overflow-x: auto;
  margin: 0 -16px; padding: 0 16px 16px;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch;
}
.column {
  flex: 0 0 82vw; max-width: 320px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 210px);
  transition: border-color .15s, background .15s;
}
.column.drop-target { border-color: var(--gold); background: rgba(253,219,83,.07); }
.column-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  font-weight: 600; font-size: 0.95rem; border-bottom: 1px solid var(--border);
}
.column-head .count { margin-left: auto; }
.column-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; }
.column-empty { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 16px 0; }

.order-card {
  display: block; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; cursor: grab;
}
.order-card:hover { border-color: var(--gold-line); }
.order-card.dragging { opacity: 0.35; }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.6); border-color: var(--gold); cursor: grabbing;
}
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.oc-top { display: flex; justify-content: space-between; gap: 8px; }
.oc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-id { color: var(--muted); font-size: 0.8rem; flex: none; }
.oc-msg { color: var(--muted); font-size: 0.85rem; margin-top: 4px; line-height: 1.35; }
.oc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 0.8rem; flex-wrap: wrap; }
.oc-sum { color: var(--gold); font-weight: 600; }
.oc-time { color: var(--muted); margin-left: auto; }
.oc-assignee { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

.tag { padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 0.75rem; }
.tag-site { background: rgba(110,168,254,.15); color: #9cc3ff; }
.tag-telegram { background: rgba(42,171,238,.15); color: #6cc7f5; }
.tag-instagram { background: rgba(225,48,108,.15); color: #f07aa3; }
.tag-manual { background: var(--gold-soft); color: var(--gold); }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  background: rgba(14,14,14,.9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--gold-line); color: var(--text);
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200; width: max-content; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: var(--danger); color: var(--danger); }

/* ---------- Картка замовлення ---------- */
.order-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.status-pill { padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.status-cancelled { background: rgba(229,103,90,.12); color: var(--danger); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.95rem; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; overflow-wrap: anywhere; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.status-buttons form { margin: 0; }
.chip {
  font: inherit; font-size: 0.85rem; padding: 8px 12px; min-height: 38px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer;
}
.chip:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.chip-active { background: var(--gold-grad); color: #141414; border-color: var(--gold); font-weight: 600; cursor: default; }
.chip-danger:not(.chip-active) { color: var(--danger); }
.chip-danger.chip-active { background: var(--danger); border-color: var(--danger); }
.card .hint { margin-top: 10px; }
.assign { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.assign select { padding: 8px 10px; min-height: 38px; }

.msg { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; max-width: 92%; }
.msg-in { background: var(--surface-2); }
.msg-out { background: var(--gold-soft); margin-left: auto; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { color: var(--muted); font-size: 0.75rem; margin-top: 4px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.ev { position: relative; padding: 0 0 14px 12px; }
.ev::before {
  content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--border); border: 2px solid var(--bg);
}
.ev-status::before { background: var(--gold); }
.ev-note::before { background: #6ea8fe; }
.ev-text { font-size: 0.92rem; }
.ev-body { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }
.ev-meta { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }

@media (min-width: 768px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .board { margin: 0; padding: 0 0 16px; scroll-snap-type: none; }
  .column { flex: 0 0 280px; max-height: calc(100vh - 190px); }
  .order-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Клієнти ---------- */
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; min-width: 0; }
.card .search { margin: 12px 0 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
}
.card .list-row { background: var(--surface-2); margin-bottom: 8px; }
a.list-row:hover { border-color: var(--gold-line); }
.lr-main { min-width: 0; }
.lr-title { font-weight: 600; }
.lr-sub { color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; overflow-wrap: anywhere; }
.lr-side { text-align: right; font-size: 0.85rem; flex: none; }
.small { font-size: 0.78rem; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.notes { margin-top: 12px; }
.alert a { margin-left: 6px; font-weight: 600; }
.merge-summary { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.merge-summary p { margin: 0; }

/* ---------- Довідники ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; color: var(--muted); white-space: nowrap; border: 1px solid var(--border); }
.tabs a.active { color: #141414; background: var(--gold-grad); border-color: var(--gold); font-weight: 600; }
.notice { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; background: rgba(95,207,138,.1); color: #5fcf8a; border: 1px solid rgba(95,207,138,.3); }
.alert { margin-bottom: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.checks { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks legend { color: var(--muted); font-size: 0.85rem; padding: 0 4px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.is-off { opacity: 0.55; }
.grow { flex: 1; gap: 8px; }
.grow input { flex: 1; min-width: 0; padding: 8px 10px; }
.chip-ok { color: #5fcf8a; border-color: rgba(95,207,138,.4); }
.qty-row { flex-direction: row !important; align-items: center; justify-content: space-between; width: 100%; gap: 12px; color: var(--text) !important; }
.qty-row input { width: 80px; text-align: center; }
.gold { color: var(--gold); }
.lr-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.pw summary { list-style: none; }
.pw summary::-webkit-details-marker { display: none; }
.pw[open] form { margin-top: 6px; gap: 6px; }
.pw input { padding: 6px 8px; width: 150px; }
@media (min-width: 768px) {
  .row-3 { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Конструктор бандлу ---------- */
.picker { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.pick {
  display: block; padding: 14px; border-radius: var(--radius); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
}
.pick:hover { border-color: var(--gold-line); }
.pick-active { border-color: var(--gold); background: rgba(253,219,83,.07); }
.pick-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pick-badge { background: var(--gold-grad); color: #141414; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; }
.pick-sub { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.pick-price { margin-top: 6px; }
.pick-price s { color: var(--muted); font-size: 0.85rem; }
.pick-price b { color: var(--gold); }
.column-list { flex-direction: column; flex-wrap: nowrap; }
.stepper { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.stepper input { width: 56px; text-align: center; padding: 8px 4px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--gold); font-size: 1.2rem; cursor: pointer;
}
.step:disabled { opacity: .3; cursor: default; }
.summary { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; }
.summary span:first-child { color: var(--muted); }
.summary-total { font-size: 1.1rem; margin-top: 4px; }
.summary-total b { color: var(--gold); }
.delivery-free { color: #5fcf8a; font-size: 0.85rem; }
.pack { list-style: none; margin: 0 0 12px; padding: 0; }
.pack li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.pack b { color: var(--gold); font-weight: 600; }
.pack-qty { font-weight: 700; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.client-text { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.manual { margin-top: 14px; }
.reset-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
@media (min-width: 768px) {
  .picker { grid-template-columns: repeat(4, 1fr); }
}
.btn-row.tight { margin-top: 0; }
.utm { margin-top: 12px; }
.utm .kv { font-size: 0.85rem; }
.compact-row { padding: 8px 12px; }

/* ---------- Дашборд ---------- */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 0.9rem; }
.segmented a.active { background: var(--gold-grad); color: #141414; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-width: 0; }
.tile-label { color: var(--muted); font-size: 0.8rem; }
.tile-value { font-size: clamp(1.2rem, 5.6vw, 1.6rem); white-space: nowrap; font-weight: 700; margin-top: 4px; line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.dash-grid { margin-bottom: 12px; }
.chart { position: relative; width: 100%; min-height: 200px; }
.chart svg { display: block; overflow: visible; }
.chart .bar { fill: var(--gold); }
.chart .hit { fill: transparent; cursor: default; }
.chart .bar.on { fill: var(--gold-strong); }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { stroke: rgba(255,255,255,.18); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: rgba(14,14,14,.92); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 6px 10px; font-size: 0.8rem; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.chart-tip span { color: var(--muted); }
.table-view { margin-top: 8px; }
.table-view summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
table.data { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 500; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.92rem; }
.hbar-head b { font-variant-numeric: tabular-nums; }
.hbar-track { height: 10px; background: var(--surface-2); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--gold); border-radius: 0 4px 4px 0; min-width: 4px; }
.hbar-sub { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.stuck { margin-bottom: 12px; }
.stuck .list-row { margin-bottom: 8px; background: var(--surface-2); }
@media (min-width: 768px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- ШІ ---------- */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.ai-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.ai-card { border-color: var(--gold-line); background: linear-gradient(160deg, rgba(253,219,83,.08), rgba(16,16,16,.62) 55%); }
.ai-suggest { margin-top: 12px; padding: 12px; border: 1px solid var(--gold-line); border-radius: var(--radius-sm); background: rgba(253,219,83,.06); }
.ai-suggest ul { margin: 8px 0; padding-left: 18px; }
.ai-suggest-head b { color: var(--gold); }
button[data-ai]:disabled { opacity: .6; cursor: progress; }


/* ---------- Скло для всіх карткових елементів ---------- */
.column, .tile, .list-row, .pick, .segmented, .tabs a {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.column { border-radius: var(--radius); }
.column-head { font-weight: 700; letter-spacing: .01em; }
.order-card { border-radius: 16px; background: rgba(255,255,255,.05); transition: border-color .15s, transform .15s; }
.order-card:hover { transform: translateY(-1px); }
.tile { border-radius: var(--radius); }
.tile-value { font-weight: 800; }
.list-row { border-radius: 16px; }
.pick { border-radius: var(--radius); }
.msg { border-radius: 16px; }
.status-pill { background: var(--gold-grad); color: #141414; font-weight: 700; }
.status-cancelled { background: rgba(255,107,91,.15); color: var(--danger); }
.chip { border-radius: 999px; min-height: 40px; padding: 8px 16px; font-weight: 600; }
.step { border-radius: 50%; }
h2 { color: var(--gold); font-weight: 700; }
.page-head h1 { font-size: 1.9rem; }
.hbar-fill, .chart .bar { background: var(--gold-grad); }
.chart .bar { fill: var(--gold); }
.notice { border-radius: var(--radius-sm); }
.tag { font-weight: 600; }
@media (min-width: 768px) {
  .page-head h1 { font-size: 2.2rem; }
}
.assign select, .filters select { padding-right: 36px; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: rgba(0,0,0,.35); display: inline-grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--gold-grad); border-color: var(--gold); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #141414; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
