:root {
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --amber-dim: rgba(245, 158, 11, 0.1);
  --orange: #e87b35;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --blue-dim: rgba(37, 99, 235, 0.08);
  --success: #10b981;
  --danger: #ef4444;
  --cream: #fffcf7;
  --sand: #fff8ed;
  --surface: #fefbf6;
  --surface-2: #f9f5ef;
  --surface-3: #f3ede4;
  --border: #e8e0d4;
  --muted: #9c8e7c;
  --text: #3d3427;
  --text-dark: #1f1a12;
  --font-display: "Clash Display", system-ui, sans-serif;
  --font-body: "General Sans", system-ui, sans-serif;
  --shadow: 0 8px 32px rgba(31, 26, 18, 0.1), 0 2px 8px rgba(31, 26, 18, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.ambient-amber { width: 520px; height: 520px; top: -120px; right: -120px; background: rgba(245, 158, 11, 0.12); }
.ambient-blue { width: 420px; height: 420px; bottom: 5%; left: -120px; background: rgba(37, 99, 235, 0.08); }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  padding: 0 clamp(18px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 252, 247, 0.86);
  border-bottom: 1px solid #f0eae0;
  backdrop-filter: blur(20px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 20px 56px;
  text-align: center;
  position: relative;
}
.hero-badge, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--amber-dim);
  color: #92400e;
  font-weight: 700;
  font-size: 13px;
}
.badge-amber { color: #b45309; }
.hero h1, .dashboard h1 {
  margin: 16px 0 12px;
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.08;
}
.hero h1 { font-size: clamp(40px, 7vw, 68px); }
.hero h1 span {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  max-width: 510px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 18px;
}
.star-deco {
  position: absolute;
  color: var(--amber);
  opacity: 0.55;
  font-size: 30px;
}
.star-one { left: 8%; top: 18%; }
.star-two { right: 10%; top: 34%; font-size: 22px; }
.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #f0eae0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.login-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px;
  text-align: left;
}
label { display: grid; gap: 7px; margin-bottom: 16px; font-size: 13px; font-weight: 700; }
input, textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  background: white;
  color: var(--text-dark);
  outline: none;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--blue-light); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
.hint { margin: -4px 0 18px; color: var(--muted); font-size: 13px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  background: white;
  color: var(--text);
  font-weight: 700;
}
.btn-primary { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2); }
.btn-warm { background: linear-gradient(135deg, var(--amber), var(--orange)); border: 0; color: white; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.full { width: 100%; }
.left { justify-content: flex-start; }
.alert { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.danger { background: rgba(239, 68, 68, 0.08); color: #b91c1c; }
.dashboard {
  max-width: 980px;
  margin: 0 auto;
  padding: 42px 20px 72px;
}
.dashboard.narrow { max-width: 560px; }
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.dashboard-header h1 { font-size: 30px; margin: 0; }
.dashboard-header p { margin: 4px 0 0; color: var(--muted); }
.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.search { margin: 0 0 18px; }
.search input { background: var(--surface); border-color: #f0eae0; }
.pw-list { display: grid; gap: 9px; }
.pw-item {
  overflow: hidden;
  border: 1.5px solid #f0eae0;
  border-radius: 16px;
  background: white;
}
.pw-item.open { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-dim), 0 2px 8px rgba(31, 26, 18, 0.06); }
.pw-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: white;
  border: 0;
  text-align: left;
}
.pw-info { display: flex; align-items: center; gap: 12px; }
.favicon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  font-weight: 800;
}
.org { color: var(--text-dark); font-weight: 800; }
.user { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pw-body { display: none; padding: 0 18px 18px; }
.open .pw-body { display: block; }
.pw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-full { grid-column: 1 / -1; }
.field-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.field-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dark);
  word-break: break-word;
}
.masked { letter-spacing: 0.12em; color: var(--muted); }
.pw-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0eae0; }
.empty-state {
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state div { font-size: 34px; color: var(--amber); }
.empty-state h2 { color: var(--text-dark); font-family: var(--font-display); }
.option-stack { display: grid; gap: 10px; padding: 20px; margin-bottom: 18px; }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 13, 8, 0.42);
  backdrop-filter: blur(6px);
}
.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.modal-header, .modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 20px;
}
.modal-header h2 { margin: 0; font-family: var(--font-display); color: var(--text-dark); }
.modal-body { padding: 0 20px 20px; }
.modal-footer { justify-content: flex-end; border-top: 1px solid #f0eae0; }
.generator-output {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  word-break: break-all;
  color: var(--text-dark);
  font-weight: 700;
}
@media (max-width: 720px) {
  .nav { padding: 0 16px; }
  .nav-user, #vault-count { display: none !important; }
  .dashboard-header { align-items: flex-start; flex-direction: column; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .btn { flex: 1; }
  .pw-fields { grid-template-columns: 1fr; }
}
