/* ══════════════════════════════════════════════════════════
   LogosCRM — Modern SaaS Design System
   Inspired by Linear, HubSpot, Notion
   ══════════════════════════════════════════════════════════ */

/* ── Google Font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #635BFF;
  --accent-light: #7C75FF;
  --accent-dark: #5046E5;
  --accent-bg: rgba(99,91,255,.08);
  --accent-bg-hover: rgba(99,91,255,.14);
  --success: #00C48C;
  --success-bg: rgba(0,196,140,.1);
  --warning: #FFB020;
  --warning-bg: rgba(255,176,32,.1);
  --danger: #F04438;
  --danger-bg: rgba(240,68,56,.08);
  --pause: #9B8AFB;
  --pause-bg: rgba(155,138,251,.1);
  --cancel: #F79009;

  --bg: #F9FAFB;
  --surface: #FFFFFF;
  --surface2: #F3F4F6;
  --surface-hover: #F9FAFB;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  --text: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-placeholder: #9CA3AF;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.08), 0 8px 10px rgba(0,0,0,.04);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-full: 9999px;
  --radius-tag: 7px;

  --nav-h: 64px;
  --header-h: 52px;

  --transition: 150ms cubic-bezier(.4,0,.2,1);
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────── */
#app { height: 100%; display: flex; flex-direction: column; }
.page { display: none; flex: 1; overflow-y: auto; padding-bottom: calc(var(--nav-h) + 8px); }
.page.active { display: flex; flex-direction: column; }

/* ── Top Header ──────────────────────────────────────────── */
.top-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.top-header h2 { font-size: 15px; font-weight: 600; flex: 1; letter-spacing: -0.01em; }

/* ── Bottom Nav (mobile) ─────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: none; border: none;
  color: var(--text-muted); font-size: 10px; font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-btn .icon { font-size: 20px; line-height: 1; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active::after {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%;
  height: 2px; background: var(--accent); border-radius: 0 0 2px 2px;
}

/* ── Source Badge ────────────────────────────────────────── */
.source-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-tag);
  font-size: 11px; font-weight: 600; letter-spacing: .01em; flex-shrink: 0;
}
.source-badge.a101 { background: var(--accent-bg); color: var(--accent); }
.source-badge.avito { background: rgba(229,66,10,.08); color: #D6400B; }
.source-badge.profi { background: var(--success-bg); color: #059669; }
.source-badge.domilend { background: rgba(99,91,255,.08); color: var(--accent); }

/* ── Login Page ──────────────────────────────────────────── */
#page-login {
  justify-content: center; align-items: center;
  min-height: 100%; padding: 24px 20px;
  background: var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px 32px;
  width: 100%; max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon { font-size: 44px; display: block; margin-bottom: 12px; }
.login-logo h1 { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.login-logo p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.email-login-form { display: flex; flex-direction: column; gap: 16px; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.field-input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field-input:hover { border-color: #D1D5DB; }
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.field-input::placeholder { color: var(--text-placeholder); }

.login-error { color: var(--danger); font-size: 13px; text-align: center; margin-top: 4px; min-height: 18px; }
.login-submit-btn { margin-top: 4px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: all var(--transition); cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(1px); }

.btn-outline { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface2); border-color: #D1D5DB; }

.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid transparent; }
.btn-danger:hover { background: rgba(240,68,56,.14); }

.btn-accent { background: var(--accent-bg); color: var(--accent); border: 1px solid transparent; }
.btn-accent:hover { background: var(--accent-bg-hover); }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-xs); }

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px 24px 20px;
  position: relative;
}
.dh-greeting { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.dh-name { font-size: 22px; font-weight: 800; margin: 2px 0; letter-spacing: -0.02em; color: var(--text); }
.dh-level {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-bg); color: var(--accent);
  padding: 4px 12px; border-radius: var(--radius-tag);
  font-size: 13px; font-weight: 600; margin-top: 8px;
}
.level-progress { margin: 12px 0 0; }
.lp-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.lp-bar { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.lp-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .5s ease; }

.dashboard-content { padding: 20px 24px; flex: 1; }
.dash-search-wrap { margin-bottom: 20px; }

.section-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 12px; margin-top: 28px;
}
.section-title:first-child { margin-top: 0; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 4px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: #D1D5DB; }
.stat-card .s-val { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.stat-card .s-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ── Task List ───────────────────────────────────────────── */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  border-left: 3px solid var(--accent);
  transition: all var(--transition);
}
.task-card:hover { border-color: #D1D5DB; box-shadow: var(--shadow-xs); }
.task-card.overdue { border-left-color: var(--danger); background: #FEF2F2; }
.task-card.paused { border-left-color: var(--pause); }
.task-card.cancelled { border-left-color: var(--cancel); opacity: 0.6; }
.task-card.secondary { border-left-color: var(--border); opacity: 0.5; }
.task-card:active { transform: scale(.995); }
.task-card .tc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.task-card .tc-num { font-size: 12px; color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.task-card .tc-badges { display: flex; gap: 6px; align-items: center; }
.task-card .tc-status { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-tag); font-weight: 600; }
.task-card .tc-status.work { background: var(--success-bg); color: #059669; }
.task-card .tc-status.overdue { background: #FEE2E2; color: #DC2626; }
.task-card .tc-status.paused { background: var(--pause-bg); color: #7C3AED; }
.task-card .tc-status.cancelled { background: var(--warning-bg); color: #B45309; }
.task-card .tc-status.secondary { background: var(--surface2); color: var(--text-muted); }
.task-card .tc-overdue-banner {
  display: flex; align-items: center; gap: 6px;
  background: #DC2626; color: white;
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
  padding: 6px 10px; border-radius: 8px; margin-bottom: 8px;
}
.task-card .tc-client { font-weight: 600; font-size: 14px; }
.task-card .tc-phone { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.task-card .tc-task { margin-top: 8px; font-size: 13px; color: var(--accent); font-weight: 600; }
.task-card .tc-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.task-card .tc-comment-btn, .req-card .tc-comment-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  padding: 4px 10px; font-size: 12px; color: var(--text-muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer;
  user-select: none; transition: all var(--transition);
}
.task-card .tc-comment-btn:hover, .req-card .tc-comment-btn:hover { background: var(--surface-hover); color: var(--text); border-color: #D1D5DB; }
.task-card .tc-comment-btn.open, .req-card .tc-comment-btn.open { background: var(--accent-bg); color: var(--accent); border-color: rgba(99,91,255,.2); }
.task-card .tc-comment-btn.open .tc-cb-label::after, .req-card .tc-comment-btn.open .tc-cb-label::after { content: ' ▲'; }
.task-card .tc-comment-btn:not(.open) .tc-cb-label::after, .req-card .tc-comment-btn:not(.open) .tc-cb-label::after { content: ' ▼'; }
.task-card .tc-comment-text, .req-card .tc-comment-text {
  display: none; margin-top: 8px; padding: 10px 14px;
  font-size: 13px; line-height: 1.6; color: var(--text-secondary);
  background: var(--surface2); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-word;
}
.task-card .tc-comment-text.open, .req-card .tc-comment-text.open { display: block; }

.tc-changes { margin-top: 8px; padding: 8px 12px; background: var(--success-bg); border: 1px solid rgba(0,196,140,.15); border-radius: var(--radius-sm); }
.tc-change-item { font-size: 12px; color: #065F46; line-height: 1.6; }
.tc-change-from { text-decoration: line-through; color: #9CA3AF; }
.tc-change-to { font-weight: 600; color: #065F46; }

/* ── Per-card Domilend sync button ────────────────────── */
.tc-sync-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 14px; width: 100%; justify-content: center;
  border: 1px solid rgba(139,92,246,.25); border-radius: var(--radius-xs);
  background: rgba(139,92,246,.06); color: #7C3AED;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.tc-sync-btn:hover { background: rgba(139,92,246,.12); border-color: rgba(139,92,246,.4); }
.tc-sync-btn:disabled { cursor: not-allowed; opacity: .7; }
.tc-sync-btn.syncing { animation: pulse-sync 1.5s ease-in-out infinite; }
.tc-sync-btn.syncing svg { animation: spin 1s linear infinite; }
.task-card.syncing { opacity: .7; pointer-events: none; }
.task-card.syncing .tc-sync-btn { pointer-events: auto; }
.task-card.sync-done {
  opacity: 0; transform: translateX(30px);
  transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
@keyframes pulse-sync { 0%,100%{opacity:.7} 50%{opacity:1} }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); width: 100%; }
.empty-state .es-icon { font-size: 36px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

.badges-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-tag); padding: 6px 12px;
  font-size: 14px; display: flex; align-items: center; gap: 5px;
}
.badge-chip .bc-name { font-size: 12px; color: var(--text-muted); }

/* ── Requests Page ───────────────────────────────────────── */
.requests-toolbar {
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}
.search-input {
  flex: 1; min-width: 140px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 14px; font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  outline: none; transition: all var(--transition);
}
.search-input:hover { border-color: #D1D5DB; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-input::placeholder { color: var(--text-placeholder); }

.filter-btn {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 0 14px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition); white-space: nowrap;
}
.filter-btn:hover { background: var(--surface2); border-color: #D1D5DB; }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.requests-list { padding: 16px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.req-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid var(--accent);
}
.req-card:hover { border-color: #D1D5DB; box-shadow: var(--shadow-xs); }
.req-card.paused { border-left-color: var(--pause); }
.req-card.cancelled { border-left-color: var(--cancel); opacity: 0.6; }
.req-card.secondary { border-left-color: var(--border); opacity: 0.45; }
.btn-wake {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); color: var(--text-muted);
  font-size: 12px; font-weight: 500; cursor: pointer; transition: all var(--transition);
}
.btn-wake:hover { background: var(--surface2); border-color: #D1D5DB; }
.btn-wake:active { transform: scale(.97); }
.req-card:active { transform: scale(.998); }
.req-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 6px; flex-wrap: wrap; }
.req-num { font-size: 12px; color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.req-badges { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.req-status { font-size: 11px; padding: 2px 8px; border-radius: var(--radius-tag); font-weight: 600; }
.req-status.work { background: var(--success-bg); color: #059669; }
.req-status.paused { background: var(--pause-bg); color: #7C3AED; }
.req-status.cancelled { background: var(--warning-bg); color: #B45309; }
.req-status.secondary { background: var(--surface2); color: var(--text-muted); }
.req-client { font-weight: 600; font-size: 14px; }
.req-phone { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.req-address { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.req-task { margin-top: 8px; font-size: 13px; color: var(--accent); font-weight: 600; }
.req-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Request Detail Modal ────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  z-index: 200; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--surface); border-radius: 16px 16px 0 0;
  width: 100%; max-width: 640px; max-height: 94vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.card-v2 {
  background: var(--surface); border-radius: 16px 16px 0 0;
  width: 100%; max-width: 640px; max-height: 94vh;
  animation: slideUp .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
@keyframes slideUp { from { transform: translateY(100%); opacity: .8; } to { transform: translateY(0); opacity: 1; } }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 10px auto 0; flex-shrink: 0; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body-scroll { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
.modal-close {
  background: var(--surface2); border: none;
  width: 32px; height: 32px; border-radius: var(--radius-full);
  font-size: 16px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* Card header */
.card-header { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.card-header-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-num { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.card-source { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--accent-bg); color: var(--accent); }
.card-service { font-size: 11px; font-weight: 500; color: var(--text-muted); padding: 2px 8px; border-radius: var(--radius-xs); background: var(--surface2); }

/* Status bar */
.card-status-bar { display: flex; gap: 6px; padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.status-chip {
  flex: 1; padding: 10px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; font-weight: 600;
  color: var(--text-muted); text-align: center;
  transition: all var(--transition); cursor: pointer;
}
.status-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.status-chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.status-chip.active-pause { background: var(--pause); color: white; border-color: var(--pause); }
.status-chip.danger { color: var(--danger); border-color: transparent; background: var(--danger-bg); }
.status-chip.danger:hover { border-color: var(--danger); }
.status-chip.active-danger { background: var(--danger); color: white; border-color: var(--danger); }
.status-chip.saving { opacity: .6; pointer-events: none; }

/* Pause inline */
.pause-inline { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--warning-bg); border-radius: var(--radius-sm); border: 1px solid rgba(255,176,32,.2); margin-bottom: 12px; }
.pause-inline-label { font-size: 12px; font-weight: 600; color: #B45309; white-space: nowrap; }

/* Inline inputs & buttons */
.inline-input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: var(--surface); color: var(--text); min-width: 0; outline: none; }
.inline-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.inline-btn { padding: 8px 14px; background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.inline-btn:hover { background: var(--accent-dark); }
.inline-btn:disabled { background: var(--surface2); color: var(--text-placeholder); cursor: not-allowed; }

/* Card sections — subtle card look */
.card-section {
  margin-bottom: 16px; padding: 14px 16px;
  background: var(--surface2); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.card-section-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.card-section-title [data-lucide] { width: 14px; height: 14px; color: var(--accent); }

/* Client info */
.card-client-name { font-weight: 700; font-size: 17px; margin-bottom: 8px; color: var(--text); }
.card-contacts { font-size: 14px; color: var(--text-secondary); }

/* Contact rows */
.card-contact-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.card-contact-row:last-child { border-bottom: none; }
.card-phone { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.card-phone-label { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Quick action buttons — colored circles */
.card-quick-actions { display: flex; gap: 8px; }
.card-quick-btn {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: white; text-decoration: none; transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.card-quick-btn:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.card-quick-btn svg { width: 16px; height: 16px; }
.cqb-phone { background: #22C55E; }
.cqb-phone:hover { background: #16A34A; }
.cqb-wa { background: #25D366; }
.cqb-wa:hover { background: #1DA851; }
.cqb-tg { background: #2AABEE; }
.cqb-tg:hover { background: #229ED9; }

/* Address */
.card-address-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.card-address-display {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 13px; color: var(--text-secondary); padding: 4px 0;
}
.card-address-display:hover { color: var(--accent); }
.card-address-display [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.card-address-display [data-lucide]:last-child { width: 12px; height: 12px; opacity: 0.4; }
.card-address-edit { flex-direction: column; gap: 8px; }
.card-address-edit .field-input { font-size: 13px; padding: 8px 10px; }
.card-address-btns { display: flex; gap: 6px; }
.card-addr-save {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius-xs); cursor: pointer;
}
.card-addr-save:hover { opacity: 0.9; }
.card-addr-cancel {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  background: var(--surface2); color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xs); cursor: pointer;
}
/* Phone add/edit */
.card-phone-add { margin: 6px 0; }
.card-phone-add-display {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 13px; color: var(--text-muted); padding: 4px 0;
}
.card-phone-add-display:hover { color: var(--accent); }
.card-phone-add-display svg { opacity: 0.5; }
.card-phone-add-display [data-lucide] { width: 12px; height: 12px; opacity: 0.4; }
.card-phone-add-edit { flex-direction: column; gap: 8px; }
.card-phone-add-edit .field-input { font-size: 13px; padding: 8px 10px; }

/* Messenger */
.card-messenger { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Task display */
.card-task-current { font-size: 14px; font-weight: 500; }
.card-task-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.card-task-details {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 4px;
}
.card-task-details [data-lucide] { width: 14px; height: 14px; color: var(--text-muted); }
.card-task-status-row {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.card-task-status-label {
  font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.card-task-stage {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 12px; font-weight: 600;
  background: var(--accent-bg); color: var(--accent);
  border-radius: var(--radius-xs);
}
.card-prekanban-hint {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 8px;
  padding: 8px 12px; font-size: 12px; font-weight: 500; line-height: 1.4;
  background: #FFF7ED; color: #C2410C; border-radius: var(--radius-xs);
  border: 1px solid #FDBA74;
}
.card-prekanban-hint svg { flex-shrink: 0; margin-top: 1px; }
.card-change-btn {
  margin-top: 8px; padding: 8px 16px;
  background: var(--accent-bg); border: 1.5px solid var(--accent);
  border-radius: var(--radius-xs); font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer;
  transition: all var(--transition);
}
.card-change-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.task-selector-v2 { margin-top: 12px; }
.task-group-title {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: 6px;
}
.task-group-title:first-child { margin-top: 0; }
.task-group-items { display: flex; flex-wrap: wrap; gap: 6px; }
.task-option {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: all var(--transition); background: var(--surface);
}
.task-option:hover { background: var(--accent-bg); border-color: rgba(99,91,255,.2); }
.task-option.selected { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.task-inline-dp {
  display: flex; gap: 6px; align-items: center;
  width: 100%; margin-top: 6px; padding: 8px 10px;
  background: var(--accent-bg); border: 1px solid rgba(99,91,255,.15);
  border-radius: var(--radius-sm);
  animation: fadeSlideDown .2s ease;
}
.task-inline-dp input { flex: 1; min-width: 0; }
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card comment */
.card-comment-existing {
  font-size: 14px; line-height: 1.6; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-word;
  padding: 10px 12px; background: var(--surface); border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent); margin-bottom: 10px; min-height: 20px;
}
.card-comment-existing:empty { display: none; }
.card-comment-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  resize: none; min-height: 44px; max-height: 300px; outline: none;
  background: var(--surface); overflow-y: auto;
  transition: border-color var(--transition), box-shadow var(--transition), height .15s ease;
}
.card-comment-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.card-save-comment-btn {
  margin-top: 8px; padding: 8px 16px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
}
.card-save-comment-btn:hover { background: var(--accent-dark); }

/* Save all changes — prominent button at bottom */
.card-save-all-btn {
  display: block; width: calc(100% - 32px); margin: 16px auto;
  padding: 14px 24px;
  background: var(--success); color: white;
  border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0,196,140,.3);
}
.card-save-all-btn:hover { background: #00a878; box-shadow: 0 4px 12px rgba(0,196,140,.4); }
.card-save-all-btn:active { transform: scale(.98); }

.card-domilend-sync-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 32px); margin: 8px auto;
  padding: 13px 24px;
  background: #1e88e5; color: white;
  border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(30,136,229,.3);
}
.card-domilend-sync-btn:hover { background: #1565c0; box-shadow: 0 4px 12px rgba(30,136,229,.4); }
.card-domilend-sync-btn:active { transform: scale(.98); }
.card-domilend-sync-btn:disabled { opacity: .7; cursor: not-allowed; }
.card-domilend-sync-btn.sync-done { background: var(--success); box-shadow: 0 2px 8px rgba(34,197,94,.3); }

.card-delete-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: calc(100% - 32px); margin: 16px auto 0;
  padding: 12px 24px;
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.card-delete-btn:hover { background: rgba(240,68,56,.14); border-color: var(--danger); }
.card-delete-btn:active { transform: scale(.98); }

.card-close-btn {
  display: block; width: calc(100% - 32px); margin: 8px auto 16px;
  padding: 12px 24px;
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.card-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.card-close-btn:active { transform: scale(.98); }

/* Card meta — subtle footer */
.card-meta {
  padding: 10px 16px; margin-top: 4px; margin-bottom: 0;
  font-size: 12px; color: var(--text-muted); background: transparent;
  border: none;
}
.card-meta-item { display: flex; gap: 8px; margin-bottom: 2px; align-items: center; }
.card-meta-label { font-weight: 600; color: var(--text-muted); min-width: 80px; }
.card-manager-select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer;
  transition: border-color var(--transition);
  appearance: auto;
}
.card-manager-select:focus { border-color: var(--accent); outline: none; }

/* ── Price Picker ─────────────────────────────────────────── */
.pp-search {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.pp-search:focus { border-color: var(--accent); }
.pp-search::placeholder { color: var(--text-muted); }
.pp-category { margin-bottom: 4px; }
.pp-category:last-child { margin-bottom: 0; }
.pp-category-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
  padding: 10px 12px; cursor: pointer; user-select: none;
  background: var(--surface2); border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 6px;
  position: sticky; top: 0; z-index: 1;
  transition: background var(--transition);
}
.pp-category-title:hover { background: var(--border); }
.pp-cat-count {
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  opacity: .7;
}
.pp-cat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: white;
  font-size: 11px; font-weight: 700;
}
.pp-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin: 0;
  cursor: pointer; transition: all var(--transition);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border);
}
.pp-item:nth-child(even) { background: var(--surface2); }
.pp-item:hover { background: var(--accent-bg); border-left-color: var(--accent); }
.pp-item-selected {
  background: var(--accent-bg) !important; border-left-color: var(--accent);
}
.pp-item-name {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  line-height: 1.4;
}
.pp-item-price {
  font-size: 14px; font-weight: 700; color: var(--accent);
  white-space: nowrap; margin-left: 16px;
}
.pp-item-type {
  font-size: 11px; color: var(--text-muted); margin-left: 4px;
}
.pp-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; min-width: 20px;
  border-radius: var(--radius-full);
  background: var(--accent); color: white;
  font-size: 12px; font-weight: 700;
}

/* ── Kanban ───────────────────────────────────────────────── */
#page-kanban { overflow: hidden; }
.kanban-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: var(--header-h);
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.kanban-header h2 { font-size: 15px; font-weight: 600; flex: 1; }

.kanban-board {
  display: flex; gap: 12px; padding: 16px 24px;
  overflow-x: auto; flex: 1; align-items: flex-start;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.kanban-col {
  background: var(--surface2); border-radius: var(--radius);
  min-width: 260px; width: 260px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--nav-h) - var(--header-h) - 40px);
  flex-shrink: 0; border: 1px solid var(--border-light);
}
.kanban-col-header {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.kanban-col-title { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.kanban-col-count {
  background: var(--border); border-radius: var(--radius-full);
  padding: 1px 8px; font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.kanban-cards { padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; flex: 1; min-height: 80px; }
.kanban-cards.drag-over { background: var(--accent-bg); border-radius: 0 0 var(--radius) var(--radius); }

.kanban-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  cursor: grab; transition: all var(--transition);
  border-left: 3px solid var(--accent); user-select: none;
}
.kanban-card:hover { box-shadow: var(--shadow); }
.kanban-card.paused { border-left-color: var(--pause); }
.kanban-card.cancelled { border-left-color: var(--cancel); opacity: 0.6; }
.kanban-card.secondary { border-left-color: var(--border); opacity: 0.45; }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .3; transform: rotate(1deg); }
.kanban-card.drag-ghost { opacity: .9; transform: rotate(-1deg) scale(1.02); box-shadow: var(--shadow-lg); cursor: grabbing; }

/* Urgent card — task due today */
.kanban-card.urgent { border-left-color: var(--danger); }
.kc-bell { color: var(--danger); margin-right: 4px; display: inline-flex; align-items: center; animation: bell-ring .6s ease-in-out; }
@keyframes bell-ring {
  0%,100% { transform: rotate(0); }
  15% { transform: rotate(12deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); }
  75% { transform: rotate(2deg); }
}

.kc-num { font-size: 12px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; margin-bottom: 4px; gap: 2px; }
.kc-client { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.kc-phone { font-size: 12px; color: var(--text-muted); }
.kc-task { margin-top: 6px; font-size: 12px; color: var(--accent); font-weight: 500; }
.kc-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.kanban-card.urgent .kc-date { color: var(--danger); font-weight: 600; }

/* Overdue card — task date in the past */
.kanban-card.overdue { border-left-color: #991B1B; background: #FEE2E2; }
.kanban-card.overdue .kc-date { color: #991B1B; font-weight: 600; text-decoration: line-through; }
.kc-overdue-icon { color: #991B1B; margin-right: 4px; display: inline-flex; align-items: center; }
.kc-overdue-label {
  margin-top: 4px; font-size: 11px; font-weight: 600; color: #991B1B;
  display: flex; align-items: center; gap: 3px;
}
.kc-btn { margin-top: 8px; width: 100%; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface); font-size: 12px; font-weight: 500; color: var(--text-muted); transition: all var(--transition); }
.kc-btn:hover { background: var(--accent-bg); color: var(--accent); border-color: rgba(99,91,255,.2); }

/* Kanban column accent colors */
.kanban-col[data-stage="Выезд"] .kanban-col-header { border-top: 3px solid #6366F1; border-radius: var(--radius) var(--radius) 0 0; }
.kanban-col[data-stage="Осмечивание"] .kanban-col-header { border-top: 3px solid #8B5CF6; }
.kanban-col[data-stage="Подбор"] .kanban-col-header { border-top: 3px solid #F59E0B; }
.kanban-col[data-stage="Доставка"] .kanban-col-header { border-top: 3px solid #3B82F6; }
.kanban-col[data-stage="Монтаж 1"] .kanban-col-header { border-top: 3px solid #10B981; }
.kanban-col[data-stage="Монтаж 2"] .kanban-col-header { border-top: 3px solid #14B8A6; }
.kanban-col[data-stage="ФинЮр"] .kanban-col-header { border-top: 3px solid #EF4444; }

/* ── Ghost cards ────────────────────────────────────────── */
.kanban-card.ghost {
  border: 2px dashed var(--border);
  border-left: 3px dashed var(--text-muted);
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 6px,
    rgba(99,91,255,.03) 6px, rgba(99,91,255,.03) 12px
  );
  opacity: 0.7;
  cursor: default;
}
.kanban-card.ghost:hover { box-shadow: none; transform: none; }
.kc-ghost-label {
  font-size: 10px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px;
}

/* Next stage indicator on primary kanban card */
.kc-next-stage {
  margin-top: 4px; font-size: 11px; color: var(--accent);
  font-weight: 500; display: flex; align-items: center; gap: 3px;
}

/* Planned stages list in card modal */
.card-planned-stages {
  display: flex; flex-direction: column; gap: 4px; margin-top: 8px;
}
.card-next-stage-block {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--accent-bg); border-radius: var(--radius-sm);
  border: 1px solid rgba(99,91,255,.15);
}
.card-nst {
  font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px;
}
.card-nst b { color: var(--accent); }
.card-nst-clear {
  margin-left: auto; padding: 2px 8px; border: none; background: none;
  font-size: 16px; color: var(--text-muted); cursor: pointer;
  border-radius: var(--radius-xs); transition: all var(--transition);
}
.card-nst-clear:hover { background: var(--danger); color: #fff; }

.card-nst-plan-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 6px 12px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.card-nst-plan-btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-bg);
}

.next-stage-picker {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.next-stage-picker .inline-input {
  padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 12px; background: var(--surface); color: var(--text);
}
.next-stage-picker .inline-input:focus { border-color: var(--accent); outline: none; }
.next-stage-picker .inline-btn {
  padding: 5px 14px; border: none; border-radius: var(--radius-xs);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.next-stage-picker .inline-btn:hover { background: var(--accent-hover); }

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard-body { padding: 16px 24px; }
.period-tabs {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px;
}
.period-tab {
  flex: 1; padding: 10px; text-align: center;
  background: var(--surface); border: none;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: all var(--transition); cursor: pointer;
}
.period-tab:first-child { border-right: 1px solid var(--border); }
.period-tab:hover { background: var(--surface2); }
.period-tab.active { background: var(--accent); color: white; }

.lb-card { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
}
.lb-row:hover { box-shadow: var(--shadow-xs); }
.lb-row.me { background: var(--accent-bg); border-color: rgba(99,91,255,.15); }
.lb-row.top1 { background: linear-gradient(90deg, #FFFBEB, #FEF9E7); }
.lb-row.top1 .lb-rank { color: #D97706; }
.lb-rank { font-size: 14px; width: 24px; text-align: center; flex-shrink: 0; }
.lb-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-weight: 600; font-size: 14px; }
.lb-sub { font-size: 12px; color: var(--text-muted); }
.lb-pts { text-align: right; }
.pts-val { font-weight: 800; font-size: 18px; color: var(--accent); letter-spacing: -0.02em; }
.pts-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ── Profile ─────────────────────────────────────────────── */
.profile-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 32px 24px; text-align: center;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: var(--radius-full);
  background: var(--accent); color: white; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
}
.profile-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.profile-level { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.profile-body { padding: 20px 24px; }

.all-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; width: 120px; text-align: center;
  transition: all var(--transition); opacity: .35; filter: grayscale(.8);
}
.badge-card.earned { opacity: 1; filter: none; }
.badge-card.earned:hover { box-shadow: var(--shadow-xs); }
.bc-emoji { font-size: 28px; line-height: 1; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
.bc-emoji svg { width: 28px; height: 28px; }
.bc-title { font-size: 12px; font-weight: 600; color: var(--text); }
.bc-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }

.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.history-icon { font-size: 18px; flex-shrink: 0; }
.history-info { flex: 1; }
.history-desc { font-size: 13px; font-weight: 600; }
.history-pts { font-weight: 700; color: var(--success); white-space: nowrap; }
.history-date { font-size: 11px; color: var(--text-muted); }

/* ── Calendar ────────────────────────────────────────────── */
.cal-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.cal-nav {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-xs); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all var(--transition);
}
.cal-nav:hover { background: var(--accent-bg); color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 6px 0; text-transform: uppercase; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); font-size: 13px; cursor: pointer;
  transition: all var(--transition); position: relative;
  padding: 4px 0 2px; min-height: 36px;
}
.cal-day:hover { background: var(--surface2); }
.cal-day.today { font-weight: 700; background: var(--accent-bg); color: var(--accent); border-radius: var(--radius-full); }
.cal-day.today:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.cal-day.selected { background: var(--accent); color: white; border-radius: var(--radius-full); }
.cal-day.selected .cal-dots .cal-dot { background: rgba(255,255,255,.7); }
.cal-day.has-events { font-weight: 600; }
.cal-day.empty-day { color: var(--text-muted); }
.cal-day.empty { cursor: default; }
.cal-dots { display: flex; gap: 3px; margin-top: 1px; height: 5px; align-items: center; overflow: hidden; max-width: 100%; justify-content: center; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-dot.visit { background: var(--accent); }
.cal-dot.mount { background: #f59e0b; }
.cal-dot.mount2 { background: #14B8A6; }
.cal-dot.delivery { background: #10b981; }
.cal-dot.estimate { background: #8b5cf6; }
.cal-dot.selection { background: #ec4899; }
.cal-dot.finjur { background: #6b7280; }
.cal-day-detail {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
  animation: slideDown .2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.cal-detail-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text); text-transform: capitalize; }
.cal-event-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-xs);
  cursor: pointer; transition: background var(--transition);
}
.cal-event-item:hover { background: var(--surface2); }
.cal-event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cal-event-dot.visit { background: var(--accent); }
.cal-event-dot.mount { background: #f59e0b; }
.cal-event-dot.mount2 { background: #14B8A6; }
.cal-event-dot.delivery { background: #10b981; }
.cal-event-dot.estimate { background: #8b5cf6; }
.cal-event-dot.selection { background: #ec4899; }
.cal-event-dot.finjur { background: #6b7280; }
.cal-event-info { flex: 1; min-width: 0; }
.cal-event-client { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.cal-event-time { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.cal-empty-day { text-align: center; padding: 12px; color: var(--text-muted); font-size: 13px; }
.cal-event-ghost { opacity: 0.7; border-left: 2px dashed var(--border); padding-left: 8px; }
.cal-ghost-badge {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  color: var(--text-muted); background: var(--surface2);
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
  letter-spacing: 0.03em; vertical-align: middle;
}

/* ── Dashboard Search ────────────────────────────────────── */
.dash-search-results { padding: 0; margin-top: -8px; margin-bottom: 16px; }

/* ── Admin Page ──────────────────────────────────────────── */
.admin-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  background: var(--surface); padding: 0 24px;
  overflow-x: auto; flex-shrink: 0;
}
.admin-tab {
  padding: 12px 16px; background: none; border: none;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; position: relative;
  transition: color var(--transition); cursor: pointer;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent); }
.admin-tab.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; right: 0; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0;
}
.admin-tab-content { display: none; padding: 20px 24px; }
.admin-tab-content.active { display: block; }

.admin-users-list { display: flex; flex-direction: column; gap: 6px; }
.admin-user-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--transition);
}
.admin-user-card:hover { box-shadow: var(--shadow-xs); }
.au-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.au-info { flex: 1; min-width: 0; }
.au-name { font-weight: 600; font-size: 14px; }
.au-role { font-size: 12px; color: var(--text-muted); }
.au-actions { display: flex; gap: 6px; }
.au-btn {
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition);
}
.au-btn:hover { background: var(--surface2); color: var(--text); }
.au-btn.delete:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.admin-req-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.admin-stats-body { display: flex; flex-direction: column; gap: 16px; }

/* ── Knowledge Base ──────────────────────────────────────── */
.kb-container { display: flex; flex: 1; overflow: hidden; }
.kb-nav {
  width: 220px; min-width: 220px; border-right: 1px solid var(--border);
  padding: 16px; overflow-y: auto; background: var(--surface);
}
.kb-nav-item {
  display: block; padding: 8px 12px; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition); margin-bottom: 2px;
}
.kb-nav-item:hover { background: var(--surface2); color: var(--text); }
.kb-nav-item.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.kb-article { flex: 1; padding: 24px; overflow-y: auto; font-size: 14px; line-height: 1.7; }
.kb-article h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.kb-article h3 { font-size: 15px; font-weight: 600; margin-top: 20px; margin-bottom: 8px; }
.kb-article p { margin-bottom: 12px; color: var(--text-secondary); }
.kb-article ul, .kb-article ol { padding-left: 20px; margin-bottom: 12px; }
.kb-article li { margin-bottom: 4px; color: var(--text-secondary); }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .6s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: white;
  box-shadow: var(--shadow-md); pointer-events: auto;
  animation: toastIn .25s ease;
  max-width: 320px;
}
.toast.success { background: #059669; }
.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }
.toast.warn { background: #F59E0B; }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Report Problem ──────────────────────────────────────── */
#report-modal-overlay.modal-overlay {
  align-items: center;
}
#report-modal-overlay .modal-sheet {
  border-radius: 16px;
  max-height: 88vh;
  animation: fadeScaleIn .2s ease;
}
@keyframes fadeScaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.report-fab {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 16px;
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--accent); color: white; border: none;
  font-size: 20px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  z-index: 99; transition: all var(--transition);
}
.report-fab:hover { background: var(--accent-dark); transform: scale(1.05); }
.report-fab:active { transform: scale(.95); }

.report-drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface2); transition: all var(--transition);
  min-height: 120px;
}
.report-drop-zone.drag-hover { border-color: var(--accent); background: var(--accent-bg); }
.report-drop-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px; cursor: pointer; color: var(--text-muted); font-size: 13px;
}
.report-preview { position: relative; padding: 8px; }
.report-preview img { width: 100%; border-radius: var(--radius-sm); }
.report-preview-remove {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: var(--radius-full);
  background: rgba(0,0,0,.6); color: white; border: none;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.report-hint { font-size: 12px; color: var(--text-muted); text-align: center; padding: 4px; }

/* ── Bug Reports Panel ──────────────────────────────────── */
.bug-report-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 8px; transition: all var(--transition);
}
.bug-report-card:hover { border-color: var(--accent); }
.br-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.br-author { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 4px; }
.br-date { font-size: 12px; color: var(--text-muted); }
.br-text { font-size: 13px; color: var(--text); line-height: 1.4; margin-bottom: 8px; word-break: break-word; }
.br-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.br-screenshot-link {
  font-size: 12px; color: var(--accent); text-decoration: none;
  display: flex; align-items: center; gap: 4px; font-weight: 500;
}
.br-screenshot-link:hover { text-decoration: underline; }
.br-status-select {
  font-size: 12px; padding: 3px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface2); cursor: pointer;
  color: var(--text);
}
.br-status-select.danger { border-color: var(--danger); }
.br-status-select.success { border-color: var(--success); }

/* ── Estimate Presentation ───────────────────────────────── */
.estimate-present-overlay {
  display: none; position: fixed; inset: 0;
  background: white; z-index: 300; overflow-y: auto;
}
.estimate-present-overlay.open { display: block; }
.estimate-present { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.estimate-present-close {
  position: fixed; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 18px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 301;
}
.estimate-present-close:hover { background: var(--border); }
.estimate-present-header { text-align: center; margin-bottom: 32px; }
.estimate-present-logo { font-size: 16px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.estimate-present-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.estimate-present-meta { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.estimate-present-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.estimate-present-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 8px; border-bottom: 2px solid var(--border); }
.estimate-present-table td { padding: 12px 8px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.estimate-present-total { text-align: right; font-size: 20px; font-weight: 800; padding: 16px 0; }

/* Calculator */
.calc-item { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.calc-item-name { flex: 1; font-size: 14px; font-weight: 500; }
.calc-item-qty { width: 60px; }
.calc-item-price { font-size: 13px; color: var(--text-muted); min-width: 80px; text-align: right; }
.calc-item-del { background: none; border: none; font-size: 16px; color: var(--text-muted); padding: 4px; cursor: pointer; }
.calc-item-del:hover { color: var(--danger); }
.calc-total-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; margin-top: 8px; border-top: 2px solid var(--border); font-size: 15px; font-weight: 700; }
.calc-total-value { color: var(--accent); }
.calc-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Price picker */
.price-group-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin: 16px 0 6px; letter-spacing: .04em; }
.price-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 4px;
  cursor: pointer; transition: all var(--transition);
}
.price-item:hover { background: var(--accent-bg); border-color: rgba(99,91,255,.2); }
.price-item-name { font-size: 14px; font-weight: 500; }
.price-item-price { font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 12px;
  transition: all var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: white; border-radius: var(--radius-full);
  transition: all var(--transition); box-shadow: var(--shadow-xs);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Settings */
.settings-list { display: flex; flex-direction: column; gap: 8px; }
.settings-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.settings-item-info { flex: 1; }
.settings-item-title { font-size: 14px; font-weight: 600; display: block; }
.settings-item-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; display: block; }

/* ── Dispatcher Summary ──────────────────────────────────── */
.summary-section { margin-bottom: 20px; }
.summary-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 8px; border-bottom: 2px solid var(--border); }
.summary-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-light); font-size: 14px; }

/* ── Restored missing styles ─────────────────────────────── */

/* Loading overlay */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}

/* Badge unlock popup */
.badge-unlock {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 998; background: rgba(0,0,0,.5);
  animation: fadeIn .3s ease;
}
.badge-unlock-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px 28px; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn .4s cubic-bezier(.34,1.56,.64,1);
  max-width: 280px;
}
.badge-unlock-card .bu-emoji { font-size: 64px; margin-bottom: 12px; }
.badge-unlock-card .bu-title { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.badge-unlock-card .bu-name { font-size: 22px; font-weight: 800; color: var(--accent); }
.badge-unlock-card .bu-btn {
  margin-top: 20px; padding: 12px 28px;
  background: var(--accent); color: white; border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.badge-unlock-card .bu-btn:hover { background: var(--accent-dark); }

/* Card saved indicator */
.card-saved-indicator {
  position: absolute; top: 12px; right: 60px;
  background: var(--success); color: white;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-xs);
  animation: fadeInOut 1.5s ease forwards; pointer-events: none;
}

/* Manager name badge (dispatcher view) */
.req-manager-badge {
  font-size: 11px; padding: 2px 8px; border-radius: var(--radius-tag);
  font-weight: 600; background: var(--pause-bg); color: #7C3AED;
}

/* Pause date label */
.pause-until {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--pause); margin-top: 4px;
}

/* Dashboard search results header */
.dash-sr-header { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }

/* Knowledge base nav section */
.kb-nav-section {
  padding: 8px 16px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted); letter-spacing: .05em;
}

/* Kanban card layout */
.kc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.kc-mgr-row { margin-bottom: 6px; }
.kc-actions { display: flex; gap: 6px; margin-top: 8px; }

/* Estimate calculator total */
.calc-item-total { font-weight: 700; min-width: 65px; text-align: right; white-space: nowrap; }

/* Domilend import table states */
.df-row-existing td { color: var(--text-placeholder); }
.df-row-imported td { color: #059669; background: var(--success-bg); }
.df-badge-existing {
  display: inline-block; font-size: 10px; padding: 1px 6px;
  border-radius: var(--radius-xs); background: var(--surface2); color: var(--text-placeholder);
  font-weight: 600; margin-left: 4px;
}
.df-badge-imported {
  display: inline-block; font-size: 10px; padding: 1px 6px;
  border-radius: var(--radius-xs); background: var(--success-bg); color: #059669;
  font-weight: 600; margin-left: 4px;
}

/* Domilend sync results */
.dl-result-icon { font-size: 18px; }
.dl-errors-title { font-size: 13px; font-weight: 600; color: var(--danger); margin-bottom: 4px; }
.dl-error-item { font-size: 12px; color: var(--text-muted); padding: 2px 0; }

/* Dispatcher summary */
.dispatcher-summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-req-card { cursor: pointer; }

/* Animations */
@keyframes fadeInOut { 0% { opacity: 0; transform: translateY(-4px); } 15% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Desktop / Responsive ────────────────────────────────── */
@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
  .report-fab { display: none !important; }
  .page { padding-bottom: 0; margin-left: 240px; }
  #page-login { margin-left: 0; }
  .side-nav {
    display: flex !important; position: fixed; left: 0; top: 0; bottom: 0;
    width: 240px; background: var(--surface);
    border-right: 1px solid var(--border);
    flex-direction: column; padding: 20px 12px; z-index: 100;
  }
  .side-nav .sn-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 0 12px 20px; border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .side-nav .sn-logo .logo { font-size: 24px; }
  .side-nav .sn-logo h2 { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
  .side-nav-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border: none; background: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
    color: var(--text-muted); width: 100%; text-align: left;
    transition: all var(--transition);
  }
  .side-nav-btn .icon { font-size: 18px; }
  .side-nav-btn.active, .side-nav-btn:hover { background: var(--accent-bg); color: var(--accent); }
  .side-nav-btn.active { font-weight: 600; }
  .sn-spacer { flex: 1; }
  .sn-report-btn { color: var(--danger) !important; }
  .sn-report-btn:hover { background: var(--danger-bg) !important; }
  .sn-logout {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; border: none; background: none;
    border-radius: var(--radius-sm); font-size: 13px;
    color: var(--text-muted); width: 100%; text-align: left;
    transition: all var(--transition);
  }
  .sn-logout:hover { background: var(--danger-bg); color: var(--danger); }
  .sn-version { padding: 6px 12px; font-size: 11px; color: var(--text-placeholder); letter-spacing: .02em; }
  .kanban-col { min-width: 280px; width: 280px; }
  .kb-container { height: calc(100vh - var(--header-h)); }
}

@media (max-width: 768px) {
  .side-nav { display: none !important; }
  .page { margin-left: 0; }
  .kb-nav { display: none; }
  .kb-article { padding: 16px; }
  .admin-tabs { padding: 0 16px; }
  .admin-tab-content { padding: 16px; }
  .requests-list { padding: 12px 16px; }
  .requests-toolbar { padding: 10px 16px; }
  .dashboard-content { padding: 16px; }
  .leaderboard-body { padding: 16px; }
  .profile-body { padding: 16px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

.side-nav { display: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #D1D5DB; }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: var(--accent-bg); color: var(--accent-dark); }

/* ── Lucide Icons ───────────────────────────────────────── */
[data-lucide] {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  fill: none;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}

/* Nav icons */
.side-nav-btn [data-lucide], .nav-btn [data-lucide] { width: 20px; height: 20px; }
.sn-logo [data-lucide] { width: 24px; height: 24px; color: var(--accent); }
.sn-logout [data-lucide] { width: 16px; height: 16px; }

/* Empty states */
.empty-state [data-lucide] { width: 36px; height: 36px; color: var(--accent); opacity: .6; margin-bottom: 10px; }

/* Modal close icon */
.modal-close [data-lucide] { width: 16px; height: 16px; }

/* Button icons */
.btn [data-lucide] { width: 16px; height: 16px; }
.btn-sm [data-lucide] { width: 14px; height: 14px; }

/* Filter button icon */
.filter-btn [data-lucide] { width: 14px; height: 14px; }

/* Dashboard level badge icon */
.dh-level [data-lucide] { width: 16px; height: 16px; }


/* Search input with icon */
.search-wrap { position: relative; flex: 1; min-width: 140px; }
.search-wrap [data-lucide] { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-placeholder); pointer-events: none; }
.search-wrap .search-input { padding-left: 36px; width: 100%; }

/* Rank medals */
.rank-medal { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-full); font-size: 13px; font-weight: 800; color: white; flex-shrink: 0; }
.rank-1 { background: linear-gradient(135deg, #F59E0B, #D97706); }
.rank-2 { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.rank-3 { background: linear-gradient(135deg, #D97706, #92400E); }

/* Report FAB icon */
.report-fab [data-lucide] { width: 22px; height: 22px; }

/* History icons */
.history-icon [data-lucide] { width: 18px; height: 18px; }

/* Badge icons */
.badge-icon [data-lucide] { width: 28px; height: 28px; }
.badge-chip [data-lucide] { width: 16px; height: 16px; }

/* Task card icons */
.task-card [data-lucide], .req-card [data-lucide] { width: 14px; height: 14px; }
.kanban-card [data-lucide] { width: 13px; height: 13px; }

/* Login logo icon */
.login-logo .logo-icon [data-lucide] { width: 44px; height: 44px; color: var(--accent); }

/* Estimate logo */
.estimate-present-logo [data-lucide] { width: 20px; height: 20px; vertical-align: text-bottom; }

/* ── Admin Users ────────────────────────────────────────── */
.admin-user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--transition);
}
.admin-user-row:hover { box-shadow: var(--shadow-xs); }
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.admin-user-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-user-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* Per-user feature toggles in admin user list */
.admin-user-features { display:flex; gap:8px; align-items:center; margin-right:12px; flex-shrink:0; }
.user-feature-toggle { display:flex; align-items:center; gap:4px; cursor:pointer; }
.user-feature-toggle input[type="checkbox"] { width:16px; height:16px; accent-color:var(--accent); cursor:pointer; }
.uft-icon { font-size:16px; line-height:1; }
.user-feature-toggle input:not(:checked) + .uft-icon { opacity:0.3; filter:grayscale(1); }
.role-badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-tag);
  font-size: 11px; font-weight: 600; text-transform: capitalize;
}
.role-badge.role-admin { background: var(--accent-bg); color: var(--accent); }
.role-badge.role-manager { background: var(--success-bg); color: #059669; }
.role-badge.role-dispatcher { background: var(--warning-bg); color: #B45309; }
.role-badge.role-seller { background: #fff3e0; color: #e65100; }
.role-badge.role-montazhnik { background: #e3f2fd; color: #1565c0; }

/* ── Admin Stats ────────────────────────────────────────── */
.admin-stat-heroes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.admin-stat-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
}
.ash-val { font-size: 28px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ash-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.admin-stats-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.admin-stats-section .detail-section-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 10px;
}
.admin-stats-table { display: flex; flex-direction: column; gap: 6px; }
.ast-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--surface2); border-radius: var(--radius-xs);
}
.ast-key { font-size: 14px; font-weight: 500; color: var(--text); }
.ast-val { font-size: 14px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ── Price Editor ───────────────────────────────────────── */
.price-service-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.price-service-tab {
  padding: 10px 18px; background: none; border: none;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; position: relative; transition: color var(--transition);
}
.price-service-tab:hover { color: var(--text); }
.price-service-tab.active { color: var(--accent); }
.price-service-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px 2px 0 0;
}

.price-category {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.price-category-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.price-category-name {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; font-weight: 600;
  background: var(--surface2);
}
.price-category-name:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.price-cat-del {
  width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.price-cat-del:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.price-item-row {
  display: grid; grid-template-columns: 1fr 100px 60px 90px 32px; gap: 8px;
  align-items: center; margin-bottom: 6px;
}
.price-item-row input, .price-item-row select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 13px; background: var(--surface);
}
.price-item-row input:focus, .price-item-row select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg);
}
.price-item-del {
  width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.price-item-del:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.price-add-item {
  display: inline-block; margin-top: 8px; padding: 6px 14px;
  background: none; border: 1px dashed var(--border); border-radius: var(--radius-xs);
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.price-add-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.price-editor-actions {
  display: flex; gap: 10px; margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Knowledge Base Editor ──────────────────────────────── */
.kb-editor-sections { display: flex; flex-direction: column; gap: 16px; }
.kb-section-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.kb-section-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.kb-section-title-input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; font-weight: 600;
  background: var(--surface2);
}
.kb-section-title-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.kb-article-list { display: flex; flex-direction: column; gap: 6px; }
.kb-article-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--surface2); border-radius: var(--radius-xs);
  cursor: pointer; transition: all var(--transition);
}
.kb-article-card:hover { background: var(--accent-bg); }
.kb-article-card-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kb-article-card-actions { display: flex; gap: 4px; }
.kb-article-card-actions button {
  width: 28px; height: 28px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface);
  font-size: 13px; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.kb-article-card-actions button:hover { background: var(--surface-hover); color: var(--text); }

.kb-article-edit {
  margin-top: 8px; padding: 14px; border: 1px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--accent-bg);
}
.kb-article-edit input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; font-weight: 500;
  margin-bottom: 8px; background: var(--surface);
}
.kb-article-edit input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(99,91,255,.15); }
.kb-textarea {
  width: 100%; min-height: 160px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 13px; font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.6; resize: vertical; background: var(--surface);
}
.kb-textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(99,91,255,.15); }
.kb-editor-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }

/* ── Domilend Sync Panel ────────────────────────────────── */
.domilend-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.domilend-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
}
.domilend-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.5; }

.dl-mode-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dl-mode-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.dl-mode-select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 13px; background: var(--surface); color: var(--text);
}
.dl-mode-select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }

/* Fetch tabs */
.df-fetch-tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--surface2); border-radius: var(--radius-xs); padding: 3px; }
.df-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 12px; border: none; border-radius: var(--radius-xs);
  background: transparent; color: var(--text-muted);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.df-tab:hover { color: var(--text); }
.df-tab.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-xs); }
.df-tab-content { /* wraps each tab pane */ }
.df-date-inputs { display: flex; align-items: center; gap: 6px; }
.df-date-input { width: 130px !important; }
.df-date-sep { color: var(--text-muted); font-size: 13px; }

.domilend-btn-start {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: none; border-radius: var(--radius-xs);
  background: var(--accent); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.domilend-btn-start:hover { background: var(--accent-dark); }

.domilend-btn-stop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--danger);
  border-radius: var(--radius-xs); background: var(--danger-bg);
  color: var(--danger); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.domilend-btn-stop:hover { background: var(--danger); color: white; }

.domilend-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.domilend-progress-bar {
  flex: 1; height: 8px; background: var(--surface2);
  border-radius: var(--radius-full); overflow: hidden;
}
.domilend-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-full); transition: width .3s ease;
}
.domilend-progress-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.domilend-current { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.domilend-elapsed { font-size: 12px; color: var(--text-placeholder); margin-bottom: 10px; }

.domilend-result { font-size: 14px; font-weight: 600; color: var(--success); }
.domilend-errors { margin-top: 8px; font-size: 13px; color: var(--danger); }

.domilend-log-details {
  margin-top: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); overflow: hidden;
}
.domilend-log-details summary {
  padding: 8px 12px; background: var(--surface2);
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center; gap: 6px;
}
.domilend-log-details summary:hover { background: var(--surface-hover); }
.domilend-log {
  padding: 12px; font-size: 12px; font-family: 'JetBrains Mono', monospace;
  line-height: 1.6; max-height: 240px; overflow-y: auto;
  background: var(--surface); color: var(--text-secondary);
  margin: 0; white-space: pre-wrap; word-break: break-word;
}

/* Domilend Fetch preview */
.df-preview-summary {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 12px; padding: 10px 14px;
  background: var(--success-bg); border-radius: var(--radius-xs);
}
.df-preview-table-wrap {
  max-height: 400px; overflow: auto; border: 1px solid var(--border);
  border-radius: var(--radius-xs); margin-bottom: 14px;
}
.df-preview-table-wrap table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 13px; }
.df-preview-table-wrap th {
  position: sticky; top: 0; background: var(--surface2);
  padding: 8px 10px; font-weight: 600; text-align: left;
  border-bottom: 1px solid var(--border);
}
.df-preview-table-wrap td { padding: 8px 10px; border-bottom: 1px solid var(--border-light); }
.df-preview-table-wrap tr:hover td { background: var(--surface-hover); }

.df-import-controls { display: flex; flex-direction: column; gap: 10px; }
.df-import-task-row { display: flex; align-items: center; gap: 10px; }
.df-notify-label { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.df-import-buttons { display: flex; gap: 8px; }

/* ── Filter bar ──── */
.df-filter-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 8px 10px; background: var(--surface2); border-radius: var(--radius-xs);
  flex-wrap: wrap;
}
.df-filter-search {
  display: flex; align-items: center; gap: 6px; flex: 1; min-width: 180px;
}
.df-filter-search i { color: var(--text-placeholder); flex-shrink: 0; }
.df-filter-input {
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 6px 10px; font-size: 13px; width: 100%; background: var(--surface);
  color: var(--text);
}
.df-filter-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-bg); }
.df-filter-select {
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 6px 8px; font-size: 12px; background: var(--surface); color: var(--text);
  min-width: 100px;
}
.df-filter-select:focus { border-color: var(--accent); outline: none; }
.df-filter-date-input {
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 5px 8px; font-size: 12px; background: var(--surface); color: var(--text);
}

/* ── Toolbar ──── */
.df-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px; padding: 8px 10px; background: var(--accent-bg);
  border-radius: var(--radius-xs); flex-wrap: wrap;
}
.df-toolbar-left { display: flex; align-items: center; gap: 8px; }
.df-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.df-selection-count { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.df-toolbar-btn-sel { background: none; color: var(--accent); border: none; font-size: 12px; font-weight: 500; padding: 4px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.df-toolbar-btn-sel:hover { color: var(--accent-dark); }
.df-toolbar-select {
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  padding: 5px 8px; font-size: 12px; background: var(--surface); color: var(--text);
  min-width: 120px;
}
.df-toolbar-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  border: none; border-radius: var(--radius-xs); cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.df-toolbar-btn-assign { background: var(--accent); color: white; }
.df-toolbar-btn-assign:hover { background: var(--accent-dark); }
.df-toolbar-btn-rotate { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.df-toolbar-btn-rotate:hover { background: var(--surface-hover); color: var(--accent); border-color: var(--accent); }

/* ── Rotate menu ──── */
.df-rotate-menu {
  margin-bottom: 10px; padding: 10px 12px;
  background: var(--surface2); border-radius: var(--radius-xs);
  border: 1px solid var(--border-light);
}
.df-rotate-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.df-rotate-managers { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.df-rotate-mgr-label {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text); cursor: pointer;
}

/* ── Table selects ──── */
.df-mgr-select, .df-svc-select {
  padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 12px; background: var(--surface); color: var(--text); max-width: 120px;
}
.df-mgr-select:focus, .df-svc-select:focus { border-color: var(--accent); outline: none; }
.df-td-addr { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Responsive adjustments for admin ──────────────────── */
@media (max-width: 768px) {
  .admin-stat-heroes { grid-template-columns: 1fr; gap: 8px; }
  .price-item-row { grid-template-columns: 1fr 80px 50px; gap: 6px; }
  .price-item-row select, .price-item-row .price-item-del { display: none; }
  .admin-user-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .admin-user-actions { align-self: flex-end; }
}

/* ══════════════════════════════════════════════════════════
   ATTACHMENTS — Gallery, Upload, Lightbox
═══════════════════════════════════════════════════════════ */

/* ── Gallery grid ──────────────────────────────────────── */
.attachments-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.att-empty {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

/* ── Image/video thumb ─────────────────────────────────── */
.att-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border-light);
}
.att-item:hover { border-color: var(--accent); }

.att-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Video play overlay ────────────────────────────────── */
.att-video { position: relative; }
.att-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  pointer-events: none;
}

/* ── Delete button ─────────────────────────────────────── */
.att-delete {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.att-item:hover .att-delete,
.att-file-card:hover .att-delete { display: flex; }

/* ── File card (PDF/DOC) ───────────────────────────────── */
.att-file-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px;
  display: flex;
  align-items: center;
  grid-column: span 2;
}
.att-file-card:hover { border-color: var(--accent); }

.att-file-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.att-file-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.att-file-size {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Upload drop zone ──────────────────────────────────── */
.attachments-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xs);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 10px;
}
.attachments-upload-zone:hover,
.attachments-upload-zone.att-drag-hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.att-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Pending files (chips before upload) ───────────────── */
.attachments-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.att-pending-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-tag);
  font-size: 12px;
  color: var(--accent);
}
.att-pending-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.att-pending-size {
  color: var(--text-muted);
  font-size: 11px;
}
.att-pending-remove {
  background: none; border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.att-pending-remove:hover { color: var(--danger); }

/* ── Progress bar ──────────────────────────────────────── */
.attachments-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.att-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.att-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.att-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Upload button ─────────────────────────────────────── */
.att-upload-btn {
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════
   LIGHTBOX — fullscreen media viewer
═══════════════════════════════════════════════════════════ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  color: white;
  cursor: pointer;
  z-index: 310;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-content video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 4px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: white;
  cursor: pointer;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 310;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  white-space: nowrap;
  z-index: 310;
}

/* ── Mobile adjustments for attachments ────────────────── */
@media (max-width: 768px) {
  .attachments-gallery {
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 6px;
  }
  .att-delete { display: flex; }  /* always visible on mobile */
  .att-file-card { grid-column: 1 / -1; }
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-close { top: 8px; right: 8px; }
}

/* ══════════════════════════════════════════════════════════
   STORE — Product catalog v2
   ══════════════════════════════════════════════════════════ */

/* ── Toolbar (santehnika-online style) ────────────────────── */
.store-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #eef0f5;
  background: #fff;
}
.store-toolbar-row {
  display: flex;
  gap: 10px;
  padding: 14px 24px;
  align-items: center;
  flex-wrap: wrap;
}
.store-toolbar-row .field-input,
.store-toolbar-row select.field-input {
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e2e5ed;
  font-size: 13px;
  padding: 0 14px;
  background: #f8f9fc;
  transition: all 0.2s ease;
}
.store-toolbar-row .field-input:focus,
.store-toolbar-row select.field-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,91,255,0.08);
}
.store-toolbar-row .btn {
  height: 40px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  padding: 0 18px;
  border: 1px solid #e2e5ed;
  background: #fff;
  transition: all 0.2s ease;
}
.store-toolbar-row .btn:hover {
  border-color: var(--accent);
  background: rgba(99,91,255,0.04);
}
.store-filter-toggle {
  gap: 6px;
  position: relative;
}
.store-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  margin-left: 2px;
}

/* ── Filters panel (santehnika-online style) ──────────────── */
.store-filters-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 18px 24px 20px;
  background: #f8f9fc;
  border-top: 1px solid #eef0f5;
  align-items: flex-end;
}
.store-filter-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 140px;
}
.store-filter-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8c98ae;
}
.store-filter-group .field-input {
  font-size: 13px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e2e5ed;
  background: #fff;
  transition: all 0.2s ease;
}
.store-filter-group .field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.08);
}
.store-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.store-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 30px;
  border: 1.5px solid #e2e5ed;
  background: #fff;
  color: #6b7a99;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.store-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99,91,255,0.04);
}
.store-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,91,255,0.2);
}

/* ── Color chips ─────────────────────────────────────────── */
.store-color-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.store-color-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  border: 1.5px solid #e2e5ed;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 600;
  color: #6b7a99;
  white-space: nowrap;
}
.store-color-chip:hover {
  border-color: var(--accent);
  background: rgba(99,91,255,0.04);
}
.store-color-chip.active {
  border-color: var(--accent);
  background: rgba(99,91,255,0.08);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,91,255,0.12);
}
.store-color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.store-color-label {
  line-height: 1;
}

/* ── Filter action buttons ───────────────────────────────── */
.store-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef0f5;
  margin-top: 4px;
}
.store-filter-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}

.store-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.store-price-range .field-input {
  width: 100px;
  font-size: 13px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e2e5ed;
  background: #fff;
}
.store-price-range .field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.08);
}
.store-price-range span {
  color: #8c98ae;
  font-size: 13px;
}
.store-filter-toggles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.store-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.store-toggle:hover {
  color: var(--accent);
}
.store-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
}

/* ── Results count ────────────────────────────────────────── */
.store-results-count {
  padding: 12px 24px 0;
  font-size: 13px;
  color: #8c98ae;
  font-weight: 500;
}

/* ── Grid (santehnika-online style) ──────────────────────── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  padding: 18px 24px 28px;
  overflow-y: auto;
  flex: 1;
  background: #f8f9fc;
}

/* ── Card ─────────────────────────────────────────────────── */
/* ── Product Card (inspired by santehnika-online) ─────────── */
.store-card {
  background: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.store-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.store-card-img {
  height: 200px;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}
.store-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.3s ease;
}
.store-card:hover .store-card-img img {
  transform: scale(1.03);
}
.store-card-body {
  padding: 12px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.store-card-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.6px;
}
.store-card-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #1c1e21;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.store-card-specs {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #8c98ae;
  margin-top: 4px;
  flex-wrap: wrap;
}
.store-card-specs span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.store-card-specs span svg {
  flex-shrink: 0;
}

/* ── Compressor & manufacturer meta ─────────────────────── */
.store-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #6b7a90;
  margin-top: 4px;
}
.store-card-meta svg { flex-shrink: 0; }
.store-meta-dot {
  color: #c4cbd8;
  margin: 0 2px;
  font-size: 10px;
}

/* ── Badges (pill style) ──────────────────────────────────── */
.store-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.store-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 30px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.store-badge.badge-green {
  background: #e8f7ef;
  color: #13b474;
}
.store-badge.badge-blue {
  background: #ebeff9;
  color: #4a6fb5;
}
.store-badge.badge-purple {
  background: #f3f0ff;
  color: #7C3AED;
}
.store-badge.badge-orange {
  background: #fff3e8;
  color: #d4690e;
}
.store-badge.badge-gray {
  background: #f3f5fb;
  color: #8c98ae;
}

/* ── Stock badge ─────────────────────────────────────────── */
.store-stock-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  width: fit-content;
}
.store-stock-badge.in-stock {
  color: #13b474;
}
.store-stock-badge.in-stock-other {
  color: #d4690e;
}
.store-detail-stock {
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}
.store-detail-stock.in-stock { color: #13b474; }
.store-detail-stock.in-stock-other { color: #d4690e; }
.store-detail-stock.out-of-stock { color: #8c98ae; }
.store-toggle-stock {
  font-weight: 600;
  color: #13b474;
}

/* ── Card price & cart button ─────────────────────────────── */
.store-card-price {
  font-size: 20px;
  font-weight: 700;
  margin-top: auto;
  padding-top: 10px;
  color: #1c1e21;
  letter-spacing: -0.3px;
}
.store-price-request {
  color: #8c98ae;
  font-size: 13px;
  font-weight: 500;
}
.store-card-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 0;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.store-card-cart-btn:hover {
  background: #4f49e6;
  box-shadow: 0 4px 12px rgba(99,91,255,0.3);
}

/* ── Cart button in header ────────────────────────────────── */
.store-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid #e2e5ed;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1c1e21;
  font-weight: 600;
  font-size: 13px;
}
.store-cart-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,91,255,0.12);
}
.store-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 30px;
  background: var(--accent);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   STORE — Detail modal (santehnika-online style)
   ══════════════════════════════════════════════════════════ */
.store-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  padding: 0;
}
.store-detail {
  background: #fff;
  border-radius: 0;
  flex: 1;
  overflow-y: auto;
  position: relative;
  box-shadow: none;
}
.store-detail-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 210;
  background: rgba(0,0,0,.55);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.store-detail-close:hover { background: rgba(0,0,0,.75); transform: scale(1.08); }

/* Two-column layout: gallery + info (full-screen) */
.store-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 50vh;
}

/* Gallery column (full-screen) */
.store-detail-gallery {
  background: #f8f9fc;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  overflow-y: auto;
}
.store-gallery-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.store-gallery-main img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  padding: 24px;
  transition: transform 0.3s ease;
}
.store-gallery-main img:hover {
  transform: scale(1.04);
}
.store-gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.store-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 4px;
  background: #fff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.store-thumb:hover {
  border-color: #c4c9d8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.store-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,91,255,0.15);
}

/* Info column (full-screen) */
.store-detail-info {
  padding: 36px 40px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.store-detail-brand {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.6px;
}
.store-detail-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: #1c1e21;
}
.store-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.store-detail-price {
  font-size: 26px;
  font-weight: 800;
  color: #1c1e21;
  margin: 6px 0;
  letter-spacing: -0.5px;
}

/* Cart controls in detail */
.store-detail-cart-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}

/* Qty selector (shared) */
.store-qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #e2e5ed;
  border-radius: 12px;
  overflow: hidden;
}
.store-qty-selector button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #f8f9fc;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #1c1e21;
  transition: all 0.2s ease;
}
.store-qty-selector button:hover { background: #eef0f5; }
.store-qty-selector span {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 0 4px;
  background: #fff;
}

/* Key specs summary */
.store-detail-key-specs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 16px;
  background: #f8f9fc;
  border-radius: 14px;
  font-size: 14px;
  margin-top: 6px;
}
.store-detail-key-specs div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.store-detail-key-specs div svg,
.store-detail-key-specs div i {
  flex-shrink: 0;
  color: #8c98ae;
}
.store-detail-stock svg,
.store-detail-stock i {
  color: inherit !important;
}

/* ── Power variant chips ──────────────────────────────────── */
.store-power-variants {
  margin-top: 12px;
}
.store-variants-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #8c98ae;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.store-variants-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.store-variant-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 14px;
  border: 1.5px solid #e2e5ed;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 68px;
}
.store-variant-chip:hover {
  border-color: var(--accent);
  background: #f0eeff;
  box-shadow: 0 2px 8px rgba(99,91,255,0.10);
}
.store-variant-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: default;
  box-shadow: 0 2px 10px rgba(99,91,255,0.22);
}
.store-variant-chip.active .store-variant-area {
  color: rgba(255,255,255,0.75);
}
.store-variant-btu {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.store-variant-area {
  font-size: 11px;
  color: #8c98ae;
  line-height: 1.2;
}
.store-variant-stock {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #13b474;
}

/* ── Similar alternatives ────────────────────────────────── */
.store-similar-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef0f5;
}
.store-similar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1c1e21;
  margin-bottom: 10px;
}
.store-similar-count {
  font-size: 11px;
  font-weight: 600;
  background: #eef0f5;
  color: #8c98ae;
  padding: 2px 7px;
  border-radius: 10px;
}
.store-similar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.store-alt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #eef0f5;
  background: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
}
.store-alt-card:hover {
  border-color: #d5d8e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.store-alt-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.store-alt-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.store-alt-info {
  flex: 1;
  min-width: 0;
}
.store-alt-brand {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.store-alt-name {
  font-size: 12px;
  font-weight: 500;
  color: #1c1e21;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-alt-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: #8c98ae;
}
.store-alt-stock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}
.store-alt-stock.in-stock { color: #13b474; }
.store-alt-stock.in-stock-other { color: #d4690e; }
.store-alt-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.store-alt-price {
  font-size: 13px;
  font-weight: 700;
  color: #1c1e21;
  white-space: nowrap;
}
.store-alt-cart-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid #e2e5ed;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.15s ease;
}
.store-alt-cart-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.store-detail-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid #eef0f5;
  border-bottom: 1px solid #eef0f5;
  padding: 0 32px;
  background: #fff;
}
.store-tab {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #8c98ae;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.store-tab:hover { color: #1c1e21; }
.store-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.store-detail-tab-content {
  padding: 20px 32px 24px;
  min-height: 80px;
}

/* Specs table inside tab */
.store-specs-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.store-specs-table .store-spec {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f2f7;
}
.store-specs-table .store-spec:last-child { border-bottom: none; }
.store-specs-table .store-spec:nth-child(odd) {
  background: #fafbfd;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 6px;
}
.store-spec-label {
  color: #8c98ae;
  flex-shrink: 0;
}
.store-spec-value {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  color: #1c1e21;
}

.store-desc-content {
  font-size: 14px;
  line-height: 1.7;
  color: #4a5568;
}
.store-desc-content img { max-width: 100%; border-radius: 12px; margin: 10px 0; }

/* ── Compatible units carousel (multi-split) ──────────────── */
.store-compatible-section {
  border-top: 1px solid #eef0f5;
  padding: 20px 32px 24px;
}
.store-compatible-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1c1e21;
  margin-bottom: 14px;
}
.store-compatible-header i { color: var(--accent); }
.store-compatible-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.store-compatible-carousel::-webkit-scrollbar { height: 4px; }
.store-compatible-carousel::-webkit-scrollbar-thumb { background: #dce0ea; border-radius: 4px; }
.store-compat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 320px;
  padding: 12px 14px;
  border: 1.5px solid #e2e5ed;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.store-compat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(99,91,255,0.1);
}
.store-compat-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #f8f9fc;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-compat-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.store-compat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.store-compat-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: #1c1e21;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.store-compat-specs {
  font-size: 11px;
  color: #8c98ae;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-compat-price {
  font-size: 13px;
  font-weight: 700;
  color: #1c1e21;
}
.store-compat-cart {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.store-compat-cart:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,91,255,0.2);
}

/* Detail actions */
.store-detail-actions {
  padding: 16px 32px 28px;
}
.store-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #e2e5ed;
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}
.store-link-btn:hover {
  background: rgba(99,91,255,0.04);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99,91,255,0.1);
}
.store-copy-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════
   STORE — Cart side panel (santehnika-online style)
   ══════════════════════════════════════════════════════════ */
.store-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(3px);
  z-index: 250;
  display: flex;
  justify-content: flex-end;
}
.store-cart-panel {
  width: 420px;
  max-width: 90vw;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
  animation: slideInRight .25s ease-out;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.store-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eef0f5;
}
.store-cart-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: #1c1e21;
}
.store-cart-header button {
  border: none;
  background: none;
  cursor: pointer;
  color: #8c98ae;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.store-cart-header button:hover {
  background: #f3f5fb;
  color: #1c1e21;
}

/* Cart items list */
.store-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.store-cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid #f0f2f7;
  align-items: flex-start;
  transition: background 0.15s ease;
}
.store-cart-item:hover {
  background: #fafbfd;
}
.store-cart-item:last-child { border-bottom: none; }
.store-cart-item-link { cursor: pointer; }
.store-cart-item-link:hover { opacity: 0.8; }
.store-cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: #f8f9fc;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}
.store-cart-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.store-cart-item-brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.store-cart-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #1c1e21;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-cart-item-spec {
  font-size: 11px;
  color: #8c98ae;
}
.store-cart-item-price {
  font-size: 14px;
  font-weight: 700;
  margin-top: 3px;
  color: #1c1e21;
}
.store-cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.store-cart-item-controls .store-qty-selector {
  transform: scale(0.9);
}
.store-cart-item-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: #c4c9d8;
  padding: 5px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.store-cart-item-remove:hover {
  color: #e74c3c;
  background: #fef2f2;
}

/* Cart footer */
.store-cart-footer {
  border-top: 1px solid #eef0f5;
  padding: 18px 22px;
  background: #fafbfd;
}
.store-cart-total {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  color: #4a5568;
}
.store-cart-total b {
  font-weight: 800;
  color: #1c1e21;
  font-size: 20px;
}
.store-cart-actions {
  display: flex;
  gap: 10px;
}
.store-cart-actions .btn {
  flex: 1;
  border-radius: 12px;
  font-weight: 600;
  height: 42px;
}

/* ── Admin store panel ────────────────────────────────────── */
.store-admin-panel {
  padding: 22px;
  background: #fff;
  border: 1.5px solid #e2e5ed;
  border-radius: 16px;
  max-width: 480px;
}
.store-admin-stat {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f2f7;
}
.store-admin-stat:last-child { border-bottom: none; }
.store-admin-stat-label { color: #8c98ae; }
.store-admin-stat-value { font-weight: 700; color: #1c1e21; }
.store-sync-success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #13b474;
  font-size: 14px;
  font-weight: 600;
}
.store-sync-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e74c3c;
  font-size: 14px;
  font-weight: 500;
}

/* ── Store mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .store-toolbar-row { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .store-toolbar-row .field-input,
  .store-toolbar-row select.field-input { height: 38px; font-size: 13px; }
  .store-filters-panel { padding: 14px; gap: 14px; }
  .store-filter-group { min-width: auto; flex: 1 1 100%; }
  .store-results-count { padding: 10px 14px 0; }
  .store-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    padding: 14px;
    gap: 12px;
  }
  .store-card { border-radius: 16px; padding: 10px; }
  .store-card-img { height: 120px; border-radius: 10px; }
  .store-card-body { padding: 8px 2px 2px; }
  .store-card-name { font-size: 13px; }
  .store-card-price { font-size: 16px; }
  .store-card-cart-btn { padding: 8px 0; font-size: 12px; border-radius: 10px; }
  .store-card-badges { gap: 4px; }
  .store-badge { padding: 2px 8px; font-size: 10px; }

  /* Detail modal → full screen (mobile) */
  .store-detail-layout {
    grid-template-columns: 1fr;
  }
  .store-detail-gallery {
    position: relative;
    height: auto;
    padding: 16px;
    border-radius: 0;
  }
  .store-gallery-main { min-height: 200px; }
  .store-gallery-main img { max-height: 240px; padding: 16px; }
  .store-detail-info { padding: 18px 16px; }
  .store-detail-name { font-size: 17px; }
  .store-detail-price { font-size: 22px; }
  .store-detail-tabs { padding: 0 16px; }
  .store-detail-tab-content { padding: 14px 16px; }
  .store-detail-actions { padding: 12px 16px 18px; }
  .store-compatible-section { padding: 14px 16px 18px; }

  /* Compat carousel */
  .store-compat-card { min-width: 250px; }

  /* Cart panel */
  .store-cart-panel { width: 100%; }
  .store-cart-header { padding: 16px 16px; }
  .store-cart-item { padding: 12px 16px; }
  .store-cart-footer { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   MULTISPLIT CONFIGURATOR
   ══════════════════════════════════════════════════════════════ */
.ms-configurator { padding: 0 0 24px; }

/* Step bar */
.ms-step-bar {
  display: flex; align-items: center; gap: 0; padding: 16px 20px;
  background: #f8f9fb; border-radius: 12px; margin-bottom: 20px;
}
.ms-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  white-space: nowrap;
}
.ms-step.active { color: var(--accent); font-weight: 600; }
.ms-step.done { color: var(--success, #22c55e); }
.ms-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 700;
}
.ms-step.active .ms-step-num { background: var(--accent); color: #fff; }
.ms-step.done .ms-step-num { background: var(--success, #22c55e); color: #fff; }
.ms-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; min-width: 16px; }

/* Panel */
.ms-panel { animation: fadeIn .2s ease; }
.ms-panel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ms-panel-title { font-size: 18px; font-weight: 600; color: var(--text); margin: 0; }
.ms-back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text-secondary); font-size: 13px;
  cursor: pointer; transition: all var(--transition);
}
.ms-back-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Step 1: Room buttons */
.ms-rooms-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 640px; margin: 24px auto;
}
.ms-room-btn {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 16px; border-radius: 16px;
  border: 2px solid var(--border); background: #fff;
  cursor: pointer; transition: all .2s ease;
  font-size: 15px; font-weight: 500; color: var(--text);
}
.ms-room-btn svg { width: 36px; height: 36px; color: var(--accent); }
.ms-room-btn:hover { border-color: var(--accent); background: #f5f4ff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,91,255,.12); }

/* Step 2 & 3: Cards grid */
.ms-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}

.ms-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.ms-filter-chip {
  padding: 5px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 12.5px; color: var(--text-secondary);
  cursor: pointer; transition: all .15s ease;
}
.ms-filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.ms-filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Outdoor / Indoor card */
.ms-card {
  display: flex; gap: 12px; padding: 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff;
  cursor: pointer; transition: all .2s ease;
}
.ms-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(99,91,255,.1); }
.ms-card.selected { border-color: var(--accent); background: #f9f8ff; box-shadow: 0 0 0 3px rgba(99,91,255,.15); }
.ms-card-img {
  width: 80px; height: 80px; flex-shrink: 0; border-radius: 8px;
  background: #f5f6f8; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ms-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ms-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ms-card-brand { font-size: 11px; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.ms-card-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-card-specs { font-size: 11.5px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px; }
.ms-card-specs span { display: inline-flex; align-items: center; gap: 2px; }
.ms-card-price { font-size: 14px; font-weight: 700; color: var(--text); margin-top: auto; }
.ms-card-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600;
  background: #eef2ff; color: var(--accent);
}

/* Step 3: Slots */
.ms-slots {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 16px; background: #f8f9fb; border-radius: 12px;
}
.ms-slot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px dashed var(--border); background: #fff;
  min-width: 200px; flex: 1; max-width: 280px;
  transition: all .2s ease; position: relative;
}
.ms-slot.filled { border-style: solid; border-color: var(--accent); background: #faf9ff; }
.ms-slot-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 700;
}
.ms-slot.filled .ms-slot-num { background: var(--accent); color: #fff; }
.ms-slot-label { font-size: 12.5px; color: var(--text-muted); flex: 1; min-width: 0; }
.ms-slot.filled .ms-slot-label { color: var(--text); font-weight: 500; }
.ms-slot-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger, #ef4444); color: #fff; border: none;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px;
}
.ms-slot.filled .ms-slot-remove { display: flex; }

/* Summary panel */
.ms-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 14px 18px; background: #f8f9fb; border-radius: 12px;
  margin-bottom: 16px; border: 1px solid var(--border);
}
.ms-capacity-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 200px; }
.ms-capacity-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; min-width: 80px; overflow: hidden; }
.ms-capacity-fill { height: 100%; border-radius: 4px; background: var(--success, #22c55e); transition: width .3s ease, background .3s ease; width: 0; }
.ms-capacity-fill.warning { background: #f59e0b; }
.ms-capacity-fill.danger { background: var(--danger, #ef4444); }
.ms-total-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.ms-total-price { font-size: 18px; font-weight: 700; color: var(--text); }
.ms-add-cart-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px; border: none;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s ease; margin-left: auto;
}
.ms-add-cart-btn:hover:not(:disabled) { background: #5248e0; }
.ms-add-cart-btn:disabled { opacity: .45; cursor: not-allowed; }
.ms-add-cart-btn svg { width: 16px; height: 16px; }

@media (max-width: 768px) {
  .ms-rooms-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ms-room-btn { padding: 20px 12px; }
  .ms-room-btn svg { width: 28px; height: 28px; }
  .ms-cards-grid { grid-template-columns: 1fr; }
  .ms-slots { flex-direction: column; }
  .ms-slot { max-width: 100%; }
  .ms-summary { flex-direction: column; align-items: stretch; }
  .ms-add-cart-btn { margin-left: 0; width: 100%; justify-content: center; }
  .ms-step-bar { flex-wrap: wrap; gap: 4px; }
}

/* ══════════════════════════════════════════════════════════════
   ERP
   ══════════════════════════════════════════════════════════════ */

/* Tabs */
.erp-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); padding:0 24px; }
.erp-tab {
  padding:10px 20px; border:none; background:none; cursor:pointer;
  font-weight:500; font-size:14px; color:var(--text-secondary);
  border-bottom:2px solid transparent; transition:all var(--transition);
}
.erp-tab:hover { color:var(--text); }
.erp-tab.active { color:var(--accent); border-bottom-color:var(--accent); }
.erp-tab-content { flex:1; overflow-y:auto; }

/* ══════════════════════════════════════════════════════════
   Org Chart v2 — Figma UI3 Light Canvas Design
   Scoped under .orgchart-canvas to isolate from CRM theme
   ══════════════════════════════════════════════════════════ */
.orgchart-canvas {
  --oc-bg:#FAFAFA; --oc-header-bg:#FFFFFF; --oc-header-border:#ECECEC;
  --oc-text:#1A1A1A; --oc-text2:#8B8FA3; --oc-accent:#635BFF;
  --oc-node-bg:#FFFFFF; --oc-node-border:#E2E5E9; --oc-connector:#C8CCD0;
  --oc-float-bg:rgba(255,255,255,0.94); --oc-float-border:rgba(0,0,0,0.06);
  --oc-float-shadow:0 2px 12px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04);
}
/* ── Light Header ─────────────────────────────────────── */
.oc-header { display:flex; align-items:center; gap:8px; padding:8px 16px;
  background:var(--oc-header-bg); border-bottom:1px solid var(--oc-header-border);
  min-height:40px; z-index:10; }
.oc-header-title { display:inline-flex; align-items:center; gap:6px;
  font-size:13px; font-weight:600; color:var(--oc-text); }
.oc-header-title svg { width:16px; height:16px; color:var(--oc-accent); }
.oc-header-info { font-size:12px; color:var(--oc-text2); font-variant-numeric:tabular-nums; }
/* ── Workspace (canvas + side panel) ─────────────────── */
.oc-workspace { display:flex; flex:1; overflow:hidden; position:relative; }
/* ── Canvas Container ─────────────────────────────────── */
.oc-container { position:relative; flex:1; overflow:hidden; background:var(--oc-bg); min-height:400px; cursor:grab; }
.oc-container.panning { cursor:grabbing; }
.oc-container.tool-select { cursor:default; }
.oc-container.tool-pan { cursor:grab; }
.oc-container.tool-pan.panning { cursor:grabbing; }
.oc-svg { width:100%; height:100%; position:absolute; inset:0; }
.oc-empty { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
/* ── Floating Bottom Toolbar (Figma UI3) ─────────────── */
.oc-bottom-bar { position:absolute; bottom:16px; left:50%; transform:translateX(-50%);
  display:flex; align-items:center; gap:2px; padding:6px 8px;
  background:var(--oc-float-bg); backdrop-filter:blur(12px);
  border:1px solid var(--oc-float-border); border-radius:12px;
  box-shadow:var(--oc-float-shadow); z-index:20; }
.oc-bbar-btn { display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; border:none; background:none; color:var(--oc-text2);
  border-radius:8px; cursor:pointer; transition:all .12s; font-family:inherit; }
.oc-bbar-btn:hover { background:#F3F4F6; color:var(--oc-text); }
.oc-bbar-btn.active { background:rgba(99,91,255,.12); color:var(--oc-accent); }
.oc-bbar-btn i, .oc-bbar-btn svg { width:16px; height:16px; }
.oc-bbar-btn-label { display:inline-flex; align-items:center; gap:5px; padding:6px 10px;
  border:none; background:none; color:var(--oc-text2); border-radius:8px;
  cursor:pointer; transition:all .12s; font-size:12px; font-weight:500; font-family:inherit; }
.oc-bbar-btn-label:hover { background:#F3F4F6; color:var(--oc-text); }
.oc-bbar-btn-label svg { width:14px; height:14px; }
.oc-bbar-sep { width:1px; height:20px; background:var(--oc-header-border); margin:0 4px; }
.oc-bbar-zoom { font-size:11px; font-weight:600; color:var(--oc-text2);
  min-width:40px; text-align:center; font-variant-numeric:tabular-nums; user-select:none; }
/* ── Connectors (dark orthogonal lines) ───────────────── */
.orgchart-connector { fill:none; stroke:#9CA3AF; stroke-width:1.5;
  stroke-linecap:round; stroke-linejoin:round; }
/* ── Node Card v3 — Rectangular photo-card ───────────── */
.oc2-card { width:200px; background:var(--oc-node-bg); border:1px solid #B0B5BD;
  border-radius:10px; display:flex; flex-direction:column; align-items:center;
  padding:14px 12px 10px; text-align:center; user-select:none;
  box-shadow:0 1px 3px rgba(0,0,0,.06); transition:border-color .15s,box-shadow .15s,transform .15s;
  box-sizing:border-box; cursor:pointer; position:relative; gap:4px; }
.oc2-card:hover { border-color:#888;
  box-shadow:0 4px 16px rgba(0,0,0,.1); }
.oc2-card.selected { border-color:var(--oc-accent);
  box-shadow:0 0 0 2px rgba(99,91,255,.25),0 4px 16px rgba(0,0,0,.1); }
.oc2-card.drag-over { border-color:#00c48c; box-shadow:0 0 0 2px rgba(0,196,140,.25); }
.oc2-card.dragging { opacity:.5; transform:scale(.96); }
/* Department icon circle */
.oc2-photo { width:44px; height:44px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background:#F3F4F6; border:2px solid #FFF; box-shadow:0 1px 3px rgba(0,0,0,.1);
  overflow:hidden; }
.oc2-photo svg, .oc2-photo i { width:20px; height:20px; color:inherit; }
/* Info block */
.oc2-info { display:flex; flex-direction:column; align-items:center; gap:1px; width:100%; }
.oc2-name { font-weight:600; font-size:12.5px; line-height:1.3; color:var(--oc-text);
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.oc2-subtitle { font-size:10.5px; color:var(--oc-text2); line-height:1.3; }
/* People avatars row */
.oc2-people { display:flex; justify-content:center; gap:0; margin-top:2px; }
.oc2-person { width:26px; height:26px; border-radius:50%; background:#E8EBF0;
  border:2px solid #FFF; display:flex; align-items:center; justify-content:center;
  font-size:9px; font-weight:700; color:#555; margin-left:-5px; flex-shrink:0;
  box-shadow:0 0 0 1px rgba(0,0,0,.08); }
.oc2-person:first-child { margin-left:0; }
.oc2-person.bot { background:rgba(99,91,255,.12); color:var(--oc-accent); }
.oc2-person.bot i, .oc2-person.bot svg { width:14px; height:14px; }
/* Actions (hover) */
.oc2-actions { display:flex; gap:2px; opacity:0; transition:opacity .15s; }
.oc2-card:hover .oc2-actions { opacity:1; }
.oc2-actions button { border:none; background:none; cursor:pointer; padding:3px; color:#9CA3AF;
  border-radius:4px; display:inline-flex; align-items:center; transition:all .1s; }
.oc2-actions button:hover { color:var(--oc-accent); background:#F3F4F6; }
.oc2-actions button.danger:hover { color:#ef4444; }
.oc2-actions button svg { width:13px; height:13px; }
/* Expand/collapse */
.oc2-expand { display:flex; align-items:center; gap:3px; cursor:pointer; padding:2px 6px;
  border-radius:4px; font-size:10px; color:var(--oc-text2); transition:all .1s; }
.oc2-expand:hover { color:var(--oc-accent); background:rgba(99,91,255,.05); }
.oc2-expand svg { width:12px; height:12px; transition:transform .2s; }
.oc2-expand.expanded svg { transform:rotate(180deg); }
/* Expanded positions */
.oc2-positions { width:100%; margin-top:2px; border-top:1px solid #D5D8DD; padding-top:5px;
  display:flex; flex-direction:column; gap:3px; text-align:left; }
.oc2-pos-item { display:flex; align-items:center; gap:5px; font-size:11px;
  padding:3px 6px; border-radius:5px; background:#F9FAFB; }
.oc2-pos-item.ai { border-left:2px solid var(--oc-accent); background:rgba(99,91,255,.04); }
.oc2-pos-item svg { width:12px; height:12px; flex-shrink:0; }
.oc2-pos-item .pos-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--oc-text); }
.oc2-pos-item .pos-assignee { color:#6B7280; font-size:10px; flex-shrink:0; }
.oc2-pos-item button { border:none; background:none; cursor:pointer; padding:2px; color:#9CA3AF;
  border-radius:3px; flex-shrink:0; display:inline-flex; }
.oc2-pos-item button:hover { color:#ef4444; }
.oc2-pos-item button svg { width:11px; height:11px; }
/* ── Minimap (light) ──────────────────────────────────── */
.oc-minimap { position:absolute; bottom:60px; right:16px; width:180px; height:120px;
  background:var(--oc-float-bg); backdrop-filter:blur(8px); border-radius:10px;
  border:1px solid var(--oc-float-border);
  overflow:hidden; box-shadow:var(--oc-float-shadow); z-index:20; }
.oc-minimap canvas { width:100%; height:100%; display:block; }
.oc-minimap-viewport { position:absolute; border:1.5px solid rgba(99,91,255,.6);
  background:rgba(99,91,255,.06); border-radius:2px; pointer-events:none; }
/* ── Side Panel ───────────────────────────────────────── */
.oc-sidepanel { width:0; overflow:hidden; transition:width .25s ease; background:var(--oc-header-bg);
  border-left:1px solid var(--oc-header-border); display:flex; flex-direction:column; flex-shrink:0; }
.oc-sidepanel.open { width:360px; }
.oc-sp-header { display:flex; align-items:center; gap:8px; padding:12px 16px;
  border-bottom:1px solid var(--oc-header-border); min-height:48px; }
.oc-sp-title { font-size:14px; font-weight:600; color:var(--oc-text); flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.oc-sp-close { border:none; background:none; cursor:pointer; padding:4px; color:var(--oc-text2);
  border-radius:6px; display:inline-flex; transition:all .1s; }
.oc-sp-close:hover { background:#F3F4F6; color:var(--oc-text); }
.oc-sp-close svg { width:16px; height:16px; }
.oc-sp-tabs { display:flex; gap:0; padding:0 16px; border-bottom:1px solid var(--oc-header-border); }
.oc-sp-tab { border:none; background:none; cursor:pointer; padding:10px 12px; font-size:12px;
  font-weight:500; color:var(--oc-text2); border-bottom:2px solid transparent;
  transition:all .15s; font-family:inherit; }
.oc-sp-tab:hover { color:var(--oc-text); }
.oc-sp-tab.active { color:var(--oc-accent); border-bottom-color:var(--oc-accent); }
.oc-sp-body { flex:1; overflow-y:auto; padding:16px; }
/* Side panel content styles */
.oc-sp-section { margin-bottom:16px; }
.oc-sp-section-title { font-size:11px; font-weight:600; text-transform:uppercase;
  letter-spacing:.5px; color:var(--oc-text2); margin-bottom:8px; }
.oc-sp-field { margin-bottom:12px; }
.oc-sp-field label { display:block; font-size:11px; font-weight:500; color:var(--oc-text2); margin-bottom:4px; }
.oc-sp-field input, .oc-sp-field select, .oc-sp-field textarea { width:100%; padding:8px 10px;
  border:1px solid var(--oc-node-border); border-radius:8px; font-size:13px;
  font-family:inherit; background:#FFF; color:var(--oc-text); box-sizing:border-box;
  transition:border-color .15s; }
.oc-sp-field input:focus, .oc-sp-field select:focus, .oc-sp-field textarea:focus {
  outline:none; border-color:var(--oc-accent); box-shadow:0 0 0 2px rgba(99,91,255,.1); }
.oc-sp-field textarea { min-height:80px; resize:vertical; }
.oc-sp-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 14px;
  border:1px solid var(--oc-node-border); background:#FFF; color:var(--oc-text);
  border-radius:8px; font-size:12px; font-weight:500; cursor:pointer;
  transition:all .15s; font-family:inherit; }
.oc-sp-btn:hover { border-color:#635BFF; color:#635BFF; }
.oc-sp-btn.primary { background:#635BFF; color:#FFF; border-color:#635BFF; }
.oc-sp-btn.primary:hover { background:#5046E5; }
.oc-sp-btn.danger { color:#ef4444; border-color:#fecaca; }
.oc-sp-btn.danger:hover { background:#fef2f2; border-color:#ef4444; }
.oc-sp-btn svg { width:14px; height:14px; }
/* Position list in side panel */
.oc-sp-pos { padding:8px 10px; border:1px solid var(--oc-node-border); border-radius:8px;
  margin-bottom:6px; display:flex; flex-direction:column; gap:6px; background:#FAFAFA; }
.oc-sp-pos-header { display:flex; align-items:center; gap:8px; }
.oc-sp-pos-header svg { width:16px; height:16px; flex-shrink:0; }
.oc-sp-pos-title { font-size:13px; font-weight:500; flex:1; color:var(--oc-text); }
.oc-sp-pos-assign { display:flex; align-items:center; gap:6px; }
.oc-sp-pos-assign select { padding:4px 8px; font-size:12px; border-radius:6px;
  border:1px solid var(--oc-node-border); background:#FFF; font-family:inherit; }
/* Document item in side panel */
.oc-sp-doc { padding:10px 12px; border:1px solid var(--oc-node-border); border-radius:8px;
  margin-bottom:8px; background:#FAFAFA; }
.oc-sp-doc-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.oc-sp-doc-type { font-size:10px; font-weight:600; text-transform:uppercase; padding:2px 6px;
  border-radius:4px; background:rgba(99,91,255,.08); color:var(--oc-accent); }
.oc-sp-doc-title { font-size:13px; font-weight:500; flex:1; color:var(--oc-text); }
.oc-sp-doc-content { font-size:12px; color:var(--oc-text2); line-height:1.5;
  white-space:pre-wrap; word-break:break-word; }
.oc-sp-doc-actions { display:flex; gap:4px; margin-top:8px; }
/* ── Responsive ───────────────────────────────────────── */
@media (max-width:768px) {
  .oc-minimap { display:none; }
  .oc-sidepanel.open { width:100%; position:absolute; right:0; top:0; bottom:0; z-index:30; }
  .oc-bbar-btn-label span { display:none; }
  .oc-bottom-bar { left:8px; right:8px; transform:none; }
}

/* Tasks toolbar */
.erp-tasks-toolbar { padding:16px 24px; display:flex; gap:8px; align-items:center; }
.erp-tasks-list { padding:0 24px 24px; display:flex; flex-direction:column; gap:8px; }

/* Task card */
.erp-task-card {
  display:flex; align-items:center; gap:12px; padding:12px 16px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); cursor:pointer;
  transition:all var(--transition);
}
.erp-task-card:hover { border-color:var(--accent); box-shadow:var(--shadow-sm); }
.erp-task-check {
  width:22px; height:22px; border-radius:50%; border:2px solid var(--border);
  cursor:pointer; flex-shrink:0; display:flex; align-items:center;
  justify-content:center; transition:all var(--transition);
}
.erp-task-check:hover { border-color:var(--accent); }
.erp-task-check.done { background:var(--accent); border-color:var(--accent); color:#fff; }
.erp-task-body { flex:1; min-width:0; }
.erp-task-title { font-weight:500; font-size:14px; }
.erp-task-title.done { text-decoration:line-through; color:var(--text-secondary); }
.erp-task-meta { font-size:12px; color:var(--text-secondary); display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; align-items:center; }

/* Task badges */
.erp-task-badge { padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; white-space:nowrap; }
.erp-task-badge.high { background:#fee2e2; color:#b91c1c; }
.erp-task-badge.medium { background:#fff3e0; color:#e65100; }
.erp-task-badge.low { background:#e8f5e9; color:#2e7d32; }
.erp-task-badge.todo { background:var(--bg); color:var(--text-secondary); }
.erp-task-badge.in_progress { background:#e3f2fd; color:#1565c0; }
.erp-task-badge.done { background:#e8f5e9; color:#2e7d32; }

/* Admin ERP panel */
.erp-admin-panel {
  padding:20px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); max-width:480px;
}
.erp-admin-panel p { margin:8px 0; font-size:14px; }

/* Modal small variant — centered (not bottom-sheet) */
.modal-sm { max-width:480px; }
#dept-modal-overlay,
#pos-modal-overlay,
#task-modal-overlay {
  align-items: center !important;
}
#dept-modal-overlay .modal-sheet,
#pos-modal-overlay .modal-sheet,
#task-modal-overlay .modal-sheet {
  border-radius: 16px;
  max-height: 80vh;
  animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn {
  from { transform: scale(.96) translateY(12px); opacity:0; }
  to   { transform: scale(1) translateY(0); opacity:1; }
}

/* Responsive */
@media (max-width: 768px) {
  .erp-tabs { padding:0 12px; }
  .erp-tab { padding:8px 14px; font-size:13px; }
  .oc-toolbar { padding:4px 8px; }
  .oc-tool-label { display:none; }
  .oc-minimap { display:none; }
  .oc-float-controls { bottom:8px; right:8px; }
  .oc-statusbar { padding:3px 8px; }
  .oc-container { min-height:300px; }
  .orgchart-node-inner { width:200px; }
  .erp-tasks-toolbar { padding:8px 12px; }
  .erp-tasks-list { padding:0 12px 12px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   SELLER ROLE — канбан, заказы, оверрайды
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Seller Stage Progress Bar ─────────────────────────── */
.so-stage-bar { display:flex; gap:4px; padding:4px 0 8px; }
.so-stage-step { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; }
.so-stage-dot { width:28px; height:28px; border-radius:50%; border:2px solid #e2e5ed; background:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#8c98ae; transition:.2s; }
.so-stage-step.active .so-stage-dot { border-color:var(--accent); background:var(--accent); color:#fff; }
.so-stage-step.done .so-stage-dot { border-color:#13b474; background:#13b474; color:#fff; }
.so-stage-label { font-size:10px; color:#8c98ae; text-align:center; line-height:1.2; max-width:80px; }
.so-stage-step.active .so-stage-label { color:var(--accent); font-weight:600; }
.so-stage-step.done .so-stage-label { color:#13b474; }
.so-stage-connector { flex:0 0 20px; display:flex; align-items:center; padding-bottom:18px; }
.so-stage-connector .so-line { flex:1; height:2px; background:#e2e5ed; }
.so-stage-connector.done .so-line { background:#13b474; }

/* ── Seller Order Modal ─────────────────────────────────── */
.so-info-block { font-size:13px; color:var(--text-secondary); line-height:1.5; }
.so-info-block b { color:var(--text-primary); font-weight:600; }
.so-comment-text { font-size:13px; color:var(--text-primary); background:#f8f9fc; padding:10px 12px; border-radius:10px; line-height:1.5; white-space:pre-wrap; }
.so-comment-text:empty::before { content:'Нет комментария'; color:#8c98ae; }
.so-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:4px; }
.so-actions .btn { flex:1; min-width:140px; }

/* ── Seller Order Chips in Request Card ─────────────────── */
.seller-order-chip { display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:10px; border:1px solid #eef0f5;
  background:#f8f9fc; margin-bottom:6px; cursor:pointer; transition:.15s; }
.seller-order-chip:hover { border-color:#d5d8e0; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.seller-order-chip.completed { border-color:#c8e6c9; background:#e8f5e9; }
.so-stage-badge { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; color:var(--accent);
  background:rgba(99,91,255,.08); padding:3px 8px; border-radius:6px; white-space:nowrap; }
.seller-order-chip.completed .so-stage-badge { color:#2e7d32; background:rgba(46,125,50,.08); }
.so-model { font-size:13px; color:var(--text-primary); font-weight:500; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.so-price { font-size:13px; font-weight:700; color:var(--text-primary); white-space:nowrap; }
.so-create-dialog { margin-top:8px; padding:10px; border-radius:10px; background:#f8f9fc; border:1px solid #eef0f5; }
.so-create-dialog textarea { min-height:60px; }

/* ── Product Picker in SO Creation Dialog ──────────────── */
.so-product-picker { position:relative; margin-bottom:8px; }
.so-search-wrap { position:relative; display:flex; align-items:center; }
.so-search-icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--text-muted); pointer-events:none; display:flex; }
.so-search-wrap .field-input { padding-left:32px; padding-right:32px; }
.so-search-clear { position:absolute; right:8px; top:50%; transform:translateY(-50%); cursor:pointer; color:var(--text-muted); display:flex; border-radius:50%; padding:2px; }
.so-search-clear:hover { color:var(--text-primary); background:#eef0f5; }

/* Dropdown Results */
.so-product-results { position:absolute; z-index:100; left:0; right:0; background:#fff; border:1px solid #eef0f5; border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12); max-height:280px; overflow-y:auto; margin-top:4px; }
.so-result-item { display:flex; align-items:center; gap:10px; padding:8px 12px; cursor:pointer; transition:background .1s; }
.so-result-item:hover { background:#f5f6fa; }
.so-result-item:not(:last-child) { border-bottom:1px solid #f0f1f5; }
.so-result-img-wrap { width:40px; height:40px; flex-shrink:0; border-radius:8px; background:#f8f9fc; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.so-result-img { width:100%; height:100%; object-fit:contain; }
.so-result-img-placeholder { color:var(--text-muted); display:flex; }
.so-result-info { flex:1; min-width:0; }
.so-result-name { font-size:13px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.so-result-meta { font-size:11px; color:var(--text-muted); display:flex; gap:6px; align-items:center; margin-top:2px; }
.so-result-specs { font-size:11px; color:var(--text-muted); }
.so-result-seller-badge { display:inline-flex; align-items:center; gap:2px; font-size:10px; color:#e67e22; font-weight:600; }
.so-result-prices { text-align:right; flex-shrink:0; }
.so-result-price { font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; }
.so-result-seller-price { font-size:11px; color:#e67e22; white-space:nowrap; }
.so-result-empty { padding:12px; text-align:center; font-size:13px; color:var(--text-muted); }

/* Selected Product Preview */
.so-product-preview { margin-top:8px; }
.so-preview-card { display:flex; align-items:center; gap:10px; padding:10px; border-radius:10px; background:#f0f1ff; border:1px solid rgba(99,91,255,.15); }
.so-preview-left { width:52px; height:52px; flex-shrink:0; border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.so-preview-img { width:100%; height:100%; object-fit:contain; }
.so-preview-img-placeholder { color:var(--text-muted); display:flex; }
.so-preview-body { flex:1; min-width:0; }
.so-preview-brand { font-size:10px; font-weight:700; text-transform:uppercase; color:var(--accent); letter-spacing:0.5px; }
.so-preview-name { font-size:13px; font-weight:500; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.so-preview-specs { font-size:11px; color:var(--text-muted); margin-top:2px; }
.so-preview-price { font-size:13px; font-weight:700; color:var(--text-primary); margin-top:2px; }
.so-preview-seller { font-size:11px; color:#e67e22; display:flex; align-items:center; gap:4px; margin-top:2px; }
.so-preview-remove { background:none; border:none; cursor:pointer; padding:4px; color:var(--text-muted); border-radius:50%; flex-shrink:0; }
.so-preview-remove:hover { color:var(--text-primary); background:rgba(0,0,0,.06); }

/* Chip thumbnail */
.so-chip-thumb { width:28px; height:28px; border-radius:6px; object-fit:contain; background:#f8f9fc; flex-shrink:0; }
.so-price-catalog { color:var(--text-muted); font-weight:500; font-size:12px; }

/* Product card in Seller Order Modal */
.so-modal-product-card { display:flex; gap:12px; padding:10px; border-radius:10px; background:#f8f9fc; border:1px solid #eef0f5; }
.so-modal-product-img-wrap { width:64px; height:64px; flex-shrink:0; border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.so-modal-product-img { width:100%; height:100%; object-fit:contain; }
.so-modal-product-info { flex:1; min-width:0; }
.so-modal-product-brand { font-size:10px; font-weight:700; text-transform:uppercase; color:var(--accent); letter-spacing:0.5px; }
.so-modal-product-name { font-size:13px; font-weight:500; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.so-modal-product-specs { font-size:11px; color:var(--text-muted); margin-top:2px; }
.so-modal-product-price { font-size:14px; font-weight:700; color:var(--text-primary); margin-top:4px; }
.so-modal-product-seller-price { font-size:11px; color:#e67e22; margin-top:2px; }

/* Kanban card product row */
.kc-product { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-primary); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kc-product-img { width:20px; height:20px; border-radius:4px; object-fit:contain; flex-shrink:0; }

/* ── Multi-product selection chips (creation dialog) ── */
.so-selected-products { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.so-selected-chip { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; background:#f0f1ff; border:1px solid rgba(99,91,255,.15); }
.so-sel-thumb { width:36px; height:36px; border-radius:6px; object-fit:contain; background:#fff; flex-shrink:0; }
.so-sel-thumb-ph { width:36px; height:36px; border-radius:6px; background:#fff; display:flex; align-items:center; justify-content:center; color:var(--text-muted); flex-shrink:0; }
.so-sel-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.so-sel-name { font-size:13px; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.so-sel-price { font-size:12px; font-weight:600; color:var(--text-primary); }
.so-sel-remove { background:none; border:none; cursor:pointer; padding:4px; color:var(--text-muted); border-radius:50%; flex-shrink:0; }
.so-sel-remove:hover { color:var(--text-primary); background:rgba(0,0,0,.06); }
/* +N badge on seller order chips */
.so-multi-badge { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:18px; padding:0 5px; border-radius:9px; background:var(--accent); color:#fff; font-size:10px; font-weight:700; flex-shrink:0; }
/* Remove button on product card in modal */
.so-modal-product-card { position:relative; }
.so-modal-product-remove { position:absolute; top:8px; right:8px; background:none; border:none; cursor:pointer; padding:4px; color:var(--text-muted); border-radius:50%; }
.so-modal-product-remove:hover { color:#e53e3e; background:rgba(229,62,62,.08); }
.so-modal-product-card + .so-modal-product-card { margin-top:8px; }
/* Delete order button */
.so-delete-btn { color:#e53e3e !important; border-color:#fecaca !important; background:#fff !important; }
.so-delete-btn:hover { background:#fef2f2 !important; border-color:#e53e3e !important; }

/* ── Seller Dashboard ──────────────────────────────────── */
.seller-dash-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px,1fr)); gap:10px; margin-bottom:16px; }
.seller-dash-card { background:#fff; border:1px solid #eef0f5; border-radius:12px; padding:14px; text-align:center; }
.seller-dash-card .sdc-value { font-size:28px; font-weight:700; color:var(--accent); }
.seller-dash-card .sdc-label { font-size:12px; color:#8c98ae; margin-top:2px; }
.seller-dash-orders { display:flex; flex-direction:column; gap:6px; }
.seller-dash-order { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid #eef0f5;
  background:#fff; cursor:pointer; transition:.15s; }
.seller-dash-order:hover { border-color:#d5d8e0; transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,0,0,.06); }

/* ── Montazhnik Dashboard ─────────────────────────────── */
.montazhnik-dash-header { margin-bottom:16px; }
.mdh-greeting { font-size:13px; color:var(--text-muted); }
.mdh-name { font-size:22px; font-weight:700; color:var(--text-primary); display:flex; align-items:center; gap:8px; margin-top:2px; }
.montazhnik-stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px,1fr)); gap:10px; margin-bottom:16px; }
.ms-card { background:#fff; border:1px solid #eef0f5; border-radius:12px; padding:14px; text-align:center; }
.ms-card .ms-value { font-size:28px; font-weight:700; color:#1565c0; }
.ms-card .ms-label { font-size:12px; color:#8c98ae; margin-top:2px; }
.mdh-section-title { display:flex; align-items:center; gap:6px; font-size:15px; font-weight:600; margin:16px 0 10px; color:var(--text-primary); }
.mdh-count { background:#e3f2fd; color:#1565c0; font-size:12px; font-weight:700; padding:2px 8px; border-radius:10px; }
.montazhnik-requests { display:flex; flex-direction:column; gap:8px; }
.montazhnik-req-card { background:#fff; border:1px solid #eef0f5; border-radius:12px; padding:14px 16px; cursor:pointer; transition:.15s; }
.montazhnik-req-card:hover { border-color:#bbdefb; transform:translateY(-1px); box-shadow:0 2px 8px rgba(21,101,192,.08); }
.mrc-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.mrc-num { font-size:13px; font-weight:700; color:var(--text-primary); }
.mrc-badges { display:flex; gap:6px; align-items:center; }
.mr-stage { font-size:11px; font-weight:600; background:#ede9fe; color:#6d28d9; padding:2px 8px; border-radius:6px; }
.mrc-status { font-size:11px; font-weight:600; padding:2px 8px; border-radius:6px; }
.mrc-status-work { background:var(--success-bg); color:#059669; }
.mrc-status-paused { background:#f3e8ff; color:#7c3aed; }
.mrc-status-other { background:#f1f5f9; color:#64748b; }
.mrc-client, .mrc-phone, .mrc-address, .mrc-task, .mrc-date { font-size:13px; color:var(--text-secondary); display:flex; align-items:center; gap:6px; margin-top:3px; }
.mrc-client { font-weight:600; color:var(--text-primary); }
.mrc-task { color:#1565c0; font-weight:500; }

/* ── Seller Store Controls ─────────────────────────────── */
.store-seller-controls { margin-top:16px; padding:14px; background:#f8f9fc; border-radius:12px; border:1px solid #eef0f5; }
.store-seller-controls .card-section-title { margin-bottom:10px; }
.store-seller-toggle { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-primary); cursor:pointer; }
.store-seller-toggle input[type="checkbox"] { width:18px; height:18px; accent-color:var(--accent); cursor:pointer; }
.store-seller-price-row { display:flex; align-items:center; gap:8px; margin-top:8px; }
.store-seller-price-row label { font-size:12px; color:#8c98ae; white-space:nowrap; }
.store-seller-price-row input { flex:1; }
.store-seller-save { margin-top:10px; }

/* ── Seller Stock Badge (in product cards) ─────────────── */
.store-seller-badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600;
  color:#e65100; background:rgba(230,81,0,.08); padding:3px 8px; border-radius:6px; margin-top:4px; }
.store-seller-price-tag { font-size:12px; color:var(--accent); font-weight:600; margin-top:2px; }

/* ── Seller Kanban Card Extras ─────────────────────────── */
.kc-manager-name { font-size:12px; color:#8c98ae; margin-top:2px; display:flex; align-items:center; gap:4px; }
.kc-model { font-size:12px; color:var(--text-primary); font-weight:500; display:flex; align-items:center; gap:4px; margin-top:4px; }
.kc-selling-price { font-size:14px; font-weight:700; color:var(--accent); margin-top:4px; }
.kc-settlement-badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; padding:3px 8px;
  border-radius:6px; margin-top:4px; }
.kc-settlement-badge.pending { color:#e65100; background:rgba(230,81,0,.08); }
.kc-settlement-badge.confirmed { color:#2e7d32; background:rgba(46,125,50,.08); }
