/* Дизайн-токени взято з BotLabs CRM (crm-jd.botlabs.agency): палітра slate, Inter, радіус 0.625rem. */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..700&display=swap');

:root {
  --radius: 0.625rem;
  --background: oklch(100% 0 0);
  --foreground: oklch(12.9% .042 264.695);
  --card: oklch(100% 0 0);
  --card-foreground: oklch(12.9% .042 264.695);
  --popover: oklch(100% 0 0);
  --primary: oklch(20.8% .042 265.755);
  --primary-foreground: oklch(98.4% .003 247.858);
  --secondary: oklch(96.8% .007 247.896);
  --secondary-foreground: oklch(20.8% .042 265.755);
  --muted: oklch(96.8% .007 247.896);
  --muted-foreground: oklch(55.4% .046 257.417);
  --accent: oklch(96.8% .007 247.896);
  --accent-foreground: oklch(20.8% .042 265.755);
  --destructive: oklch(57.7% .245 27.325);
  --border: oklch(92.9% .013 255.508);
  --input: oklch(92.9% .013 255.508);
  --ring: oklch(70.4% .04 256.788);
  --sidebar: var(--background);
  --ok: oklch(52.7% .154 150.069);
  --ok-bg: oklch(96.2% .044 156.743);
  --warn: oklch(55.5% .163 48.998);
  --warn-bg: oklch(96.2% .059 95.617);
  --bad: oklch(57.7% .245 27.325);
  --bad-bg: oklch(95.6% .029 17.38);
  --info: oklch(48.8% .217 264.376);
  --info-bg: oklch(95.1% .026 236.824);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --sidebar-width: 16rem;
  color-scheme: light;
}
:root.dark {
  --background: oklch(12.9% .042 264.695);
  --foreground: oklch(98.4% .003 247.858);
  --card: oklch(14% .04 259.21);
  --card-foreground: oklch(98.4% .003 247.858);
  --popover: oklch(20.8% .042 265.755);
  --primary: oklch(92.9% .013 255.508);
  --primary-foreground: oklch(20.8% .042 265.755);
  --secondary: oklch(27.9% .041 260.031);
  --secondary-foreground: oklch(98.4% .003 247.858);
  --muted: oklch(27.9% .041 260.031);
  --muted-foreground: oklch(70.4% .04 256.788);
  --accent: oklch(27.9% .041 260.031);
  --accent-foreground: oklch(98.4% .003 247.858);
  --destructive: oklch(70.4% .191 22.216);
  --border: oklch(100% 0 0 / .1);
  --input: oklch(100% 0 0 / .15);
  --ring: oklch(55.1% .027 264.364);
  --ok: oklch(79.2% .209 151.711);
  --ok-bg: oklch(39.3% .095 152.535 / .35);
  --warn: oklch(82.8% .189 84.429);
  --warn-bg: oklch(47.3% .137 46.201 / .35);
  --bad: oklch(70.4% .191 22.216);
  --bad-bg: oklch(39.6% .141 25.723 / .35);
  --info: oklch(70.7% .165 254.624);
  --info-bg: oklch(37.9% .146 265.522 / .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--foreground); background: var(--background);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11';
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted-foreground); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Каркас ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width); flex: none; background: var(--sidebar); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 8px;
}
.sidebar-head { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 4px; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; }
.logo svg.i { width: 18px; height: 18px; }
.brand-name { font-weight: 600; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted-foreground); }
.nav-group { padding: 8px 0; }
.nav-label { font-size: 12px; font-weight: 500; color: var(--muted-foreground); padding: 0 8px; height: 32px; display: flex; align-items: center; }
.nav-item {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 6px; text-decoration: none;
  color: var(--foreground); font-size: 14px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--accent); }
.nav-item.active { background: var(--accent); font-weight: 500; }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 500; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--muted); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header {
  height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklch, var(--background) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.header .spacer { flex: 1; }
.content { padding: 24px 16px 48px; width: 100%; max-width: 1400px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; margin: 0; line-height: 1.25; }
.page-sub { color: var(--muted-foreground); margin: 4px 0 0; }
.backdrop { display: none; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .layout.nav-open .sidebar { transform: none; }
  .layout.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 40; }
}
@media (min-width: 901px) { .only-mobile { display: none !important; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; border: 1px solid transparent; text-decoration: none;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-xs); transition: background .15s, opacity .15s;
}
.btn:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .textarea:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .tab:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); border-color: var(--ring);
}
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.outline { background: var(--background); color: var(--foreground); border-color: var(--input); }
.btn.outline:hover, .btn.ghost:hover { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--foreground); box-shadow: none; }
.btn.secondary { background: var(--secondary); color: var(--secondary-foreground); box-shadow: none; }
.btn.destructive { background: var(--destructive); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.dashed { border-style: dashed; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent;
  cursor: pointer; color: var(--foreground);
}
.icon-btn:hover { background: var(--accent); }
.icon-btn.sm { width: 32px; height: 32px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Поля ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-size: 14px; font-weight: 500; line-height: 1; }
.hint { font-size: 12px; color: var(--muted-foreground); }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--input); background: transparent;
  box-shadow: var(--shadow-xs); font-size: 14px; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.textarea { height: auto; min-height: 96px; padding: 8px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.select option { background: var(--popover); color: var(--foreground); }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--destructive); }
.field-error { font-size: 12px; color: var(--destructive); }
.input-group { position: relative; }
.input-group > svg.i { position: absolute; left: 10px; top: 10px; color: var(--muted-foreground); pointer-events: none; }
.input-group > svg.i + .input { padding-left: 34px; }
.input-group > .input + .icon-btn { right: 2px; }
.input-group > .icon-btn { position: absolute; right: 2px; top: 2px; width: 32px; height: 32px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--input); transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--background); box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); }

/* ---------- Картки ---------- */
.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.card-head { padding: 20px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.3; margin: 0; }
.card-desc { color: var(--muted-foreground); font-size: 13px; margin: 4px 0 0; }
.card-body { padding: 20px 24px; display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { border-radius: 12px; border: 1px solid var(--border); background: var(--card); padding: 12px; text-align: left; box-shadow: var(--shadow-xs); cursor: pointer; }
.kpi:hover { background: var(--accent); }
.kpi.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.kpi-label { margin-top: 4px; font-size: 14px; font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--muted-foreground); }
.kpi.warn .kpi-value { color: var(--warn); }

/* ---------- Таблиця ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .input-group { width: 280px; max-width: 100%; }
.toolbar .select { width: auto; min-width: 150px; height: 32px; font-size: 13px; }
.table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { height: 40px; padding: 0 8px; text-align: left; font-weight: 500; color: var(--muted-foreground); white-space: nowrap; border-bottom: 1px solid var(--border); }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in oklch, var(--muted) 50%, transparent); }
.table th:first-child, .table td:first-child { padding-left: 12px; }
.table th:last-child, .table td:last-child { padding-right: 12px; }
.table .right { text-align: right; }
.row-link { cursor: pointer; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--muted); display: grid; place-items: center; color: var(--muted-foreground); }
.cell-title { font-weight: 500; display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cell-title:hover { text-decoration: underline; }
.cell-sub { font-size: 12px; color: var(--muted-foreground); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-old { color: var(--muted-foreground); text-decoration: line-through; font-size: 12px; margin-left: 6px; font-weight: 400; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted-foreground); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; color: var(--muted-foreground); font-size: 13px; flex-wrap: wrap; }
.pager .btns { display: flex; gap: 8px; }

/* ---------- Бейджі ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.outline { border-color: var(--border); color: var(--foreground); }
.badge.s-in_stock, .badge.r-done { color: var(--ok); background: var(--ok-bg); }
.badge.s-reserved, .badge.r-new { color: var(--warn); background: var(--warn-bg); }
.badge.s-sold, .badge.r-cancelled { color: var(--bad); background: var(--bad-bg); }
.badge.s-hidden { color: var(--muted-foreground); background: var(--muted); }
.badge.r-confirmed { color: var(--info); background: var(--info-bg); }
.badge.disc { color: var(--bad); background: var(--bad-bg); }
.badge.disc::before { display: none; }

/* ---------- Меню, діалоги, тости ---------- */
.menu { position: fixed; z-index: 60; min-width: 200px; background: var(--popover); color: var(--foreground); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; font-size: 14px; text-align: left; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--accent); outline: none; }
.menu-item.danger { color: var(--destructive); }
.menu-sep { height: 1px; background: var(--border); margin: 4px -4px; }
.dialog-overlay { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / .5); display: grid; place-items: center; padding: 16px; }
.dialog { width: 100%; max-width: 440px; background: var(--background); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 24px; display: grid; gap: 16px; }
.dialog h2 { margin: 0; font-size: 18px; font-weight: 600; }
.dialog p { margin: 0; color: var(--muted-foreground); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; background: var(--muted); border-radius: 10px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.seg button.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--popover); color: var(--foreground); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; animation: toastIn .2s ease; }
.toast.error svg.i { color: var(--destructive); }
.toast.ok svg.i { color: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Вкладки ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; padding: 3px; background: var(--muted); border-radius: 10px; gap: 2px; margin-bottom: 12px; }
.tab { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 6px; }
.tab.on { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-xs); }
.tab .n { font-variant-numeric: tabular-nums; font-size: 12px; opacity: .8; }

/* ---------- Редактор ---------- */
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.editor-bar .title { flex: 1; min-width: 200px; }
.dirty-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); }
.dirty-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.editor-col { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1100px) { .editor-grid { grid-template-columns: 1fr; } }
.discount-line { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: var(--muted); color: var(--muted-foreground); }
.discount-line.on { background: var(--bad-bg); color: var(--bad); font-weight: 500; }
.discount-line.err { background: var(--bad-bg); color: var(--destructive); }
.features { display: grid; gap: 8px; }
.feature-row { display: flex; gap: 6px; align-items: center; }
.feature-row .input { flex: 1; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--muted); cursor: grab; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo.dragging { opacity: .4; }
.photo.drop-target { box-shadow: 0 0 0 2px var(--primary); }
.photo .cover-tag { position: absolute; left: 6px; top: 6px; background: var(--primary); color: var(--primary-foreground); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.photo .tools { position: absolute; inset: auto 4px 4px 4px; display: flex; justify-content: space-between; gap: 2px; opacity: 0; transition: opacity .15s; }
.photo:hover .tools, .photo:focus-within .tools { opacity: 1; }
@media (hover: none) { .photo .tools { opacity: 1; } }
.photo .tools button { width: 28px; height: 28px; border-radius: 6px; border: 0; background: rgb(255 255 255 / .92); color: #0f172a; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.photo .tools button svg.i { width: 14px; height: 14px; }
.photo .tools button.danger { color: #dc2626; }
.dropzone { border: 1px dashed var(--input); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted-foreground); cursor: pointer; font-size: 13px; display: grid; gap: 6px; justify-items: center; }
.dropzone:hover, .dropzone.over { background: var(--accent); color: var(--foreground); }
.history { display: grid; gap: 10px; font-size: 13px; margin: 0; padding: 0; list-style: none; }
.history li { display: grid; gap: 2px; }
.history .when { font-size: 12px; color: var(--muted-foreground); }
.status-options { display: grid; gap: 8px; }
.status-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.status-option:hover { background: var(--accent); }
.status-option.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.status-option input { margin: 3px 0 0; accent-color: var(--primary); }
.status-option .t { font-weight: 500; }
.status-option .d { font-size: 12px; color: var(--muted-foreground); }

/* ---------- Заявки ---------- */
.req-note { min-width: 160px; height: 32px; font-size: 13px; }
.req-status { height: 32px; font-size: 13px; width: 150px; }
.link-muted { color: var(--muted-foreground); text-decoration: none; }
.link-muted:hover { text-decoration: underline; color: var(--foreground); }
.msg { font-size: 12px; color: var(--muted-foreground); max-width: 280px; white-space: pre-wrap; }

/* ---------- Налаштування ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted-foreground); }
.kv dd { margin: 0; word-break: break-word; }
.list { display: grid; gap: 0; border: 1px solid var(--border); border-radius: 10px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 140px; }
.state-line { display: flex; align-items: center; gap: 8px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--muted); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* ---------- Вхід ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 500; }
.login-brand svg.i { width: 22px; height: 22px; }
.login-card { padding: 24px; display: grid; gap: 16px; }
.login-card h1 { font-size: 18px; font-weight: 600; margin: 0; }
.login-card p { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.alert { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.alert.error { border-color: color-mix(in oklch, var(--destructive) 40%, transparent); color: var(--destructive); background: var(--bad-bg); }
.alert.warn { border-color: color-mix(in oklch, var(--warn) 40%, transparent); color: var(--warn); background: var(--warn-bg); }
.skeleton { background: var(--muted); border-radius: 8px; animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }
