:root {
  --bg: #070b12;
  --bg-2: #0b111b;
  --panel: rgba(15, 23, 36, 0.88);
  --panel-solid: #101925;
  --panel-soft: #141f2e;
  --line: rgba(157, 181, 211, 0.15);
  --line-strong: rgba(79, 148, 255, 0.38);
  --text: #eef5ff;
  --muted: #91a1b6;
  --blue: #2f8cff;
  --blue-2: #78b9ff;
  --cyan: #4bd6ff;
  --green: #3fd59d;
  --yellow: #f7c66a;
  --red: #ff6c7d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(47, 140, 255, 0.12), transparent 32%),
    radial-gradient(circle at 86% 82%, rgba(75, 214, 255, 0.08), transparent 28%),
    linear-gradient(145deg, #06090f 0%, #09111c 48%, #070b12 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(47, 140, 255, 0.35); }

.ambient {
  position: fixed;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(76, 145, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(0.2px);
  z-index: 0;
}
.ambient::before, .ambient::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(76, 145, 255, 0.06);
  border-radius: inherit;
}
.ambient::after { inset: 31%; }
.ambient--one { top: -250px; right: -110px; }
.ambient--two { left: -280px; bottom: -280px; }

.access-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(360px, 1fr);
  align-items: center;
  gap: 60px;
}
.access-card {
  min-height: 650px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(16, 25, 38, 0.96), rgba(8, 13, 21, 0.96));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter: blur(24px);
}
.access-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.access-logo { width: 182px; max-width: 58%; height: auto; display: block; }
.version-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}
.access-step { animation: rise .35s ease both; }
.eyebrow, .aside-kicker, .dialog-kicker {
  color: var(--blue-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px rgba(63,213,157,.7); }
.access-card h1 { margin: 18px 0 12px; font-size: clamp(32px, 4vw, 48px); line-height: 1.03; letter-spacing: -.04em; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 15px; line-height: 1.75; }

.btn {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: wait; opacity: .55; transform: none; }
.btn--wide { width: 100%; min-height: 50px; }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #2579ff, #39a4ff);
  box-shadow: 0 10px 28px rgba(37, 121, 255, .25), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary:hover { background: linear-gradient(135deg, #3688ff, #4cb1ff); }
.btn--ghost { color: #c9d8ec; border-color: var(--line); background: rgba(255,255,255,.025); }
.btn--ghost:hover { border-color: var(--line-strong); background: rgba(47,140,255,.08); }
.btn--google { color: #f5f8fc; border-color: rgba(136, 169, 209, .2); background: #101a28; }
.btn--google:hover { border-color: rgba(79,148,255,.5); background: #132135; }
.btn--danger { color: #ffd7dc; border-color: rgba(255,108,125,.24); background: rgba(255,108,125,.1); }
.btn--small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.google-g {
  width: 22px; height: 22px; display: inline-grid; place-items: center;
  color: #fff; background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  border-radius: 50%; font-weight: 900; font-size: 12px;
}
.inline-state { min-height: 20px; margin: 12px 0 24px; color: var(--muted); font-size: 12px; text-align: center; }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.security-tile { padding: 15px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.security-tile strong { display: block; margin-bottom: 6px; font-size: 12px; color: #dceaff; }
.security-tile span { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }

.verified-line { display: inline-flex; align-items: center; gap: 8px; color: #b9dfcf; font-size: 12px; }
.verified-check { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(63,213,157,.14); color: var(--green); }
.vault-orbit { position: relative; width: 104px; height: 104px; margin: 26px auto 20px; display: grid; place-items: center; }
.vault-orbit__ring { position: absolute; inset: 0; border: 1px solid rgba(47,140,255,.34); border-radius: 50%; box-shadow: 0 0 40px rgba(47,140,255,.1), inset 0 0 30px rgba(47,140,255,.06); animation: slowspin 14s linear infinite; }
.vault-orbit__ring::after { content: ""; position: absolute; width: 8px; height: 8px; top: -4px; left: 50%; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.vault-orbit img { width: 66px; height: 66px; object-fit: contain; }
#master-title { text-align: center; }
#master-subtitle { text-align: center; }
.field-label, .field label { display: block; margin: 0 0 8px; color: #bdcbe0; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #0b131f;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input, select { height: 44px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus { border-color: rgba(47,140,255,.6); box-shadow: 0 0 0 3px rgba(47,140,255,.1); background: #0d1724; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7790ad 50%), linear-gradient(135deg, #7790ad 50%, transparent 50%); background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.secret-field { position: relative; }
.secret-field input { padding-right: 48px; }
.field-icon-btn { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
#master-confirm-group { margin-top: 14px; }
.master-strength { margin: 12px 0 4px; }
.master-strength span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.strength-track { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.strength-bar { width: 0; height: 100%; border-radius: inherit; background: var(--red); transition: width .2s ease, background .2s ease; }
.strength-bar[data-level="medium"] { background: var(--yellow); }
.strength-bar[data-level="strong"] { background: var(--green); }
.field-error { min-height: 20px; margin: 9px 0 5px; color: #ff95a2; font-size: 12px; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: var(--blue-2); cursor: pointer; font-size: 12px; }
.text-button--danger { color: #ff91a0; }
#back-google-btn { display: block; margin: 12px auto 0; }
.zero-knowledge-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: #6f8199; font-size: 10px; line-height: 1.6; text-align: center; }

.access-aside { padding: 20px 0; }
.access-aside h2 { max-width: 620px; margin: 20px 0 16px; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.access-aside > p { max-width: 610px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.aside-board { margin-top: 42px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; transform: perspective(900px) rotateX(4deg) rotateY(-5deg); transform-origin: center; }
.mini-column { min-height: 190px; padding: 14px; border: 1px solid rgba(130,158,194,.15); border-radius: 14px; background: linear-gradient(180deg, rgba(21,32,47,.9), rgba(10,16,25,.85)); box-shadow: 0 20px 40px rgba(0,0,0,.24); }
.mini-column span { display: block; margin-bottom: 16px; color: #bed0e6; font-size: 11px; font-weight: 700; }
.mini-column i { display: block; height: 46px; margin-bottom: 9px; border: 1px solid rgba(96,132,178,.13); border-radius: 9px; background: linear-gradient(90deg, rgba(47,140,255,.12), rgba(255,255,255,.02)); }
.aside-footer { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 18px; color: #5f748f; font-size: 9px; letter-spacing: .14em; }

.app-screen { position: relative; z-index: 1; min-height: 100vh; padding-bottom: 40px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; padding: 0 28px;
  display: grid; grid-template-columns: 210px minmax(260px, 620px) 1fr; align-items: center; gap: 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, .82);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; }
.brand img { width: 140px; height: auto; display: block; }
.search-box { height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); color: var(--muted); }
.search-box:focus-within { border-color: rgba(47,140,255,.5); box-shadow: 0 0 0 3px rgba(47,140,255,.08); }
.search-box input { height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.search-box input:focus { box-shadow: none; background: transparent; }
kbd { margin-left: auto; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: #6f829b; background: #0a111b; font-size: 10px; }
.topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); cursor: pointer; }
.icon-button:hover { border-color: var(--line-strong); background: rgba(47,140,255,.07); }
.icon-button--lock { color: var(--blue-2); }
.sync-chip { min-width: 95px; height: 34px; padding: 0 11px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 10px; cursor: pointer; }
.sync-chip:hover { border-color: var(--line-strong); }
.sync-chip span { width: 7px; height: 7px; border-radius: 50%; background: #708198; }
.sync-chip--syncing span { background: var(--yellow); animation: pulse 1s ease infinite; }
.sync-chip--saving span, .sync-chip--pending span { background: var(--yellow); animation: pulse 1s ease infinite; }
.sync-chip--saving, .sync-chip--pending { color: #f1d793; border-color: rgba(244,185,94,.22); }
.sync-chip--synced { color: #a9d7c4; border-color: rgba(63,213,157,.18); }
.sync-chip--synced span { background: var(--green); box-shadow: 0 0 10px rgba(63,213,157,.5); }
.sync-chip--error { color: #ffc0c7; border-color: rgba(255,108,125,.22); }
.sync-chip--error span { background: var(--red); }

.workspace-head { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 36px 0 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.workspace-head h1 { margin: 8px 0 5px; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.045em; }
.workspace-head p { margin: 0; color: var(--muted); font-size: 13px; }
.workspace-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.filter-strip { width: min(1500px, calc(100% - 48px)); min-height: 42px; margin: 0 auto 14px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-strip::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; font-size: 11px; }
.filter-chip:hover, .filter-chip.is-active { color: #e9f3ff; border-color: rgba(47,140,255,.4); background: rgba(47,140,255,.1); }
.filter-chip i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--chip-color, var(--blue)); }

.vault-board { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 6px 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; gap: 14px; }
.vault-column { min-width: 0; min-height: 230px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(16,25,38,.9), rgba(10,16,25,.84)); box-shadow: 0 18px 38px rgba(0,0,0,.16); overflow: hidden; }
.vault-column.is-dragover { border-color: rgba(47,140,255,.7); box-shadow: 0 0 0 3px rgba(47,140,255,.1), 0 18px 38px rgba(0,0,0,.2); }
.column-head { height: 60px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.column-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(47,140,255,.24); border-radius: 9px; background: rgba(47,140,255,.08); color: var(--blue-2); }
.column-title { min-width: 0; flex: 1; }
.column-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.column-title span { color: var(--muted); font-size: 10px; }
.column-actions { display: flex; gap: 3px; }
.column-actions button { width: 29px; height: 29px; border: 0; border-radius: 7px; background: transparent; color: #70849e; cursor: pointer; }
.column-actions button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.column-body { min-height: 150px; padding: 10px; }
.column-empty { min-height: 126px; display: grid; place-items: center; border: 1px dashed rgba(121,151,188,.14); border-radius: 11px; color: #64758b; font-size: 11px; text-align: center; }
.column-add { width: calc(100% - 20px); min-height: 34px; margin: 0 10px 10px; border: 1px dashed rgba(121,151,188,.15); border-radius: 9px; background: transparent; color: #778aa2; cursor: pointer; font-size: 11px; }
.column-add:hover { color: var(--blue-2); border-color: rgba(47,140,255,.38); background: rgba(47,140,255,.05); }

.credential-card { position: relative; margin-bottom: 8px; padding: 12px; border: 1px solid rgba(141,169,204,.12); border-radius: 12px; background: linear-gradient(140deg, rgba(23,35,52,.88), rgba(13,21,33,.95)); cursor: grab; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.credential-card:hover { transform: translateY(-1px); border-color: rgba(79,148,255,.28); box-shadow: 0 12px 24px rgba(0,0,0,.16); }
.credential-card:active { cursor: grabbing; }
.credential-card.is-dragging { opacity: .45; transform: scale(.98); }
.card-main { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.card-logo { width: 42px; height: 42px; overflow: hidden; display: grid; place-items: center; border: 1px solid rgba(146,175,211,.14); border-radius: 11px; background: #0a111b; color: var(--blue-2); font-weight: 800; }
.card-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.card-copy { min-width: 0; }
.card-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.card-copy span { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.card-edit { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #71849d; cursor: pointer; }
.card-edit:hover { background: rgba(255,255,255,.05); color: var(--text); }
.card-bottom { margin-top: 10px; display: flex; align-items: center; gap: 7px; }
.category-badge { max-width: 130px; padding: 4px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--badge-color) 26%, transparent); border-radius: 999px; color: color-mix(in srgb, var(--badge-color) 70%, white); background: color-mix(in srgb, var(--badge-color) 10%, transparent); font-size: 9px; }
.card-actions { margin-left: auto; display: flex; gap: 4px; }
.card-actions button { min-height: 27px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.02); color: #91a4bb; cursor: pointer; font-size: 9px; }
.card-actions button:hover { color: #eaf4ff; border-color: rgba(47,140,255,.35); background: rgba(47,140,255,.07); }

.empty-vault { width: min(720px, calc(100% - 48px)); margin: 70px auto; padding: 52px 30px; border: 1px dashed rgba(107,146,193,.22); border-radius: 20px; text-align: center; background: rgba(13,21,33,.55); }
.empty-vault img { width: 76px; height: 76px; object-fit: contain; opacity: .8; }
.empty-vault h2 { margin: 14px 0 8px; }
.empty-vault p { margin: 0 0 22px; color: var(--muted); }

.dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 30px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--text);
  border: 1px solid rgba(121,153,194,.22);
  border-radius: 18px;
  background: linear-gradient(150deg, #111b29, #090f18);
  box-shadow: 0 32px 100px rgba(0,0,0,.62);
}
.dialog::backdrop { background: rgba(3,6,10,.76); backdrop-filter: blur(9px); }
.dialog > form, .dialog > .dialog-content { padding: 24px; }
.dialog--small { width: min(440px, calc(100% - 24px)); padding: 24px; }
.dialog--category, .dialog--settings { padding: 24px; }
.dialog--settings { width: min(760px, calc(100% - 24px)); }
.dialog-head { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.03em; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; font-size: 22px; }
.logo-editor { margin-bottom: 22px; padding: 14px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.logo-preview { flex: 0 0 70px; width: 70px; height: 70px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: #0a111b; color: var(--blue-2); font-size: 24px; font-weight: 800; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-editor p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field--span-2 { grid-column: span 2; }
.inline-select { display: grid; grid-template-columns: 1fr 44px; gap: 7px; }
.inline-select button { border: 1px solid var(--line); border-radius: 10px; background: rgba(47,140,255,.08); color: var(--blue-2); cursor: pointer; font-size: 20px; }
.password-editor { display: grid; grid-template-columns: 1fr 44px 68px; gap: 7px; }
.password-editor button { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 11px; }
.password-editor + .strength-track { margin-top: 8px; }
.dialog-actions { margin-top: 24px; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 9px; }

.category-create { display: grid; grid-template-columns: 1fr 48px auto; gap: 9px; }
.category-create input[type="color"] { padding: 4px; cursor: pointer; }
.category-list { margin-top: 16px; display: grid; gap: 8px; }
.category-row { min-height: 48px; padding: 0 10px 0 12px; display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); }
.category-row i { width: 10px; height: 10px; border-radius: 50%; background: var(--category-color); box-shadow: 0 0 12px color-mix(in srgb, var(--category-color) 45%, transparent); }
.category-row span { font-size: 12px; }
.category-row button { border: 0; background: transparent; color: #ff91a0; cursor: pointer; font-size: 11px; }

.settings-section { padding: 18px 0; border-top: 1px solid var(--line); }
.settings-section h3 { margin: 0 0 8px; font-size: 14px; }
.settings-section p { margin: 0 0 13px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.settings-grid label { color: #bfcde0; font-size: 11px; }
.settings-grid select { margin-top: 7px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.drive-map { padding: 14px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 11px; background: #080e16; }
.drive-map code { color: #b9d9ff; font-size: 11px; }
.drive-map code span { color: #657a95; }
.fine-print { margin-top: 12px !important; color: #6f8198 !important; }
.settings-footer { padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.toast-area { position: fixed; z-index: 1000; top: 18px; right: 18px; width: min(360px, calc(100% - 36px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(14,23,35,.96); box-shadow: 0 16px 42px rgba(0,0,0,.34); color: #dce9f9; font-size: 12px; opacity: 0; transform: translateY(-8px); transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast--success { border-color: rgba(63,213,157,.25); }
.toast--error { border-color: rgba(255,108,125,.3); }
.toast--warning { border-color: rgba(247,198,106,.3); }

.busy-overlay { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: rgba(3,6,10,.74); backdrop-filter: blur(8px); }
.busy-card { min-width: 260px; padding: 25px; display: grid; justify-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 16px; background: #0d1622; box-shadow: var(--shadow); text-align: center; }
.busy-card b { font-size: 13px; }
.busy-card small { color: var(--muted); font-size: 10px; }
.spinner { width: 30px; height: 30px; margin-bottom: 5px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slowspin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .access-shell { grid-template-columns: 1fr; width: min(620px, calc(100% - 28px)); gap: 20px; padding: 24px 0; }
  .access-aside { display: none; }
  .access-card { min-height: auto; }
  .topbar { grid-template-columns: 150px 1fr auto; padding: 0 16px; gap: 12px; }
  .brand img { width: 125px; }
  .sync-chip { min-width: auto; }
  .sync-chip b { display: none; }
  .workspace-head { align-items: flex-start; flex-direction: column; }
  .workspace-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .access-card { padding: 24px 20px; border-radius: 22px; }
  .access-brand { margin-bottom: 30px; }
  .security-grid { grid-template-columns: 1fr; }
  .security-tile { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; }
  .security-tile strong { margin: 0; }
  .topbar { height: auto; min-height: 68px; grid-template-columns: 1fr auto; }
  .search-box { grid-column: 1 / -1; grid-row: 2; margin-bottom: 10px; }
  .topbar-actions { grid-column: 2; grid-row: 1; }
  .brand { grid-column: 1; grid-row: 1; }
  .workspace-head, .filter-strip, .vault-board { width: min(100% - 24px, 1500px); }
  .workspace-head { padding-top: 26px; }
  .workspace-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .workspace-actions #add-entry-btn { grid-column: span 2; }
  .vault-board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
  }
  .vault-board::-webkit-scrollbar { display: none; }
  .vault-column {
    flex: 0 0 calc(100vw - 36px);
    scroll-snap-align: start;
  }
  .form-grid { grid-template-columns: 1fr; }
  .field--span-2 { grid-column: auto; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions > span { display: none; }
  .dialog-actions .btn { width: 100%; }
  .category-create { grid-template-columns: 1fr 44px; }
  .category-create .btn { grid-column: span 2; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .access-shell { width: calc(100% - 18px); }
  .access-card { padding: 21px 16px; }
  .access-card h1 { font-size: 34px; }
  .workspace-actions { grid-template-columns: 1fr; }
  .workspace-actions #add-entry-btn { grid-column: auto; }
  .password-editor { grid-template-columns: 1fr 42px; }
  .password-editor #generate-password-btn { grid-column: span 2; min-height: 38px; }
  .logo-editor { align-items: flex-start; }
  .card-bottom { align-items: flex-end; }
  .card-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
