/* ═══════════════════════════════════════════════════════════════════════════
   Nemo Design Tokens v1
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:            #0d1426;
  --bg-card:       #131c33;
  --bg-soft:       #0f1729;
  --bg-hover:      #1a2540;
  --border:        #1f2a45;
  --border-strong: #2a3a5c;

  --text:          #e8ecf3;
  --text-soft:     #8b95b3;
  --text-muted:    #6b7593;

  --accent:        #ff7a3d;
  --accent-hover:  #ff6a25;
  --accent-soft:   rgba(255,122,61,.12);

  --success:       #4ade80;
  --success-soft:  rgba(74,222,128,.12);
  --warning:       #fbbf24;
  --warning-soft:  rgba(251,191,36,.12);
  --danger:        #f87171;
  --danger-soft:   rgba(248,113,113,.12);
  --blue:          #3b82f6;
  --blue-soft:     rgba(59,130,246,.12);
  --brand-nemo:    #00d0ff;

  --font-sans:     'Roboto Slab', Georgia, 'Times New Roman', serif;
  --font-mono:     'Roboto Slab', Georgia, serif;

  --fs-xs:   10px;
  --fs-sm:   11px;
  --fs-body: 13px;
  --fs-md:   14px;
  --fs-lg:   15px;
  --fs-xl:   18px;
  --fs-2xl:  22px;
  --fs-3xl:  28px;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight: 1.2;
  --lh-base:  1.5;

  --tracking-wide:   .06em;
  --tracking-normal: 0;

  --pad-xxs: 2px;
  --pad-xs:  4px;
  --pad-sm:  8px;
  --pad-md:  12px;
  --pad-lg:  16px;
  --pad-xl:  20px;
  --pad-2xl: 28px;

  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 18px;

  --hdr-height:  56px;
  --hdr-padding: 14px 22px;

  --logo-font-size:       22px;
  --logo-font-weight:     800;
  --logo-letter-spacing:  -0.02em;

  --sidebar-width:        290px;
  --sidebar-width-narrow: 200px;
  --sidebar-pad:          10px 8px;
  --sidebar-item-h:       36px;
  --sidebar-item-radius:  8px;

  --btn-height:    36px;
  --btn-height-sm: 30px;
  --btn-pad:       0 14px;
  --btn-pad-sm:    0 10px;

  --input-height:  36px;
  --input-pad:     8px 12px;

  --card-pad:      18px 20px;
  --card-pad-sm:   12px 14px;

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 999px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.25);
  --shadow-md:    0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.45);
  --shadow-popup: 0 8px 28px rgba(0,0,0,.25);

  --transition: .15s ease;
}

[data-theme="light"] {
  --bg:            #F1F4FB;
  --bg-card:       #FFFFFF;
  --bg-soft:       #F7F9FD;
  --bg-hover:      #EBF0FA;
  --border:        #D4DCEF;
  --border-strong: #B8C7E3;

  --text:          #0F172A;
  --text-soft:     #5B6A8A;
  --text-muted:    #94A3B8;

  --accent:        #E8621A;
  --accent-hover:  #D5530F;
  --accent-soft:   rgba(232,98,26,.1);

  --success:       #16A34A;
  --success-soft:  rgba(22,163,74,.1);
  --warning:       #D97706;
  --warning-soft:  rgba(217,119,6,.1);
  --danger:        #DC2626;
  --danger-soft:   rgba(220,38,38,.1);
  --blue:          #2563EB;
  --blue-soft:     rgba(37,99,235,.1);
  --brand-nemo:    #00d0ff;

  --shadow-sm:    0 1px 3px rgba(15,23,42,.08);
  --shadow-md:    0 4px 16px rgba(15,23,42,.12);
  --shadow-lg:    0 12px 40px rgba(15,23,42,.18);
  --shadow-popup: 0 8px 28px rgba(15,23,42,.15);
}

/* ── Базовые компоненты ── */

.nemo-check {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-size: var(--fs-body); color: var(--text);
}
.nemo-check input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nemo-check-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border-strong); border-radius: 4px;
  background: var(--bg-soft);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.nemo-check-box svg {
  display: none; width: 12px; height: 12px;
  stroke: #fff; stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.nemo-check input:checked + .nemo-check-box { background: var(--accent); border-color: var(--accent); }
.nemo-check input:checked + .nemo-check-box svg { display: block; }
.nemo-check input:focus-visible + .nemo-check-box { box-shadow: 0 0 0 2px var(--accent-soft); }
.nemo-check:hover .nemo-check-box { border-color: var(--accent); }
.nemo-check input:disabled + .nemo-check-box { opacity: .45; cursor: not-allowed; }
.nemo-check input:disabled ~ * { opacity: .45; cursor: not-allowed; }
.nemo-check-sm .nemo-check-box { width: 15px; height: 15px; border-radius: 3px; }
.nemo-check-sm .nemo-check-box svg { width: 10px; height: 10px; stroke-width: 3.5; }

.nemo-radio {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  font-size: var(--fs-body); color: var(--text);
}
.nemo-radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.nemo-radio-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border-strong); border-radius: 50%;
  background: var(--bg-soft);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nemo-radio-dot::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: transparent;
  transition: background var(--transition), transform var(--transition);
  transform: scale(0);
}
.nemo-radio input:checked + .nemo-radio-dot { border-color: var(--accent); }
.nemo-radio input:checked + .nemo-radio-dot::after { background: var(--accent); transform: scale(1); }
.nemo-radio input:focus-visible + .nemo-radio-dot { box-shadow: 0 0 0 2px var(--accent-soft); }
.nemo-radio:hover .nemo-radio-dot { border-color: var(--accent); }

/* ── Collapse ── */
.nemo-collapse { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.nemo-collapse + .nemo-collapse { margin-top: 6px; }
.nemo-collapse-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: var(--bg-soft); border: 0;
  font-family: inherit; font-size: var(--fs-body); font-weight: var(--fw-semibold);
  color: var(--text); cursor: pointer;
  transition: background var(--transition);
  text-align: left;
}
.nemo-collapse-head:hover { background: var(--bg-hover); }
.nemo-collapse-arrow {
  width: 14px; height: 14px; flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s ease;
}
.nemo-collapse.open .nemo-collapse-arrow { transform: rotate(90deg); }
.nemo-collapse-badge {
  margin-left: auto;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  padding: 1px 8px; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent);
  line-height: 1.6;
}
.nemo-collapse-badge.empty { background: var(--bg-hover); color: var(--text-muted); }
.nemo-collapse-body { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.nemo-collapse.open .nemo-collapse-body { max-height: 600px; }
.nemo-collapse-body-inner { padding: 10px 14px 14px; }

/* ── Select / Dropdown ── */
.nemo-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 8px 36px 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7593' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}
.nemo-select:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-hover);
}
.nemo-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.nemo-select option {
  background: var(--bg-card);
  color: var(--text);
  padding: 8px 12px;
}
.nemo-select option:checked {
  background: var(--accent-soft);
  color: var(--accent);
}
.nemo-select:disabled {
  opacity: .5;
  cursor: not-allowed;
  background-color: var(--bg-hover);
}
[data-theme="light"] .nemo-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.logo-mark, .nemo-wordmark, .brand-wordmark {
  color: var(--brand-nemo) !important;
  font-size: var(--logo-font-size);
  font-weight: var(--logo-font-weight);
  letter-spacing: var(--logo-letter-spacing);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Компоненты v2 — единый визуальный язык для всех модулей.
   Правило: любая новая страница подключает design-tokens.css и берёт .nemo-*
   классы. Локальные оверрайды — только для module-specific нюансов.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Кнопки ────────────────────────────────────────────────────────────── */
.nemo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px; height: var(--btn-height, 36px);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-hover); color: var(--text);
  font-family: inherit; font-size: var(--fs-body); font-weight: var(--fw-semibold);
  cursor: pointer; white-space: nowrap;
  transition: border-color var(--transition), background var(--transition), color var(--transition), filter var(--transition);
}
.nemo-btn:hover { border-color: var(--accent); }
.nemo-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.nemo-btn:disabled, .nemo-btn[disabled] { opacity: .5; cursor: not-allowed; }
.nemo-btn svg { width: 14px; height: 14px; }

.nemo-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.nemo-btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }

.nemo-btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.nemo-btn-danger:hover { filter: brightness(1.08); border-color: var(--danger); }

.nemo-btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.nemo-btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: transparent; }

.nemo-btn-sm { height: var(--btn-height-sm, 30px); padding: 0 10px; font-size: var(--fs-sm); }

.nemo-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--bg-hover); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.nemo-icon-btn:hover { border-color: var(--accent); color: var(--text); }
.nemo-icon-btn svg { width: 16px; height: 16px; }

/* ── Инпуты / текстарии ────────────────────────────────────────────────── */
.nemo-input, .nemo-textarea {
  width: 100%;
  padding: 0 12px; height: var(--input-height, 36px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: inherit; font-size: var(--fs-body);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nemo-textarea { padding: 8px 12px; height: auto; min-height: 80px; resize: vertical; line-height: var(--lh-base); }
.nemo-input:hover, .nemo-textarea:hover { border-color: var(--border-strong); }
.nemo-input:focus, .nemo-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nemo-input:disabled, .nemo-textarea:disabled { opacity: .55; cursor: not-allowed; }
.nemo-input::placeholder, .nemo-textarea::placeholder { color: var(--text-muted); }

.nemo-input-sm { height: var(--btn-height-sm, 30px); padding: 0 10px; font-size: var(--fs-sm); }

/* Стилизуем нативные date/time для тёмной темы: скрываем calendar picker icon
   у Chromium и красим индикатор */
.nemo-input[type="date"], .nemo-input[type="datetime-local"], .nemo-input[type="time"] {
  color-scheme: dark;
}
[data-theme="light"] .nemo-input[type="date"],
[data-theme="light"] .nemo-input[type="datetime-local"],
[data-theme="light"] .nemo-input[type="time"] { color-scheme: light; }

.nemo-field { margin-bottom: 12px; }
.nemo-field-label { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 4px; font-weight: var(--fw-medium); }

/* ── Панель / карточка ─────────────────────────────────────────────────── */
.nemo-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--card-pad, 18px 20px);
}
.nemo-panel-title {
  font-size: var(--fs-sm); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--text-muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.nemo-panel-title svg { width: 14px; height: 14px; }

/* ── Модалка ───────────────────────────────────────────────────────────── */
.nemo-modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 1100; padding: 20px;
  animation: nemo-fade-in .12s ease;
}
.nemo-modal-back.show { display: flex; }
.nemo-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: nemo-scale-in .14s ease;
}
.nemo-modal-lg { max-width: 900px; }
.nemo-modal-xl { max-width: 1200px; }
.nemo-modal-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.nemo-modal-title { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); }
.nemo-modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition);
}
.nemo-modal-close:hover { color: var(--text); background: var(--bg-hover); }
.nemo-modal-body { padding: 20px; overflow: auto; flex: 1; }
.nemo-modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

@keyframes nemo-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes nemo-scale-in { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: scale(1) } }

/* ── Dropzone (drag&drop файлов) ───────────────────────────────────────── */
.nemo-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center; color: var(--text-muted); cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.nemo-dropzone:hover, .nemo-dropzone.hover {
  border-color: var(--accent); color: var(--text); background: var(--accent-soft);
}
.nemo-dropzone svg { width: 40px; height: 40px; opacity: .6; margin-bottom: 8px; }
.nemo-dropzone-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); }
.nemo-dropzone-sub { font-size: var(--fs-sm); margin-top: 4px; }

/* ── Тосты ─────────────────────────────────────────────────────────────── */
.nemo-toast-wrap {
  position: fixed; bottom: 20px; right: 20px; z-index: 1300;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.nemo-toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: var(--fs-body); color: var(--text);
  box-shadow: var(--shadow-md);
  pointer-events: auto; max-width: 380px;
  animation: nemo-slide-in .18s ease;
}
.nemo-toast.ok  { border-left: 3px solid var(--success); }
.nemo-toast.err { border-left: 3px solid var(--danger); }
.nemo-toast.warn{ border-left: 3px solid var(--warning); }
@keyframes nemo-slide-in { from { opacity: 0; transform: translateX(30px) } to { opacity: 1; transform: translateX(0) } }

/* ── Таблица ───────────────────────────────────────────────────────────── */
.nemo-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--fs-body); color: var(--text);
}
.nemo-table th, .nemo-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.nemo-table th {
  color: var(--text-muted); font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  font-weight: var(--fw-semibold);
  background: var(--bg-soft);
}
.nemo-table tr:hover td { background: var(--bg-soft); }
.nemo-table td.actions { display: flex; gap: 4px; }
.nemo-table-scroll { overflow-x: auto; }

.nemo-badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--bg-hover); color: var(--text-soft);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: .04em;
  line-height: 1.6;
}
.nemo-badge-ok    { background: var(--success-soft); color: var(--success); }
.nemo-badge-err   { background: var(--danger-soft);  color: var(--danger); }
.nemo-badge-warn  { background: var(--warning-soft); color: var(--warning); }
.nemo-badge-info  { background: var(--blue-soft);    color: var(--blue); }
.nemo-badge-accent{ background: var(--accent-soft);  color: var(--accent); }

/* ── Утилиты ───────────────────────────────────────────────────────────── */
.nemo-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: var(--fs-body); }
.nemo-hint  { font-size: var(--fs-sm); color: var(--text-muted); }
.nemo-divider { height: 1px; background: var(--border); margin: 12px 0; }

/* Скрытие спиннера number-input в Chrome/Firefox */
.nemo-input[type="number"]::-webkit-outer-spin-button,
.nemo-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nemo-input[type="number"] { -moz-appearance: textfield; }

/* ═══ nemo-combobox — reusable ARIA 1.2 combobox with inline create-row ═══ */
.nemo-combobox { position: relative; width: 100%; }

.nemo-combobox-input { padding-right: 56px; }

.nemo-combobox-clear {
  position: absolute; top: 50%; right: 34px; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0;
  display: none; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted); border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
}
.nemo-combobox-clear:hover { color: var(--text); background: var(--bg-hover); }
.nemo-combobox.has-value .nemo-combobox-clear { display: inline-flex; }

.nemo-combobox-caret {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 12px; height: 12px; color: var(--text-muted);
  pointer-events: none;
  transition: transform .18s ease, color var(--transition);
}
.nemo-combobox[aria-expanded="true"] .nemo-combobox-caret {
  transform: translateY(-50%) rotate(180deg); color: var(--accent);
}

.nemo-combobox-spinner {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 12px; height: 12px; display: none;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: nemo-cb-spin .7s linear infinite;
}
.nemo-combobox.is-loading .nemo-combobox-spinner { display: block; }
.nemo-combobox.is-loading .nemo-combobox-caret   { display: none; }
@keyframes nemo-cb-spin { to { transform: translateY(-50%) rotate(360deg); } }

.nemo-combobox-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 1050;
  max-height: 280px; overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup, 0 8px 24px rgba(0,0,0,.24));
  padding: 4px;
  margin: 0; list-style: none;
  display: none;
  animation: nemo-cb-in .12s ease;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.nemo-combobox[aria-expanded="true"] .nemo-combobox-pop { display: block; }
@keyframes nemo-cb-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.nemo-combobox-pop::-webkit-scrollbar { width: 8px; }
.nemo-combobox-pop::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.nemo-combobox-pop::-webkit-scrollbar-track { background: transparent; }

.nemo-combobox-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-body); color: var(--text);
  cursor: pointer; user-select: none;
  transition: background var(--transition), color var(--transition);
  line-height: var(--lh-tight);
}
.nemo-combobox-opt.is-active,
.nemo-combobox-opt[aria-selected="true"] {
  background: var(--accent-soft); color: var(--accent);
}
.nemo-combobox-opt:hover { background: var(--bg-hover); }
.nemo-combobox-opt-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nemo-combobox-opt-sub {
  font-size: var(--fs-xs); color: var(--text-muted); flex-shrink: 0;
}
.nemo-combobox-opt mark {
  background: transparent; color: inherit;
  font-weight: var(--fw-bold);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.nemo-combobox-create {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 8px; border-radius: var(--radius-sm);
  font-size: var(--fs-body); color: var(--accent);
  cursor: pointer; font-weight: var(--fw-medium);
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.nemo-combobox-create.only-item { border-top: 0; margin-top: 0; padding-top: 8px; }
.nemo-combobox-create.is-active,
.nemo-combobox-create[aria-selected="true"],
.nemo-combobox-create:hover { background: var(--accent-soft); }
.nemo-combobox-create svg { width: 14px; height: 14px; flex-shrink: 0; }
.nemo-combobox-create-q { color: var(--text); font-weight: var(--fw-semibold); }

.nemo-combobox-empty {
  padding: 14px 10px; text-align: center;
  color: var(--text-muted); font-size: var(--fs-sm);
}

.nemo-combobox-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .nemo-combobox-pop { max-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) {
  .nemo-combobox-pop { animation: none; }
  .nemo-combobox-caret,
  .nemo-combobox-spinner { transition: none; animation: none; }
}

/* ── Anti-autofill ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-soft, var(--bg, #0f1729)) inset !important;
  -webkit-text-fill-color: var(--text, #e8ecf3) !important;
  caret-color: var(--text, #e8ecf3) !important;
  border-color: var(--border, #1f2a45) !important;
  transition: background-color 9999s ease-in-out 0s !important;
  font-family: inherit !important;
}
input:autofill,
textarea:autofill,
select:autofill {
  background-color: var(--bg-soft, var(--bg, #0f1729)) !important;
  color: var(--text, #e8ecf3) !important;
}
