:root {
  --vault-navy: #0b1930;
  --vault-blue: #4357ed;
  --vault-purple: #744fea;
  --vault-green: #0fa875;
  --vault-red: #dc3f56;
  --vault-amber: #d58a10;
  --vault-line: #e1e7f2;
  --vault-muted: #71809a;
  --vault-panel: #f4f7fc;
}

.vault-menu-link > span {
  display: grid;
  place-items: center;
  color: #5a55ea;
}

.vault-menu-link > span svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vault-menu-link::after {
  content: "PRIVATE";
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #635bff, #8a4df2);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.vault-dialog {
  width: min(760px, calc(100vw - 28px));
  max-width: 760px;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: #f7f9fd;
  color: #111a2e;
  box-shadow: 0 30px 90px rgba(20, 27, 62, .34);
  overflow: hidden;
}

.vault-dialog::backdrop,
.vault-detail-dialog::backdrop,
.vault-editor::backdrop {
  background: rgba(13, 19, 43, .56);
  backdrop-filter: blur(7px);
}

.vault-main-form {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: min(900px, calc(100dvh - 30px));
  margin: 0;
  background: linear-gradient(180deg, #fbfcff, #f5f8fd);
}

.vault-appbar {
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 13px 18px;
  border-bottom: 1px solid var(--vault-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
}

.vault-brand,
.vault-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.vault-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 13px;
  background: linear-gradient(145deg, #1bd1a3, #3972f5);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(48, 108, 221, .2);
}

.vault-brand span:last-child,
.vault-user span {
  min-width: 0;
}

.vault-brand b,
.vault-brand small,
.vault-user b,
.vault-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-brand b {
  font-size: 14px;
}

.vault-brand small,
.vault-user small {
  margin-top: 2px;
  color: var(--vault-muted);
  font-size: 9px;
}

.vault-user {
  text-align: right;
}

.vault-user b {
  max-width: 150px;
  font-size: 11px;
}

.vault-user i {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 50%;
  background: #e9eafe center / cover no-repeat;
  color: #4c54d9;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.vault-user i.has-photo {
  color: transparent;
}

.vault-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #edf1f8;
  color: #27334d;
  font-size: 23px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.vault-close:hover {
  background: #e4e9f3;
  transform: translateY(-1px);
}

.vault-shell {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 17px 20px 14px;
}

.vault-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.vault-title-shield {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 15px;
  background: linear-gradient(145deg, #e7ebff, #eee8ff);
  color: #5652df;
}

.vault-title-shield svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vault-title-row h2 {
  margin: 0 0 2px;
  font-size: 24px;
  line-height: 1.05;
}

.vault-title-row p {
  margin: 0;
  color: var(--vault-muted);
  font-size: 10px;
}

.vault-protected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #bfe9da;
  border-radius: 999px;
  background: #eafaf4;
  color: #087b58;
  font-size: 9px;
  font-weight: 900;
}

.vault-protected i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #13b987;
  box-shadow: 0 0 0 4px rgba(19, 185, 135, .12);
}

.vault-health {
  margin-top: 13px;
  padding: 12px 14px;
  border: 1px solid #dfe6f2;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 47, 90, .05);
}

.vault-health-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vault-health-copy span {
  color: #38455d;
  font-size: 11px;
  font-weight: 850;
}

.vault-health-copy strong {
  font-size: 19px;
}

.vault-health-track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edf5;
}

.vault-health-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #18b985, #52d6aa);
  transition: width .3s ease;
}

.vault-health-track i[data-level="fair"] {
  background: linear-gradient(90deg, #f0aa29, #ffd061);
}

.vault-health-track i[data-level="weak"] {
  background: linear-gradient(90deg, #e74a5d, #ff8592);
}

.vault-health > p {
  margin: 6px 0 0;
  color: var(--vault-muted);
  font-size: 9px;
}

.vault-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #ebeff6;
}

.vault-stats > div {
  padding: 0 9px;
  border-right: 1px solid #e8edf5;
  text-align: center;
}

.vault-stats > div:first-child {
  padding-left: 0;
}

.vault-stats > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.vault-stats b,
.vault-stats span {
  display: block;
}

.vault-stats b {
  font-size: 15px;
  line-height: 1;
}

.vault-stats span {
  margin-top: 4px;
  color: var(--vault-muted);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.vault-stats .strong b {
  color: var(--vault-green);
}

.vault-stats .weak b,
.vault-stats .reused b {
  color: var(--vault-red);
}

.vault-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.vault-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid #dce3ef;
  border-radius: 13px;
  background: #fff;
}

.vault-search svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #7b879d;
  stroke-width: 2;
}

.vault-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17213a;
  font: inherit;
  font-size: 16px;
}

.vault-add-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--vault-blue), var(--vault-purple));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(66, 79, 225, .18);
}

.vault-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 9px 0 11px;
}

.vault-filters button {
  min-width: 0;
  min-height: 31px;
  padding: 0 8px;
  border: 1px solid #dfe5f0;
  border-radius: 999px;
  background: #fff;
  color: #65728a;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.vault-filters button.active {
  border-color: #5863ed;
  background: #edf0ff;
  color: #4551df;
}

.vault-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.vault-category {
  position: relative;
  min-width: 0;
  border: 1px solid #dfe6f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 7px 20px rgba(27, 41, 79, .05);
}

.vault-category-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 9px 11px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #17213a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.vault-category-head:hover {
  background: #f8faff;
}

.vault-category-head:focus-visible {
  outline: 3px solid rgba(75, 88, 237, .2);
  outline-offset: -3px;
}

.vault-category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #edf0ff;
  color: #4f58dd;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.vault-category-icon.google {
  background: linear-gradient(145deg, #e7f0ff, #f1edff);
  color: #3f63d9;
}

.vault-category-icon.banks {
  background: linear-gradient(145deg, #e4f9ef, #eafbf7);
  color: #087b5a;
}

.vault-category-icon.social {
  background: linear-gradient(145deg, #f1e9ff, #f7edff);
  color: #7b43ce;
}

.vault-category-icon.business {
  background: linear-gradient(145deg, #fff1db, #fff8e8);
  color: #aa6810;
}

.vault-category-icon.shopping {
  background: linear-gradient(145deg, #ffe9ef, #fff1f4);
  color: #c43c61;
}

.vault-category-icon.other {
  background: linear-gradient(145deg, #eaf0f7, #f3f6fa);
  color: #5d6d83;
}

.vault-category-copy {
  min-width: 0;
}

.vault-category-copy b,
.vault-category-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-category-copy b {
  font-size: 13px;
  font-weight: 900;
}

.vault-category-copy small {
  margin-top: 2px;
  color: #7a879d;
  font-size: 8px;
  font-weight: 650;
}

.vault-category-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #e0e5f0;
  border-radius: 999px;
  background: #f4f7fb;
  color: #657289;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.vault-category-chevron {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #f2f5fa;
  color: #5e6b81;
}

.vault-category-chevron svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.vault-category-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  padding: 0 10px 10px;
}

.vault-category.is-collapsed .vault-category-chevron svg {
  transform: rotate(-90deg);
}

.vault-category.is-collapsed .vault-category-items {
  display: none;
}

.vault-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 9px 10px 11px;
  border: 1px solid #e0e6f1;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(27, 41, 79, .04);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.vault-card:hover {
  border-color: #cdd5e8;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(27, 41, 79, .07);
}

.vault-card:focus-visible {
  outline: 3px solid rgba(75, 88, 237, .22);
  outline-offset: 2px;
  border-color: #737cf0;
}

.vault-service-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #e7ebff, #eee6ff);
  color: #5049d8;
  font-size: 11px;
  font-weight: 950;
}

.vault-card-main {
  min-width: 0;
}

.vault-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.vault-card-title b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.vault-login-name {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #75829a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-strength {
  display: inline-flex;
  flex: none;
  padding: 2px 5px;
  border-radius: 999px;
  background: #eef2f7;
  color: #68758b;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.vault-strength.strong {
  background: #e8f9f2;
  color: #07805b;
}

.vault-strength.weak,
.vault-strength.reused {
  background: #fff0f2;
  color: #c82d45;
}

.vault-strength.fair {
  background: #fff6df;
  color: #9a6810;
}

.vault-card-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 5px;
}

.vault-card-preview > span:last-child {
  flex: none;
  color: #5963df;
  font-size: 8px;
  font-weight: 850;
}

.vault-card-preview > span:last-child b {
  display: inline-block;
  margin-left: 2px;
  transition: transform .18s ease;
}

.vault-card:hover .vault-card-preview > span:last-child b {
  transform: translateX(2px);
}

.vault-password {
  flex: 1;
  min-width: 45px;
  overflow: hidden;
  color: #263249;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-password.masked {
  letter-spacing: .08em;
}

.vault-icon-btn,
.vault-favorite,
.vault-more-menu summary {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #e3e8f1;
  border-radius: 9px;
  background: #f8faff;
  color: #5b687f;
  cursor: pointer;
}

.vault-icon-btn svg,
.vault-favorite svg,
.vault-more-menu summary svg,
.vault-more-menu a svg,
.vault-more-menu button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vault-favorite {
  color: #a2acbd;
}

.vault-favorite.active {
  border-color: #ffe5a8;
  background: #fff9e9;
  color: #f3a61d;
}

.vault-favorite.active svg {
  fill: #ffc84c;
}

.vault-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vault-more-menu {
  position: relative;
}

.vault-more-menu summary {
  list-style: none;
}

.vault-more-menu summary::-webkit-details-marker {
  display: none;
}

.vault-more-menu > div {
  position: absolute;
  top: 33px;
  right: 0;
  z-index: 12;
  width: 154px;
  padding: 5px;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 32, 65, .18);
}

.vault-more-menu a,
.vault-more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #34415a;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.vault-more-menu a:hover,
.vault-more-menu button:hover {
  background: #f3f6fb;
}

.vault-more-menu .danger {
  color: #d3354d;
}

.vault-empty,
.vault-loading {
  grid-column: 1 / -1;
  padding: 35px 18px;
  border: 1px dashed #ced7e7;
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  color: #697791;
  text-align: center;
}

.vault-empty-shield {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 9px;
  border-radius: 14px;
  background: #edf0ff;
  color: #5d59df;
}

.vault-empty-shield svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.vault-empty strong,
.vault-empty > span:last-child {
  display: block;
}

.vault-empty strong {
  margin-bottom: 4px;
  color: #1e2941;
  font-size: 14px;
}

.vault-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.vault-loading > span {
  width: 15px;
  height: 15px;
  border: 2px solid #ccd4ef;
  border-top-color: #5960e9;
  border-radius: 50%;
  animation: vault-spin .7s linear infinite;
}

@keyframes vault-spin {
  to { transform: rotate(360deg); }
}

.vault-drive-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  background: #fff;
}

.vault-drive-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: #edf8ff;
  color: #2d6adf;
}

.vault-drive-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
}

.vault-drive-card > div {
  min-width: 0;
}

.vault-drive-card b {
  display: block;
  font-size: 11px;
}

.vault-sync-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: #718098;
  font-size: 8px;
}

.vault-sync-line i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #f0b23d;
}

.vault-sync-line em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-sync-line[data-status="synced"] i {
  background: #12b985;
}

.vault-sync-line[data-status="error"] i {
  background: #e5485d;
}

.vault-drive-card button,
.vault-drive-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid #dce3ee;
  border-radius: 9px;
  background: #f8faff;
  color: #46536e;
  font-size: 8px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.vault-drive-card .hidden {
  display: none;
}

.vault-footnote {
  margin: 7px 4px 0;
  color: #7a879c;
  font-size: 8px;
  line-height: 1.45;
}

.vault-footer {
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vault-line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(16px);
}

.vault-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vault-footer b,
.vault-footer small {
  display: block;
}

.vault-footer b {
  font-size: 9px;
}

.vault-footer small {
  margin-top: 2px;
  color: var(--vault-muted);
  font-size: 7px;
}

.vault-lock-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border: 3px solid #d7def0;
  border-top-color: #555de6;
  border-radius: 50%;
}

.vault-add {
  min-height: 39px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--vault-blue), var(--vault-purple));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(66, 79, 225, .18);
}

.vault-detail-dialog {
  width: min(520px, calc(100vw - 28px));
  max-width: 520px;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: #fff;
  color: #111a2e;
  box-shadow: 0 30px 90px rgba(20, 27, 62, .36);
  overflow: hidden;
}

.vault-detail-sheet {
  max-height: min(760px, calc(100dvh - 30px));
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #fff, #f8faff);
}

.vault-detail-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--vault-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
}

.vault-detail-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #e7ebff, #eee6ff);
  color: #5049d8;
  font-size: 14px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(88, 89, 224, .06);
}

.vault-detail-head > div {
  min-width: 0;
}

.vault-detail-head small {
  display: block;
  color: #6659e9;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .16em;
}

.vault-detail-head h2,
.vault-detail-head p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-detail-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.1;
}

.vault-detail-head p {
  margin: 4px 0 0;
  color: var(--vault-muted);
  font-size: 10px;
}

.vault-detail-body {
  display: grid;
  gap: 11px;
  padding: 18px 20px;
}

.vault-detail-field,
.vault-detail-notes,
.vault-detail-security,
.vault-detail-meta {
  border: 1px solid #e0e6f1;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(27, 41, 79, .035);
}

.vault-detail-field,
.vault-detail-notes,
.vault-detail-security {
  padding: 12px 13px;
}

.vault-detail-field label,
.vault-detail-notes label {
  display: block;
  margin-bottom: 7px;
  color: #79869b;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vault-detail-field > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.vault-detail-field > div > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #202a41;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-detail-password {
  font: 800 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace !important;
  letter-spacing: .1em;
}

.vault-detail-password.revealed {
  letter-spacing: 0;
}

.vault-detail-field button,
.vault-detail-field a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid #e0e6f1;
  border-radius: 10px;
  background: #f7f9fe;
  color: #5360dc;
  cursor: pointer;
}

.vault-detail-field button svg,
.vault-detail-field a svg,
.vault-detail-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vault-detail-field.is-empty a {
  display: none;
}

.vault-detail-security > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  font-weight: 850;
}

.vault-detail-security strong {
  color: #0a996c;
  font-size: 9px;
}

.vault-detail-security strong[data-level="weak"],
.vault-detail-security strong[data-level="reused"] {
  color: #d63b51;
}

.vault-detail-security strong[data-level="fair"] {
  color: #ae7210;
}

.vault-detail-strength-track {
  height: 7px;
  margin: 9px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf5;
}

.vault-detail-strength-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #09b57d, #39cf9d);
  transition: width .2s ease;
}

.vault-detail-strength-track i[data-level="weak"],
.vault-detail-strength-track i[data-level="reused"] {
  background: linear-gradient(90deg, #e7495f, #fa778a);
}

.vault-detail-strength-track i[data-level="fair"] {
  background: linear-gradient(90deg, #e6a62e, #f5c45d);
}

.vault-detail-security small {
  color: #7a879c;
  font-size: 8px;
}

.vault-detail-notes p {
  margin: 0;
  color: #364158;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vault-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.vault-detail-meta > div {
  min-width: 0;
  padding: 11px 13px;
}

.vault-detail-meta > div + div {
  border-left: 1px solid #e5eaf2;
}

.vault-detail-meta span,
.vault-detail-meta b {
  display: block;
}

.vault-detail-meta span {
  color: #7b879a;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.vault-detail-meta b {
  margin-top: 4px;
  overflow: hidden;
  color: #29344c;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vault-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--vault-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
}

.vault-detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 13px;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.vault-detail-edit {
  border: 0;
  background: linear-gradient(135deg, var(--vault-blue), var(--vault-purple));
  color: #fff;
  box-shadow: 0 8px 18px rgba(66, 79, 225, .18);
}

.vault-detail-delete {
  border: 1px solid #ffd2d8;
  background: #fff4f5;
  color: #d13249;
}

.vault-head {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--vault-line);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
}

.vault-head small {
  display: block;
  color: #6559eb;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.vault-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.vault-editor {
  width: min(520px, calc(100vw - 28px));
  max-width: 520px;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: #fff;
  color: #111a2e;
  box-shadow: 0 30px 90px rgba(20, 27, 62, .34);
}

.vault-editor > form {
  max-height: calc(100dvh - 30px);
  overflow: auto;
  padding: 0 22px 24px;
}

.vault-editor .vault-head {
  margin: 0 -22px 18px;
}

.vault-form-grid {
  display: grid;
  gap: 13px;
}

.vault-form-grid label {
  display: grid;
  gap: 7px;
  color: #4d5870;
  font-size: 11px;
  font-weight: 800;
}

.vault-form-grid input,
.vault-form-grid select,
.vault-form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid #dce2ef;
  border-radius: 13px;
  outline: 0;
  background: #f9fbff;
  color: #141d33;
  font: inherit;
  font-size: 16px;
}

.vault-form-grid input:focus,
.vault-form-grid select:focus,
.vault-form-grid textarea:focus {
  border-color: #6467eb;
  box-shadow: 0 0 0 3px rgba(94, 93, 235, .12);
}

.vault-form-grid textarea {
  min-height: 86px;
  resize: vertical;
}

.vault-form-grid select {
  min-height: 45px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #66728a 50%), linear-gradient(135deg, #66728a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 13px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 34px;
}

.vault-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.vault-generate {
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: #edf0ff;
  color: #4d51d5;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.vault-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
  margin-top: 18px;
}

.vault-form-actions button {
  min-height: 47px;
  border: 0;
  border-radius: 14px;
  font-weight: 900;
  cursor: pointer;
}

.vault-form-actions .vault-cancel {
  background: #eef1f7;
  color: #536078;
}

.vault-form-actions .vault-save {
  background: linear-gradient(135deg, #4b58ed, #7648e9);
  color: #fff;
}

.vault-save:disabled,
.vault-add:disabled,
.vault-drive-card button:disabled {
  opacity: .55;
  cursor: wait;
}

.vault-toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  bottom: auto;
  z-index: 2147483647;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 17px;
  border: 0;
  border-radius: 13px;
  background: #14213a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: .2s ease;
}

.vault-toast:popover-open {
  display: block;
}

.vault-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.vault-toast.error {
  background: #b92642;
}

@media (max-width: 700px) {
  .vault-dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .vault-main-form {
    height: 100dvh;
    max-height: none;
  }

  .vault-toast {
    top: max(12px, env(safe-area-inset-top));
  }

  .vault-appbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  }

  .vault-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .vault-brand b {
    font-size: 12px;
  }

  .vault-brand small {
    font-size: 8px;
  }

  .vault-user span {
    display: none;
  }

  .vault-user i {
    width: 34px;
    height: 34px;
  }

  .vault-close {
    width: 35px;
    height: 35px;
  }

  .vault-shell {
    padding: 12px 12px 10px;
  }

  .vault-title-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
  }

  .vault-title-shield {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .vault-title-row h2 {
    font-size: 20px;
  }

  .vault-title-row p {
    max-width: 210px;
    font-size: 8px;
  }

  .vault-protected {
    padding: 6px 8px;
    font-size: 8px;
  }

  .vault-health {
    margin-top: 10px;
    padding: 10px 12px;
  }

  .vault-health-copy strong {
    font-size: 17px;
  }

  .vault-health > p {
    font-size: 8px;
  }

  .vault-stats > div {
    padding: 0 5px;
  }

  .vault-stats b {
    font-size: 13px;
  }

  .vault-stats span {
    font-size: 7px;
  }

  .vault-tools {
    margin-top: 9px;
  }

  .vault-search,
  .vault-add-icon {
    height: 40px;
  }

  .vault-add-icon {
    width: 40px;
  }

  .vault-filters {
    margin: 7px 0 9px;
  }

  .vault-filters button {
    min-height: 29px;
    padding: 0 4px;
    font-size: 8px;
  }

  .vault-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vault-category {
    border-radius: 15px;
  }

  .vault-category-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    min-height: 52px;
    padding: 7px 8px;
    border-radius: 15px;
  }

  .vault-category-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 9px;
  }

  .vault-category-copy b {
    font-size: 11px;
  }

  .vault-category-copy small {
    font-size: 7px;
  }

  .vault-category-count {
    min-height: 22px;
    padding: 0 7px;
    font-size: 7px;
  }

  .vault-category-chevron {
    width: 25px;
    height: 25px;
  }

  .vault-category-items {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 0 7px 7px;
  }

  .vault-card {
    min-height: 58px;
    padding: 8px 7px 8px 9px;
    border-radius: 13px;
  }

  .vault-card-preview > span:last-child {
    font-size: 7px;
  }

  .vault-service-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .vault-card-title b {
    font-size: 11px;
  }

  .vault-card-actions {
    gap: 3px;
  }

  .vault-icon-btn,
  .vault-favorite,
  .vault-more-menu summary {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }

  .vault-more-menu > div {
    top: 30px;
  }

  .vault-drive-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-top: 8px;
    padding: 9px 10px;
  }

  .vault-drive-card a {
    grid-column: 2 / 4;
  }

  .vault-footnote {
    margin-top: 5px;
  }

  .vault-footer {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }

  .vault-footer small {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vault-add {
    min-height: 38px;
    padding: 0 13px;
  }

  .vault-editor {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .vault-detail-dialog {
    width: 100vw;
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }

  .vault-detail-sheet {
    max-height: calc(100dvh - 16px);
  }

  .vault-detail-head {
    padding: 16px 16px 14px;
  }

  .vault-detail-body {
    gap: 9px;
    padding: 14px 16px;
  }

  .vault-detail-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .vault-form-actions {
    position: sticky;
    bottom: -24px;
    margin: 18px -22px -24px;
    padding: 11px 22px calc(11px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
  }
}

/* Keep compact mobile layout readable without sub-10px account text. */
@media (max-width: 700px) {
  .vault-title-row p,
  .vault-health > p,
  .vault-category-copy small,
  .vault-login-name,
  .vault-card-preview > span:last-child,
  .vault-footnote {
    font-size: 10px;
  }

  .vault-filters button,
  .vault-category-copy b,
  .vault-footer b {
    font-size: 11px;
  }

  .vault-stats span,
  .vault-category-count,
  .vault-brand small,
  .vault-protected,
  .vault-footer small,
  .vault-strength {
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .vault-brand small {
    display: none;
  }

  .vault-title-row p {
    max-width: 150px;
  }

  .vault-protected {
    padding: 5px 7px;
  }

  .vault-category-copy small {
    display: none;
  }

  .vault-category-count {
    padding: 0 6px;
  }

  .vault-footer b {
    font-size: 10px;
  }

  .vault-add {
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vault-toast,
  .vault-card,
  .vault-health-track i {
    transition: none;
  }

  .vault-loading > span {
    animation: none;
  }
}
