/* CTO-157 step 1: the locked design frame (Direction A, Soft, Cyan).
   Loaded last, so these rules win. Palette (brand-colors.md): primary #1A7395,
   slate #46565F, tints #B2CFD3 (borders) / #D1E2E5 (card fill) / #E0ECED (band)
   / #F0F5F6 (page). Never primary-coloured text on #B2CFD3. Manrope 400/500/600. */

:root {
  --v-card-shadow: 0 1px 2px rgba(18, 24, 31, .04), 0 4px 14px rgba(26, 115, 149, .08);
  --v-radius-group: 16px;
  --v-radius-card: 13px;
  --v-bar-height: 72px;
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--surface);
  color: var(--text-primary);
  padding-bottom: calc(var(--v-bar-height) + env(safe-area-inset-bottom, 0px));
}

/* ── App bar ──────────────────────────────────────────────────────────── */

.appbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 8px 8px 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.avatar,
.avatar:visited {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.appbar-who {
  flex: 1;
  min-width: 0;
}

.appbar-name,
.appbar-name:visited {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-primary);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.appbar-sub {
  margin-top: 1px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.appbar-caret {
  flex: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.for-person {
  margin: 2px 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.appbar-menu {
  position: relative;
  flex: none;
}

.appbar-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  list-style: none;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
}

.appbar-menu > summary::-webkit-details-marker {
  display: none;
}

.appbar-menu > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.appbar-menu-panel {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 214px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--v-radius-card);
  box-shadow: var(--v-card-shadow);
}

.vault-signout {
  margin: 0;
}

.vault-signout-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  text-align: left;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
}

.vault-signout-btn:hover {
  background: var(--accent-light);
}

/* ── Test-mode line: one thin line under the app bar ──────────────────── */

.vault-test-banner {
  padding: 6px 16px;
  background: var(--accent-light);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

/* ── Page body ────────────────────────────────────────────────────────── */

.vault-main {
  padding: 16px;
  max-width: 560px;
}

.vault-panel-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.vault-panel-title--sm {
  font-size: 14px;
}

/* ── Shared Soft pieces ───────────────────────────────────────────────── */

.btn-extract {
  min-height: 48px;
  border-radius: var(--v-radius-card);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}

.vault-saved-card,
.soon-card {
  border: 1px solid var(--border);
  box-shadow: var(--v-card-shadow);
}

/* Coming-soon pages: Documents and Share. */
.coming-soon {
  margin-top: 8px;
  padding: 22px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--v-radius-group);
  box-shadow: var(--v-card-shadow);
}

.coming-soon h2 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.coming-soon p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.coming-soon .btn-extract {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  text-decoration: none;
}

@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
  }
}
