:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #dbe4f0;
  --text: #0f172a;
  --muted: #64748b;
  --yellow: #f7c948;
  --yellow-dark: #e9b414;
  --accent: #1d4ed8;
  --ok: #059669;
  --danger: #dc2626;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 0% -10%, #fff6d6 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #e8efff 0%, transparent 50%),
    var(--bg);
}
a { color: var(--accent); }
.page-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}
html.crm-native-app .page-top {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}
html.crm-native-app .ios-pwa-notify-help { display: none !important; }
.page-top h1 {
  margin: 0;
  font-size: 1.15rem;
  flex: 1 1 auto;
  min-width: 0;
}
.page-top .sub {
  width: 100%;
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}
.btn, input, select, textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 80px; }
.btn { cursor: pointer; }
.btn.primary { background: var(--yellow); border-color: var(--yellow-dark); font-weight: 700; }
.btn.ghost { background: #fff; }
.btn.danger { background: #fff1f2; border-color: #fecaca; color: var(--danger); }
.btn.small { padding: 6px 10px; font-size: 12px; }
.page-shell { max-width: 1080px; margin: 0 auto; padding: 14px 16px 28px; }
.page-status {
  margin-bottom: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
}
.page-status.err { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.page-status.ok { border-color: #bbf7d0; background: #ecfdf5; color: #065f46; }
.page-status[hidden] { display: none !important; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.card-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(90deg, #fffdf4, #fff 60%);
}
.card-body { padding: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpi {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.kpi b { display: block; font-size: 24px; line-height: 1.1; margin-bottom: 4px; }
.kpi span { font-size: 12px; color: var(--muted); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}
.data-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.managers-table .row-inactive td { opacity: .55; }
.managers-table .manager-token-cell {
  min-width: 0;
  max-width: 220px;
}
.manager-api-token {
  display: block;
  font-size: 11px;
  word-break: break-all;
  line-height: 1.35;
  color: #334155;
  margin-bottom: 4px;
}
.managers-table .manager-token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.badge-on, .badge-off {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}
.badge-on { background: #dcfce7; color: #166534; }
.badge-off { background: #fee2e2; color: #991b1b; }
.credentials-card {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid #86efac;
  border-radius: 12px;
  background: #f0fdf4;
}
.credentials-card-head {
  font-weight: 700;
  margin-bottom: 6px;
}
.cred-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.cred-row:last-child { border-bottom: 0; }
.cred-label { font-size: 12px; color: var(--muted); padding-top: 2px; }
.cred-value {
  display: block;
  font-size: 12px;
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}
.manager-edit-panel {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.manager-edit-panel-head {
  font-weight: 700;
  margin-bottom: 10px;
}
.edit-panel-status {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.edit-panel-status.err {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.edit-panel-status.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
@media (max-width: 640px) {
  .cred-row { grid-template-columns: 1fr; }
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  min-width: 60px;
}
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f7c948, #f59e0b); }
.bar-fill.blue { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.bar-fill.green { background: linear-gradient(90deg, #34d399, #059669); }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #f8fafc;
}
.pill.tier-sale { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.pill.tier-thinking { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.pill.tier-contact { background: #fffbeb; border-color: #fcd34d; color: #b45309; }
.pill.tier-closed { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; }
.pill.tier-new { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
.qr-editor-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fafbfc;
}
.qr-editor-item .row { margin-bottom: 8px; }
.contact-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; }
.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-main { min-width: 0; flex: 1; }
.contact-main strong { display: block; font-size: 14px; }
.contact-main .meta { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.contact-row-clickable { cursor: pointer; border-radius: 10px; margin: 0 -6px; padding-left: 6px; padding-right: 6px; transition: background 0.12s; }
.contact-row-clickable:hover { background: #f1f5f9; }
.contact-row-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; align-items: stretch; }
.contact-detail-backdrop {
  position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 42, 0.45);
}
.contact-detail-backdrop[hidden] { display: none !important; }
.contact-detail-drawer {
  position: fixed; z-index: 1201; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: #fff; box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.22s ease;
}
.contact-detail-drawer.open { transform: translateX(0); }
.contact-detail-drawer[hidden] { display: none !important; }
.contact-detail-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.contact-detail-hero { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.contact-detail-av {
  width: 44px; height: 44px; border-radius: 12px; background: #e0e7ff; color: #3730a3;
  font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-detail-head-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.contact-detail-head-text strong { font-size: 16px; line-height: 1.25; word-break: break-word; }
.contact-detail-body { flex: 1; overflow: auto; padding: 14px 16px; font-size: 14px; line-height: 1.45; }
.contact-detail-actions {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 16px; border-top: 1px solid var(--line); flex-shrink: 0;
}
.contact-detail-actions .primary { flex: 1 1 140px; min-height: 44px; font-weight: 700; }
.contact-detail-field { margin-bottom: 12px; }
.contact-detail-field .lbl { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.contact-detail-field .val { word-break: break-word; }
.contact-detail-field a.val { color: #1d4ed8; text-decoration: none; }
.contact-detail-field a.val:hover { text-decoration: underline; }
.contact-detail-note { white-space: pre-wrap; font-size: 13px; color: #334155; background: #f8fafc; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.contact-detail-seg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 12px; }
@media (max-width: 480px) {
  .contact-detail-drawer { width: 100vw; }
  .contact-detail-seg-grid { grid-template-columns: 1fr; }
}
.dup-leads-card .card-head {
  background: linear-gradient(90deg, #fef2f2, #fff 55%);
  color: #991b1b;
  border-bottom-color: #fecaca;
}
.dup-leads-card .card-body { padding: 12px 14px; }
.dup-empty { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.dup-empty.ok { color: #065f46; }
.dup-group {
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fffbfb;
}
.dup-group:last-child { margin-bottom: 0; }
.dup-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.dup-group-head strong { font-size: 14px; color: #b91c1c; }
.dup-group-head .muted { font-size: 12px; color: var(--muted); }
.dup-table { margin-bottom: 10px; font-size: 12px; }
.dup-actions { margin-top: 8px; align-items: flex-end; }
.dup-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  flex: 1 1 220px;
}
.dup-label select { min-width: 200px; max-width: 100%; }
.task-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.task-item:last-child { border-bottom: none; }
.task-item.done .task-text { text-decoration: line-through; color: var(--muted); }
.funnel-viz { display: grid; gap: 8px; }
.funnel-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}
@media (max-width: 760px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Памятки и правила */
.memos-shell { max-width: 1200px; }
.memos-shell.memos-mode-airlines { max-width: none; width: 100%; padding-left: 12px; padding-right: 12px; }
.memos-shell.memos-mode-airlines .memos-layout { grid-template-columns: 1fr; }
.memos-shell.memos-mode-airlines .memos-sidebar { display: none !important; }
.memos-shell.memos-mode-airlines .memos-main { min-width: 0; width: 100%; }
.memos-airlines-view { width: 100%; min-width: 0; }
.memos-routes-list { width: 100%; min-width: 0; }
.memos-airlines-notes-fold { padding: 0; }
.memos-airlines-notes-fold summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 14px;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.memos-airlines-notes-fold summary::-webkit-details-marker { display: none; }
.memos-airlines-notes-fold summary::before { content: "▸ "; color: var(--muted); }
.memos-airlines-notes-fold[open] summary::before { content: "▾ "; }
.memos-airlines-notes-body { padding: 12px 14px 14px; font-size: 13px; }
.memos-search-card { margin-bottom: 12px; }
.memos-search-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.memos-search-input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 12px;
}
.memos-hints { margin-top: 10px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.memos-hint-chip {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--accent);
}
.memos-hint-chip:hover { background: #eff6ff; border-color: #bfdbfe; }
.memos-filters { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.memos-filter-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.memos-topic-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
}
.memos-topic-chip.active { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; font-weight: 600; }
.memos-mode-tabs { display: flex; gap: 6px; margin-top: 12px; }
.memos-mode-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.memos-mode-btn.active { background: var(--yellow); border-color: var(--yellow-dark); }
.memos-airlines-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.memos-airline-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.memos-airline-card h4 { margin: 0 0 4px; font-size: 14px; }
.memos-airline-code { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #eff6ff; color: #1d4ed8; margin-bottom: 8px; }
.memos-airline-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.memos-airline-links a { font-size: 12px; padding: 4px 8px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); text-decoration: none; }
.memos-airline-links a:hover { background: #eff6ff; }
.memos-airline-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.memos-route-table-hint { margin: 0 0 8px; font-size: 12px; }
.memos-routes-table-scroll { overflow: auto; max-height: calc(100vh - 200px); border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.memos-routes-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1280px; table-layout: auto; }
.memos-routes-table thead { position: sticky; top: 0; z-index: 2; }
.memos-routes-table th,
.memos-routes-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; text-align: left; line-height: 1.45; }
.memos-routes-table th { background: #f8fafc; font-size: 11px; font-weight: 700; white-space: nowrap; }
.memos-routes-table tbody tr:hover { background: #fafafa; }
.memos-route-col-airline { min-width: 120px; font-weight: 600; }
.memos-route-col-code { width: 48px; white-space: nowrap; font-weight: 700; color: #1d4ed8; }
.memos-route-col-dest { min-width: 110px; }
.memos-route-col-baggage,
.memos-route-col-checkin,
.memos-route-col-meals,
.memos-route-col-extras,
.memos-route-col-infant,
.memos-route-col-merge,
.memos-route-col-pets { min-width: 140px; }
.memos-route-th-focus { background: #fef9c3 !important; box-shadow: inset 0 -2px 0 #eab308; }
.memos-route-td-hit { background: #fffbeb; }
.memos-route-td-focus { background: #fef08a; box-shadow: inset 0 0 0 2px #eab308; }
.memos-routes-table mark { background: #fde047; padding: 0 2px; border-radius: 2px; }
.memos-bg-links-cell a,
.memos-ak-links-cell a { display: inline-block; margin: 2px 4px 2px 0; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #f0fdf4; border: 1px solid #bbf7d0; text-decoration: none; }
.memos-bg-links-cell a { background: #eff6ff; border-color: #bfdbfe; }
.memos-bg-banner a { margin-right: 8px; }
.memos-bg-table { min-width: 1180px; }
.memos-note-item { margin-bottom: 12px; }
.memos-note-item strong { display: block; margin-bottom: 4px; }
.memos-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; align-items: start; }
.memos-sidebar { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; }
.memos-country-list { display: grid; gap: 6px; padding-top: 4px; }
.memos-country-btn {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}
.memos-country-btn strong { display: block; font-size: 13px; }
.memos-country-btn small { color: var(--muted); font-size: 11px; }
.memos-country-btn.active { border-color: #93c5fd; background: #eff6ff; }
.memos-country-btn.dimmed { opacity: 0.45; }
.memos-flag { font-size: 1.25rem; line-height: 1; }
.memos-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.memos-toc-link {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  text-decoration: none;
}
.memos-toc-link:hover, .memos-toc-link.active { background: #dbeafe; color: #1d4ed8; }
.memos-section { margin-bottom: 20px; scroll-margin-top: 88px; }
.memos-section h3 { margin: 0 0 8px; font-size: 1rem; color: #1e3a8a; }
.memos-body { font-size: 14px; line-height: 1.55; color: #334155; }
.memos-results { display: grid; gap: 8px; margin-bottom: 12px; }
.memos-results-meta { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.memos-search-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #fefce8);
  font-size: 14px; font-weight: 600; color: #1e3a8a;
  animation: memos-banner-in 0.35s ease;
}
.memos-search-banner[hidden] { display: none !important; }
.memos-search-banner .memos-banner-count {
  background: #1d4ed8; color: #fff; font-size: 12px;
  padding: 3px 10px; border-radius: 999px;
}
.memos-search-banner .memos-banner-hint {
  font-weight: 500; color: #475569; font-size: 13px;
}
.memos-search-input.is-searching {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}
.memos-shell.memos-has-results .memos-sidebar { display: none; }
.memos-shell.memos-has-results .memos-empty { display: none !important; }
.memos-hit-rank {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 6px; margin-right: 6px;
  background: #fef3c7; color: #92400e;
}
.memos-hit-rank.airline { background: #dbeafe; color: #1d4ed8; }
@keyframes memos-banner-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 861px) {
  .memos-shell.memos-has-results .memos-sidebar { display: block; }
  .memos-shell.memos-mode-airlines.memos-has-results .memos-sidebar { display: none !important; }
  .memos-shell.memos-mode-airlines .memos-layout { grid-template-columns: 1fr; }
  .memos-search-banner .memos-banner-hint { display: none; }
}
.memos-hit { cursor: pointer; transition: box-shadow 0.15s; }
.memos-hit:hover { box-shadow: var(--shadow); }
.memos-hit-body { font-size: 13px; line-height: 1.5; color: #475569; }
.memos-hit mark { background: #fef08a; padding: 0 2px; border-radius: 2px; }
.memos-empty .card-body { padding: 28px; text-align: center; }
@media (max-width: 860px) {
  .memos-layout { grid-template-columns: 1fr; }
  .memos-sidebar { position: static; max-height: none; }
}

.ios-pwa-notify-help {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  font-size: 13px;
  line-height: 1.45;
}
.ios-pwa-notify-help strong { display: block; margin-bottom: 8px; color: #92400e; }
.ios-pwa-steps {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
}

.settings-nav {
  position: sticky;
  top: 52px;
  z-index: 15;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-nav-link:hover {
  color: var(--text);
  border-color: #c7d5ea;
}
.settings-nav-link.is-active {
  color: #1e3a8a;
  border-color: #93c5fd;
  background: #eff6ff;
}
.settings-nav-link[hidden] { display: none !important; }

.qr-editor-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.qr-editor-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.qr-editor-summary::-webkit-details-marker { display: none; }
.qr-editor-summary::before {
  content: "▸";
  float: left;
  margin-right: 8px;
  color: var(--muted);
  transition: transform 0.15s;
}
.qr-editor-item[open] > .qr-editor-summary::before { transform: rotate(90deg); }
.qr-editor-summary-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding-left: 18px;
}
.qr-editor-summary-preview {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  padding-left: 18px;
}
.qr-editor-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}
