01c56edf25
In a zero-knowledge vault, forgetting the master password normally
means losing the data — the AES key is derived from the master pw
and the server can't help. This commit adds the standard escape
hatch: a one-time recovery code that key-wraps the AES key so the
user can get back in.
Threat model
============
The plaintext recovery code is shown to the user exactly once, at
generation time. Server only ever stores SHA-256(code) + an AES-GCM
wrap of the vault key under a KEK = PBKDF2(code, kdf_salt, 600k).
Without the plaintext code the server cannot unwrap. The code is
high-entropy (96 bits from a 32-char ambiguity-free alphabet, in 4
groups of 4) — printed form is misreading-resistant.
Single use: redeeming deletes the row inside the same DB.Lock the
lookup happened in, so concurrent redeem attempts are race-free.
Failed redemptions feed both the per-IP rate limit AND the per-
username lockout, so brute-forcing the code is infeasible.
Schema
======
recovery_keys (
user_id INTEGER PRIMARY KEY (1:1 with users, FK cascade),
code_hash TEXT NOT NULL (SHA-256 hex of plaintext code),
kdf_salt TEXT NOT NULL (PBKDF2 salt for KEK derivation),
wrapped_key TEXT NOT NULL (base64 AES-GCM ciphertext of vault key),
wrapped_iv TEXT NOT NULL (base64 12B IV for the wrap),
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
)
Backend: new unit PM.Handler.Recovery
=====================================
GET /recovery-key/status (auth) -> { configured, created_at? }
POST /recovery-key/setup (auth + CSRF) body {masterPassword, codeHash,
kdfSalt, wrappedKey, wrappedIv}
DELETE /recovery-key (auth + CSRF) -> remove config
POST /recovery-key/redeem (NO auth) body {username, code}
-> session + wrappedKey + wrappedIv + kdfSalt
+ user's current salt + kdfIterations
VerifyMasterPassword() helper handles both legacy 'pbkdf2' and
current 'pbkdf2-sha256' schemes consistently with PM.Handler.Auth.
Setup flow
==========
1. Settings → "Generate recovery code" button (asks master pw via reauth).
2. Client generates: 16-char code + fresh kdf_salt + exports the current
AES key via crypto.subtle.exportKey('raw').
3. Client wraps the raw key under KEK=PBKDF2(code, kdf_salt, 600k)
with a random 12B IV → base64.
4. POSTs to /recovery-key/setup. Server verifies master pw, INSERT-or-
replaces the row (DELETE+INSERT, no UPSERT — same pattern as the
lockout table since FireDAC's UPSERT support is patchy).
5. Confirm modal shows the plaintext code in a monospace, user-select-all
panel. The modal is forcing: "I saved it" button is the only way out.
Modal is the only place the code ever appears — server never sees it.
Redeem flow (forgot master pw)
==============================
1. Auth screen → "Forgot master password? Use a recovery code" link.
2. promptDialog: username, then code (masked input).
3. POST /recovery-key/redeem. Server hashes the typed code, joins with
users by username, ConstantTimeEquals against stored hash. On match:
- deletes the recovery_keys row (single-use)
- issues a fresh session token + CSRF
- returns: { token, csrfToken, salt, kdfIterations, kdfSalt,
wrappedKey, wrappedIv, userId }
4. Client unwraps the AES key with PBKDF2(code, kdfSalt, 600k) → raw bytes
→ importKey('raw') back into a CryptoKey.
5. State is reconstituted from the new session, persistCryptoKey, enterApp.
6. Client immediately opens the Change-master-password modal — the
recovery code is consumed and the account needs a fresh master pw
AND a fresh recovery code (the user generates a new one from Settings).
Backward compat
===============
Recovery is opt-in. Existing users see "No recovery key set" in Settings
until they generate one. No migration needed — the table is created via
CREATE TABLE IF NOT EXISTS at server startup, FK cascade on user delete.
Minor UI additions
==================
- .btn-link CSS class for the auth-screen "Forgot master password?" link.
- Recovery-status label in Settings refreshed on every openSettings()
via GET /recovery-key/status.
1279 lines
35 KiB
CSS
1279 lines
35 KiB
CSS
/* ============================================================
|
|
Vault — UI V2 (Linear/Notion design system)
|
|
Dark default, cyan/violet accent, glassmorphism subtil.
|
|
============================================================ */
|
|
|
|
/* ---- 1. RESET & TOKENS ----------------------------------- */
|
|
|
|
*,*::before,*::after { box-sizing: border-box; }
|
|
html, body { margin: 0; padding: 0; height: 100%; }
|
|
body {
|
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
color: var(--text);
|
|
background: var(--bg);
|
|
-webkit-font-smoothing: antialiased;
|
|
overflow: hidden;
|
|
}
|
|
|
|
button { font-family: inherit; cursor: pointer; }
|
|
input, select, textarea { font-family: inherit; font-size: inherit; }
|
|
kbd {
|
|
font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
background: var(--bg-elev);
|
|
color: var(--text-dim);
|
|
}
|
|
|
|
:root, [data-theme="dark"] {
|
|
/* Slightly lighter surfaces + warmer tones, brighter text-dim/faint
|
|
and more visible borders. Less "black hole" feel. */
|
|
--bg: #15151c;
|
|
--bg-elev: #1d1d26;
|
|
--bg-elev-2: #292932;
|
|
--bg-glass: rgba(29,29,38,0.78);
|
|
--border: #353541;
|
|
--border-soft: #25252e;
|
|
--text: #f1f1f5;
|
|
--text-dim: #b8b8c4;
|
|
--text-faint: #82828f;
|
|
--accent: #06b6d4;
|
|
--accent-hover: #22d3ee;
|
|
--accent-soft: rgba(6,182,212,0.12);
|
|
--accent-2: #a78bfa;
|
|
--danger: #f43f5e;
|
|
--danger-soft: rgba(244,63,94,0.12);
|
|
--success: #10b981;
|
|
--warning: #f59e0b;
|
|
--shadow: 0 8px 24px rgba(0,0,0,0.4);
|
|
--shadow-lg: 0 24px 48px rgba(0,0,0,0.55);
|
|
--blur: saturate(140%) blur(20px);
|
|
--radius: 12px;
|
|
--radius-sm: 8px;
|
|
--radius-lg: 16px;
|
|
--t-fast: 120ms cubic-bezier(0.16,1,0.3,1);
|
|
--t-base: 200ms cubic-bezier(0.16,1,0.3,1);
|
|
}
|
|
|
|
[data-theme="light"] {
|
|
--bg: #f7f7f5;
|
|
--bg-elev: #ffffff;
|
|
--bg-elev-2: #efefec;
|
|
--bg-glass: rgba(255,255,255,0.92);
|
|
--border: #dcdcd7;
|
|
--border-soft: #ebebe6;
|
|
--text: #1a1a1f;
|
|
--text-dim: #57575e;
|
|
--text-faint: #8e8e96;
|
|
--accent: #0891b2; /* cyan-600 — darker for better contrast on white */
|
|
--accent-hover: #0e7490;
|
|
--accent-soft: rgba(8,145,178,0.10);
|
|
--accent-2: #7c3aed;
|
|
--shadow: 0 4px 16px rgba(0,0,0,0.06);
|
|
--shadow-lg: 0 16px 36px rgba(0,0,0,0.08);
|
|
--blur: saturate(160%) blur(16px);
|
|
}
|
|
[data-theme="light"] .auth-screen {
|
|
background:
|
|
radial-gradient(ellipse at top, rgba(8,145,178,0.08), transparent 50%),
|
|
radial-gradient(ellipse at bottom right, rgba(124,58,237,0.06), transparent 50%),
|
|
var(--bg);
|
|
}
|
|
|
|
svg { width: 16px; height: 16px; flex-shrink: 0; }
|
|
|
|
/* ---- 2. UTILITIES ---------------------------------------- */
|
|
|
|
.is-hidden { display: none !important; }
|
|
.hint { color: var(--text-faint); font-weight: 400; font-size: 12px; margin-left: 4px; }
|
|
|
|
/* ---- 3. BUTTONS ------------------------------------------ */
|
|
|
|
.btn {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
gap: 6px;
|
|
padding: 8px 14px;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px; font-weight: 500; line-height: 1;
|
|
transition: all var(--t-fast);
|
|
white-space: nowrap;
|
|
}
|
|
.btn-primary { background: var(--accent); color: white; }
|
|
.btn-primary:hover { background: var(--accent-hover); }
|
|
.btn.is-danger { background: var(--danger); color: white; }
|
|
.btn.is-danger:hover { background: #e11d48; }
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: var(--text-dim);
|
|
border-color: var(--border);
|
|
}
|
|
.btn-ghost:hover { background: var(--bg-elev-2); color: var(--text); }
|
|
.btn-block { width: 100%; }
|
|
.btn-sm { padding: 6px 10px; font-size: 12px; }
|
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
.btn-link {
|
|
background: transparent;
|
|
color: var(--text-dim);
|
|
border-color: transparent;
|
|
text-decoration: underline;
|
|
text-underline-offset: 2px;
|
|
}
|
|
.btn-link:hover { color: var(--accent); background: transparent; }
|
|
|
|
.icon-btn {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
width: 32px; height: 32px;
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-dim);
|
|
transition: all var(--t-fast);
|
|
}
|
|
.icon-btn:hover { background: var(--bg-elev-2); color: var(--text); }
|
|
.icon-btn-sm { width: 24px; height: 24px; }
|
|
.icon-btn-sm svg { width: 14px; height: 14px; }
|
|
|
|
/* ---- 4. FORM CONTROLS ------------------------------------ */
|
|
|
|
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
|
|
.field > span {
|
|
font-size: 12px; font-weight: 500; color: var(--text-dim);
|
|
display: flex; align-items: center;
|
|
}
|
|
.field input[type="text"],
|
|
.field input[type="password"],
|
|
.field input[type="search"],
|
|
.field input[type="email"],
|
|
.field select {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
transition: all var(--t-fast);
|
|
}
|
|
.field input:focus, .field select:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
background: var(--bg);
|
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
}
|
|
|
|
.input-with-action { position: relative; display: flex; align-items: center; gap: 4px; }
|
|
.input-with-action input { padding-right: 80px; }
|
|
.input-with-action .icon-btn {
|
|
position: absolute;
|
|
top: 50%; transform: translateY(-50%);
|
|
}
|
|
.input-with-action .icon-btn:nth-of-type(1) { right: 38px; }
|
|
.input-with-action .icon-btn:nth-of-type(2) { right: 4px; }
|
|
|
|
.strength-bar {
|
|
height: 4px;
|
|
background: var(--border);
|
|
border-radius: 2px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin-top: 4px;
|
|
}
|
|
.strength-bar::after {
|
|
content: '';
|
|
position: absolute; inset: 0;
|
|
width: var(--strength, 0%);
|
|
background: linear-gradient(90deg, var(--danger), var(--warning) 50%, var(--success));
|
|
transition: width var(--t-base);
|
|
}
|
|
|
|
input[type="range"] {
|
|
-webkit-appearance: none; appearance: none;
|
|
width: 100%; height: 4px;
|
|
background: var(--border);
|
|
border-radius: 2px;
|
|
}
|
|
input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none; appearance: none;
|
|
width: 16px; height: 16px;
|
|
background: var(--accent);
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.check {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: 6px 10px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.check:has(input:checked) {
|
|
background: var(--accent-soft);
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
.check input { display: none; }
|
|
|
|
/* ---- 5. AUTH SCREEN -------------------------------------- */
|
|
|
|
.auth-screen {
|
|
position: fixed; inset: 0;
|
|
display: grid; place-items: center;
|
|
padding: 24px;
|
|
background:
|
|
radial-gradient(ellipse at top, var(--accent-soft), transparent 50%),
|
|
radial-gradient(ellipse at bottom right, rgba(167,139,250,0.08), transparent 50%),
|
|
var(--bg);
|
|
}
|
|
.auth-card {
|
|
width: 100%; max-width: 400px;
|
|
padding: 32px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
.auth-brand { text-align: center; margin-bottom: 24px; }
|
|
.auth-brand-icon {
|
|
width: 40px; height: 40px;
|
|
padding: 10px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
border-radius: var(--radius);
|
|
margin-bottom: 12px;
|
|
}
|
|
.auth-brand h1 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
|
|
.auth-brand p { color: var(--text-dim); font-size: 13px; margin: 0; }
|
|
.auth-tabs {
|
|
display: flex;
|
|
padding: 4px;
|
|
background: var(--bg);
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 20px;
|
|
}
|
|
.auth-tab {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text-dim);
|
|
font-size: 13px; font-weight: 500;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.auth-tab.is-active {
|
|
background: var(--bg-elev);
|
|
color: var(--text);
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
}
|
|
.auth-form { display: flex; flex-direction: column; }
|
|
.auth-form .btn-block { margin-top: 8px; }
|
|
|
|
.auth-hint {
|
|
padding: 10px 12px;
|
|
margin-bottom: 14px;
|
|
background: var(--accent-soft);
|
|
border: 1px solid var(--accent);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--accent);
|
|
font-size: 12px;
|
|
text-align: center;
|
|
}
|
|
.auth-hint:empty { display: none; }
|
|
|
|
/* Tag chip input */
|
|
.chip-input {
|
|
display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
|
|
padding: 6px 8px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
min-height: 38px;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.chip-input:focus-within {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
background: var(--bg);
|
|
}
|
|
.chip-input input {
|
|
flex: 1;
|
|
min-width: 80px;
|
|
background: transparent;
|
|
border: none;
|
|
outline: none;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
padding: 2px 4px;
|
|
}
|
|
.chip {
|
|
display: inline-flex; align-items: center; gap: 4px;
|
|
padding: 2px 4px 2px 8px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
border-radius: 10px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
}
|
|
.chip button {
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
width: 16px; height: 16px;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 50%;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
opacity: 0.6;
|
|
}
|
|
.chip button:hover { opacity: 1; background: rgba(0,0,0,0.1); }
|
|
.chip button svg { width: 10px; height: 10px; }
|
|
|
|
/* Tag suggestions dropdown */
|
|
.chip-suggestions {
|
|
position: absolute;
|
|
z-index: 50;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: var(--shadow);
|
|
padding: 4px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
min-width: 160px;
|
|
}
|
|
.chip-suggestion {
|
|
padding: 6px 10px;
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
.chip-suggestion:hover, .chip-suggestion.is-active { background: var(--bg-elev-2); color: var(--text); }
|
|
.chip-suggestion-empty { padding: 6px 10px; color: var(--text-faint); font-size: 12px; }
|
|
|
|
/* Settings rows */
|
|
.setting-row {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 10px 12px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border-soft);
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 6px;
|
|
font-size: 13px;
|
|
}
|
|
.setting-row > span { display: flex; flex-direction: column; gap: 2px; }
|
|
.setting-hint {
|
|
color: var(--text-faint);
|
|
font-size: 11px;
|
|
font-weight: normal;
|
|
line-height: 1.35;
|
|
max-width: 320px;
|
|
}
|
|
.setting-row select {
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
padding: 4px 8px;
|
|
font-size: 12px;
|
|
}
|
|
.setting-row select:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* iOS-style toggle switch */
|
|
.toggle {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 36px; height: 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
.toggle input { opacity: 0; width: 0; height: 0; }
|
|
.toggle-slider {
|
|
position: absolute; inset: 0;
|
|
background: var(--bg-elev-2);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.toggle-slider::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 2px; top: 1px;
|
|
width: 14px; height: 14px;
|
|
background: var(--text-dim);
|
|
border-radius: 50%;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.toggle input:checked + .toggle-slider {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
}
|
|
.toggle input:checked + .toggle-slider::before {
|
|
background: white;
|
|
transform: translateX(16px);
|
|
}
|
|
|
|
/* ---- 6. APP SHELL ---------------------------------------- */
|
|
|
|
.app-shell {
|
|
display: grid;
|
|
grid-template-columns: 240px 1fr;
|
|
height: 100vh;
|
|
background: var(--bg);
|
|
}
|
|
|
|
/* ---- 7. SIDEBAR ------------------------------------------ */
|
|
|
|
.sidebar {
|
|
display: flex; flex-direction: column;
|
|
padding: 16px 12px;
|
|
background: var(--bg-elev);
|
|
border-right: 1px solid var(--border);
|
|
overflow-y: auto;
|
|
}
|
|
.sidebar-brand {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 6px 8px 18px;
|
|
font-size: 15px; font-weight: 600;
|
|
}
|
|
.sidebar-brand svg { color: var(--accent); width: 18px; height: 18px; }
|
|
|
|
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
|
|
.nav-item {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 7px 10px;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text-dim);
|
|
font-size: 13px; font-weight: 500;
|
|
text-align: left;
|
|
width: 100%;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.nav-item:hover { background: var(--bg-elev-2); color: var(--text); }
|
|
.nav-item.is-active {
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
}
|
|
.nav-item.is-active svg { color: var(--accent); }
|
|
.nav-item svg { color: var(--text-faint); }
|
|
.nav-item > span:first-of-type { flex: 1; }
|
|
.nav-count {
|
|
font-size: 11px;
|
|
color: var(--text-faint);
|
|
background: var(--bg-elev-2);
|
|
padding: 1px 6px;
|
|
border-radius: 8px;
|
|
min-width: 18px;
|
|
text-align: center;
|
|
}
|
|
.nav-item.is-active .nav-count { background: var(--accent); color: white; }
|
|
|
|
.sidebar-section { margin-top: 18px; }
|
|
.sidebar-section-header {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 4px 10px 6px;
|
|
font-size: 11px; font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
color: var(--text-faint);
|
|
}
|
|
.sidebar-bottom {
|
|
margin-top: auto;
|
|
padding-top: 12px;
|
|
border-top: 1px solid var(--border-soft);
|
|
display: flex; flex-direction: column; gap: 2px;
|
|
}
|
|
|
|
.folder-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
|
.nav-item.drag-over {
|
|
background: var(--accent-soft);
|
|
box-shadow: inset 0 0 0 2px var(--accent);
|
|
}
|
|
|
|
/* ---- 8. MAIN --------------------------------------------- */
|
|
|
|
.main { display: flex; flex-direction: column; overflow: hidden; }
|
|
.topbar {
|
|
display: flex; align-items: center; gap: 12px;
|
|
padding: 12px 24px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--bg-glass);
|
|
backdrop-filter: var(--blur);
|
|
-webkit-backdrop-filter: var(--blur);
|
|
}
|
|
.search { flex: 1; max-width: 480px; position: relative; display: flex; align-items: center; }
|
|
.search svg {
|
|
position: absolute; left: 10px;
|
|
color: var(--text-faint);
|
|
pointer-events: none;
|
|
}
|
|
.search input {
|
|
width: 100%;
|
|
padding: 8px 60px 8px 34px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
transition: all var(--t-fast);
|
|
}
|
|
.search input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
}
|
|
.search kbd { position: absolute; right: 8px; }
|
|
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
|
|
|
|
/* View toggle (Cards / List) */
|
|
.view-toggle {
|
|
display: inline-flex;
|
|
padding: 2px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
.view-btn {
|
|
width: 28px; height: 28px;
|
|
display: grid; place-items: center;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text-dim);
|
|
transition: all var(--t-fast);
|
|
}
|
|
.view-btn:hover { color: var(--text); }
|
|
.view-btn.is-active {
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
}
|
|
|
|
[data-theme="dark"] .theme-icon-light { display: none; }
|
|
[data-theme="light"] .theme-icon-dark { display: none; }
|
|
|
|
.user-menu { position: relative; }
|
|
.user-chip {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: 6px 12px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: 16px;
|
|
color: var(--text);
|
|
font-size: 12px;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.user-chip:hover { background: var(--bg-elev-2); }
|
|
.user-dropdown {
|
|
position: absolute; top: calc(100% + 6px); right: 0;
|
|
min-width: 180px;
|
|
padding: 4px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: var(--shadow);
|
|
z-index: 50;
|
|
}
|
|
.dropdown-item {
|
|
display: flex; align-items: center; gap: 8px;
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
text-align: left;
|
|
}
|
|
.dropdown-item:hover { background: var(--bg-elev-2); }
|
|
.dropdown-item svg { color: var(--text-dim); }
|
|
|
|
.content { flex: 1; padding: 24px 32px; overflow-y: auto; }
|
|
.content-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
|
|
.content-header h2 { font-size: 22px; font-weight: 600; margin: 0; }
|
|
.content-meta { color: var(--text-faint); font-size: 12px; }
|
|
|
|
/* ---- 9. ENTRY GRID --------------------------------------- */
|
|
|
|
.entry-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 12px;
|
|
position: relative;
|
|
user-select: none; /* avoid native text-selection during marquee */
|
|
}
|
|
|
|
/* Marquee rectangle for rubber-band selection */
|
|
.marquee {
|
|
position: fixed;
|
|
z-index: 5;
|
|
background: var(--accent-soft);
|
|
border: 1px solid var(--accent);
|
|
border-radius: 2px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.entry-card {
|
|
position: relative;
|
|
padding: 14px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
transition: all var(--t-fast);
|
|
cursor: pointer;
|
|
}
|
|
.entry-card:hover {
|
|
transform: translateY(-1px);
|
|
border-color: var(--accent);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
.entry-card.is-selected {
|
|
border-color: var(--accent);
|
|
background: var(--accent-soft);
|
|
}
|
|
.entry-card.is-checked {
|
|
border-color: var(--accent);
|
|
background: var(--accent-soft);
|
|
box-shadow: inset 0 0 0 2px var(--accent);
|
|
}
|
|
|
|
/* === List view layout === */
|
|
/* Cards are flattened into a single horizontal row using flexbox + `order`.
|
|
`.entry-head` and `.entry-pw-row` get display:contents so their children
|
|
participate directly in the card flex container — no wrapping, ever. */
|
|
.entry-grid.is-list {
|
|
grid-template-columns: 1fr;
|
|
gap: 4px;
|
|
}
|
|
.entry-grid.is-list .entry-card {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 8px 12px;
|
|
}
|
|
.entry-grid.is-list .entry-card:hover { transform: none; }
|
|
|
|
.entry-grid.is-list .entry-head { display: contents; }
|
|
.entry-grid.is-list .entry-pw-row { display: contents; }
|
|
|
|
.entry-grid.is-list .entry-avatar {
|
|
order: 1;
|
|
width: 28px; height: 28px;
|
|
font-size: 12px;
|
|
margin: 0;
|
|
}
|
|
.entry-grid.is-list .entry-title {
|
|
order: 2;
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex; flex-direction: column;
|
|
}
|
|
.entry-grid.is-list .entry-title b { font-size: 13px; }
|
|
.entry-grid.is-list .entry-title small { font-size: 11px; }
|
|
|
|
.entry-grid.is-list .entry-pw {
|
|
order: 3;
|
|
font-size: 11px;
|
|
width: 110px;
|
|
flex-shrink: 0;
|
|
padding: 4px 8px;
|
|
background: var(--bg);
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border-soft);
|
|
}
|
|
.entry-grid.is-list .entry-pw-row .icon-btn {
|
|
order: 4;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.entry-grid.is-list .entry-meta {
|
|
order: 5;
|
|
margin: 0;
|
|
flex-shrink: 0;
|
|
max-width: 220px;
|
|
overflow: hidden;
|
|
flex-wrap: nowrap;
|
|
}
|
|
.entry-grid.is-list .entry-meta .entry-chip {
|
|
flex-shrink: 0;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* Right-side action buttons: favorite + delete (normal view),
|
|
restore + purge (trash view), or kebab (compact mode). Same order slot. */
|
|
.entry-grid.is-list .entry-fav,
|
|
.entry-grid.is-list .entry-del,
|
|
.entry-grid.is-list .entry-kebab-wrap,
|
|
.entry-grid.is-list .entry-head .icon-btn {
|
|
order: 6;
|
|
flex-shrink: 0;
|
|
}
|
|
.entry-avatar.is-checkable {
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
.entry-avatar.is-checkable:hover::after {
|
|
content: '';
|
|
position: absolute; inset: 0;
|
|
border-radius: var(--radius-sm);
|
|
background: var(--accent-soft);
|
|
border: 2px solid var(--accent);
|
|
}
|
|
.entry-card.is-checked .entry-avatar {
|
|
background: var(--accent);
|
|
color: white;
|
|
}
|
|
|
|
/* Batch action bar (appears when selection is non-empty) */
|
|
.batch-bar {
|
|
position: sticky;
|
|
top: -1px;
|
|
z-index: 10;
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 16px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--accent);
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow);
|
|
animation: toastIn var(--t-base);
|
|
}
|
|
.batch-bar-count {
|
|
font-weight: 600;
|
|
color: var(--accent);
|
|
margin-right: 8px;
|
|
}
|
|
.batch-bar select {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
padding: 4px 8px;
|
|
font-size: 12px;
|
|
}
|
|
.batch-bar .grow { flex: 1; }
|
|
|
|
.entry-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
|
|
.entry-avatar {
|
|
width: 32px; height: 32px;
|
|
display: grid; place-items: center;
|
|
background: var(--bg-elev-2);
|
|
border-radius: var(--radius-sm);
|
|
font-weight: 600; font-size: 14px;
|
|
color: var(--text);
|
|
flex-shrink: 0;
|
|
}
|
|
.entry-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
.entry-title b {
|
|
font-size: 14px; font-weight: 600;
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
}
|
|
.entry-title small {
|
|
color: var(--text-dim);
|
|
font-size: 12px;
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
}
|
|
.entry-fav, .entry-del {
|
|
color: var(--text-faint);
|
|
background: transparent; border: none;
|
|
padding: 4px;
|
|
transition: all var(--t-fast);
|
|
cursor: pointer;
|
|
}
|
|
.entry-fav.is-on { color: var(--warning); }
|
|
.entry-fav:hover { color: var(--warning); transform: scale(1.1); }
|
|
|
|
/* Delete button — always visible, brightens on hover */
|
|
.entry-del {
|
|
color: var(--text-dim);
|
|
opacity: 0.8;
|
|
}
|
|
.entry-del:hover {
|
|
opacity: 1;
|
|
color: var(--danger);
|
|
background: var(--danger-soft);
|
|
border-radius: 6px;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
/* Username row with inline copy button (visible on card hover) */
|
|
.entry-user-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
.entry-user-row > span {
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
}
|
|
.entry-copy-user {
|
|
background: transparent; border: none;
|
|
padding: 2px;
|
|
color: var(--text-faint);
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
transition: all var(--t-fast);
|
|
border-radius: 4px;
|
|
}
|
|
.entry-copy-user svg { width: 11px; height: 11px; }
|
|
.entry-card:hover .entry-copy-user { opacity: 0.7; }
|
|
.entry-copy-user:hover {
|
|
opacity: 1 !important;
|
|
color: var(--accent);
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
/* Kebab (⋯) menu */
|
|
.entry-kebab-wrap {
|
|
position: relative;
|
|
}
|
|
.entry-kebab {
|
|
background: transparent; border: none;
|
|
padding: 4px;
|
|
color: var(--text-dim);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.entry-kebab:hover { color: var(--text); background: var(--bg-elev-2); }
|
|
|
|
.entry-kebab-menu {
|
|
position: absolute;
|
|
top: calc(100% + 4px);
|
|
right: 0;
|
|
min-width: 180px;
|
|
padding: 4px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: var(--shadow);
|
|
z-index: 60;
|
|
display: none;
|
|
animation: modalIn var(--t-fast);
|
|
}
|
|
.entry-kebab-menu.is-open { display: block; }
|
|
|
|
.kebab-item {
|
|
display: flex; align-items: center; gap: 10px;
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.kebab-item:hover { background: var(--bg-elev-2); }
|
|
.kebab-item svg { color: var(--text-dim); }
|
|
.kebab-item.is-danger { color: var(--danger); }
|
|
.kebab-item.is-danger:hover { background: var(--danger-soft); }
|
|
.kebab-item.is-danger svg { color: var(--danger); }
|
|
|
|
.entry-pw-row {
|
|
display: flex; align-items: center; gap: 6px;
|
|
padding: 6px 8px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border-soft);
|
|
border-radius: 6px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.entry-pw {
|
|
flex: 1;
|
|
font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
|
|
font-size: 12px;
|
|
color: var(--text-dim);
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
user-select: none;
|
|
}
|
|
.entry-pw.is-revealed { color: var(--text); }
|
|
.entry-pw.is-error { color: var(--danger); }
|
|
|
|
.entry-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
.entry-chip {
|
|
display: inline-flex; align-items: center; gap: 4px;
|
|
padding: 2px 8px;
|
|
background: var(--bg-elev-2);
|
|
border-radius: 10px;
|
|
font-size: 11px;
|
|
color: var(--text-dim);
|
|
}
|
|
.entry-chip svg { width: 11px; height: 11px; }
|
|
.entry-chip.is-folder { color: var(--accent); background: var(--accent-soft); }
|
|
.entry-chip.is-pwned {
|
|
color: #fff;
|
|
background: #dc2626; /* solid red — high-attention signal */
|
|
font-weight: 600;
|
|
}
|
|
.entry-chip.is-pwned svg { stroke: #fff; }
|
|
.entry-chip.is-2fa {
|
|
color: var(--accent);
|
|
background: var(--accent-soft);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* TOTP live-code panel (inside slide-over Two-factor field) */
|
|
.totp-panel {
|
|
display: flex; align-items: center; gap: 12px;
|
|
margin-top: 8px;
|
|
padding: 10px 12px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border-soft);
|
|
border-radius: var(--radius-sm);
|
|
min-height: 36px;
|
|
}
|
|
.totp-code {
|
|
flex: 1;
|
|
font-family: 'JetBrains Mono', ui-monospace, monospace;
|
|
font-size: 22px;
|
|
letter-spacing: 2px;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
user-select: all; /* triple-click selects the code */
|
|
}
|
|
.totp-code.is-invalid {
|
|
color: var(--text-faint);
|
|
font-size: 13px;
|
|
letter-spacing: normal;
|
|
font-style: italic;
|
|
font-weight: normal;
|
|
}
|
|
.totp-bar-wrap {
|
|
margin-top: 4px;
|
|
height: 3px;
|
|
background: var(--bg);
|
|
border-radius: 2px;
|
|
overflow: hidden;
|
|
}
|
|
.totp-bar {
|
|
height: 100%;
|
|
background: var(--accent);
|
|
width: 0%;
|
|
transition: width 0.8s linear, background 0.2s;
|
|
}
|
|
|
|
/* ---- 10. SLIDE-OVER -------------------------------------- */
|
|
|
|
.slideover {
|
|
position: fixed; top: 0; right: 0; bottom: 0;
|
|
width: 420px;
|
|
background: var(--bg-elev);
|
|
border-left: 1px solid var(--border);
|
|
box-shadow: var(--shadow-lg);
|
|
transform: translateX(100%);
|
|
transition: transform var(--t-base);
|
|
display: flex; flex-direction: column;
|
|
z-index: 30;
|
|
}
|
|
.slideover.is-open { transform: translateX(0); }
|
|
.slideover-header {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.slideover-header h3 {
|
|
font-size: 15px; font-weight: 600;
|
|
margin: 0;
|
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
}
|
|
.slideover-body { padding: 20px; overflow-y: auto; flex: 1; }
|
|
.slideover-field { margin-bottom: 16px; }
|
|
.slideover-field-label { font-size: 11px; font-weight: 500; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
|
|
.slideover-field-value {
|
|
display: flex; align-items: center; gap: 6px;
|
|
padding: 10px 12px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border-soft);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 13px;
|
|
word-break: break-all;
|
|
}
|
|
.so-input {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
transition: all var(--t-fast);
|
|
}
|
|
.so-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
background: var(--bg);
|
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
}
|
|
.so-pw-row {
|
|
display: flex; align-items: center; gap: 4px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 2px 4px 2px 10px;
|
|
}
|
|
.so-pw-row:focus-within {
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px var(--accent-soft);
|
|
}
|
|
.so-pw-row .so-input {
|
|
background: transparent;
|
|
border: none;
|
|
padding: 8px 4px;
|
|
}
|
|
.so-pw-row .so-input:focus { box-shadow: none; }
|
|
.slideover-actions { display: flex; gap: 8px; margin-top: 24px; }
|
|
|
|
/* ---- 11. MODALS ------------------------------------------ */
|
|
|
|
.modal {
|
|
position: fixed; inset: 0;
|
|
z-index: 100;
|
|
display: grid; place-items: center;
|
|
padding: 24px;
|
|
}
|
|
.modal-backdrop {
|
|
position: absolute; inset: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
.modal-panel {
|
|
position: relative;
|
|
width: 100%; max-width: 480px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
overflow: hidden;
|
|
animation: modalIn var(--t-base);
|
|
}
|
|
.modal-panel-sm { max-width: 360px; }
|
|
@keyframes modalIn {
|
|
from { opacity: 0; transform: scale(0.96) translateY(8px); }
|
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
}
|
|
.modal-header {
|
|
display: flex; align-items: center; justify-content: space-between;
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.modal-header h3 { font-size: 15px; font-weight: 600; margin: 0; }
|
|
.modal-body { padding: 20px; }
|
|
.modal-footer {
|
|
display: flex; gap: 8px; justify-content: flex-end;
|
|
padding: 14px 20px;
|
|
background: var(--bg);
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.gen-preview {
|
|
padding: 12px;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-family: 'JetBrains Mono', monospace;
|
|
font-size: 13px;
|
|
word-break: break-all;
|
|
margin-bottom: 16px;
|
|
min-height: 42px;
|
|
display: flex; align-items: center;
|
|
}
|
|
.gen-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
|
|
|
/* ---- 12. COMMAND PALETTE -------------------------------- */
|
|
|
|
.cmd-palette {
|
|
position: fixed; inset: 0;
|
|
z-index: 200;
|
|
display: grid; place-items: start center;
|
|
padding-top: 15vh;
|
|
}
|
|
.cmd-panel {
|
|
position: relative;
|
|
width: 100%; max-width: 560px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
overflow: hidden;
|
|
animation: modalIn var(--t-base);
|
|
}
|
|
.cmd-input {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 14px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.cmd-input svg { color: var(--text-faint); }
|
|
.cmd-input input {
|
|
flex: 1;
|
|
background: transparent; border: none; outline: none;
|
|
color: var(--text);
|
|
font-size: 15px;
|
|
}
|
|
.cmd-results { max-height: 360px; overflow-y: auto; padding: 8px; }
|
|
.cmd-item {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 10px 12px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
}
|
|
.cmd-item:hover, .cmd-item.is-active { background: var(--bg-elev-2); }
|
|
|
|
/* ---- 13. EMPTY STATE ------------------------------------ */
|
|
|
|
.empty-state {
|
|
display: flex; flex-direction: column; align-items: center; gap: 8px;
|
|
padding: 80px 20px;
|
|
color: var(--text-dim);
|
|
animation: fadeIn var(--t-base);
|
|
}
|
|
.empty-illustration {
|
|
width: 140px; height: 140px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.empty-icon {
|
|
width: 48px; height: 48px;
|
|
padding: 12px;
|
|
background: var(--bg-elev);
|
|
border-radius: var(--radius);
|
|
color: var(--text-faint);
|
|
}
|
|
.empty-state h3 { margin: 8px 0 0; font-size: 18px; color: var(--text); font-weight: 600; }
|
|
.empty-state p { margin: 0; font-size: 13px; max-width: 320px; text-align: center; }
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ---- Skeleton loaders ----------------------------------- */
|
|
.skeleton-card {
|
|
padding: 14px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
.skeleton-card::after {
|
|
content: '';
|
|
position: absolute; inset: 0;
|
|
background: linear-gradient(90deg, transparent, var(--bg-elev-2), transparent);
|
|
animation: shimmer 1.4s infinite;
|
|
}
|
|
.skeleton-line {
|
|
height: 12px;
|
|
background: var(--bg-elev-2);
|
|
border-radius: 4px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.skeleton-line.w-40 { width: 40%; }
|
|
.skeleton-line.w-60 { width: 60%; }
|
|
.skeleton-line.w-80 { width: 80%; }
|
|
.skeleton-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
|
|
.skeleton-circle {
|
|
width: 32px; height: 32px;
|
|
background: var(--bg-elev-2);
|
|
border-radius: var(--radius-sm);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
from { transform: translateX(-100%); }
|
|
to { transform: translateX(100%); }
|
|
}
|
|
|
|
/* ---- Idle warning ---------------------------------------- */
|
|
.idle-warning {
|
|
position: fixed;
|
|
top: 50%; left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 400;
|
|
width: 320px;
|
|
padding: 24px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--warning);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
text-align: center;
|
|
animation: modalIn var(--t-base);
|
|
}
|
|
.idle-warning .idle-icon {
|
|
width: 36px; height: 36px;
|
|
padding: 8px;
|
|
background: rgba(245,158,11,0.12);
|
|
color: var(--warning);
|
|
border-radius: 50%;
|
|
margin: 0 auto 8px;
|
|
display: block;
|
|
}
|
|
.idle-warning h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
|
|
.idle-warning p { color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }
|
|
.idle-warning b { color: var(--warning); font-size: 20px; }
|
|
|
|
/* ---- 14. TOASTS ----------------------------------------- */
|
|
|
|
.toast-container {
|
|
position: fixed; bottom: 20px; right: 20px;
|
|
z-index: 300;
|
|
display: flex; flex-direction: column-reverse; gap: 8px;
|
|
pointer-events: none;
|
|
}
|
|
.toast {
|
|
pointer-events: auto;
|
|
display: flex; align-items: center; gap: 8px;
|
|
padding: 10px 14px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-left: 3px solid var(--accent);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: var(--shadow);
|
|
font-size: 13px;
|
|
min-width: 240px;
|
|
animation: toastIn var(--t-base);
|
|
}
|
|
.toast.is-success { border-left-color: var(--success); }
|
|
.toast.is-error { border-left-color: var(--danger); }
|
|
.toast.is-warning { border-left-color: var(--warning); }
|
|
@keyframes toastIn {
|
|
from { opacity: 0; transform: translateX(20px); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
|
|
/* ---- 15. SCROLLBARS ------------------------------------- */
|
|
|
|
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
|
|
|
|
/* ---- 16. RESPONSIVE ------------------------------------- */
|
|
|
|
@media (max-width: 900px) {
|
|
.app-shell { grid-template-columns: 60px 1fr; }
|
|
.sidebar { padding: 12px 6px; }
|
|
.sidebar-brand span,
|
|
.nav-item > span:first-of-type,
|
|
.nav-count,
|
|
.sidebar-section-header { display: none; }
|
|
.nav-item { justify-content: center; padding: 8px; }
|
|
.topbar { padding: 12px 16px; }
|
|
.content { padding: 16px; }
|
|
.slideover { width: 100%; }
|
|
}
|