:root { --black:#000; --sidebar:#202020; --panel:#171717; --panel-2:#1c1c1c; --raised:#242424; --line:#303030; --line-2:#414141; --ink:#f2f2f2; --muted:#a0a0a0; --quiet:#6f6f6f; --blue:#2877bd; --blue-hover:#338bd4; --success:#8aa596; --danger:#d88888; font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; color-scheme:dark; }
* { box-sizing:border-box; }
html,body { height:100%; }
body { margin:0; overflow:hidden; color:var(--ink); background:var(--black); font-size:13px; }
[hidden] { display:none!important; }
button,input,select { font:inherit; }
button { color:inherit; }
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible { outline:2px solid #8ab8df; outline-offset:2px; }
.primary,.secondary,.icon-button,.nav-item,.text-button { cursor:pointer; }
.primary,.secondary { min-height:34px; padding:8px 13px; border-radius:3px; font-weight:650; }
.primary { border:1px solid #3d8fd4; background:var(--blue); color:#fff; }
.primary:hover { background:var(--blue-hover); }
.secondary { border:1px solid var(--line-2); background:#252525; color:#ddd; }
.secondary:hover { background:#303030; }
.primary:disabled,.secondary:disabled { cursor:not-allowed; opacity:.4; }
.icon-button { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:3px; background:transparent; color:#aaa; font-size:18px; }
.icon-button:hover { background:#303030; color:#fff; }
.eyebrow { margin:0 0 6px; color:#7f7f7f; font:700 9px/1.4 ui-monospace,monospace; letter-spacing:.16em; }
.brand { display:flex; align-items:center; gap:9px; color:#fff; text-decoration:none; letter-spacing:.07em; }
.brand-mark { display:grid; place-items:center; width:32px; height:32px; border:1px solid #555; border-radius:3px; background:#111; color:#eee; font-size:10px; font-weight:850; }
.brand b,.brand small { display:block; }
.brand b { font-size:12px; }
.brand small { color:#777; font-size:8px; }

/* Sign in */
.auth-screen { display:grid; place-items:center; min-height:100%; padding:24px; background:#090909; }
.login-card { width:min(390px,100%); padding:30px; border:1px solid #383838; border-radius:5px; background:#151515; box-shadow:0 30px 100px #000; }
.login-brand { margin-bottom:34px; }
.auth-heading h1 { margin:0; font-size:28px; font-weight:620; }
.auth-tabs { display:flex; margin:24px 0 18px; padding:2px; border:1px solid var(--line); background:#0b0b0b; }
.auth-tabs button { flex:1; padding:8px; border:0; background:transparent; color:#888; cursor:pointer; }
.auth-tabs button[aria-selected="true"] { background:#2b2b2b; color:#fff; }
.auth-form { display:grid; gap:13px; }
.auth-form label,.form-grid label { color:#b5b5b5; font-size:11px; font-weight:620; }
.auth-form input,.form-grid input,.form-grid select { display:block; width:100%; margin-top:6px; padding:10px 11px; border:1px solid #454545; border-radius:3px; outline:none; background:#090909; color:#eee; }
.auth-form input:focus,.form-grid input:focus,.form-grid select:focus { border-color:#7f7f7f; box-shadow:0 0 0 2px rgba(255,255,255,.06); }
.auth-message { min-height:16px; margin:11px 0 0; color:var(--success); font-size:10px; }
.auth-message.error { color:var(--danger); }
.connection-label { color:#686868; font:9px ui-monospace,monospace; }
.connection-label i { display:inline-block; width:5px; height:5px; margin-right:6px; border-radius:50%; background:var(--success); }

/* Application shell */
.vault-shell { display:grid; grid-template-columns:232px minmax(0,1fr); width:100%; height:100%; background:#111; }
.sidebar { display:flex; flex-direction:column; min-width:0; padding:18px 12px 12px; border-right:1px solid #2a2a2a; background:var(--sidebar); }
.sidebar>.brand { margin:0 8px 22px; }
.new-resource-wrap { position:relative; margin:0 0 12px; }
.new-resource { display:flex; justify-content:center; align-items:center; gap:7px; width:108px; margin:0; }
.new-resource span { font-size:16px; font-weight:400; }
.new-resource i { margin-left:auto; color:#d8e9f7; font-style:normal; }
.new-resource-menu { position:absolute; z-index:20; top:40px; left:0; width:258px; padding:7px; border:1px solid #4a4a4a; border-radius:4px; background:#191919; box-shadow:0 18px 55px rgba(0,0,0,.72); }
.new-resource-menu>p { margin:5px 8px 7px; color:#777; font:700 8px ui-monospace,monospace; letter-spacing:.13em; }
.new-resource-menu>button { display:grid; grid-template-columns:30px 1fr; grid-template-rows:auto auto; column-gap:9px; width:100%; padding:8px; border:0; border-radius:3px; background:transparent; color:#eee; text-align:left; cursor:pointer; }
.new-resource-menu>button:hover,.new-resource-menu>button:focus-visible { background:#292929; }
.new-resource-menu>button span { grid-row:1/3; display:grid; place-items:center; width:30px; height:30px; border:1px solid #484848; border-radius:4px; background:#222; color:#bbb; font:10px ui-monospace,monospace; }
.new-resource-menu>button b { align-self:end; font-size:11px; }
.new-resource-menu>button small { color:#777; font-size:8px; }
.new-resource-menu hr { margin:6px 4px; border:0; border-top:1px solid #353535; }
.vault-nav,.sidebar-section { display:grid; gap:2px; }
.nav-item { display:flex; align-items:center; gap:10px; width:100%; height:34px; padding:0 10px; border:0; border-radius:2px; background:transparent; color:#d0d0d0; text-align:left; font-size:12px; }
.nav-item span { display:inline-grid; place-items:center; width:16px; color:#aaa; font-family:ui-monospace,monospace; }
.nav-item:hover { background:#292929; }
.nav-item.active { background:#164e7d; color:#fff; }
.nav-item.active span { color:#fff; }
.sidebar-section { margin-top:24px; padding-top:17px; border-top:1px solid #303030; }
.folder-section { margin-top:14px; }
.folder-nav { display:grid; gap:2px; }
.folder-nav button { display:flex; align-items:center; gap:8px; width:100%; height:30px; padding:0 10px; overflow:hidden; border:0; border-radius:2px; background:transparent; color:#bbb; text-align:left; cursor:pointer; font-size:10px; }
.folder-nav button:hover,.folder-nav button.active { background:#292929; color:#fff; }
.folder-nav button span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-label { margin:0 10px 8px; color:#646464; font:700 8px ui-monospace,monospace; letter-spacing:.13em; }
.sidebar-account { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:8px; align-items:center; margin-top:auto; padding:10px 5px 0; border-top:1px solid #303030; }
.sidebar-account b,.sidebar-account small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-account b { font-size:10px; }
.sidebar-account small { margin-top:2px; color:#757575; font-size:8px; }
.avatar { display:grid; place-items:center; width:30px; height:30px; border:1px solid #555; border-radius:50%; background:#3a3a3a; color:#fff; font-size:9px; font-weight:800; }
button.avatar { cursor:pointer; }
.vault-stage { display:grid; grid-template-rows:58px minmax(0,1fr); min-width:0; min-height:0; }
.vault-topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 18px; border-bottom:1px solid #292929; background:#1e1e1e; }
.search-box { display:flex; align-items:center; flex:1; max-width:860px; height:34px; border:1px solid #343434; border-radius:2px; background:#090909; color:#777; }
.search-box span { padding:0 10px; font-size:18px; }
.search-box input { flex:1; height:100%; padding:0 10px 0 0; border:0; outline:0; background:transparent; color:#eee; font-size:11px; }
.search-box input:disabled { opacity:.45; }
.top-actions { display:flex; align-items:center; gap:5px; }
.vault-state { margin-right:6px; color:#888; font:8px ui-monospace,monospace; letter-spacing:.06em; text-transform:uppercase; }
.top-avatar { border:0; }
.workspace-grid { display:grid; grid-template-columns:minmax(550px,1fr) 330px; gap:12px; min-height:0; padding:12px; background:#111; }
.workspace-grid.details-hidden { grid-template-columns:minmax(0,1fr); }
.workspace-grid.details-hidden .detail-pane { display:none; }
.resource-pane,.detail-pane { min-width:0; min-height:0; border:1px solid #292929; border-radius:3px; background:var(--panel); }
.resource-pane { display:flex; flex-direction:column; overflow:hidden; }
.resource-toolbar { display:flex; align-items:center; justify-content:space-between; min-height:66px; padding:14px 15px; border-bottom:1px solid #2a2a2a; }
.resource-toolbar>div { display:flex; align-items:baseline; gap:10px; }
.resource-toolbar h2 { margin:0; font-size:15px; font-weight:650; }
.resource-toolbar span { color:#8c8c8c; font-size:9px; }
.compact-button { min-height:30px; padding:6px 10px; font-size:10px; }

/* Unlock gate */
.vault-gate { display:grid; flex:1; place-items:center; min-height:0; padding:24px; }
.gate-card { width:min(360px,100%); padding:24px; border:1px solid #383838; border-radius:4px; background:#1b1b1b; text-align:center; }
.gate-icon { display:grid; place-items:center; width:42px; height:42px; margin:0 auto 13px; border:1px solid #4d4d4d; border-radius:50%; color:#aaa; font-size:20px; }
.gate-card h2 { margin:0 0 18px; font-size:17px; font-weight:620; }
.gate-card h2 span { color:#888; font-weight:450; }
.gate-card .auth-form { text-align:left; }
.gate-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:center; }
.recovery-panel { text-align:left; }
.recovery-panel output { display:block; margin:10px 0; padding:10px; overflow-wrap:anywhere; border:1px solid #414141; background:#080808; color:#d0c3a4; font:10px/1.5 ui-monospace,monospace; user-select:all; }

/* Resource table */
.resource-table { flex:1; min-height:0; overflow:auto; }
.table-head,.resource-row { display:grid; grid-template-columns:34px minmax(150px,1.25fr) minmax(120px,1fr) 105px 90px minmax(120px,1.1fr) 92px; align-items:center; }
.table-head { position:sticky; z-index:2; top:0; min-width:880px; height:34px; border-bottom:1px solid #303030; background:#191919; color:#bdbdbd; font-size:9px; font-weight:680; }
.table-head span,.resource-row>span,.resource-row>button { min-width:0; padding:0 8px; border-right:1px solid #292929; }
.table-head span:last-child,.resource-row>span:last-child { border-right:0; }
.table-body { min-width:880px; }
.resource-row { width:100%; min-width:880px; height:38px; padding:0; border:0; border-bottom:1px solid #282828; background:#171717; color:#eee; text-align:left; cursor:pointer; font-size:10px; }
.resource-row:hover,.resource-row.selected { background:#232323; }
.resource-row.selected { box-shadow:inset 2px 0 var(--blue); }
.resource-row .row-check { color:#6e6e6e; text-align:center; }
.resource-row .row-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:650; }
.resource-row .row-name i { display:inline-grid; place-items:center; width:20px; height:20px; margin-right:7px; border-radius:50%; background:#666; color:#ddd; font-style:normal; font-size:8px; }
.resource-row .cell { overflow:hidden; color:#d2d2d2; text-overflow:ellipsis; white-space:nowrap; }
.resource-row .masked { letter-spacing:.08em; }
.resource-row .totp-cell { color:#d6d6d6; font-family:ui-monospace,monospace; letter-spacing:.08em; }
.empty-row { display:grid; place-items:center; min-height:240px; color:#777; font-size:11px; }

/* Details */
.detail-pane { overflow:auto; }
.detail-empty { display:grid; place-items:center; align-content:center; height:100%; min-height:260px; color:#8b8b8b; }
.detail-empty span { font-size:48px; font-weight:200; }
.detail-empty p { margin:10px 0; font-size:11px; }
#detail-content { padding:20px; }
.detail-title { display:flex; gap:12px; align-items:center; padding-bottom:18px; border-bottom:1px solid #303030; }
.detail-title h2 { max-width:215px; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:17px; }
.detail-title small { display:block; margin-top:3px; color:#777; font-size:9px; }
.resource-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#666; color:#fff; }
.secret-details { margin:6px 0 0; }
.secret-details>div { padding:14px 0; border-bottom:1px solid #2c2c2c; }
.secret-details dt { margin-bottom:7px; color:#777; font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
.secret-details dd { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; overflow-wrap:anywhere; color:#e5e5e5; font-size:11px; }
.secret-details button { padding:3px 5px; border:0; background:transparent; color:#8ab8df; cursor:pointer; font-size:8px; }
.secret-details a { color:#a9c8e2; text-decoration:none; }
.secret-details strong { font:650 18px ui-monospace,monospace; letter-spacing:.14em; }

/* Dialogs */
dialog { width:min(720px,calc(100% - 28px)); max-height:calc(100vh - 40px); padding:0; overflow:auto; border:1px solid #515151; border-radius:4px; background:#191919; color:#eee; box-shadow:0 30px 100px #000; }
dialog::backdrop { background:rgba(0,0,0,.82); backdrop-filter:blur(3px); }
dialog form { padding:22px; }
.dialog-head { display:flex; align-items:start; justify-content:space-between; margin-bottom:20px; }
.dialog-head h2 { margin:0; font-size:20px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.wide { grid-column:1/-1; }
.secret-row { display:flex; gap:7px; }
.secret-row input { flex:1; }
.secret-row button,.folder-create button { margin-top:6px; padding:0 11px; border:1px solid #484848; border-radius:3px; background:#292929; color:#ddd; cursor:pointer; font-size:10px; }
.folder-create { display:grid; grid-template-columns:1fr auto; gap:7px; }
.dialog-field { display:block; color:#b5b5b5; font-size:11px; font-weight:620; }
.dialog-field input { display:block; width:100%; margin-top:6px; padding:10px 11px; border:1px solid #454545; border-radius:3px; outline:none; background:#090909; color:#eee; }
.passkey-guide { display:grid; grid-template-columns:26px 1fr; gap:10px; align-items:center; }
.passkey-guide>span { display:grid; place-items:center; width:24px; height:24px; border:1px solid #555; border-radius:50%; color:#aaa; font:700 9px ui-monospace,monospace; }
.passkey-guide p { margin:0; padding:9px 0; color:#bbb; font-size:10px; line-height:1.45; }
.check { display:flex; align-items:center; gap:7px; }
.check input { width:auto; margin:0; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; padding-top:17px; border-top:1px solid #303030; }
.tool-dialog { width:min(480px,calc(100% - 28px)); }
.generator-output { display:block; min-height:62px; padding:14px; overflow-wrap:anywhere; border:1px solid #444; background:#080808; color:#fff; font:15px/1.5 ui-monospace,monospace; user-select:all; }
.range-label { display:grid; grid-template-columns:1fr auto; gap:8px; margin:20px 0 14px; color:#aaa; font-size:11px; }
.range-label input { grid-column:1/-1; width:100%; accent-color:var(--blue); }
.generator-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.generator-options label { padding:9px; border:1px solid #383838; background:#202020; color:#bbb; font-size:10px; }
.generator-options input { margin-right:7px; accent-color:var(--blue); }
.account-details { margin:0 0 16px; border:1px solid #363636; }
.account-details>div { display:grid; grid-template-columns:100px 1fr; padding:10px; border-bottom:1px solid #333; }
.account-details>div:last-child { border-bottom:0; }
.account-details dt { color:#777; font-size:9px; }
.account-details dd { margin:0; font-size:10px; }
.settings-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.device-section { margin-top:20px; padding-top:16px; border-top:1px solid #333; }
.section-head { display:flex; align-items:center; justify-content:space-between; }
.section-head h3 { margin:0; font-size:13px; }
.text-button { padding:0; border:0; background:transparent; color:#8ab8df; font-size:9px; }
.device-list { display:grid; gap:6px; margin-top:10px; }
.device-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px; border:1px solid #383838; background:#202020; }
.device-row strong,.device-row small { display:block; }
.device-row strong { font-size:10px; }
.device-row small { margin-top:3px; color:#777; font-size:8px; }
.danger-action { color:var(--danger)!important; }

@media (max-width:1050px) { .workspace-grid { grid-template-columns:minmax(500px,1fr) 280px; } }
@media (max-width:820px) {
  body { overflow:auto; }
  .vault-shell { grid-template-columns:64px minmax(0,1fr); min-height:100vh; }
  .sidebar { padding:14px 8px; }
  .sidebar .brand>span:last-child,.nav-item:not(.active){ font-size:0; }
  .sidebar .brand { margin:0 auto 20px; }
  .new-resource { width:46px; margin:0 auto 12px; font-size:0; }
  .new-resource span { font-size:18px; }
  .nav-item { justify-content:center; padding:0; }
  .nav-item span { font-size:13px; }
  .sidebar-label,.sidebar-account>span:not(.avatar),.sidebar-account .icon-button { display:none; }
  .sidebar-account { display:block; margin-top:auto; text-align:center; }
  .sidebar-account .avatar { margin:auto; }
  .workspace-grid { grid-template-columns:1fr; grid-template-rows:minmax(540px,1fr) auto; }
  .detail-pane { min-height:250px; }
}
@media (max-width:560px) {
  .vault-shell { grid-template-columns:52px minmax(0,1fr); }
  .workspace-grid { padding:6px; }
  .vault-topbar { padding:0 8px; }
  .vault-state,.top-avatar { display:none; }
  .form-grid { grid-template-columns:1fr; }
  .folder-create { grid-template-columns:1fr; }
  .folder-create button { min-height:34px; }
  .settings-actions,.generator-options { grid-template-columns:1fr; }
}
