/* ============================================================
   AccessNode — Premium Design System
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-root: #06060d;
  --bg-surface: #0a0a16;
  --bg-elevated: #0f0f1d;
  --bg-card: rgba(15, 15, 30, 0.7);
  --bg-card-solid: #111122;
  --bg-input: #0c0c1a;
  --bg-hover: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(10, 10, 26, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(99, 102, 241, 0.35);

  --text-primary: #f0f0fc;
  --text-secondary: #a0a0c0;
  --text-tertiary: #606080;
  --text-placeholder: #4a4a6a;

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --accent-subtle: rgba(99, 102, 241, 0.08);

  --green: #22c55e;       --green-subtle: rgba(34, 197, 94, 0.1);
  --red: #ef4444;         --red-subtle: rgba(239, 68, 68, 0.1);
  --orange: #f97316;      --orange-subtle: rgba(249, 115, 22, 0.1);
  --yellow: #eab308;      --yellow-subtle: rgba(234, 179, 8, 0.1);
  --purple: #a855f7;      --purple-subtle: rgba(168, 85, 247, 0.12);
  --cyan: #06b6d4;        --cyan-subtle: rgba(6, 182, 212, 0.1);
  --pink: #ec4899;        --pink-subtle: rgba(236, 72, 153, 0.1);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px var(--accent-glow);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-accent);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'SF Mono', Consolas, monospace;
}

/* ---- Light Theme ---- */
[data-theme="light"] {
  --bg-root: #f5f5fa;
  --bg-surface: #ffffff;
  --bg-elevated: #f8f8fd;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --bg-input: #f0f0f7;
  --bg-hover: rgba(0, 0, 0, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.8);

  --border-subtle: rgba(0, 0, 0, 0.04);
  --border-default: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(99, 102, 241, 0.3);

  --text-primary: #14142b;
  --text-secondary: #5a5a78;
  --text-tertiary: #8a8aa8;
  --text-placeholder: #b0b0c8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.1);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border-accent);
}

/* ---- Transitions ---- */
body, body *, body *::before, body *::after {
  transition: background-color 0.35s var(--ease-out),
              color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out),
              opacity 0.35s var(--ease-out);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
::selection { background: var(--accent); color: #fff; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ---- Typography ---- */
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 40%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; padding: 10px 22px;
  font-family: var(--font-sans); position: relative; overflow: hidden;
  letter-spacing: -0.01em; user-select: none; white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-lg { padding: 15px 32px; font-size: 16px; border-radius: var(--radius-md); }
.btn-xl { padding: 18px 40px; font-size: 17px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; justify-content: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity var(--duration-fast);
}
.btn-primary:hover { color: #fff; box-shadow: 0 4px 24px rgba(99,102,241,0.45); transform: translateY(-2px); }
.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
  background: var(--accent-subtle); color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.btn-secondary:hover { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-accent); }

.btn-danger {
  background: transparent; color: var(--red); border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { background: var(--red); color: #fff; box-shadow: 0 2px 12px rgba(239, 68, 68, 0.35); }

.btn-icon {
  background: none; border: none; color: var(--text-tertiary); cursor: pointer;
  font-size: 20px; padding: 6px; line-height: 1; border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
}
.btn-icon:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 14px; font-family: var(--font-sans);
  transition: all var(--duration-fast); outline: none;
}
.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--text-placeholder);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-group select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239d9db5' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px; background-color: var(--bg-input);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error {
  background: var(--red-subtle); color: var(--red);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  animation: shake 0.5s var(--ease-out);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.password-input-group { position: relative; }
.password-input-group input { padding-right: 44px; }
.password-input-group .btn-icon {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
}
.password-strength { margin-top: 10px; }
.strength-bar { height: 4px; background: var(--border-strong); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.strength-fill { height: 100%; border-radius: 2px; transition: width 0.5s var(--ease-out), background 0.5s var(--ease-out); }
.strength-label { font-size: 12px; font-weight: 600; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-glass); backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.03em;
}
.nav-logo:hover { opacity: 0.8; color: var(--text-primary); }
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-user { color: var(--text-secondary); font-size: 13px; font-weight: 500; }

/* ---- Theme Toggle ---- */
.theme-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--bg-hover); border: 1px solid var(--border-default);
  cursor: pointer; font-size: 16px; color: var(--text-secondary);
  transition: all var(--duration-fast);
}
.theme-toggle-btn:hover { background: var(--accent-subtle); color: var(--accent-light); }

/* =========================== LANDING PAGE =========================== */
.landing-bg {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.landing-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(99, 102, 241, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(168, 85, 247, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 70%, rgba(6, 182, 212, 0.04), transparent 50%);
}
.landing-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

.hero {
  position: relative; padding: 120px 0 100px; text-align: center; z-index: 1;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 18px;
  background: var(--accent-subtle); border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-full); color: var(--accent-light);
  font-size: 13px; font-weight: 600; margin-bottom: 28px;
  animation: fadeInUp 0.6s var(--ease-out) backwards;
}
.hero-pill-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2s var(--ease-in-out) infinite;
}
.hero h1 {
  font-size: clamp(36px, 7vw, 68px); line-height: 1.08; font-weight: 900;
  letter-spacing: -0.04em; margin-bottom: 24px;
  animation: fadeInUp 0.6s 0.1s var(--ease-out) backwards;
}
.hero-desc {
  font-size: 18px; color: var(--text-secondary); margin: 0 auto 40px;
  max-width: 560px; line-height: 1.7;
  animation: fadeInUp 0.6s 0.2s var(--ease-out) backwards;
}
.hero-actions {
  display: flex; justify-content: center; gap: 14px; margin-bottom: 64px;
  animation: fadeInUp 0.6s 0.3s var(--ease-out) backwards;
}
.hero-trust {
  display: flex; justify-content: center; gap: 56px;
  animation: fadeInUp 0.6s 0.4s var(--ease-out) backwards;
}
.hero-trust-item { text-align: center; }
.hero-trust-value { font-size: 26px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; }
.hero-trust-label { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }

.hero-visual {
  max-width: 720px; margin: 60px auto 0;
  animation: fadeInUp 0.6s 0.5s var(--ease-out) backwards;
}
.hero-mock {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 80px rgba(99, 102, 241, 0.08);
}
.hero-mock-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px; font-weight: 600; color: var(--text-tertiary);
}
.hero-mock-dots { display: flex; gap: 6px; margin-right: 10px; }
.hero-mock-dots span { width: 10px; height: 10px; border-radius: 50%; }
.hero-mock-dots span:nth-child(1) { background: #ef4444; }
.hero-mock-dots span:nth-child(2) { background: #f59e0b; }
.hero-mock-dots span:nth-child(3) { background: #22c55e; }
.hero-mock-body { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-mock-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.hero-mock-avatar {
  width: 34px; height: 34px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.hero-mock-avatar.purple { background: var(--purple-subtle); color: var(--purple); }
.hero-mock-avatar.cyan { background: var(--cyan-subtle); color: var(--cyan); }
.hero-mock-avatar.green { background: var(--green-subtle); color: var(--green); }
.hero-mock-avatar.pink { background: var(--pink-subtle); color: var(--pink); }
.hero-mock-lines { flex: 1; }
.hero-mock-line { height: 6px; background: var(--border-strong); border-radius: 3px; margin-bottom: 5px; }
.hero-mock-line.short { width: 60%; }
.hero-mock-line.xs { width: 35%; }
.hero-mock-strength { width: 36px; height: 4px; border-radius: 2px; flex-shrink: 0; }
.hero-mock-strength.strong { background: var(--green); }
.hero-mock-strength.fair { background: var(--orange); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.6); }
}

/* ---- Features Section ---- */
.features {
  position: relative; z-index: 1;
  padding: 100px 0; border-top: 1px solid var(--border-subtle);
}
.section-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--accent-light); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 5vw, 40px); font-weight: 900;
  letter-spacing: -0.03em; margin-bottom: 14px;
}
.section-subtitle {
  color: var(--text-secondary); font-size: 16px;
  max-width: 500px; margin-bottom: 56px;
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 32px;
  cursor: default;
  transition: all var(--duration-slow) var(--ease-out);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity var(--duration-slow);
}
.feature-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.feature-card:hover::before { opacity: 1; }
.feature-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 18px;
  background: var(--accent-subtle); color: var(--accent-light);
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }

/* ---- CTA Section ---- */
.cta {
  position: relative; z-index: 1;
  padding: 100px 0; text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--accent-subtle), transparent);
  pointer-events: none;
}
.cta .container { position: relative; }
.cta h2 { font-size: clamp(28px, 5vw, 38px); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 14px; }
.cta p { color: var(--text-secondary); font-size: 16px; margin-bottom: 36px; }
.cta-stats { display: flex; justify-content: center; gap: 56px; margin-top: 44px; }
.cta-stat { text-align: center; }
.cta-stat-value { font-size: 28px; font-weight: 800; color: var(--accent-light); }
.cta-stat-label { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }

/* ---- Footer ---- */
.footer {
  position: relative; z-index: 1;
  padding: 36px 0; border-top: 1px solid var(--border-subtle);
}
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-secondary); }
.footer-brand p { color: var(--text-tertiary); font-size: 13px; margin-top: 2px; }
.footer-links { display: flex; gap: 28px; align-items: center; }
.footer-links a { color: var(--text-tertiary); font-size: 13px; }
.footer-links a:hover { color: var(--text-primary); }

/* =========================== AUTH PAGES =========================== */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; position: relative; overflow: hidden;
}
.auth-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.auth-bg::before {
  content: '';
  position: absolute; top: -300px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.1), transparent 70%);
}
.auth-card {
  width: 100%; max-width: 440px; position: relative; z-index: 1;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); padding: 44px;
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
  animation: fadeInUp 0.5s var(--ease-out);
}
.auth-logo { display: block; text-align: center; margin-bottom: 28px; color: var(--accent); }
.auth-card h1 {
  font-size: 26px; font-weight: 800; text-align: center;
  margin-bottom: 6px; letter-spacing: -0.03em;
}
.auth-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 32px; font-size: 14px; }
.auth-form .btn { margin-top: 10px; height: 48px; font-size: 15px; }
.auth-footer { text-align: center; margin-top: 28px; font-size: 14px; color: var(--text-secondary); }

/* =========================== DASHBOARD =========================== */
.dashboard { display: flex; min-height: calc(100vh - 64px); }

/* Sidebar */
.sidebar {
  width: 268px; min-width: 268px;
  background: var(--bg-surface); border-right: 1px solid var(--border-subtle);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: all var(--duration-fast);
}
.sidebar-link svg { flex-shrink: 0; color: var(--text-tertiary); }
.sidebar-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-link:hover svg { color: var(--text-secondary); }
.sidebar-link.active { background: var(--accent-subtle); color: var(--accent-light); }
.sidebar-link.active svg { color: var(--accent-light); }
.sidebar-count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--bg-elevated); padding: 2px 8px; border-radius: var(--radius-full);
  color: var(--text-tertiary); min-width: 22px; text-align: center;
}
.sidebar-link.active .sidebar-count { background: var(--accent); color: #fff; }
.sidebar-divider { height: 1px; background: var(--border-subtle); margin: 2px 0; }

.sidebar-section-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 800; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
  padding: 0 12px;
}
.category-list { display: flex; flex-direction: column; gap: 2px; }
.category-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  font-family: var(--font-sans); transition: all var(--duration-fast);
}
.category-item:hover { background: var(--bg-hover); }
.category-item.active { background: var(--accent-subtle); color: var(--accent-light); font-weight: 600; }
.category-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.category-count { margin-left: auto; font-size: 11px; color: var(--text-tertiary); }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 6px; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Stats Bar */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding: 20px 28px; border-bottom: 1px solid var(--border-subtle);
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 16px 18px;
  transition: all var(--duration-fast);
  cursor: default;
}
.stat-card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stat-card-icon {
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.stat-card-value { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.stat-card-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.stat-card-sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.stat-card.accent .stat-card-icon { background: var(--accent-subtle); color: var(--accent-light); }
.stat-card.good .stat-card-icon { background: var(--green-subtle); color: var(--green); }
.stat-card.warn .stat-card-icon { background: var(--orange-subtle); color: var(--orange); }
.stat-card.danger .stat-card-icon { background: var(--red-subtle); color: var(--red); }

/* Content Header */
.content-header {
  padding: 14px 28px; border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 14px;
}
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-sm); padding: 0 14px; flex: 1; max-width: 440px;
  transition: all var(--duration-fast);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.search-box svg { color: var(--text-tertiary); flex-shrink: 0; }
.search-box input {
  flex: 1; background: none; border: none; color: var(--text-primary);
  font-size: 14px; padding: 11px 0; outline: none; font-family: var(--font-sans);
}
.search-box input::placeholder { color: var(--text-placeholder); }
.search-shortcut {
  font-size: 10px; font-weight: 700; color: var(--text-tertiary);
  background: var(--bg-elevated); padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--border-subtle); letter-spacing: 0.04em;
}
.view-toggle {
  display: flex; background: var(--bg-input); border-radius: var(--radius-xs);
  border: 1px solid var(--border-default); overflow: hidden;
}
.view-toggle button {
  padding: 8px 12px; border: none; background: none; color: var(--text-tertiary);
  cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: all var(--duration-fast);
}
.view-toggle button:hover { color: var(--text-secondary); }
.view-toggle button.active { background: var(--accent); color: #fff; }

/* Content */
.entries-container { flex: 1; padding: 24px 28px; overflow-y: auto; }
.entries-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.entries-list { display: flex; flex-direction: column; gap: 1px; }

/* Entry Card */
.entry-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 20px;
  cursor: pointer; position: relative;
  transition: all var(--duration-fast);
}
.entry-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.entry-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.entry-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
  letter-spacing: -0.02em;
}
.entry-avatar.blue { background: rgba(99,102,241,0.15); color: var(--accent-light); }
.entry-avatar.purple { background: var(--purple-subtle); color: var(--purple); }
.entry-avatar.green { background: var(--green-subtle); color: var(--green); }
.entry-avatar.orange { background: var(--orange-subtle); color: var(--orange); }
.entry-avatar.cyan { background: var(--cyan-subtle); color: var(--cyan); }
.entry-avatar.pink { background: var(--pink-subtle); color: var(--pink); }
.entry-avatar.yellow { background: var(--yellow-subtle); color: var(--yellow); }

.entry-fav {
  background: none; border: none; color: var(--text-tertiary); cursor: pointer;
  font-size: 18px; padding: 4px; line-height: 1; border-radius: 4px; opacity: 0;
  position: absolute; top: 16px; right: 16px; transition: all var(--duration-fast);
}
.entry-card:hover .entry-fav { opacity: 1; }
.entry-fav.active { color: var(--yellow); opacity: 1; }
.entry-fav:hover { color: var(--yellow); background: var(--yellow-subtle); }

.entry-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; word-break: break-word; letter-spacing: -0.02em; }
.entry-username {
  font-size: 12px; color: var(--text-secondary); margin-bottom: 14px;
  word-break: break-word; font-family: var(--font-mono);
}
.entry-footer { display: flex; align-items: center; justify-content: space-between; }
.entry-meta { display: flex; align-items: center; gap: 8px; }
.entry-cat {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--bg-elevated); color: var(--text-tertiary);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.entry-actions-row { display: flex; gap: 6px; opacity: 0; transition: opacity var(--duration-fast); }
.entry-card:hover .entry-actions-row { opacity: 1; }
.entry-actions-row .btn { padding: 5px 10px; font-size: 11px; border-radius: 6px; }

/* List View */
.entry-row {
  display: grid; grid-template-columns: 2fr 1.5fr 1fr 0.8fr auto;
  align-items: center; gap: 16px; padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; transition: background var(--duration-fast);
}
.entry-row:hover { background: var(--bg-hover); }
.entry-row-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.entry-row-avatar {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.entry-row-user {
  font-size: 12px; color: var(--text-secondary);
  font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entry-row-cat { font-size: 11px; font-weight: 600; color: var(--text-tertiary); }
.entry-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.entry-row-actions button { opacity: 0.3; transition: opacity var(--duration-fast); }
.entry-row:hover .entry-row-actions button { opacity: 1; }

/* Trash */
.trash-badge {
  background: var(--orange-subtle); color: var(--orange);
  padding: 2px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.trash-info-bar {
  background: var(--orange-subtle); border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-sm); padding: 9px 16px; margin: 0; flex: 1;
  font-size: 12px; color: var(--text-secondary); display: none; align-items: center; justify-content: space-between;
}
.trash-info-bar strong { color: var(--orange); }

/* Empty State */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; text-align: center;
}
.empty-icon {
  width: 80px; height: 80px; border-radius: var(--radius-lg);
  background: var(--accent-subtle); display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: 20px;
}
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { height: 170px; border-radius: var(--radius-md); }
.skeleton-row { height: 48px; border-radius: 0; margin-bottom: 1px; }

/* =========================== MODALS =========================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(8px);
  animation: overlayIn 0.2s var(--ease-out);
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card-solid); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-subtle);
  backdrop-filter: blur(24px);
  animation: modalIn 0.3s var(--ease-spring);
}
.modal-sm { max-width: 420px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.modal-close-btn { font-size: 24px; width: 34px; height: 34px; border-radius: var(--radius-xs); }
.modal form { padding: 28px; }
.modal-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; border-top: 1px solid var(--border-subtle); margin-top: 8px;
}
.modal-actions-right { display: flex; gap: 10px; }

/* Generator */
.generator-body { padding: 28px; }
.generated-password {
  background: var(--bg-input); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 16px 20px;
  font-family: var(--font-mono); font-size: 18px; text-align: center;
  margin-bottom: 24px; word-break: break-all; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; letter-spacing: 0.02em; color: var(--green);
  cursor: pointer; transition: all var(--duration-fast);
}
.generated-password:hover { border-color: var(--accent); }
.generated-password.empty { color: var(--text-tertiary); }
.gen-options { margin-bottom: 24px; }
.gen-options input[type="range"] { width: 100%; accent-color: var(--accent); height: 4px; }
.gen-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.check-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 500;
  transition: background var(--duration-fast);
}
.check-label:hover { background: var(--bg-hover); }
.check-label input[type="checkbox"] {
  accent-color: var(--accent); width: 18px; height: 18px; cursor: pointer; border-radius: 4px;
}
.gen-actions { display: flex; gap: 10px; }

/* Confirm Dialog */
.confirm-body { padding: 28px; text-align: center; }
.confirm-body p { color: var(--text-secondary); margin-bottom: 24px; font-size: 14px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 4px; }
.history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--bg-elevated); border-radius: var(--radius-sm);
  font-size: 13px;
}
.history-date { color: var(--text-tertiary); font-size: 11px; }
.history-pw { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

/* Import Zone */
.import-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: 36px; text-align: center; cursor: pointer;
  background: var(--bg-input); transition: all var(--duration-fast);
}
.import-zone:hover, .import-zone.dragover {
  border-color: var(--accent); background: var(--accent-subtle);
}
.import-zone-icon { font-size: 40px; margin-bottom: 14px; }
.import-zone p { color: var(--text-secondary); font-size: 13px; }
.import-zone input[type="file"] { display: none; }

/* =========================== TOASTS =========================== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card-solid); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 14px 20px;
  color: var(--text-primary); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn 0.4s var(--ease-spring);
  min-width: 280px; max-width: 420px; pointer-events: auto;
  backdrop-filter: blur(24px);
}
.toast.success { border-color: rgba(34, 197, 94, 0.3); }
.toast.error { border-color: rgba(239, 68, 68, 0.3); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
@keyframes toastIn { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: translateX(0); } }
.toast-out { animation: toastOut 0.3s var(--ease-out) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(48px); } }

/* =========================== SETUP PAGE =========================== */
.setup-page { padding: 60px 0; }
.setup-page .container { max-width: 880px; }
.setup-hero { text-align: center; margin-bottom: 56px; }
.setup-hero h1 { font-size: 38px; font-weight: 900; letter-spacing: -0.04em; margin-bottom: 12px; }
.setup-hero p { color: var(--text-secondary); font-size: 16px; line-height: 1.6; max-width: 560px; margin: 0 auto; }
.setup-section { margin-bottom: 52px; }
.setup-section h2 {
  font-size: 24px; font-weight: 800; margin-bottom: 16px;
  letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px;
}
.setup-section h2::before {
  content: ''; width: 4px; height: 28px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--purple)); flex-shrink: 0;
}
.setup-section h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; }
.setup-section p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.setup-section ul, .setup-section ol { color: var(--text-secondary); font-size: 14px; line-height: 1.8; padding-left: 22px; margin-bottom: 14px; }
.setup-section li { margin-bottom: 4px; }
.setup-section strong { color: var(--text-primary); }
code.inline {
  background: var(--bg-elevated); color: var(--accent-light);
  padding: 2px 8px; border-radius: 4px; font-size: 13px;
  font-family: var(--font-mono); border: 1px solid var(--border-subtle);
}
.code-block {
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden;
}
.code-block-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px; background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px; font-weight: 700; color: var(--text-tertiary);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.code-block pre {
  padding: 16px 20px; margin: 0; overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.7; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-word;
}
.code-block pre .comment { color: var(--text-tertiary); }
.code-block pre .cmd { color: var(--green); }
.code-block pre .val { color: var(--orange); }
.setup-note {
  background: var(--accent-subtle); border: 1px solid rgba(99,102,241,0.15);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}
.setup-note strong { color: var(--accent-light); }
.setup-warning {
  background: var(--orange-subtle); border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}
.setup-warning strong { color: var(--orange); }
.setup-tip {
  background: var(--green-subtle); border: 1px solid rgba(34,197,94,0.15);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}
.setup-tip strong { color: var(--green); }

/* =========================== TOOLTIPS =========================== */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); color: var(--text-primary);
  font-size: 12px; padding: 5px 12px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; opacity: 0;
  transition: opacity var(--duration-fast); z-index: 500;
  border: 1px solid var(--border-strong);
  font-weight: 500; letter-spacing: -0.01em;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after { opacity: 1; }

/* =========================== COPY ANIMATION =========================== */
@keyframes copyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); color: var(--green); }
  100% { transform: scale(1); }
}
.copy-flash { animation: copyPulse 0.35s var(--ease-out); }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 1024px) {
  .hero h1 { font-size: clamp(32px, 8vw, 52px); }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .hero { padding: 72px 0 60px; }
  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 15px; }
  .hero-trust { gap: 32px; flex-wrap: wrap; }
  .hero-mock-body { grid-template-columns: 1fr; }
  .features { padding: 60px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .cta { padding: 60px 0; }
  .cta-stats { gap: 32px; }
  .footer-content { flex-direction: column; gap: 16px; text-align: center; }
  .dashboard { flex-direction: column; }
  .sidebar {
    width: 100%; min-width: 100%; flex-direction: row; flex-wrap: wrap;
    padding: 12px; gap: 8px; border-right: none; border-bottom: 1px solid var(--border-subtle);
  }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-section { display: none; }
  .sidebar-footer { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 14px 14px 16px; gap: 8px; }
  .entries-grid { grid-template-columns: 1fr; }
  .content-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .entries-container { padding: 14px; }
  .search-box { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .entry-row { grid-template-columns: 1fr; gap: 4px; padding: 14px; }
  .entry-row-user, .entry-row-cat { display: none; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .hero h1 { font-size: 28px; }
  .hero-trust-value { font-size: 20px; }
  .hero-mock { border-radius: var(--radius-lg); }
  .modal { border-radius: var(--radius-lg); }
  .modal form { padding: 20px; }
  .gen-checks { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   PREMIUM EFFECTS & FEATURES
   ============================================================ */

/* ---- Animated Background Mesh ---- */
.bg-mesh {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; opacity: 0.5;
}
.bg-mesh-orb {
  position: absolute; border-radius: 50%; filter: blur(120px);
  animation: orbFloat 20s ease-in-out infinite;
}
.bg-mesh-orb:nth-child(1) {
  width: 600px; height: 600px;
  background: rgba(99, 102, 241, 0.06); top: -200px; left: -100px;
  animation-delay: 0s;
}
.bg-mesh-orb:nth-child(2) {
  width: 500px; height: 500px;
  background: rgba(168, 85, 247, 0.05); bottom: -150px; right: -100px;
  animation-delay: -7s;
}
.bg-mesh-orb:nth-child(3) {
  width: 400px; height: 400px;
  background: rgba(6, 182, 212, 0.04); top: 50%; left: 50%;
  animation-delay: -14s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.1); }
  50% { transform: translate(-30px, 50px) scale(0.9); }
  75% { transform: translate(-50px, -30px) scale(1.05); }
}

/* ---- 3D Card Tilt ---- */
.tilt-card { transform-style: preserve-3d; perspective: 1000px; }
.tilt-card:hover { transition: transform 0.1s ease; }

/* ---- Ripple Effect ---- */
.ripple {
  position: relative; overflow: hidden;
}
.ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0); animation: ripple 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ---- Confetti ---- */
.confetti-piece {
  position: fixed; z-index: 9999; pointer-events: none;
  animation: confettiFall 1.5s ease-out forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0); opacity: 0; }
}

/* ---- Animated Border Gradient ---- */
.border-glow {
  position: relative;
}
.border-glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--purple), var(--cyan), var(--accent));
  background-size: 300% 300%; animation: borderGlow 3s ease infinite;
  z-index: -1; opacity: 0; transition: opacity 0.4s;
}
.border-glow:hover::before { opacity: 1; }
@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---- Strength Ring ---- */
.strength-ring {
  width: 44px; height: 44px; position: relative; flex-shrink: 0;
}
.strength-ring svg { transform: rotate(-90deg); }
.strength-ring-bg { fill: none; stroke: var(--border-strong); stroke-width: 4; }
.strength-ring-fill {
  fill: none; stroke-width: 4; stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease-out), stroke 0.4s;
}
.strength-ring-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}

/* ---- Entry Strength Badge ---- */
.strength-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.strength-badge.very-strong { background: var(--green-subtle); color: var(--green); }
.strength-badge.strong { background: rgba(34, 197, 94, 0.06); color: #16a34a; }
.strength-badge.fair { background: var(--orange-subtle); color: var(--orange); }
.strength-badge.weak { background: var(--red-subtle); color: var(--red); }

/* ---- Sort Bar ---- */
.sort-bar {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.sort-select {
  padding: 6px 28px 6px 10px; font-size: 12px; font-weight: 600;
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-xs); color: var(--text-secondary);
  cursor: pointer; font-family: var(--font-sans);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%239d9db5' stroke-width='2'%3E%3Cpath d='m3 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.sort-select:focus { outline: none; border-color: var(--accent); }

/* ---- Multi-Select Bar ---- */
.multiselect-bar {
  display: none; align-items: center; gap: 12px;
  background: var(--accent-subtle); border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-md); padding: 10px 18px; margin-bottom: 14px;
  animation: fadeInUp 0.25s var(--ease-out);
}
.multiselect-bar span { font-size: 13px; font-weight: 600; color: var(--accent-light); }
.multiselect-bar .btn { padding: 5px 12px; font-size: 12px; }

/* ---- Select Checkbox ---- */
.select-check {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border-strong); background: var(--bg-card);
  cursor: pointer; opacity: 0; transition: all var(--duration-fast);
  display: flex; align-items: center; justify-content: center;
}
.entry-card:hover .select-check, .entry-row:hover .select-check { opacity: 1; }
.select-check.checked { opacity: 1; background: var(--accent); border-color: var(--accent); }
.select-check.checked::after {
  content: ''; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -2px;
}

/* ---- Pinned Badge ---- */
.pinned-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; color: var(--accent-light);
  background: var(--accent-subtle); padding: 2px 8px; border-radius: var(--radius-full);
}
.pinned-indicator {
  position: absolute; top: -6px; right: -6px;
  color: var(--accent-light); font-size: 14px;
  filter: drop-shadow(0 0 4px var(--accent-glow));
}

/* ---- Welcome Banner ---- */
.welcome-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, var(--accent-subtle), transparent);
}
.welcome-greeting { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.welcome-greeting span { color: var(--accent-light); }
.welcome-meta { font-size: 12px; color: var(--text-tertiary); display: flex; gap: 16px; }
.welcome-meta strong { color: var(--text-secondary); }

/* ---- Animated Counter ---- */
.counter-animate { transition: all 0.3s var(--ease-out); }

/* ---- Density Toggle ---- */
.density-toggle { display: flex; gap: 2px; }
.density-toggle button {
  padding: 5px 10px; border: 1px solid var(--border-default); background: var(--bg-input);
  color: var(--text-tertiary); cursor: pointer; font-size: 12px; font-family: var(--font-sans);
  transition: all var(--duration-fast);
}
.density-toggle button:first-child { border-radius: var(--radius-xs) 0 0 var(--radius-xs); }
.density-toggle button:last-child { border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.density-toggle button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Entry Card Gradient Accent ---- */
.entry-card.accent-top::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 2px;
  border-radius: 1px; opacity: 0; transition: opacity var(--duration-slow);
}
.entry-card:hover.accent-top::before { opacity: 1; }
.entry-card.strong-pw.accent-top::before { background: var(--green); }
.entry-card.weak-pw.accent-top::before { background: var(--orange); }
.entry-card.old-pw.accent-top::before { background: var(--red); }

/* ---- Spotlight hover ---- */
.spotlight {
  position: relative; overflow: hidden;
}
.spotlight::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.04) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* ---- Shake on delete ---- */
@keyframes deleteShake {
  0%, 100% { transform: translateX(0); opacity: 1; }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); opacity: 0.6; }
  75% { transform: translateX(-2px); }
}
.shake-out { animation: deleteShake 0.4s ease forwards; }

/* ---- Pulse dot ---- */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
  animation: pulseDot 2s var(--ease-in-out) infinite;
}
.pulse-dot.green { background: var(--green); }
.pulse-dot.orange { background: var(--orange); }

/* ---- Status indicator ---- */
.status-online {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--green);
}

/* ---- Quick Actions Menu ---- */
.quick-actions {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg-card-solid); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: 6px; z-index: 50;
  box-shadow: var(--shadow-lg); min-width: 160px;
  animation: fadeInUp 0.15s var(--ease-out);
  display: none;
}
.quick-actions.show { display: block; }
.quick-actions button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border: none; background: none;
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  border-radius: var(--radius-xs); font-family: var(--font-sans);
  transition: all var(--duration-fast);
}
.quick-actions button:hover { background: var(--bg-hover); color: var(--text-primary); }
.quick-actions button.danger { color: var(--red); }
.quick-actions button.danger:hover { background: var(--red-subtle); }

/* ---- Scale-in animation ---- */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 0.3s var(--ease-spring); }

/* ---- Float animation for empty state ---- */
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-anim { animation: floatUpDown 3s ease-in-out infinite; }

/* ---- Drag ghost ---- */
.drag-ghost { opacity: 0.6; border: 2px dashed var(--accent) !important; }

/* ---- Better focus ring ---- */
.focus-ring:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs);
}