/* ==========================================================================
   PassMan — DataCentral design system
   Tokens mirror the DataCentral DS (colors / typography / spacing / motion).
   ========================================================================== */

:root {
  /* Violet — the single UI accent */
  --violet-50:#f5f3ff; --violet-100:#ede9fe; --violet-200:#ddd6fe; --violet-300:#c4b5fd;
  --violet-400:#a78bfa; --violet-500:#8b5cf6; --violet-600:#7c3aed; --violet-700:#6d28d9;
  --violet-800:#5b21b6; --violet-900:#4c1d95; --violet-950:#2e1065;

  /* Amber — semantic warnings only */
  --amber-100:#fef3c7; --amber-500:#f59e0b; --amber-700:#b45309;

  /* Neutral */
  --neutral-0:#ffffff; --neutral-50:#fafafa; --neutral-100:#f5f5f5; --neutral-200:#e5e5e5;
  --neutral-300:#d4d4d4; --neutral-400:#a3a3a3; --neutral-500:#737373; --neutral-600:#525252;
  --neutral-700:#404040; --neutral-800:#262626; --neutral-900:#171717; --neutral-950:#0a0a0a;

  --emerald-100:#d1fae5; --emerald-500:#10b981; --emerald-700:#047857;
  --red-50:#fef2f2; --red-100:#fee2e2; --red-500:#ef4444; --red-600:#dc2626; --red-700:#b91c1c;

  --brand-stripe:linear-gradient(90deg,#f9c815 0 25%,#f07124 25% 50%,#ed0e78 50% 75%,#6640a2 75% 100%);

  --color-primary:var(--violet-600);
  --color-primary-hover:var(--violet-700);
  --color-primary-active:var(--violet-800);
  --color-link:var(--violet-600);
  --color-link-hover:var(--violet-700);

  --surface-page:var(--neutral-50);
  --surface-card:var(--neutral-0);
  --surface-sunken:var(--neutral-100);
  --surface-primary-subtle:var(--violet-50);
  --surface-hover:var(--neutral-100);
  --surface-selected:var(--violet-50);
  --surface-overlay:rgba(10,10,10,.42);

  --text-body:var(--neutral-900);
  --text-muted:var(--neutral-500);
  --text-subtle:var(--neutral-400);
  --text-on-primary:#ffffff;
  --text-accent:var(--violet-700);

  --border-default:var(--neutral-200);
  --border-strong:var(--neutral-300);
  --border-primary-subtle:var(--violet-200);

  --status-success-bg:var(--emerald-100); --status-success-fg:var(--emerald-700); --status-success-dot:var(--emerald-500);
  --status-warning-bg:var(--amber-100);   --status-warning-fg:var(--amber-700);   --status-warning-dot:var(--amber-500);
  --status-error-bg:var(--red-100);       --status-error-fg:var(--red-600);       --status-error-dot:var(--red-500);
  --status-inactive-bg:var(--neutral-100);--status-inactive-fg:var(--neutral-500);--status-inactive-dot:var(--neutral-400);

  --font-heading:'Space Grotesk',system-ui,sans-serif;
  --font-body:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --text-xs:12px; --text-sm:13px; --text-base:14px; --text-md:16px;
  --text-lg:18px; --text-xl:22px; --text-2xl:28px;

  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;

  --radius-sm:6px; --radius-md:8px; --radius-lg:12px; --radius-full:999px;

  --shadow-sm:0 1px 2px rgba(23,23,23,.06);
  --shadow-md:0 2px 8px rgba(23,23,23,.08);
  --shadow-lg:0 8px 24px rgba(23,23,23,.12);
  --focus-ring:0 0 0 2px var(--surface-card), 0 0 0 4px var(--violet-500);

  --ease-out:cubic-bezier(.16,1,.3,1);
  --dur-fast:120ms; --dur-base:180ms;

  --sidebar-w:224px;
  --topbar-h:56px;
  --detail-w:420px;

  color-scheme:light;
}

[data-theme="dark"] {
  --neutral-0:#171717; --neutral-50:#1f1f1f; --neutral-100:#262626; --neutral-200:#333333;
  --neutral-300:#404040; --neutral-400:#737373; --neutral-500:#a3a3a3; --neutral-600:#d4d4d4;
  --neutral-700:#e5e5e5; --neutral-800:#f5f5f5; --neutral-900:#fafafa; --neutral-950:#ffffff;

  --surface-page:#0a0a0a;
  --surface-card:#171717;
  --surface-sunken:#111111;
  --surface-primary-subtle:#1e0f3d;
  --surface-hover:#222222;
  --surface-selected:#1e0f3d;
  --surface-overlay:rgba(0,0,0,.6);

  --text-body:#fafafa;
  --text-muted:#a3a3a3;
  --text-subtle:#737373;
  --text-accent:var(--violet-300);

  --border-default:#262626;
  --border-strong:#404040;
  --border-primary-subtle:#4c1d95;

  --color-link:var(--violet-400);
  --color-link-hover:var(--violet-300);

  --status-success-bg:#022c22; --status-success-fg:#6ee7b7;
  --status-warning-bg:#451a03; --status-warning-fg:#fcd34d;
  --status-error-bg:#450a0a;   --status-error-fg:#f87171;
  --status-inactive-bg:#262626;--status-inactive-fg:#a3a3a3;

  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 2px 8px rgba(0,0,0,.4);
  --shadow-lg:0 8px 24px rgba(0,0,0,.5);

  color-scheme:dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing:border-box; }
html, body { height:100%; }
body {
  margin:0;
  font-family:var(--font-body);
  font-size:var(--text-base);
  line-height:1.5;
  color:var(--text-body);
  background:var(--surface-page);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4 { font-family:var(--font-heading); font-weight:700; margin:0; letter-spacing:-.01em; line-height:1.2; }
p { margin:0; }
a { color:var(--color-link); text-decoration:none; }
a:hover { color:var(--color-link-hover); text-decoration:underline; }
code, kbd, .mono { font-family:var(--font-mono); }
button { font:inherit; color:inherit; }
input, select, textarea { font:inherit; color:inherit; }
:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.hidden { display:none !important; }
body.is-readonly .requires-write { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.muted { color:var(--text-muted); }

.icon { width:16px; height:16px; flex:none; stroke:currentColor; fill:none; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; display:block; }
.icon-20 { width:20px; height:20px; }
[data-icon] { display:inline-flex; }

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2);
  height:36px; padding:0 var(--space-4);
  font-family:var(--font-heading); font-weight:500; font-size:var(--text-base);
  border-radius:var(--radius-sm); border:1px solid transparent;
  cursor:pointer; white-space:nowrap; user-select:none;
  transition:background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-primary { background:var(--color-primary); color:var(--text-on-primary); }
.btn-primary:hover:not(:disabled) { background:var(--color-primary-hover); }
.btn-primary:active:not(:disabled) { background:var(--color-primary-active); }
.btn-secondary { background:var(--surface-card); border-color:var(--border-default); color:var(--text-body); }
.btn-secondary:hover:not(:disabled) { background:var(--surface-hover); border-color:var(--border-strong); }
.btn-ghost { background:transparent; color:var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background:var(--surface-hover); color:var(--text-body); }
.btn-danger { background:var(--red-600); color:#fff; }
.btn-danger:hover:not(:disabled) { background:var(--red-700); }
.btn-danger-ghost { background:transparent; color:var(--red-600); border-color:var(--border-default); }
.btn-danger-ghost:hover:not(:disabled) { background:var(--status-error-bg); }
.btn-sm { height:30px; padding:0 var(--space-3); font-size:var(--text-sm); }
.btn-block { width:100%; }

.icon-btn {
  display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; flex:none;
  border:0; border-radius:var(--radius-sm); background:transparent;
  color:var(--text-muted); cursor:pointer;
  transition:background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { background:var(--surface-hover); color:var(--text-body); }
.icon-btn.is-on { color:var(--color-primary); }
.icon-btn.is-on .icon { fill:currentColor; }
.icon-btn-sm { width:28px; height:28px; }

.link-btn { background:none; border:0; padding:0; color:var(--color-link); cursor:pointer; font-size:var(--text-sm); }
.link-btn:hover { color:var(--color-link-hover); text-decoration:underline; }

.split { display:inline-flex; }
.split > .btn:first-child { border-top-right-radius:0; border-bottom-right-radius:0; }
.split-caret { border-top-left-radius:0; border-bottom-left-radius:0; padding:0 var(--space-2); border-left:1px solid rgba(255,255,255,.25); }

/* ---------- Forms ---------- */
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:var(--space-4); }
.field > label, .field-label-row label, .field-label {
  font-size:var(--text-sm); font-weight:600; color:var(--text-body);
}
.field-label-row { display:flex; align-items:center; justify-content:space-between; }
.field-hint { font-size:var(--text-xs); color:var(--text-muted); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3); }
.field-row > .field { min-width:0; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="search"], input[type="number"], select, textarea {
  width:100%; height:36px; padding:0 var(--space-3);
  background:var(--surface-card); color:var(--text-body);
  border:1px solid var(--border-default); border-radius:var(--radius-sm);
  font-size:var(--text-base);
  transition:border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
textarea { height:auto; min-height:88px; padding:var(--space-2) var(--space-3); resize:vertical; line-height:1.5; }
select { appearance:none; padding-right:32px; cursor:pointer;
  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='%23737373' 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; }
input:hover, select:hover, textarea:hover { border-color:var(--border-strong); }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--violet-500); box-shadow:0 0 0 3px color-mix(in srgb, var(--violet-500) 22%, transparent); }
input::placeholder, textarea::placeholder { color:var(--text-subtle); }
input.mono, textarea.mono { font-family:var(--font-mono); font-size:var(--text-sm); }

.input-group { position:relative; display:flex; align-items:center; }
.input-group input { padding-right:calc(var(--space-2) + 30px * var(--btns, 1)); }
.input-group .input-actions { position:absolute; right:4px; display:flex; gap:2px; }
.input-icon-btn { position:absolute; right:4px; }
.input-icon-btn, .input-actions button {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border:0; border-radius:var(--radius-sm);
  background:transparent; color:var(--text-muted); cursor:pointer;
}
.input-icon-btn:hover, .input-actions button:hover { background:var(--surface-hover); color:var(--text-body); }

.checkbox { display:inline-flex; align-items:center; gap:var(--space-2); cursor:pointer; font-size:var(--text-sm); }
input[type="checkbox"] { width:16px; height:16px; margin:0; accent-color:var(--color-primary); cursor:pointer; }
input[type="range"] { width:100%; accent-color:var(--color-primary); }

.code-input { font-family:var(--font-mono) !important; font-size:22px !important; letter-spacing:.4em; text-align:center; height:48px !important; }

/* ---------- Pills / badges ---------- */
.pill {
  display:inline-flex; align-items:center; gap:6px;
  height:22px; padding:0 var(--space-2);
  border-radius:var(--radius-full);
  font-size:var(--text-xs); font-weight:500; white-space:nowrap;
  background:var(--status-inactive-bg); color:var(--status-inactive-fg);
}
.pill::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--status-inactive-dot); }
.pill-plain::before { display:none; }
.pill-success { background:var(--status-success-bg); color:var(--status-success-fg); }
.pill-success::before { background:var(--status-success-dot); }
.pill-warning { background:var(--status-warning-bg); color:var(--status-warning-fg); }
.pill-warning::before { background:var(--status-warning-dot); }
.pill-error { background:var(--status-error-bg); color:var(--status-error-fg); }
.pill-error::before { background:var(--status-error-dot); }
.pill-accent { background:var(--surface-primary-subtle); color:var(--text-accent); }
.pill-accent::before { background:var(--violet-500); }

.chip {
  display:inline-flex; align-items:center; gap:6px;
  height:24px; padding:0 10px;
  border:1px solid var(--border-default); border-radius:var(--radius-full);
  background:var(--surface-card); color:var(--text-body);
  font-size:var(--text-xs); font-weight:500; cursor:default;
}
.chip-dot { width:8px; height:8px; border-radius:50%; flex:none; }
button.chip { cursor:pointer; }
button.chip:hover { border-color:var(--border-strong); }
button.chip[aria-pressed="true"] { border-color:var(--violet-500); background:var(--surface-primary-subtle); color:var(--text-accent); }

kbd {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:20px; height:20px; padding:0 5px;
  font-size:11px; color:var(--text-muted);
  background:var(--surface-sunken); border:1px solid var(--border-default); border-radius:4px;
}

/* ---------- Boot ---------- */
.boot { position:fixed; inset:0; display:flex; flex-direction:column; gap:var(--space-5); align-items:center; justify-content:center; background:var(--surface-page); z-index:100; }
.spinner { width:20px; height:20px; border:2px solid var(--border-default); border-top-color:var(--color-primary); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---------- Auth ---------- */
.auth {
  min-height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:var(--space-10) var(--space-4);
  background:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--violet-500) 10%, transparent), transparent 60%),
    var(--surface-page);
}
.auth-panel {
  width:100%; max-width:400px;
  background:var(--surface-card); border:1px solid var(--border-default);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); overflow:hidden;
}
.brand-stripe { height:5px; background:var(--brand-stripe); }
.auth-body { padding:var(--space-8) var(--space-8) var(--space-6); }
.auth-brand { display:flex; align-items:center; gap:var(--space-3); margin-bottom:var(--space-8); }
.auth-brand-name { font-family:var(--font-heading); font-weight:700; font-size:var(--text-lg); line-height:1.1; }
.auth-brand-sub { font-size:var(--text-xs); color:var(--text-muted); }
.auth-title { font-size:var(--text-xl); margin-bottom:var(--space-1); }
.auth-lede { color:var(--text-muted); margin-bottom:var(--space-6); }
.auth-view .btn-block + .btn-block { margin-top:var(--space-2); }
.auth-row { display:flex; justify-content:space-between; margin-top:var(--space-4); }
.auth-foot { margin-top:var(--space-5); font-size:var(--text-xs); color:var(--text-muted); }

.divider { display:flex; align-items:center; gap:var(--space-3); margin:var(--space-6) 0 var(--space-4); color:var(--text-subtle); font-size:var(--text-xs); text-transform:uppercase; letter-spacing:.13em; }
.divider::before, .divider::after { content:""; flex:1; height:1px; background:var(--border-default); }
.sso-buttons { display:flex; flex-direction:column; gap:var(--space-2); }

.alert { padding:var(--space-3) var(--space-4); border-radius:var(--radius-sm); font-size:var(--text-sm); margin-bottom:var(--space-4); }
.alert-error { background:var(--status-error-bg); color:var(--status-error-fg); }
.alert-success { background:var(--status-success-bg); color:var(--status-success-fg); }
.alert-details { margin-top:var(--space-2); }
.alert-details summary { cursor:pointer; font-size:var(--text-xs); opacity:.85; }
.alert-details .mono { margin-top:var(--space-2); font-size:11px; line-height:1.5; white-space:pre-wrap; word-break:break-word; max-height:160px; overflow-y:auto; }

.callout { padding:var(--space-3) var(--space-4); background:var(--surface-primary-subtle); border-left:3px solid var(--color-primary); border-radius:0 var(--radius-sm) var(--radius-sm) 0; font-size:var(--text-sm); }
.callout-warning { background:var(--status-warning-bg); border-left-color:var(--amber-500); color:var(--status-warning-fg); }

.demo { margin-top:var(--space-6); border-top:1px solid var(--border-default); padding-top:var(--space-4); font-size:var(--text-sm); }
.demo summary { cursor:pointer; color:var(--text-muted); }
.demo dl { display:grid; grid-template-columns:auto 1fr; gap:var(--space-1) var(--space-4); margin:var(--space-3) 0 0; }
.demo dt { color:var(--text-muted); }
.demo dd { margin:0; }
.demo code { font-size:var(--text-xs); background:var(--surface-sunken); padding:1px 5px; border-radius:4px; }

/* ---------- App shell ---------- */
.app { display:flex; height:100vh; height:100dvh; overflow:hidden; }

.sidebar {
  width:var(--sidebar-w); flex:none; display:flex; flex-direction:column;
  background:var(--surface-card); border-right:1px solid var(--border-default);
}
.sidebar-brand { height:var(--topbar-h); display:flex; align-items:center; gap:var(--space-2); padding:0 var(--space-4); flex:none; }
.sidebar-brand-name { font-family:var(--font-heading); font-weight:700; font-size:var(--text-md); }
.sidebar-scroll { flex:1; overflow-y:auto; padding:var(--space-2) var(--space-3) var(--space-4); }
.nav-group { margin-bottom:var(--space-5); }
.nav-heading {
  display:flex; align-items:center; justify-content:space-between;
  height:28px; padding:0 var(--space-2);
  font-size:11px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--text-muted);
}
.nav-heading-btn { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border:0; border-radius:4px; background:none; color:var(--text-muted); cursor:pointer; }
.nav-heading-btn:hover { background:var(--surface-hover); color:var(--text-body); }
.nav-heading-btn .icon { width:14px; height:14px; }

.nav-item {
  position:relative; display:flex; align-items:center; gap:10px; width:100%;
  height:32px; padding:0 var(--space-2);
  border:0; border-radius:var(--radius-sm); background:transparent;
  color:var(--text-body); font-size:var(--text-base); text-align:left; cursor:pointer;
  transition:background-color var(--dur-fast) var(--ease-out);
}
.nav-item .icon { color:var(--text-muted); }
.nav-item:hover { background:var(--surface-hover); }
.nav-item.active { background:var(--surface-selected); color:var(--text-accent); font-weight:600; }
.nav-item.active .icon { color:var(--color-primary); }
.nav-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-count { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); }
.nav-empty { padding:var(--space-1) var(--space-2); font-size:var(--text-sm); color:var(--text-subtle); }

.tree-item { display:flex; align-items:center; }
.tree-toggle { width:18px; height:18px; flex:none; display:inline-flex; align-items:center; justify-content:center; border:0; background:none; color:var(--text-muted); cursor:pointer; border-radius:4px; margin-right:-6px; }
.tree-toggle:hover { background:var(--surface-hover); }
.tree-toggle .icon { width:12px; height:12px; transition:transform var(--dur-fast) var(--ease-out); }
.tree-toggle.open .icon { transform:rotate(90deg); }
.tree-spacer { width:18px; flex:none; margin-right:-6px; }

.sidebar-footer { flex:none; padding:var(--space-2) var(--space-3) var(--space-3); border-top:1px solid var(--border-default); }
.user-chip { display:flex; align-items:center; gap:var(--space-2); width:100%; padding:var(--space-2); border:0; border-radius:var(--radius-sm); background:transparent; cursor:pointer; text-align:left; }
.user-chip:hover { background:var(--surface-hover); }
.user-chip .icon { color:var(--text-muted); }
.user-chip-text { flex:1; min-width:0; display:flex; flex-direction:column; }
.user-chip-name { font-weight:600; font-size:var(--text-sm); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-chip-role { font-size:var(--text-xs); color:var(--text-muted); text-transform:capitalize; }

.avatar {
  width:28px; height:28px; flex:none; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--surface-primary-subtle); color:var(--text-accent);
  font-family:var(--font-heading); font-weight:700; font-size:var(--text-xs); text-transform:uppercase;
}

.workspace { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar {
  height:var(--topbar-h); flex:none; display:flex; align-items:center; gap:var(--space-3);
  padding:0 var(--space-6); background:var(--surface-card); border-bottom:1px solid var(--border-default);
}
.search { position:relative; flex:1; max-width:560px; }
.search input { height:36px; padding-left:36px; padding-right:36px; background:var(--surface-sunken); border-color:transparent; }
.search input:hover { border-color:var(--border-default); }
.search input:focus { background:var(--surface-card); }
.search input::-webkit-search-cancel-button { display:none; }
.search-icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); color:var(--text-muted); pointer-events:none; }
.search-kbd { position:absolute; right:9px; top:50%; transform:translateY(-50%); pointer-events:none; }
.search input:focus ~ .search-kbd, .search input:not(:placeholder-shown) ~ .search-kbd { display:none; }
.topbar-actions { margin-left:auto; display:flex; align-items:center; gap:var(--space-2); }
.mobile-only { display:none; }

.main { flex:1; min-height:0; position:relative; }
.view { height:100%; }
.view-vault { display:flex; }

/* ---------- List ---------- */
.list-pane { flex:1; min-width:0; display:flex; flex-direction:column; border-right:1px solid var(--border-default); background:var(--surface-card); }
.list-header { flex:none; padding:var(--space-5) var(--space-6) var(--space-3); border-bottom:1px solid var(--border-default); }
.list-title-row { display:flex; align-items:center; gap:var(--space-3); min-height:32px; }
.list-title { font-size:var(--text-xl); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.list-meta { display:flex; align-items:center; gap:var(--space-3); margin-top:var(--space-2); font-size:var(--text-sm); color:var(--text-muted); flex-wrap:wrap; }
.list-meta select { width:auto; height:28px; font-size:var(--text-sm); padding-left:var(--space-2); }
.crumbs { display:flex; align-items:center; gap:2px; font-size:var(--text-sm); color:var(--text-muted); margin-bottom:var(--space-1); flex-wrap:wrap; }
.crumbs button { border:0; background:none; padding:2px 4px; border-radius:4px; color:var(--text-muted); cursor:pointer; }
.crumbs button:hover { background:var(--surface-hover); color:var(--text-body); }
.crumbs .icon { width:12px; height:12px; }

.bulk-bar { display:flex; align-items:center; gap:var(--space-2); min-height:32px; flex-wrap:wrap; }
.bulk-count { font-family:var(--font-heading); font-weight:500; margin-right:auto; }

.list { flex:1; overflow-y:auto; padding:var(--space-2) var(--space-3) var(--space-6); outline:none; }
.row {
  position:relative; display:flex; align-items:center; gap:var(--space-3);
  min-height:56px; padding:var(--space-2) var(--space-3);
  border-radius:var(--radius-md); cursor:pointer;
  transition:background-color var(--dur-fast) var(--ease-out);
}
.row:hover { background:var(--surface-hover); }
.row.selected { background:var(--surface-selected); }
.row.selected::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:2px; background:var(--color-primary); }
.row-check { width:20px; display:flex; justify-content:center; flex:none; opacity:0; transition:opacity var(--dur-fast); }
.row:hover .row-check, .list.has-checked .row-check, .row-check:focus-within { opacity:1; }
.row-main { flex:1; min-width:0; }
.row-title { display:flex; align-items:center; gap:6px; font-weight:600; overflow:hidden; }
.row-title-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-title .icon { width:13px; height:13px; }
.row-fav { color:var(--color-primary); }
.row-fav .icon { fill:currentColor; }
.row-sub { font-size:var(--text-sm); color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-side { display:flex; align-items:center; gap:var(--space-2); flex:none; }
.row-actions { display:flex; gap:2px; opacity:0; transition:opacity var(--dur-fast); }
.row:hover .row-actions, .row.selected .row-actions, .row:focus-within .row-actions { opacity:1; }
.row-folder .row-sub { font-family:var(--font-mono); font-size:var(--text-xs); }

.tile {
  width:36px; height:36px; flex:none; border-radius:var(--radius-md);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  background:var(--surface-sunken); border:1px solid var(--border-default);
  color:var(--text-muted); font-family:var(--font-heading); font-weight:700; font-size:var(--text-md);
}
.tile img { width:20px; height:20px; }
.tile-lg { width:48px; height:48px; border-radius:var(--radius-lg); font-size:var(--text-lg); }
.tile-lg img { width:28px; height:28px; }
.tile-lg .icon { width:22px; height:22px; }

.empty { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:var(--space-2); padding:var(--space-10) var(--space-6); color:var(--text-muted); height:100%; }
.empty-icon { width:48px; height:48px; border-radius:var(--radius-lg); display:flex; align-items:center; justify-content:center; background:var(--surface-sunken); color:var(--text-muted); margin-bottom:var(--space-2); }
.empty-icon .icon { width:22px; height:22px; }
.empty h3 { font-size:var(--text-md); color:var(--text-body); }
.empty p { max-width:320px; font-size:var(--text-sm); }
.empty .btn { margin-top:var(--space-3); }

.skeleton-row { height:56px; margin:4px 0; border-radius:var(--radius-md); background:linear-gradient(90deg, var(--surface-sunken), var(--surface-hover), var(--surface-sunken)); background-size:200% 100%; animation:shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position:100% 0; } 100% { background-position:-100% 0; } }

/* ---------- Detail ---------- */
.detail-pane { width:var(--detail-w); flex:none; overflow-y:auto; background:var(--surface-page); }
.detail { padding:var(--space-6); }
.detail-top { display:flex; align-items:center; gap:var(--space-2); margin:calc(-1 * var(--space-2)) 0 var(--space-4); }
.detail-back { display:none; }
.detail-toolbar { margin-left:auto; display:flex; gap:2px; }
.detail-head { display:flex; align-items:center; gap:var(--space-4); margin-bottom:var(--space-6); }
.detail-head h2 { font-size:var(--text-xl); word-break:break-word; }
.detail-head .detail-kind { font-size:var(--text-sm); color:var(--text-muted); margin-top:2px; }

.card { background:var(--surface-card); border:1px solid var(--border-default); border-radius:var(--radius-md); }
.fields { overflow:hidden; }
.fieldrow { display:flex; align-items:center; gap:var(--space-2); padding:var(--space-3) var(--space-4); min-height:60px; }
.fieldrow + .fieldrow { border-top:1px solid var(--border-default); }
.fieldrow-main { flex:1; min-width:0; }
.fieldrow-label { font-size:var(--text-xs); color:var(--text-muted); margin-bottom:2px; }
.fieldrow-value { word-break:break-all; }
.fieldrow-value.secret { font-family:var(--font-mono); font-size:var(--text-sm); letter-spacing:.02em; }
.fieldrow-value.pre { white-space:pre-wrap; word-break:break-word; }
.fieldrow-actions { display:flex; gap:2px; flex:none; }
.fieldrow-meta { display:flex; align-items:center; gap:var(--space-2); margin-top:6px; flex-wrap:wrap; }

.section-title { font-size:11px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--text-muted); margin:var(--space-6) 0 var(--space-2); display:flex; align-items:center; justify-content:space-between; }
.meta-grid { display:grid; grid-template-columns:auto 1fr; gap:var(--space-2) var(--space-4); font-size:var(--text-sm); padding:var(--space-4); }
.meta-grid dt { color:var(--text-muted); }
.meta-grid dd { margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }

.history-item { display:flex; align-items:center; gap:var(--space-2); padding:var(--space-2) var(--space-4); }
.history-item + .history-item { border-top:1px solid var(--border-default); }
.history-item .mono { font-size:var(--text-sm); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.history-date { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); white-space:nowrap; }

.strength { display:flex; align-items:center; gap:var(--space-2); margin-top:6px; }
.strength-track { flex:1; display:grid; grid-template-columns:repeat(4,1fr); gap:3px; }
.strength-track span { height:4px; border-radius:2px; background:var(--border-default); transition:background-color var(--dur-base) var(--ease-out); }
.strength[data-level="1"] .strength-track span:nth-child(-n+1) { background:var(--red-500); }
.strength[data-level="2"] .strength-track span:nth-child(-n+2) { background:var(--amber-500); }
.strength[data-level="3"] .strength-track span:nth-child(-n+3) { background:var(--violet-500); }
.strength[data-level="4"] .strength-track span { background:var(--emerald-500); }
.strength-label { font-size:var(--text-xs); color:var(--text-muted); min-width:92px; text-align:right; }

.generator { margin-top:var(--space-2); padding:var(--space-3) var(--space-4); background:var(--surface-sunken); border-radius:var(--radius-sm); display:grid; gap:var(--space-3); }
.generator-row { display:flex; align-items:center; gap:var(--space-3); }
.generator-row label:first-child { font-size:var(--text-sm); min-width:64px; }
.generator-len { font-family:var(--font-mono); font-size:var(--text-sm); width:28px; text-align:right; }
.generator-opts { display:flex; flex-wrap:wrap; gap:var(--space-2) var(--space-4); }

/* ---------- Pages (users / activity) ---------- */
.page { overflow-y:auto; }
.page-inner { max-width:1080px; padding:var(--space-8) var(--space-6); margin:0 auto; }
.page-head { display:flex; align-items:flex-end; gap:var(--space-4); margin-bottom:var(--space-6); }
.page-head h1 { font-size:var(--text-2xl); }
.page-head p { color:var(--text-muted); margin-top:var(--space-1); }
.page-head .btn { margin-left:auto; }
.eyebrow { font-size:12px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--color-primary); margin-bottom:var(--space-2); }

.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:var(--space-3); margin-bottom:var(--space-6); }
.stat { padding:var(--space-4) var(--space-5); }
.stat-value { font-family:var(--font-heading); font-weight:700; font-size:var(--text-2xl); letter-spacing:-.01em; line-height:1.1; }
.stat-label { font-size:var(--text-sm); color:var(--text-muted); margin-top:var(--space-1); }

.table-wrap { overflow-x:auto; }
.table { width:100%; border-collapse:collapse; font-size:var(--text-sm); }
.table th { text-align:left; font-weight:600; font-size:var(--text-xs); color:var(--text-muted); padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--border-default); white-space:nowrap; }
.table td { padding:var(--space-3) var(--space-4); border-bottom:1px solid var(--border-default); vertical-align:middle; }
.table tr:last-child td { border-bottom:0; }
.table tbody tr:hover { background:var(--surface-hover); }
.table .cell-user { display:flex; align-items:center; gap:var(--space-3); }
.table .cell-strong { font-weight:600; }
.table .cell-actions { text-align:right; width:1%; white-space:nowrap; }
.table .mono { font-size:var(--text-xs); color:var(--text-muted); white-space:nowrap; }
.table tr.is-inactive td:not(.cell-actions) { opacity:.6; }

/* ---------- Menus ---------- */
.menu {
  position:fixed; z-index:60; min-width:200px; padding:var(--space-1);
  background:var(--surface-card); border:1px solid var(--border-default);
  border-radius:var(--radius-md); box-shadow:var(--shadow-lg);
  animation:fade-in var(--dur-fast) var(--ease-out);
}
.menu-item {
  display:flex; align-items:center; gap:10px; width:100%;
  height:32px; padding:0 var(--space-3);
  border:0; border-radius:4px; background:none; cursor:pointer; text-align:left; font-size:var(--text-base);
}
.menu-item .icon { color:var(--text-muted); }
.menu-item:hover, .menu-item:focus-visible { background:var(--surface-hover); box-shadow:none; }
.menu-item.danger { color:var(--red-600); }
.menu-item.danger .icon { color:currentColor; }
.menu-item kbd { margin-left:auto; }
.menu-sep { height:1px; background:var(--border-default); margin:var(--space-1) 0; }
.menu-label { padding:var(--space-2) var(--space-3) var(--space-1); font-size:var(--text-xs); color:var(--text-muted); }

/* ---------- Modal ---------- */
.modal { position:fixed; inset:0; z-index:50; display:flex; align-items:flex-start; justify-content:center; padding:min(10vh, 80px) var(--space-4) var(--space-4); }
.modal-scrim { position:fixed; inset:0; background:var(--surface-overlay); animation:fade-in var(--dur-base) var(--ease-out); }
.modal-panel {
  position:relative; width:100%; max-width:480px;
  display:flex; flex-direction:column;
  max-height:calc(100dvh - min(10vh, 80px) - var(--space-4));
  background:var(--surface-card); border:1px solid var(--border-default);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
  animation:rise var(--dur-base) var(--ease-out);
}
.modal-panel.wide { max-width:600px; }
.modal-head { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-5) var(--space-6) 0; }
.modal-head h2 { font-size:var(--text-lg); flex:1; }
.modal-sub { padding:var(--space-1) var(--space-6) 0; color:var(--text-muted); font-size:var(--text-sm); }
.modal-body { padding:var(--space-5) var(--space-6); overflow-y:auto; min-height:0; }
.modal-head, .modal-sub, .modal-foot { flex:none; }
.modal-foot { display:flex; justify-content:flex-end; gap:var(--space-2); padding:var(--space-4) var(--space-6); border-top:1px solid var(--border-default); background:var(--surface-page); border-radius:0 0 var(--radius-lg) var(--radius-lg); }
.modal-foot .spacer { margin-right:auto; }
@keyframes fade-in { from { opacity:0; } }
@keyframes rise { from { opacity:0; transform:translateY(8px); } }

.type-switch { display:inline-flex; padding:3px; gap:2px; background:var(--surface-sunken); border-radius:var(--radius-sm); margin-bottom:var(--space-5); }
.type-switch button { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 var(--space-3); border:0; border-radius:4px; background:none; color:var(--text-muted); font-size:var(--text-sm); font-weight:500; cursor:pointer; }
.type-switch button[aria-pressed="true"] { background:var(--surface-card); color:var(--text-body); box-shadow:var(--shadow-sm); }

.form-section { font-size:11px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--text-muted); margin:var(--space-6) 0 var(--space-3); padding-top:var(--space-4); border-top:1px solid var(--border-default); }

.settings-section { padding:var(--space-5) 0; }
.settings-section + .settings-section { border-top:1px solid var(--border-default); }
.settings-section h3 { font-size:var(--text-md); margin-bottom:var(--space-1); }
.settings-section > p { color:var(--text-muted); font-size:var(--text-sm); margin-bottom:var(--space-4); }
.settings-grid { display:grid; grid-template-columns:auto 1fr; gap:var(--space-2) var(--space-6); font-size:var(--text-sm); }
.settings-grid dt { color:var(--text-muted); }
.settings-grid dd { margin:0; }
.inline-actions { display:flex; gap:var(--space-2); flex-wrap:wrap; }

.dropzone { display:flex; flex-direction:column; align-items:center; gap:var(--space-1); padding:var(--space-6); border:1px dashed var(--border-strong); border-radius:var(--radius-md); color:var(--text-muted); font-size:var(--text-sm); text-align:center; cursor:pointer; transition:border-color var(--dur-fast), background-color var(--dur-fast); }
.dropzone:hover, .dropzone.over { border-color:var(--violet-500); background:var(--surface-primary-subtle); }
.dropzone strong { color:var(--color-link); font-weight:600; }
.list-box { border:1px solid var(--border-default); border-radius:var(--radius-sm); max-height:200px; overflow-y:auto; font-size:var(--text-sm); }
.list-box > div { padding:var(--space-2) var(--space-3); display:flex; align-items:center; gap:var(--space-3); }
.list-box > div + div { border-top:1px solid var(--border-default); }

.share-row { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) 0; }
.share-row + .share-row { border-top:1px solid var(--border-default); }
.share-row-main { flex:1; min-width:0; }
.share-row-title { font-weight:600; font-size:var(--text-sm); display:flex; align-items:center; gap:var(--space-2); }
.share-row-sub { font-size:var(--text-xs); color:var(--text-muted); }
.suggest { position:absolute; left:0; right:0; top:100%; margin-top:4px; z-index:5; background:var(--surface-card); border:1px solid var(--border-default); border-radius:var(--radius-sm); box-shadow:var(--shadow-md); overflow:hidden; }
.suggest button { display:flex; flex-direction:column; width:100%; padding:var(--space-2) var(--space-3); border:0; background:none; text-align:left; cursor:pointer; }
.suggest button:hover { background:var(--surface-hover); }
.suggest small { color:var(--text-muted); }
.copy-box { display:flex; gap:var(--space-2); }
.copy-box input { font-family:var(--font-mono); font-size:var(--text-xs); }

.shortcut-list { display:grid; grid-template-columns:1fr auto; gap:var(--space-3) var(--space-4); align-items:center; font-size:var(--text-sm); }
.shortcut-list span:nth-child(even) { display:flex; gap:4px; justify-content:flex-end; }

.label-edit { display:flex; align-items:center; gap:var(--space-2); padding:var(--space-2) 0; }
.label-edit + .label-edit { border-top:1px solid var(--border-default); }
.label-edit .grow { flex:1; min-width:0; }
.swatches { display:flex; gap:6px; }
.swatch { width:22px; height:22px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0; }
.swatch[aria-pressed="true"] { border-color:var(--surface-card); box-shadow:0 0 0 2px var(--text-body); }

/* ---------- Toasts ---------- */
.toast-root { position:fixed; left:50%; bottom:var(--space-6); transform:translateX(-50%); z-index:80; display:flex; flex-direction:column; gap:var(--space-2); align-items:center; pointer-events:none; }
.toast {
  display:flex; align-items:center; gap:var(--space-3);
  padding:10px var(--space-4); max-width:min(480px, calc(100vw - 32px));
  background:var(--neutral-900); color:var(--neutral-0);
  border-radius:var(--radius-md); box-shadow:var(--shadow-lg);
  font-size:var(--text-sm); pointer-events:auto;
  animation:rise var(--dur-base) var(--ease-out);
}
.toast-dot { width:8px; height:8px; border-radius:50%; background:var(--neutral-400); flex:none; }
.toast.success .toast-dot { background:var(--emerald-500); }
.toast.error .toast-dot { background:var(--red-500); }
.toast.warning .toast-dot { background:var(--amber-500); }
.toast.leaving { opacity:0; transition:opacity var(--dur-base) var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  :root { --detail-w:360px; }
}

@media (max-width: 960px) {
  .mobile-only { display:inline-flex; }
  .sidebar {
    position:fixed; inset:0 auto 0 0; z-index:40; width:272px;
    transform:translateX(-100%); transition:transform var(--dur-base) var(--ease-out);
    box-shadow:var(--shadow-lg);
  }
  .app.sidebar-open .sidebar { transform:none; }
  .sidebar-scrim { position:fixed; inset:0; z-index:39; background:var(--surface-overlay); opacity:0; pointer-events:none; transition:opacity var(--dur-base) var(--ease-out); }
  .app.sidebar-open .sidebar-scrim { opacity:1; pointer-events:auto; }
  .topbar { padding:0 var(--space-3); }

  .detail-pane {
    position:absolute; inset:0; z-index:20; width:auto;
    transform:translateX(100%); transition:transform var(--dur-base) var(--ease-out);
  }
  .view-vault.show-detail .detail-pane { transform:none; }
  .detail-back { display:inline-flex; }
  .list-pane { border-right:0; }
  .row-actions { opacity:1; }
  .row-check { display:none; }
}

@media (max-width: 600px) {
  .hide-sm { display:none; }
  .split > .btn:first-child { padding:0 var(--space-3); }
  .list-header { padding:var(--space-4) var(--space-4) var(--space-3); }
  .list { padding:var(--space-1) var(--space-2) var(--space-6); }
  .row-actions .opt { display:none; }
  .row-side .pill:not(.pill-plain) { font-size:0; gap:0; width:18px; padding:0; justify-content:center; }
  .row-side .pill-plain { display:none; }
  .detail { padding:var(--space-4); }
  .auth-body { padding:var(--space-6) var(--space-5) var(--space-5); }
  .modal { padding:var(--space-4) var(--space-2); }
  .modal-head, .modal-body { padding-left:var(--space-4); padding-right:var(--space-4); }
  .modal-foot { padding:var(--space-3) var(--space-4); }
  .field-row { grid-template-columns:1fr; gap:0; }
  .page-inner { padding:var(--space-6) var(--space-4); }
  .page-head { flex-wrap:wrap; }
  .search-kbd { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:0s !important; transition-duration:0s !important; }
}

/* ---------- Companion apps / device approval ---------- */
.app-card { display:flex; gap:var(--space-4); padding:var(--space-4); border:1px solid var(--border-default); border-radius:var(--radius-md); margin-bottom:var(--space-3); background:var(--surface-card); }
.app-card-icon, .device-badge { flex:none; width:40px; height:40px; border-radius:var(--radius-md); display:grid; place-items:center; background:var(--surface-primary-subtle); color:var(--text-accent); }
.app-card-body { min-width:0; flex:1; }
.app-card-body h3 { font-size:var(--text-md); margin:0 0 var(--space-1); }
.app-card-body p { margin:0 0 var(--space-3); color:var(--text-muted); font-size:var(--text-sm); }
.app-size { font-size:var(--text-xs); }
.app-help { margin-top:var(--space-3); font-size:var(--text-sm); }
.app-help summary { cursor:pointer; color:var(--text-accent); }
.app-help ol { margin:var(--space-2) 0 0; padding-left:20px; color:var(--text-muted); line-height:1.6; }
.app-help code, .app-card-body code { font-family:var(--font-mono); font-size:12px; background:var(--surface-sunken); padding:1px 5px; border-radius:4px; }
.app-card kbd { font-family:var(--font-mono); font-size:11px; border:1px solid var(--border-strong); border-bottom-width:2px; border-radius:4px; padding:0 5px; }
.device-list { list-style:none; margin:0; padding:0; }
.device-list li { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-3) 0; border-top:1px solid var(--border-default); }
.device-list li:first-child { border-top:0; }
.device-meta { flex:1; min-width:0; display:flex; flex-direction:column; font-size:var(--text-sm); }
.device-meta .muted { font-size:var(--text-xs); }
.device-head { display:flex; align-items:center; gap:var(--space-3); margin-bottom:var(--space-4); }
.device-code { font-family:var(--font-mono); font-size:30px; font-weight:500; letter-spacing:.14em; text-align:center; padding:var(--space-4); border-radius:var(--radius-md); background:var(--surface-sunken); border:1px dashed var(--border-strong); margin-bottom:var(--space-4); }
.device-note { font-size:var(--text-sm); }
.device-done { text-align:center; padding:var(--space-4) 0; }
.device-done h3 { margin:var(--space-3) 0 var(--space-1); }
.device-check { display:inline-grid; place-items:center; width:44px; height:44px; border-radius:50%; background:var(--status-success-bg); color:var(--status-success-fg); }
.modal-actions { display:flex; justify-content:flex-end; gap:var(--space-2); margin-top:var(--space-5); }

/* ---------- Auth: hidden password, invites ---------- */
.no-password #login-form .field, .no-password #login-form button[type="submit"], .no-password #sso .divider { display:none; }
.no-password #login-form .auth-lede { margin-bottom:var(--space-4); }
.auth-invite { display:flex; flex-direction:column; align-items:center; gap:var(--space-2); margin-top:var(--space-4); }
.invite-banner { width:100%; text-align:center; padding:var(--space-2) var(--space-3); border-radius:var(--radius-sm); background:var(--surface-primary-subtle); color:var(--text-accent); font-size:var(--text-sm); font-weight:600; }
.invite-input { text-transform:uppercase; letter-spacing:.18em !important; font-size:18px !important; }

/* ---------- Admin: access settings ---------- */
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); padding:var(--space-3) 0; border-top:1px solid var(--border-default); cursor:pointer; }
.switch-row:first-of-type { border-top:0; }
.switch-row.is-off { opacity:.55; cursor:not-allowed; }
.switch-text { display:flex; flex-direction:column; font-size:var(--text-sm); }
input.switch { appearance:none; -webkit-appearance:none; width:40px; height:24px; flex:none; border-radius:999px; background:var(--border-strong); position:relative; cursor:pointer; transition:background-color .2s var(--ease-out); margin:0; }
input.switch::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:var(--shadow-sm); transition:transform .25s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)); }
input.switch:checked { background:var(--color-primary); }
input.switch:checked::after { transform:translateX(16px); }
input.switch:disabled { cursor:not-allowed; }
.check-grid { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2) var(--space-4); }
.inv-form { display:grid; grid-template-columns:2fr 1fr 1fr 1fr auto; gap:var(--space-3); align-items:end; margin-bottom:var(--space-4); }
.inv-form .field { margin-bottom:0; }
@media (max-width:600px) { .inv-form { grid-template-columns:1fr 1fr; } .check-grid { grid-template-columns:1fr; } }

/* ---------- Import preview ---------- */
.imp-bar { display:flex; gap:var(--space-3); align-items:center; flex-wrap:wrap; margin-bottom:var(--space-3); }
.imp-search { flex:1; min-width:200px; max-width:none; }
.imp-chips { display:flex; gap:var(--space-2); flex-wrap:wrap; }
.imp-tools { display:flex; align-items:center; gap:var(--space-2); font-size:var(--text-sm); margin-bottom:var(--space-2); }
.imp-count { margin-left:auto; }
.imp-list { border:1px solid var(--border-default); border-radius:var(--radius-md); max-height:min(46vh, 420px); overflow-y:auto; background:var(--surface-card); }
.imp-row { display:flex; align-items:center; gap:var(--space-3); padding:var(--space-2) var(--space-3); cursor:pointer; min-height:52px; }
.imp-row + .imp-row { border-top:1px solid var(--border-default); }
.imp-row:hover { background:var(--surface-hover); }
.imp-row input { flex:none; }
.imp-row .tile { width:32px; height:32px; }
.imp-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.imp-title { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.imp-sub { font-size:var(--text-xs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.imp-meta { display:flex; gap:var(--space-1); flex:none; }
@media (max-width:600px) { .imp-meta .pill:not(.pill-accent):not(.pill-warning) { display:none; } }
