/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: background var(--t) var(--ease), border-color var(--t), color var(--t), box-shadow var(--t);
  text-decoration: none !important; user-select: none;
}
.btn svg { color: currentColor; opacity: .85; }
.btn:hover { background: var(--surface); }
.btn:active { background: var(--surface-2); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(10,92,255,.25); }
.btn-primary svg { opacity: 1; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-tint); border-color: #F4C7C3; }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #912018; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy svg { opacity: 0; }
.btn.busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--border-strong); border-top-color: var(--ink-2);
  animation: spin .7s linear infinite;
}
.btn-primary.busy::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .7s linear infinite; }

/* ---------- Form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 16px; }
.label { font-size: 13px; font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.label .opt { color: var(--faint); font-weight: 400; }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { font-size: 12.5px; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--bg);
  color: var(--ink); font-size: 14px; outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #B8BFCB; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input.invalid { border-color: var(--danger); }
.input.invalid:focus { box-shadow: 0 0 0 3px rgba(180,35,24,.18); }
.input:disabled, .input[readonly] { background: var(--surface); color: var(--muted); }
.select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%235B6474' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 18px;
}
.select-sm, .input-sm { height: 32px; font-size: 13px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > svg { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.input-group > svg + .input { padding-left: 36px; }
.input-group .input-suffix { position: absolute; right: 6px; }
.input-prefix-wrap { display: flex; }
.input-prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--surface); color: var(--muted); font-size: 14px; }
.input-prefix + .input { border-radius: 0 var(--r) var(--r) 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 .field + .field, .grid-3 .field + .field { margin-top: 0; }
.form-row { margin-top: 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink); }
.check input { appearance: none; margin: 0; width: 16px; height: 16px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; cursor: pointer; transition: background var(--t), border-color var(--t); }
.check input:checked, .check input:indeterminate { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 1.6px 1.6px; transform: translateY(-1px) rotate(-45deg); }
.check input:indeterminate::after { content: ""; width: 8px; height: 1.6px; background: #fff; }
.check input:disabled { opacity: .45; cursor: not-allowed; }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked { background: var(--bg); border: 5px solid var(--accent); }
.check input[type="radio"]:checked::after { display: none; }

.switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input { appearance: none; margin: 0; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background var(--t); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.2); transition: transform 150ms var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }
.switch input:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Segmented + tabs + chips ---------- */
.segmented { display: inline-flex; padding: 2px; background: var(--surface-2); border-radius: var(--r); gap: 2px; }
.segmented button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }
.segmented button:hover { color: var(--ink); }
.segmented button.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px rgba(16,24,40,.04); }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; border: 0; background: none; padding: 10px 0 12px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.tab .count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on svg { color: #fff; }

/* ---------- Badges / tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--neutral-tint); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.success { background: var(--success-tint); color: var(--success); }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.danger { background: var(--danger-tint); color: var(--danger); }
.badge.accent { background: var(--accent-tint); color: var(--accent); }
.badge.neutral { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--bg); white-space: nowrap; }
.tag button { border: 0; background: none; padding: 0; color: var(--faint); display: inline-flex; }
.tag button:hover { color: var(--ink); }
.pill-plan { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11.5px; font-weight: 600; background: var(--accent-tint); color: var(--accent); letter-spacing: .01em; }

/* ---------- Kbd ---------- */
kbd, .kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); background: var(--bg); }

/* ---------- Avatar ---------- */
.avatar { overflow: hidden; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); flex-shrink: 0; letter-spacing: .01em; transition: box-shadow var(--t); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; }

/* ---------- Panels (the only "card") ---------- */
.panel { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { font-size: 14px; font-weight: 600; }
.panel-body { padding: 18px; }
.panel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel + .panel { margin-top: 16px; }
.panel.subtle { background: var(--surface); border-color: transparent; }

.dl { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 10px 16px; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-lg); }
.kpi { padding: 16px 20px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12.5px; margin-top: 2px; font-weight: 500; font-variant-numeric: tabular-nums; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta span { color: var(--faint); font-weight: 400; }
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Meter ---------- */
.meter-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.meter-row .num { color: var(--muted); font-size: 12.5px; }
.meter { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 300ms var(--ease); }
.meter.warn > i { background: #DC6803; }
.meter.full > i { background: var(--danger); }
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 28px; }

/* ---------- Tables ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; background: var(--bg); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted);
  padding: 0 14px; height: 38px; background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.table th:first-child { border-top-left-radius: var(--r-lg); }
.table th:last-child { border-top-right-radius: var(--r-lg); }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--ink); }
.table th .sort { display: inline-flex; vertical-align: -3px; margin-left: 2px; color: var(--faint); }
.table th.sorted { color: var(--ink); }
.table th.sorted .sort { color: var(--accent); }
.table td { padding: 0 14px; height: 52px; border-bottom: 1px solid var(--border); color: var(--ink); vertical-align: middle; white-space: nowrap; }
.table td.wrapok { white-space: normal; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover, .table tbody tr.selected { background: #FAFBFC; }
.table tbody tr.selected { background: var(--accent-tint); }
.table .right, .table th.right { text-align: right; }
.table .num { font-variant-numeric: tabular-nums; }
.table .w-check { width: 44px; padding-right: 0; }
.table .w-act { width: 56px; text-align: right; }
.table.compact td { height: 44px; }
.cell-main { font-weight: 500; color: var(--ink); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0; font-size: 13px; color: var(--muted); }
.table-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.table-toolbar .input-group { width: 320px; max-width: 100%; }
@media (max-width: 767px) { .table-toolbar .input-group { width: 100%; } }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; margin: 16px 0 12px; border-radius: var(--r); background: var(--ink); color: #fff; font-size: 13.5px; }
.bulkbar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.2); box-shadow: none; }
.bulkbar .btn:hover { background: rgba(255,255,255,.08); }

/* ---------- Skeleton ---------- */
.sk { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2) 0%, #F8F9FB 40%, var(--surface-2) 80%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk.circle { border-radius: 50%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; }
.empty-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted); margin-bottom: 16px; background: var(--bg); }
.empty h3 { font-size: 15px; }
.empty p { color: var(--muted); max-width: 400px; margin-top: 6px; font-size: 14px; }
.empty .row { margin-top: 20px; justify-content: center; }
.empty.in-table { border: 1px solid var(--border); border-radius: var(--r-lg); }
.empty.compact { padding: 32px 16px; }

/* ---------- Lock / plan gate ---------- */
.gate { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }
.gate-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--border); color: var(--accent); flex-shrink: 0; }
.gate h4 { font-size: 14px; font-weight: 600; }
.gate p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.gate .btn { margin-top: 12px; }
.lock-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Callout ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); }
.callout svg { margin-top: 1px; color: var(--muted); }
.callout.warn { background: var(--warn-tint); border-color: #FEDF89; }
.callout.warn svg { color: var(--warn); }
.callout.info { background: var(--accent-tint); border-color: var(--accent-tint-2); }
.callout.info svg { color: var(--accent); }
.callout.danger { background: var(--danger-tint); border-color: #FECDCA; }
.callout.danger svg { color: var(--danger); }

/* ---------- Overlays: modal, drawer, menu, palette ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; display: flex; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(11, 18, 32, .36); animation: fade 140ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.99); } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }

.modal { position: relative; margin: auto; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column; background: var(--bg); border-radius: 10px; box-shadow: var(--shadow-pop); animation: rise 160ms var(--ease); }
.modal.sm { width: min(420px, calc(100vw - 32px)); }
.modal.lg { width: min(720px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 17px; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.modal-body { padding: 18px 22px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.modal-foot .left { margin-right: auto; }

.drawer { position: relative; margin-left: auto; height: 100%; width: min(520px, 100vw); background: var(--bg); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: slide 180ms var(--ease); }
.drawer.lg { width: min(640px, 100vw); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 32px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }
.drawer-section + .drawer-section { margin-top: 28px; }
.drawer-section h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }

.menu { position: fixed; z-index: 90; min-width: 220px; max-width: 320px; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); animation: rise 120ms var(--ease); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: none; font-size: 13.5px; text-align: left; color: var(--ink); text-decoration: none !important; }
.menu-item svg { color: var(--muted); }
.menu-item:hover, .menu-item.focus { background: var(--surface); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.menu-item .check-mark { margin-left: auto; color: var(--accent); }
.menu-sep { height: 1px; background: var(--border); margin: 6px -6px; }
.menu-label { font-size: 12px; color: var(--faint); padding: 6px 10px 4px; font-weight: 500; }
.menu-block { padding: 6px 10px 8px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-pop); animation: rise 160ms var(--ease); pointer-events: auto; max-width: calc(100vw - 32px); }
.toast svg { color: #7EA8FF; }
.toast.success svg { color: #6CE9A6; }
.toast.error svg { color: #FDA29B; }
.toast .link-btn { color: #9DBBFF; margin-left: 6px; }
.toast.out { opacity: 0; transform: translateY(4px); transition: all 160ms var(--ease); }

/* ---------- Command palette ---------- */
.palette { position: relative; margin: 12vh auto auto; width: min(640px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; animation: rise 140ms var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--border); }
.palette-input svg { color: var(--faint); }
.palette-input input { flex: 1; height: 56px; border: 0; outline: none; font-size: 16px; background: none; }
.palette-list { overflow-y: auto; padding: 6px 8px 10px; }
.palette-group { font-size: 12px; color: var(--faint); font-weight: 500; padding: 12px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.palette-item svg { color: var(--muted); }
.palette-item .sub { color: var(--muted); font-size: 13px; }
.palette-item .meta { margin-left: auto; font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.palette-item.on { background: var(--accent-tint); }
.palette-item.on svg { color: var(--accent); }
.palette-item mark { background: none; color: var(--accent); font-weight: 600; }
.palette-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface); }
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette-empty { padding: 36px 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; gap: 6px; }

/* ---------- Selectable tiles ---------- */
.tiles { display: grid; gap: 12px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .tiles.two, .tiles.three { grid-template-columns: 1fr; } }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--bg); transition: border-color var(--t), box-shadow var(--t), background var(--t); cursor: pointer; }
.tile:hover { border-color: #AEB6C4; }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #FBFCFF; }
.tile-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--ink-2); margin-bottom: 6px; background: var(--bg); }
.tile.on .tile-icon { color: var(--accent); border-color: var(--accent-tint-2); background: var(--accent-tint); }
.tile-title { font-weight: 600; font-size: 14.5px; }
.tile-sub { font-size: 13px; color: var(--muted); }
.tile-check { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; color: #fff; background: var(--bg); }
.tile.on .tile-check { background: var(--accent); border-color: var(--accent); }

/* ---------- Misc ---------- */
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 20px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.copy-field { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; height: 38px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); }
.copy-field .mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monogram { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg); color: var(--ink); letter-spacing: -0.02em; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-dot.on { background: #12B76A; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: 0; }
.settings-row .t { font-weight: 500; font-size: 14px; }
.settings-row .d { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Person silhouette fills the circle; shoulders run off the bottom edge */
.avatar-person { width: 100%; height: 100%; display: block; opacity: .9; }
