/* Leka_Data : mise en page (sidebar, liste, détail) */

:root {
  --leka-primary: #2563eb;
  --leka-side-bg: #0f1b2d;
  --leka-side-text: #cbd5e1;
  --leka-topbar-h: 56px;
  --bs-offcanvas-width: 290px;
}

html,
body {
  height: 100%;
}

/* ---------- Page de connexion ---------- */
.auth-body {
  min-height: 100dvh;
  display: flex;
  background: var(--bs-tertiary-bg);
}

.auth-main {
  margin: auto;
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
}

/* ---------- Application (connecté) ---------- */
.app-body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bs-body-bg);
}

@media (min-width: 992px) {
  .app-body {
    flex-direction: row;
  }
}

/* ---------- Barre mobile ---------- */
.mobile-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--leka-topbar-h);
  padding: env(safe-area-inset-top, 0) 0.5rem 0;
  background: var(--bs-body-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--leka-side-bg);
  color: var(--leka-side-text);
}

.app-sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1rem;
  overflow-y: auto;
}

/* Bootstrap rend .offcanvas-lg transparent à partir de lg : on fixe la largeur ici */
@media (min-width: 992px) {
  .app-body .app-sidebar {
    flex: 0 0 260px;
    max-width: 260px;
  }
}

.sidebar-brand {
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-brand .bi {
  color: var(--leka-primary);
}

.sidebar-label {
  margin: 0 0 0.5rem;
  padding: 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--leka-side-text);
  text-align: left;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background: var(--leka-primary);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

.sidebar-user {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ---------- Panneaux liste + détail ---------- */
.vault-panes {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 7fr 9fr; /* liste 35 % / détail 45 % */
}

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bs-body-bg);
}

.pane-list {
  position: relative;
  border-right: 1px solid var(--bs-border-color);
}

.pane-toolbar {
  flex: 0 0 auto;
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.secret-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 5rem; /* évite que le bouton flottant masque le dernier élément */
}

.secret-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--bs-border-color);
  background: none;
  color: inherit;
  text-align: left;
}

.secret-item:hover,
.secret-item:focus-visible,
.secret-item.active {
  background: var(--bs-primary-bg-subtle);
}

.pane-detail-header {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.secret-detail {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--bs-secondary-color);
}

.empty-state .bi {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* ---------- Bouton flottant (mobile) ---------- */
.fab {
  position: absolute;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--leka-primary);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* ---------- Mobile : une colonne, écrans successifs ---------- */
@media (max-width: 991.98px) {
  .vault-panes {
    position: relative;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .pane-list {
    border-right: 0;
  }

  .pane-detail {
    position: absolute;
    inset: 0;
    z-index: 2;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .vault-panes[data-view="detail"] .pane-detail {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
}

@media (min-width: 992px) {
  .fab {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pane-detail {
    transition: none;
  }
}

/* ---------- Coffre verrouille et formulaires ---------- */
.vault-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 20, 31, 0.86);
  backdrop-filter: blur(5px);
}

.vault-lock-screen[hidden] {
  display: none;
}

.vault-lock-panel {
  width: min(100%, 420px);
  padding: 2rem;
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
}

.vault-lock-icon {
  display: block;
  margin-bottom: 1rem;
  color: var(--leka-primary);
  font-size: 2rem;
}

.vault-editor {
  width: min(100%, 680px);
  margin: 0 auto;
}

.vault-editor-actions,
.vault-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vault-item-value {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.secret-item-copy {
  min-width: 0;
  flex: 1;
}

.secret-item-title,
.secret-item-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-item-subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

.vault-api-status {
  position: absolute;
  inset: auto 1rem 1rem;
  z-index: 5;
  width: fit-content;
  max-width: calc(100% - 2rem);
}

@media (max-width: 575.98px) {
  .vault-lock-panel {
    padding: 1.5rem;
  }

  .secret-detail {
    padding: 1rem;
  }
}

/* ---------- Accueil public ---------- */
.home-body {
  min-height: 100%;
  background: #f1f0e8;
  color: #142b28;
}

.home-main {
  width: 100%;
}

.home-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 5vw, 5rem);
  color: #fff;
}

.home-brand {
  color: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

.home-login {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 2px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.home-login:hover,
.home-login:focus-visible {
  background: #d7f17a;
  border-color: #d7f17a;
  color: #142b28;
}

.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(500px, 72svh, 760px);
  overflow: hidden;
  background: #102c2a;
  color: #fff;
}

.home-hero-image,
.home-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero-image {
  object-fit: cover;
  object-position: center 48%;
}

.home-hero-shade {
  background: rgba(4, 22, 21, 0.58);
}

.home-hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 900px);
  padding: 9rem clamp(1.5rem, 8vw, 8rem) 5rem;
}

.home-eyebrow {
  margin-bottom: 1rem;
  color: #d7f17a;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.04;
}

.home-hero-copy {
  max-width: 510px;
  margin: 1.25rem 0 1.75rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.1rem;
  line-height: 1.6;
}

.home-primary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 50px;
  padding: 0.75rem 1.1rem;
  background: #d7f17a;
  color: #142b28;
  font-weight: 700;
  text-decoration: none;
}

.home-primary-link:hover,
.home-primary-link:focus-visible {
  background: #fff;
  color: #142b28;
}

.home-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr);
  gap: 2rem;
  align-items: center;
  padding: 2.5rem clamp(1.5rem, 8vw, 8rem) 3rem;
}

.home-next h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}

.home-next p {
  max-width: 420px;
  margin: 0;
  color: #4f625e;
  line-height: 1.6;
}

/* ---------- Dashboard du coffre ---------- */
.vault-panes {
  --vault-ink: #17233c;
  --vault-muted: #77829a;
  --vault-line: #e8ecf3;
  --vault-canvas: #f5f7fb;
}

.vault-panes {
  grid-template-columns: minmax(310px, 0.78fr) minmax(0, 1.4fr);
  gap: 1px;
  background: var(--vault-line);
}

.pane {
  color: var(--vault-ink);
}

.pane-list {
  z-index: 1;
  border: 0;
  background: #fff;
}

.vault-toolbar {
  padding: clamp(1.15rem, 2vw, 1.8rem);
  border: 0;
  background:
    radial-gradient(ellipse at 2% 0%, rgba(84, 125, 255, 0.1), transparent 55%),
    #fff;
}

.vault-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.vault-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #536cb2;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.vault-eyebrow .bi {
  font-size: 0.9rem;
}

.vault-page-title {
  margin: 0.45rem 0 0;
  color: var(--vault-ink);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.vault-page-subtitle {
  max-width: 28rem;
  margin: 0.55rem 0 0;
  color: var(--vault-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.vault-lock-indicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid #dceee7;
  border-radius: 999px;
  background: #f1faf6;
  color: #28775b;
  font-size: 0.72rem;
  font-weight: 700;
}

.vault-toolbar-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
}

.vault-selector-group {
  flex: 1 1 auto;
  min-width: 0;
}

.vault-control-label {
  display: block;
  margin: 0 0 0.38rem 0.05rem;
  color: #7d8799;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.vault-selector-row {
  display: flex;
  gap: 0.38rem;
}

.vault-select-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.vault-select-wrap > .bi {
  position: absolute;
  top: 50%;
  left: 0.8rem;
  z-index: 1;
  color: #77829a;
  pointer-events: none;
  transform: translateY(-50%);
}

.vault-select-wrap .form-select {
  min-height: 42px;
  padding-left: 2.3rem;
  border-color: var(--vault-line);
  border-radius: 0.75rem;
  color: var(--vault-ink);
  font-size: 0.83rem;
  font-weight: 650;
  box-shadow: none;
}

.vault-icon-button {
  display: inline-grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--vault-line);
  border-radius: 0.72rem;
  color: #66728a;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.vault-icon-button:hover:not(:disabled) {
  background: #eef2ff;
  color: #405cb4;
  transform: translateY(-1px);
}

.vault-icon-button-danger:hover:not(:disabled) {
  background: #fff0ef;
  color: #c34a4a;
}

.vault-icon-button:disabled {
  opacity: 0.42;
}

.vault-new-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  border: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  box-shadow: 0 5px 13px rgba(83, 111, 224, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.vault-new-button:hover {
  background: linear-gradient(135deg, #4965d6, #6552d6);
  box-shadow: 0 8px 18px rgba(83, 111, 224, 0.28);
  transform: translateY(-1px);
}

.vault-security-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e6e9f1;
  border-radius: 0.75rem;
  color: #53617a;
  font-size: 0.8rem;
  font-weight: 650;
}

.vault-security-button:hover {
  border-color: #d7ddf0;
  background: #f7f8ff;
  color: #465ba7;
}

.vault-list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.vault-search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.vault-search > .bi-search {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  z-index: 1;
  color: #98a1b1;
  pointer-events: none;
  transform: translateY(-50%);
}

.vault-search .form-control {
  min-height: 42px;
  padding: 0.6rem 2.7rem 0.6rem 2.5rem;
  border-color: var(--vault-line);
  border-radius: 0.75rem !important;
  background: #f9faff;
  color: var(--vault-ink);
  font-size: 0.82rem;
  box-shadow: none;
}

.vault-search .form-control:focus,
.vault-select-wrap .form-select:focus {
  border-color: #9cacf0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.1);
}

.vault-search-clear {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #8c96a7;
  font-size: 0.75rem;
  transform: translateY(-50%);
}

.vault-search-clear:hover {
  background: #edf0f7;
  color: #44516a;
}

.vault-search-clear[hidden] {
  display: none;
}

.vault-list-count {
  flex: 0 0 auto;
  color: #8993a5;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.vault-filter-row {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.vault-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: transparent;
  color: #7c8799;
  font-size: 0.76rem;
  font-weight: 650;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.vault-filter:hover {
  background: #f5f6fb;
  color: #495774;
}

.vault-filter.active {
  border-color: #e1e6fa;
  background: #eff2ff;
  color: #4a5fb0;
}

.secret-list {
  position: relative;
  padding: 0.5rem 0.7rem 5.5rem;
  scrollbar-color: #d7dce7 transparent;
  scrollbar-width: thin;
}

.secret-item {
  position: relative;
  gap: 0.85rem;
  margin: 0.25rem 0;
  padding: 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
  animation: vault-appear 260ms ease both;
}

.secret-item:nth-child(2) { animation-delay: 25ms; }
.secret-item:nth-child(3) { animation-delay: 50ms; }
.secret-item:nth-child(4) { animation-delay: 75ms; }
.secret-item:nth-child(5) { animation-delay: 100ms; }

.secret-item:focus-visible,
.vault-icon-button:focus-visible,
.vault-filter:focus-visible,
.vault-new-button:focus-visible,
.vault-search-clear:focus-visible {
  outline: 3px solid rgba(91, 112, 220, 0.35);
  outline-offset: 2px;
}

.secret-item:hover,
.secret-item:focus-visible {
  border-color: #edf0f7;
  background: #fafbff;
  transform: translateX(2px);
}

.secret-item.active {
  border-color: #e2e7fb;
  background: #f2f4ff;
}

.secret-item > .bi:first-child {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 0.8rem;
  background: #eff2ff;
  color: #556ed0;
  font-size: 1.1rem;
}

.secret-item:nth-child(3n + 2) > .bi:first-child {
  background: #eaf8f3;
  color: #329371;
}

.secret-item:nth-child(3n) > .bi:first-child {
  background: #fff3e8;
  color: #c47b3c;
}

.secret-item-copy {
  display: grid;
  gap: 0.25rem;
}

.secret-item-title {
  color: #26334c;
  font-size: 0.86rem;
  font-weight: 700;
}

.secret-item-subtitle {
  color: #8a94a5;
  font-size: 0.72rem;
}

.pane-detail {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(227, 233, 255, 0.48), transparent 50%),
    #fbfcff;
}

.pane-detail::before,
.pane-detail::after {
  position: absolute;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgba(126, 145, 210, 0.09);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.pane-detail::before {
  top: -8rem;
  right: -5rem;
}

.pane-detail::after {
  bottom: -9rem;
  left: -6rem;
  width: 16rem;
  height: 16rem;
}

.secret-detail {
  position: relative;
  z-index: 1;
  scrollbar-color: #d7dce7 transparent;
  scrollbar-width: thin;
}

.secret-detail > h2 {
  color: var(--vault-ink);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.vault-detail-empty {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  animation: vault-appear 420ms ease both;
}

.vault-detail-empty h2 {
  max-width: 28rem;
  margin: 0.75rem 0 0.5rem;
  color: var(--vault-ink);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}

.vault-detail-empty > p {
  max-width: 25rem;
  margin: 0 0 1.2rem;
  color: var(--vault-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.vault-detail-empty > .btn {
  min-height: 42px;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  font-weight: 700;
  box-shadow: 0 5px 13px rgba(83, 111, 224, 0.2);
}

.vault-empty-illustration {
  position: relative;
  display: grid;
  width: clamp(150px, 19vw, 220px);
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 1.5rem;
}

.vault-empty-orbit {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(104, 127, 213, 0.16);
  border-radius: 50%;
}

.vault-empty-orbit-two {
  inset: 0;
  border-style: dashed;
  border-color: rgba(104, 127, 213, 0.12);
  animation: vault-orbit 36s linear infinite;
}

.vault-empty-icon {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(108, 126, 209, 0.12);
  border-radius: 28px;
  background: linear-gradient(145deg, #fff, #eef1ff);
  color: #5b71d2;
  font-size: 2.6rem;
  box-shadow: 0 18px 48px rgba(70, 87, 155, 0.16), inset 0 1px 0 #fff;
  animation: vault-float 4s ease-in-out infinite;
}

.vault-empty-spark {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #e7eaf6;
  border-radius: 12px;
  background: #fff;
  color: #7a8de0;
  box-shadow: 0 7px 20px rgba(49, 64, 117, 0.08);
}

.vault-empty-spark-one {
  top: 13%;
  right: 13%;
  animation: vault-float 3.2s ease-in-out 0.2s infinite;
}

.vault-empty-spark-two {
  bottom: 13%;
  left: 12%;
  color: #43a588;
  animation: vault-float 3.8s ease-in-out 0.5s infinite;
}

.vault-encryption-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  color: #8792a5;
  font-size: 0.73rem;
}

.vault-encryption-note .bi {
  color: #3a9878;
}

.vault-back-button {
  min-height: 42px;
  color: #5d6d89 !important;
  font-weight: 650;
  text-decoration: none;
}

.vault-list-empty {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
  animation: vault-appear 320ms ease both;
}

.vault-list-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 0.9rem;
  border-radius: 17px;
  background: #f0f2ff;
  color: #657bd2;
  font-size: 1.25rem;
}

.vault-list-empty h2 {
  margin: 0 0 0.4rem;
  color: #34415b;
  font-size: 0.95rem;
  font-weight: 750;
}

.vault-list-empty p {
  max-width: 17rem;
  margin: 0 0 0.9rem;
  color: #8a94a5;
  font-size: 0.8rem;
  line-height: 1.55;
}

.vault-list-empty .btn {
  border-radius: 0.65rem;
  font-weight: 650;
}

.vault-list-loading {
  display: grid;
  gap: 0.7rem;
  padding: 0.65rem;
}

.vault-list-loading span {
  display: block;
  height: 66px;
  border: 1px solid #f0f2f7;
  border-radius: 0.85rem;
  background: linear-gradient(100deg, #f7f8fb 25%, #eef1f7 42%, #f7f8fb 60%);
  background-size: 220% 100%;
  animation: vault-shimmer 1.4s ease-in-out infinite;
}

.vault-detail-actions .btn {
  min-height: 36px;
  border-radius: 0.65rem;
  font-weight: 600;
}

.vault-editor .form-control,
.vault-editor .form-select {
  border-color: var(--vault-line);
  border-radius: 0.7rem;
  box-shadow: none;
}

.vault-lock-screen {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(84, 106, 190, 0.28), transparent 55%),
    rgba(13, 20, 36, 0.84);
  backdrop-filter: blur(12px);
}

.vault-lock-panel {
  padding: clamp(1.5rem, 5vw, 2.4rem);
  border: 1px solid rgba(225, 230, 244, 0.9);
  border-radius: 1.25rem;
  box-shadow: 0 2rem 6rem rgba(10, 18, 40, 0.3);
  animation: vault-appear 360ms ease both;
}

.vault-lock-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #eef1ff, #e1e8ff);
  font-size: 1.55rem;
}

.vault-lock-panel h1 {
  color: var(--vault-ink, #17233c);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.vault-lock-panel .form-control {
  min-height: 46px;
  border-color: #e4e8f0;
  border-radius: 0.75rem;
}

.vault-lock-panel .form-control:focus {
  border-color: #9cacf0;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.12);
}

.vault-password-strength {
  color: #647084;
}

.vault-password-strength[hidden] {
  display: none;
}

.vault-password-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.vault-password-strength-bar {
  height: 4px;
  border-radius: 999px;
  background: #e7eaf1;
  transition: background-color 160ms ease;
}

.vault-password-strength[data-strength="1"] .vault-password-strength-bar.active {
  background: #dd7861;
}

.vault-password-strength[data-strength="2"] .vault-password-strength-bar.active {
  background: #e1ad4f;
}

.vault-password-strength[data-strength="3"] .vault-password-strength-bar.active {
  background: #83aa55;
}

.vault-password-strength[data-strength="4"] .vault-password-strength-bar.active {
  background: #399878;
}

.vault-lock-panel button[type="submit"] {
  min-height: 46px;
  border: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  font-weight: 700;
}

.account-profile-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2.75rem);
  background:
    radial-gradient(ellipse at 82% 0, rgba(102, 117, 230, 0.1), transparent 34rem),
    #f6f7fb;
}

.account-profile-content {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.account-profile-hero {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(220, 225, 238, 0.8);
  border-radius: 1.35rem;
  background: linear-gradient(120deg, #fff 25%, #f0f2ff 100%);
  box-shadow: 0 1rem 2.5rem rgba(35, 45, 80, 0.06);
}

.account-profile-avatar,
.account-profile-card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.account-profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: linear-gradient(145deg, #526ee0, #7a61dc);
  color: #fff;
  font-size: 1.65rem;
  box-shadow: 0 0.6rem 1.2rem rgba(82, 110, 224, 0.24);
}

.account-profile-heading {
  min-width: 0;
}

.account-profile-eyebrow {
  color: #6574bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.account-profile-heading h1 {
  margin: 0.15rem 0 0.25rem;
  color: #17233c;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.04em;
}

.account-profile-heading p,
.account-profile-card-heading p {
  margin: 0;
  color: #778198;
  font-size: 0.88rem;
}

.account-profile-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccebdc;
  border-radius: 999px;
  background: #f0fbf5;
  color: #22835d;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
}

.account-profile-security-column {
  display: grid;
  gap: 1.25rem;
}

.account-profile-card {
  min-width: 0;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid #e8eaf1;
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(35, 45, 80, 0.045);
}

.account-profile-card-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.account-profile-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.15rem;
}

.account-profile-card-icon-blue {
  background: #eef3ff;
  color: #4168d5;
}

.account-profile-card-icon-violet {
  background: #f2efff;
  color: #7256cb;
}

.account-profile-card-icon-slate {
  background: #eef1f5;
  color: #536176;
}

.account-profile-card-heading h2 {
  margin: 0 0 0.2rem;
  color: #202b42;
  font-size: 1rem;
  font-weight: 750;
}

.account-profile-card-heading p {
  font-size: 0.78rem;
  line-height: 1.45;
}

.account-profile-field-label,
.account-profile-email-value,
.account-profile-email-note {
  display: block;
}

.account-profile-field-label {
  margin-bottom: 0.35rem;
  color: #758097;
  font-size: 0.76rem;
  font-weight: 650;
}

.account-profile-email-value {
  overflow-wrap: anywhere;
  color: #26334c;
  font-size: 0.95rem;
  font-weight: 700;
}

.account-profile-email-note {
  margin-top: 0.35rem;
  color: #43856a;
  font-size: 0.74rem;
}

.account-profile-form {
  margin-top: 1.35rem;
}

.account-profile-form .form-label,
.account-master-password-form .form-label {
  color: #45516a;
  font-size: 0.82rem;
  font-weight: 650;
}

.account-profile-form .form-control,
.account-master-password-form .form-control {
  min-height: 44px;
  border-color: #e2e6ef;
  border-radius: 0.7rem;
  box-shadow: none;
}

.account-profile-form .form-control:focus,
.account-master-password-form .form-control:focus {
  border-color: #9cacf0;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.12);
}

.account-profile-save {
  min-height: 44px;
  border: 0;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  font-size: 0.86rem;
  font-weight: 700;
}

.account-profile-security-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: -0.25rem 0 1.2rem;
  padding: 0.8rem;
  border: 1px solid #e8e6fb;
  border-radius: 0.75rem;
  background: #f8f7ff;
  color: #6656a6;
  font-size: 0.78rem;
  line-height: 1.5;
}

.account-profile-security-note p {
  margin: 0;
}

.account-profile-status {
  margin: 0 0 0.9rem;
  color: #67738a;
  font-size: 0.8rem;
}

.account-profile-status.text-success {
  color: #27835e !important;
}

.account-profile-password-card .account-profile-card-heading {
  margin-bottom: 1rem;
}

.account-profile-secondary-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  border-radius: 0.7rem;
  font-size: 0.8rem;
  font-weight: 650;
  text-align: left;
}

@media (max-width: 767.98px) {
  .account-profile-page {
    padding: 1rem;
  }

  .account-profile-hero {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem;
    border-radius: 1rem;
  }

  .account-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 1.4rem;
  }

  .account-profile-heading {
    flex: 1 1 calc(100% - 64px);
  }

  .account-profile-verified {
    margin-left: 0;
  }

  .account-profile-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

.sidebar-theme-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.9fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(203, 213, 225, 0.16);
  border-radius: 0.65rem;
  color: #cbd5e1;
}

.sidebar-theme-control label {
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-theme-control .form-select {
  min-height: 34px;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-color: rgba(203, 213, 225, 0.2);
  border-radius: 0.5rem;
  background-color: #15243a;
  color: #e2e8f0;
  font-size: 0.75rem;
}

.sidebar-theme-control .form-select:focus {
  border-color: #8296ed;
  box-shadow: 0 0 0 3px rgba(130, 150, 237, 0.16);
}

.public-theme-control {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem 0.4rem 0.7rem;
  border: 1px solid #e2e6ef;
  border-radius: 0.75rem;
  background: #fff;
  color: #53617a;
  box-shadow: 0 0.4rem 1.2rem rgba(35, 45, 80, 0.08);
}

.public-theme-control label {
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.public-theme-control .form-select {
  width: auto;
  min-width: 120px;
  border-color: #e2e6ef;
  border-radius: 0.55rem;
  font-size: 0.75rem;
}

@media (max-width: 991.98px) {
  .sidebar-theme-control {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 0.7fr);
  }
}

:root[data-bs-theme="dark"] {
  color-scheme: dark;
  --bs-body-bg: #111827;
  --bs-body-color: #e5e7eb;
  --bs-secondary-color: #a3adbd;
  --bs-tertiary-bg: #172131;
  --bs-border-color: #344154;
  --vault-ink: #e7ebf3;
  --vault-muted: #a4afc1;
  --vault-line: #344154;
  --vault-canvas: #111827;
}

:root[data-bs-theme="dark"] body,
:root[data-bs-theme="dark"] .app-main,
:root[data-bs-theme="dark"] .app-body,
:root[data-bs-theme="dark"] .auth-body {
  background-color: #111827;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .mobile-topbar {
  background: #151f2e;
  border-color: #344154;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .mobile-topbar .btn-link {
  color: #e5e7eb !important;
}

:root[data-bs-theme="dark"] .public-theme-control {
  border-color: #344154;
  background: #1b2636;
  color: #d3dae5;
}

:root[data-bs-theme="dark"] .public-theme-control .form-select {
  border-color: #445166;
  background-color: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .app-messages .alert {
  border-color: var(--bs-border-color);
}

:root[data-bs-theme="dark"] .card,
:root[data-bs-theme="dark"] .list-group-item,
:root[data-bs-theme="dark"] .modal-content,
:root[data-bs-theme="dark"] .dropdown-menu,
:root[data-bs-theme="dark"] .popover {
  border-color: #344154;
  background-color: #1b2636;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .form-control,
:root[data-bs-theme="dark"] .form-select,
:root[data-bs-theme="dark"] .input-group-text {
  border-color: #445166;
  background-color: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .form-control::placeholder {
  color: #8e9aae;
  opacity: 1;
}

:root[data-bs-theme="dark"] .form-control:focus,
:root[data-bs-theme="dark"] .form-select:focus {
  border-color: #8296ed;
  background-color: #1b293d;
  color: #f3f5fa;
  box-shadow: 0 0 0 3px rgba(130, 150, 237, 0.18);
}

:root[data-bs-theme="dark"] .form-control:disabled,
:root[data-bs-theme="dark"] .form-control[readonly] {
  background-color: #202c3d;
  color: #b6c0cf;
}

:root[data-bs-theme="dark"] .form-check-input {
  border-color: #647188;
  background-color: #182334;
}

:root[data-bs-theme="dark"] .form-check-input:checked {
  border-color: #7185e5;
  background-color: #586fd4;
}

:root[data-bs-theme="dark"] .text-body-secondary,
:root[data-bs-theme="dark"] .text-secondary,
:root[data-bs-theme="dark"] .form-text {
  color: #a3adbd !important;
}

:root[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #66748a;
  color: #d3dae5;
}

:root[data-bs-theme="dark"] .btn-outline-secondary:hover {
  border-color: #8296ed;
  background-color: #29364a;
  color: #fff;
}

:root[data-bs-theme="dark"] .btn-light {
  border-color: #3a485d;
  background-color: #202c3d;
  color: #dce3ee;
}

:root[data-bs-theme="dark"] .btn-light:hover {
  border-color: #596a84;
  background-color: #2a384c;
  color: #fff;
}

:root[data-bs-theme="dark"] .vault-panes {
  --vault-ink: #e7ebf3;
  --vault-muted: #a4afc1;
  --vault-line: #344154;
  --vault-canvas: #111827;
  background: #344154;
}

:root[data-bs-theme="dark"] .pane,
:root[data-bs-theme="dark"] .pane-list,
:root[data-bs-theme="dark"] .vault-toolbar {
  background-color: #172131;
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .vault-toolbar {
  background:
    radial-gradient(ellipse at 2% 0%, rgba(84, 125, 255, 0.12), transparent 55%),
    #172131;
}

:root[data-bs-theme="dark"] .vault-eyebrow,
:root[data-bs-theme="dark"] .vault-control-label {
  color: #a6b5ec;
}

:root[data-bs-theme="dark"] .vault-lock-indicator {
  border-color: #285d4a;
  background: #19382f;
  color: #8bdbb7;
}

:root[data-bs-theme="dark"] .vault-select-wrap .form-select,
:root[data-bs-theme="dark"] .vault-search .form-control {
  border-color: #3a485d;
  background-color: #111b2a;
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .vault-search .form-control:focus,
:root[data-bs-theme="dark"] .vault-select-wrap .form-select:focus {
  border-color: #8296ed;
  background-color: #182334;
}

:root[data-bs-theme="dark"] .vault-icon-button {
  border-color: #3a485d;
  background: #202c3d;
  color: #b8c3d3;
}

:root[data-bs-theme="dark"] .vault-icon-button:hover:not(:disabled) {
  border-color: #6577c8;
  background: #293754;
  color: #c6d0ff;
}

:root[data-bs-theme="dark"] .vault-icon-button-danger:hover:not(:disabled) {
  border-color: #8f4e57;
  background: #452b35;
  color: #ffb9bd;
}

:root[data-bs-theme="dark"] .vault-list-count,
:root[data-bs-theme="dark"] .vault-filter {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .vault-filter:hover {
  background: #202c3d;
  color: #e1e7f2;
}

:root[data-bs-theme="dark"] .vault-filter.active {
  border-color: #3d4d7e;
  background: #263455;
  color: #c3ceff;
}

:root[data-bs-theme="dark"] .secret-list,
:root[data-bs-theme="dark"] .secret-detail {
  background-color: #172131;
  scrollbar-color: #46536a transparent;
}

:root[data-bs-theme="dark"] .secret-item:hover,
:root[data-bs-theme="dark"] .secret-item:focus-visible {
  border-color: #35435b;
  background: #202c3d;
}

:root[data-bs-theme="dark"] .secret-item.active {
  border-color: #3b4b78;
  background: #263455;
}

:root[data-bs-theme="dark"] .secret-item > .bi:first-child {
  background: #263455;
  color: #b8c5ff;
}

:root[data-bs-theme="dark"] .secret-item:nth-child(3n + 2) > .bi:first-child {
  background: #1e3b35;
  color: #8cd8bd;
}

:root[data-bs-theme="dark"] .secret-item:nth-child(3n) > .bi:first-child {
  background: #463629;
  color: #e8b47b;
}

:root[data-bs-theme="dark"] .secret-item-title,
:root[data-bs-theme="dark"] .vault-detail-empty h2,
:root[data-bs-theme="dark"] .vault-list-empty h2 {
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .secret-item-subtitle,
:root[data-bs-theme="dark"] .vault-detail-empty > p,
:root[data-bs-theme="dark"] .vault-list-empty p,
:root[data-bs-theme="dark"] .vault-encryption-note {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .pane-detail {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(87, 105, 177, 0.13), transparent 50%),
    #131e2d;
}

:root[data-bs-theme="dark"] .vault-empty-icon {
  border-color: #3c4a63;
  background: linear-gradient(145deg, #263248, #1d2940);
  color: #aebcff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

:root[data-bs-theme="dark"] .vault-empty-spark {
  border-color: #3b4960;
  background: #202c3d;
  color: #b9c5ff;
}

:root[data-bs-theme="dark"] .vault-list-empty-icon {
  background: #263455;
  color: #b8c5ff;
}

:root[data-bs-theme="dark"] .vault-list-loading span {
  border-color: #354257;
  background: linear-gradient(100deg, #202c3d 25%, #2a3749 42%, #202c3d 60%);
  background-size: 220% 100%;
}

:root[data-bs-theme="dark"] .vault-recovery-panel {
  border-color: #3a485d;
  background: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .vault-lock-panel {
  border-color: #3b485b;
  background: #1b2636;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .vault-lock-panel h1 {
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .vault-lock-panel .form-control {
  border-color: #445166;
  background: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .vault-lock-icon {
  background: linear-gradient(145deg, #2c3858, #28314a);
  color: #c3ceff;
}

:root[data-bs-theme="dark"] .vault-password-strength,
:root[data-bs-theme="dark"] .vault-password-strength-advice {
  color: #b1bbcb;
}

:root[data-bs-theme="dark"] .vault-password-strength-bar {
  background: #3d4859;
}

:root[data-bs-theme="dark"] .vault-editor .form-control,
:root[data-bs-theme="dark"] .vault-editor .form-select {
  border-color: #3a485d;
  background-color: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .vault-detail-actions .btn-outline-secondary {
  border-color: #66748a;
  color: #d3dae5;
}

:root[data-bs-theme="dark"] .account-profile-page,
:root[data-bs-theme="dark"] .trusted-contacts-page {
  background:
    radial-gradient(ellipse at 85% 0, rgba(89, 113, 224, 0.12), transparent 34rem),
    #111827;
}

:root[data-bs-theme="dark"] .account-profile-hero,
:root[data-bs-theme="dark"] .trusted-contacts-hero {
  border-color: #344154;
  background: linear-gradient(120deg, #1b2636 20%, #202b42 100%);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.14);
}

:root[data-bs-theme="dark"] .account-profile-heading h1,
:root[data-bs-theme="dark"] .trusted-contacts-hero h1 {
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .account-profile-heading p,
:root[data-bs-theme="dark"] .account-profile-card-heading p,
:root[data-bs-theme="dark"] .trusted-contacts-hero p,
:root[data-bs-theme="dark"] .trusted-contacts-card-heading p {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .account-profile-card,
:root[data-bs-theme="dark"] .trusted-contacts-card,
:root[data-bs-theme="dark"] .trusted-contact-card {
  border-color: #344154;
  background: #1b2636;
  color: #e5e7eb;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.14);
}

:root[data-bs-theme="dark"] .account-profile-card-heading h2,
:root[data-bs-theme="dark"] .account-profile-email-value,
:root[data-bs-theme="dark"] .trusted-contacts-card-heading h2,
:root[data-bs-theme="dark"] .trusted-contacts-list-heading h2,
:root[data-bs-theme="dark"] .trusted-contact-info h3 {
  color: #e2e8f0;
}

:root[data-bs-theme="dark"] .account-profile-verified {
  border-color: #285d4a;
  background: #19382f;
  color: #8bdbb7;
}

:root[data-bs-theme="dark"] .account-profile-card-icon-blue,
:root[data-bs-theme="dark"] .trusted-contacts-card-icon,
:root[data-bs-theme="dark"] .trusted-contacts-empty-icon {
  background: #263455;
  color: #b8c5ff;
}

:root[data-bs-theme="dark"] .account-profile-card-icon-violet {
  background: #352c53;
  color: #c9b8ff;
}

:root[data-bs-theme="dark"] .account-profile-card-icon-slate {
  background: #2b3748;
  color: #c4cfdf;
}

:root[data-bs-theme="dark"] .account-profile-field-label,
:root[data-bs-theme="dark"] .account-profile-form .form-label,
:root[data-bs-theme="dark"] .account-master-password-form .form-label,
:root[data-bs-theme="dark"] .trusted-contacts-card .form-label {
  color: #c2ccda;
}

:root[data-bs-theme="dark"] .account-profile-form .form-control,
:root[data-bs-theme="dark"] .account-master-password-form .form-control,
:root[data-bs-theme="dark"] .trusted-contacts-card .form-control {
  border-color: #445166;
  background: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .account-profile-security-note {
  border-color: #443c69;
  background: #292541;
  color: #c7b9f4;
}

:root[data-bs-theme="dark"] .account-profile-status {
  color: #b1bbcb;
}

:root[data-bs-theme="dark"] .account-profile-status.text-success {
  color: #8bdbb7 !important;
}

:root[data-bs-theme="dark"] .trusted-contacts-notice {
  border-color: #34496d;
  background: #1b2b43;
  color: #bfcbec;
}

:root[data-bs-theme="dark"] .trusted-contacts-checkbox {
  border-color: #3a485d;
  background: #182334;
}

:root[data-bs-theme="dark"] .trusted-contacts-checkbox .form-check-label {
  color: #c2ccda;
}

:root[data-bs-theme="dark"] .trusted-contacts-count {
  border-color: #3a485d;
  background: #202c3d;
  color: #c3ceff;
}

:root[data-bs-theme="dark"] .trusted-contact-avatar {
  background: linear-gradient(145deg, #2c3858, #352c53);
  color: #c6ceff;
}

:root[data-bs-theme="dark"] .trusted-contact-email,
:root[data-bs-theme="dark"] .trusted-contact-meta {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .trusted-contact-status.is-active {
  color: #8bdbb7;
}

:root[data-bs-theme="dark"] .trusted-contact-status.is-inactive {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .trusted-contacts-empty {
  border-color: #3a485d;
  background: rgba(27, 38, 54, 0.72);
}

:root[data-bs-theme="dark"] .trusted-contacts-empty h3 {
  color: #e2e8f0;
}

:root[data-bs-theme="dark"] .trusted-contacts-empty p {
  color: #a4afc1;
}

:root[data-bs-theme="dark"] .account-flow-card {
  border-color: #344154;
  background: #1b2636;
  color: #e5e7eb;
  box-shadow: 0 1.2rem 3.5rem rgba(0, 0, 0, 0.24);
}

:root[data-bs-theme="dark"] .account-flow-card h1 {
  color: #e7ebf3;
}

:root[data-bs-theme="dark"] .account-flow-intro,
:root[data-bs-theme="dark"] .account-flow-form .form-label {
  color: #b1bbcb;
}

:root[data-bs-theme="dark"] .account-flow-form input,
:root[data-bs-theme="dark"] .account-flow-form .form-control {
  border-color: #445166;
  background: #182334;
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .account-flow-hint {
  border-color: #34496d;
  background: #1b2b43;
  color: #bfcbec;
}

:root[data-bs-theme="dark"] .account-flow-back {
  color: #b1bbcb;
}

:root[data-bs-theme="dark"] .account-flow-back:hover {
  color: #c3ceff;
}

:root[data-bs-theme="dark"] .vault-list-empty,
:root[data-bs-theme="dark"] .empty-state,
:root[data-bs-theme="dark"] .vault-detail-empty,
:root[data-bs-theme="dark"] .secret-detail {
  color: #e5e7eb;
}

:root[data-bs-theme="dark"] .vault-detail-empty .vault-eyebrow {
  color: #aebcff;
}

:root[data-bs-theme="dark"] .app-main .alert-info {
  border-color: #34496d;
  background: #1b2b43;
  color: #bfcbec;
}

:root[data-bs-theme="dark"] .app-main .alert-success {
  border-color: #285d4a;
  background: #19382f;
  color: #a7e4c8;
}

:root[data-bs-theme="dark"] .app-main .alert-warning {
  border-color: #6a5331;
  background: #3a3021;
  color: #f1d49e;
}

:root[data-bs-theme="dark"] .app-main .alert-danger {
  border-color: #70404b;
  background: #3f2730;
  color: #f1b3bd;
}

:root[data-bs-theme="dark"] .text-danger {
  color: #ff9ca8 !important;
}

:root[data-bs-theme="dark"] .border,
:root[data-bs-theme="dark"] .border-bottom,
:root[data-bs-theme="dark"] .border-top {
  border-color: #344154 !important;
}

:root[data-bs-theme="light"] .lp-body {
  background: #f5f7fb;
  color: #29364d;
}

:root[data-bs-theme="light"] .lp-header.is-scrolled {
  background: rgba(248, 249, 253, 0.92);
  border-color: #e2e6ef;
}

:root[data-bs-theme="light"] .lp-brand,
:root[data-bs-theme="light"] .lp-hero h1,
:root[data-bs-theme="light"] .lp-section h2,
:root[data-bs-theme="light"] .lp-final h2,
:root[data-bs-theme="light"] .lp-card h3,
:root[data-bs-theme="light"] .lp-steps h3,
:root[data-bs-theme="light"] .lp-faq summary {
  color: #1d2b45 !important;
}

:root[data-bs-theme="light"] .lp-nav a:not(.lp-btn) {
  color: #53617a;
}

:root[data-bs-theme="light"] .lp-nav a:not(.lp-btn):hover {
  color: #24334e;
}

:root[data-bs-theme="light"] .lp-hero {
  background: #eef2ff;
  color: #33415d;
}

:root[data-bs-theme="light"] .lp-hero::before {
  opacity: 0.32;
}

:root[data-bs-theme="light"] .lp-hero::after {
  background-image:
    linear-gradient(rgba(63, 83, 145, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 83, 145, 0.045) 1px, transparent 1px);
}

:root[data-bs-theme="light"] .lp-lead,
:root[data-bs-theme="light"] .lp-card p,
:root[data-bs-theme="light"] .lp-steps p,
:root[data-bs-theme="light"] .lp-faq p {
  color: #5e6c83;
}

:root[data-bs-theme="light"] .lp-badges {
  color: #68768b;
}

:root[data-bs-theme="light"] .lp-demo {
  border-color: #dce2f0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 80px rgba(49, 64, 117, 0.14);
}

:root[data-bs-theme="light"] .lp-demo-bar small,
:root[data-bs-theme="light"] .lp-demo-meta {
  color: #758198;
}

:root[data-bs-theme="light"] .lp-demo-label {
  color: #596986;
}

:root[data-bs-theme="light"] .lp-demo-input {
  border-color: #dce2ed;
  background: #f8f9fc;
  color: #29364d;
}

:root[data-bs-theme="light"] .lp-demo-cipher {
  border-color: #b6c3ef;
  background: #f4f6ff;
  color: #4b63b9;
}

:root[data-bs-theme="light"] .lp-section {
  background: #f5f7fb;
}

:root[data-bs-theme="light"] .lp-alt {
  background: #eef1f7;
}

:root[data-bs-theme="light"] .lp-card,
:root[data-bs-theme="light"] .lp-steps li {
  border-color: #e0e5ef;
  background: #fff;
}

:root[data-bs-theme="light"] .lp-card:hover {
  border-color: #cbd4f2;
  background: #f9faff;
}

:root[data-bs-theme="light"] .lp-faq {
  border-color: #dce2ed;
}

:root[data-bs-theme="light"] .lp-final {
  border-color: #d8def2;
  background:
    radial-gradient(ellipse at 50% 0, rgba(83, 111, 224, 0.12), transparent 70%),
    #fff;
}

:root[data-bs-theme="light"] .lp-footer {
  border-color: #e0e5ef;
  color: #758198;
}

.trusted-contacts-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 2.5rem);
  background:
    radial-gradient(ellipse at 85% 0, rgba(89, 113, 224, 0.1), transparent 34rem),
    #f6f7fb;
}

.trusted-contacts-content {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.trusted-contacts-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #e8eaf2;
  border-radius: 1.25rem;
  background: linear-gradient(120deg, #fff 20%, #f0f3ff 100%);
  box-shadow: 0 1rem 2.5rem rgba(35, 45, 80, 0.055);
}

.trusted-contacts-hero-icon {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #536fe0, #7560dc);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 0.6rem 1.2rem rgba(82, 110, 224, 0.22);
}

.trusted-contacts-eyebrow {
  color: #6877bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.trusted-contacts-hero h1 {
  margin: 0.15rem 0 0.25rem;
  color: #17233c;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 780;
  letter-spacing: -0.04em;
}

.trusted-contacts-hero p {
  margin: 0;
  color: #778198;
  font-size: 0.88rem;
}

.trusted-contacts-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #dfe7fb;
  border-radius: 0.85rem;
  background: #f5f8ff;
  color: #51689e;
  font-size: 0.8rem;
  line-height: 1.5;
}

.trusted-contacts-notice > i {
  margin-top: 0.08rem;
  color: #5571d7;
}

.trusted-contacts-notice p {
  margin: 0;
}

.trusted-contacts-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: 1.25rem;
}

.trusted-contacts-card {
  min-width: 0;
  padding: clamp(1.2rem, 2.5vw, 1.65rem);
  border: 1px solid #e8eaf1;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(35, 45, 80, 0.045);
}

.trusted-contacts-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.trusted-contacts-card-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #eef2ff;
  color: #4c68d2;
}

.trusted-contacts-card-heading h2,
.trusted-contacts-list-heading h2 {
  margin: 0 0 0.2rem;
  color: #202b42;
  font-size: 1rem;
  font-weight: 750;
}

.trusted-contacts-card-heading p {
  margin: 0;
  color: #7a8499;
  font-size: 0.77rem;
  line-height: 1.45;
}

.trusted-contacts-card .form-label {
  color: #45516a;
  font-size: 0.82rem;
  font-weight: 650;
}

.trusted-contacts-card .form-control {
  min-height: 43px;
  border-color: #e2e6ef;
  border-radius: 0.7rem;
  box-shadow: none;
}

.trusted-contacts-card .form-control:focus {
  border-color: #9cacf0;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.12);
}

.trusted-contacts-checkbox {
  padding: 0.75rem 0.75rem 0.75rem 2.25rem;
  border: 1px solid #e8eaf1;
  border-radius: 0.7rem;
  background: #fafbfe;
}

.trusted-contacts-checkbox .form-check-input {
  margin-top: 0.18rem;
}

.trusted-contacts-checkbox .form-check-label {
  color: #4b5870;
  font-size: 0.78rem;
  line-height: 1.45;
}

.trusted-contacts-submit {
  min-height: 43px;
  width: 100%;
  border: 0;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  font-size: 0.84rem;
  font-weight: 700;
}

.trusted-contacts-list-section {
  min-width: 0;
}

.trusted-contacts-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.15rem 0 0.8rem;
}

.trusted-contacts-list-heading h2 {
  margin-top: 0.15rem;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.trusted-contacts-count {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  padding: 0 0.55rem;
  border: 1px solid #e1e6f4;
  border-radius: 999px;
  background: #fff;
  color: #5369b9;
  font-size: 0.78rem;
  font-weight: 750;
}

.trusted-contacts-list {
  display: grid;
  gap: 0.75rem;
}

.trusted-contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e8eaf1;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(35, 45, 80, 0.035);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.trusted-contact-card:hover {
  transform: translateY(-1px);
  border-color: #d7ddf1;
  box-shadow: 0 0.75rem 1.8rem rgba(35, 45, 80, 0.07);
}

.trusted-contact-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #eaf0ff, #f3edff);
  color: #596bc0;
  font-size: 1rem;
  font-weight: 800;
}

.trusted-contact-info {
  flex: 1 1 auto;
  min-width: 0;
}

.trusted-contact-info h3 {
  overflow: hidden;
  margin: 0;
  color: #26334c;
  font-size: 0.9rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trusted-contact-email {
  overflow: hidden;
  margin: 0.12rem 0 0.45rem;
  color: #7a8498;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trusted-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  color: #79839a;
  font-size: 0.7rem;
}

.trusted-contact-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.trusted-contact-status {
  font-weight: 650;
}

.trusted-contact-status.is-active {
  color: #25815d;
}

.trusted-contact-status.is-inactive {
  color: #7e8799;
}

.trusted-contact-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.trusted-contact-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
}

.trusted-contact-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.trusted-contact-actions form {
  margin: 0;
}

.trusted-contacts-empty {
  display: grid;
  justify-items: center;
  padding: 2rem 1.25rem;
  border: 1px dashed #dce1ed;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.trusted-contacts-empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 0.8rem;
  border-radius: 18px;
  background: #f0f2ff;
  color: #6373c6;
  font-size: 1.35rem;
}

.trusted-contacts-empty h3 {
  margin: 0 0 0.3rem;
  color: #2a3650;
  font-size: 0.95rem;
  font-weight: 750;
}

.trusted-contacts-empty p {
  max-width: 24rem;
  margin: 0;
  color: #7a8498;
  font-size: 0.8rem;
  line-height: 1.55;
}

.account-flow-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 900px);
  min-height: 100%;
  margin: auto;
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow-y: auto;
}

.account-flow-card {
  width: min(100%, 520px);
  margin: auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid #e8eaf1;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 1.2rem 3.5rem rgba(35, 45, 80, 0.1);
}

.account-flow-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 1.2rem;
  border-radius: 19px;
  font-size: 1.5rem;
}

.account-flow-icon-blue {
  background: #edf2ff;
  color: #4e6bd4;
}

.account-flow-icon-green {
  background: #eaf8f0;
  color: #26835d;
}

.account-flow-icon-violet {
  background: #f1edff;
  color: #7256cb;
}

.account-flow-eyebrow {
  color: #6877bd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.account-flow-card h1 {
  margin: 0.25rem 0 0.6rem;
  color: #17233c;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.account-flow-intro {
  margin: 0 0 1.3rem;
  color: #737e94;
  font-size: 0.88rem;
  line-height: 1.65;
}

.account-flow-form .form-label {
  color: #45516a;
  font-size: 0.82rem;
  font-weight: 650;
}

.account-flow-form input,
.account-flow-form .form-control {
  min-height: 46px;
  border-color: #e2e6ef;
  border-radius: 0.72rem;
  box-shadow: none;
}

.account-flow-form input:focus,
.account-flow-form .form-control:focus {
  border-color: #9cacf0;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.12);
}

.account-flow-form .form-text {
  font-size: 0.75rem;
}

.account-flow-submit {
  min-height: 46px;
  border: 0;
  border-radius: 0.72rem;
  background: linear-gradient(135deg, #536fe0, #715ee2);
  font-size: 0.85rem;
  font-weight: 700;
}

.account-flow-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  color: #68748b;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}

.account-flow-back:hover {
  color: #4f65c1;
}

.account-flow-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem;
  border: 1px solid #e4e9f6;
  border-radius: 0.7rem;
  background: #f7f9ff;
  color: #687594;
  font-size: 0.76rem;
  line-height: 1.5;
}

.account-flow-hint i {
  margin-top: 0.08rem;
  color: #5972cc;
}

.account-flow-hint span {
  min-width: 0;
}

@media (max-width: 767.98px) {
  .trusted-contacts-page {
    padding: 1rem;
  }

  .trusted-contacts-hero {
    align-items: flex-start;
    padding: 1.15rem;
    border-radius: 1rem;
  }

  .trusted-contacts-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .trusted-contacts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .trusted-contact-card {
    flex-wrap: wrap;
  }

  .trusted-contact-actions {
    width: 100%;
    justify-content: flex-end;
    padding-left: 3.3rem;
  }

  .account-flow-main {
    align-items: flex-start;
    padding: 1rem;
  }

  .account-flow-card {
    margin: auto 0;
    border-radius: 1rem;
  }
}

.vault-recovery-panel {
  padding: 1rem;
  border: 1px solid #e5e9f2;
  border-radius: 0.9rem;
  background: #fbfcff;
}

.vault-recovery-panel[hidden] {
  display: none;
}

.vault-recovery-panel textarea {
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.vault-recovery-panel .form-control:focus,
#vault-master-change-form .form-control:focus {
  border-color: #9cacf0;
  box-shadow: 0 0 0 3px rgba(91, 112, 220, 0.12);
}

@media (max-width: 767.98px) {
  .vault-security-button {
    width: 100%;
  }
}

@keyframes vault-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

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

@keyframes vault-shimmer {
  to { background-position: -220% 0; }
}

@keyframes vault-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .vault-panes {
    grid-template-columns: minmax(285px, 0.9fr) minmax(0, 1.1fr);
  }

  .vault-toolbar {
    padding: 1.2rem;
  }

  .vault-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .vault-new-button {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .vault-panes {
    position: relative;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .pane-list {
    border-right: 0;
  }

  .pane-detail {
    position: absolute;
    inset: 0;
    z-index: 2;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .vault-panes[data-view="detail"] .pane-detail {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }
}

@media (max-width: 767.98px) {
  .vault-welcome {
    margin-bottom: 1.1rem;
  }

  .vault-toolbar {
    padding: 1.1rem 1rem 0.9rem;
  }

  .vault-page-subtitle {
    font-size: 0.82rem;
  }

  .vault-toolbar-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 0.6rem;
  }

  .vault-new-button {
    width: 100%;
  }

  .vault-list-toolbar {
    margin-top: 1rem;
  }

  .vault-filter-row {
    margin-top: 0.65rem;
  }

  .vault-filter {
    flex: 1 1 0;
    padding-inline: 0.35rem;
  }

  .pane-detail-header {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
  }

  .secret-detail {
    padding: 1.1rem;
  }

  .vault-detail-empty {
    min-height: calc(100% - 1rem);
  }
}

@media (max-width: 600px) {
  .home-header {
    padding: 1rem 1.1rem;
  }

  .home-hero {
    min-height: 70svh;
  }

  .home-hero-content {
    padding: 8rem 1.4rem 3.25rem;
  }

  .home-hero h1 {
    font-size: 48px;
  }

  .home-hero-copy {
    font-size: 1rem;
  }

  .home-next {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.6rem 1.4rem 2rem;
  }

  .home-next h2 {
    font-size: 26px;
  }
}

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