/*
 * Shared interface pieces: dropdowns, glass notices, page headers with icons,
 * identity cards and the small touches that make each page feel finished.
 */

/* ===========================================================================
   Dropdowns
   ======================================================================== */

.nbs { position: relative; }
.nbs-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  margin: 0;
}
.nbs-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 46px;
  padding: .7rem .85rem;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.nbs-btn:hover { border-color: #94a3b8; }
.nbs-btn:focus-visible,
.nbs-btn[aria-expanded="true"] {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .16);
}
.nbs-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nbs-value.is-placeholder { color: #94a3b8; }
.nbs-btn > svg { width: 18px; height: 18px; flex: none; color: #64748b; transition: transform .25s ease; }
.nbs-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }

/* The panel: a popover on desktop. */
.nbs-pop {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 48px rgba(15, 30, 60, .18);
  opacity: 0;
  transform: translateY(-6px) scale(.99);
  transform-origin: top center;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
.nbs-pop.is-open { opacity: 1; transform: none; }
.nbs-pop[hidden] { display: none; }
.nbs-sheet-grip, .nbs-head { display: none; }

.nbs-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .75rem;
  border-bottom: 1px solid #eef2f7;
}
.nbs-search[hidden] { display: none; }
.nbs-search svg { width: 16px; height: 16px; color: #94a3b8; flex: none; }
.nbs-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
}
.nbs-search input:focus { outline: none; }

.nbs-list {
  list-style: none;
  margin: 0;
  padding: .3rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
}
.nbs-opt {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .7rem;
  border-radius: 9px;
  font-size: .95rem;
  color: var(--ink);
  cursor: pointer;
}
.nbs-opt[hidden] { display: none; }
.nbs-opt > span { flex: 1; min-width: 0; }
.nbs-opt > svg { width: 17px; height: 17px; flex: none; color: var(--brand); opacity: 0; }
.nbs-opt.is-active { background: #f1f5fb; }
.nbs-opt.is-selected { color: var(--brand); font-weight: 600; }
.nbs-opt.is-selected > svg { opacity: 1; }
.nbs-opt.is-placeholder { color: #94a3b8; }
.nbs-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.nbs-scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(8, 21, 38, .42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s ease;
}
.nbs-scrim.is-open { opacity: 1; }
.nbs-scrim[hidden] { display: none; }
body.nbs-locked { overflow: hidden; }

/* Phones: a bottom sheet with big targets, instead of a small popover. */
@media (max-width: 640px) {
  .nbs-pop.is-sheet {
    left: 0 !important;
    right: 0;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    max-height: min(72vh, 560px) !important;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-radius: 22px 22px 0 0;
    border: 0;
    box-shadow: 0 -18px 48px rgba(5, 14, 30, .3);
    transform: translateY(100%);
    transform-origin: bottom center;
    transition: transform .32s cubic-bezier(.2, .9, .25, 1), opacity .2s ease;
  }
  .nbs-pop.is-sheet.is-open { transform: none; }
  .nbs-pop.is-sheet .nbs-sheet-grip {
    display: block;
    width: 40px;
    height: 4px;
    margin: .55rem auto .2rem;
    border-radius: 2px;
    background: #cbd5e1;
    flex: none;
  }
  .nbs-pop.is-sheet .nbs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem 1rem .7rem;
    border-bottom: 1px solid #eef2f7;
  }
  .nbs-pop.is-sheet .nbs-head strong { font-size: 1.02rem; letter-spacing: -.01em; }
  .nbs-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
  }
  .nbs-close svg { width: 17px; height: 17px; }
  .nbs-pop.is-sheet .nbs-search { padding: .7rem 1rem; }
  .nbs-pop.is-sheet .nbs-list { padding: .4rem .6rem 1rem; }
  .nbs-pop.is-sheet .nbs-opt { padding: .9rem .8rem; font-size: 1rem; border-radius: 12px; }
  .nbs-pop.is-sheet .nbs-opt + .nbs-opt { border-top: 1px solid #f1f5f9; }
  .nbs-pop.is-sheet .nbs-opt.is-selected { background: var(--brand-soft); }
}

@media (prefers-reduced-motion: reduce) {
  .nbs-pop, .nbs-pop.is-sheet, .nbs-scrim { transition: none; }
}

/* ===========================================================================
   Notices: white frosted glass rather than a block of colour
   ======================================================================== */

.kyc-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(15, 30, 60, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
/* A soft wash of the status colour, kept well behind the text. */
.kyc-banner::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -10%;
  height: 160%;
  z-index: -1;
  background: radial-gradient(60% 70% at 15% 30%, rgba(29, 78, 216, .16), transparent 70%);
}
.kyc-banner-unverified, .kyc-banner-pending, .kyc-banner-rejected {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(255, 255, 255, .9);
}
.kyc-banner-rejected::before { background: radial-gradient(60% 70% at 15% 30%, rgba(220, 38, 38, .16), transparent 70%); }
.kyc-banner-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  color: var(--brand);
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(232, 239, 253, .85));
  border: 1px solid rgba(203, 213, 225, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.kyc-banner-icon svg { width: 22px; height: 22px; }
.kyc-banner-rejected .kyc-banner-icon { color: #b91c1c; background: linear-gradient(160deg, #fff, #fee2e2); border-color: #fecaca; }
.kyc-banner-pending .kyc-banner-icon { color: #b45309; background: linear-gradient(160deg, #fff, #fef3c7); border-color: #fde68a; }
.kyc-banner-body { flex: 1; min-width: 0; }
.kyc-banner-title { font-weight: 650; letter-spacing: -.01em; color: var(--navy-900); }
.kyc-banner-body p:last-child { color: var(--ink-muted); font-size: .92rem; margin-top: .2rem; line-height: 1.55; }
.kyc-banner-close { color: var(--ink-subtle); }
.kyc-banner-close:hover { background: rgba(15, 23, 42, .06); color: var(--ink); }

@media (max-width: 640px) {
  /* Icon beside the words, buttons on their own row underneath. */
  .kyc-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon body" "actions actions";
    align-items: start;
    gap: .85rem;
    padding: 1rem;
  }
  .kyc-banner-icon { grid-area: icon; width: 40px; height: 40px; border-radius: 12px; }
  .kyc-banner-icon svg { width: 20px; height: 20px; }
  .kyc-banner-body { grid-area: body; }
  .kyc-banner-actions { grid-area: actions; width: 100%; }
  .kyc-banner-actions .btn { flex: 1; justify-content: center; }
}

/* ===========================================================================
   Page headers with an icon
   ======================================================================== */

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  color: #334155;
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(226, 232, 240, .85));
  border: 1px solid rgba(203, 213, 225, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.page-head-icon svg { width: 22px; height: 22px; }
.page-head-text { flex: 1; min-width: 0; }
.page-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

@media (max-width: 640px) {
  .page-head { gap: .8rem; }
  .page-head-icon { width: 40px; height: 40px; border-radius: 12px; }
  .page-head-icon svg { width: 19px; height: 19px; }
  .page-head h1 { font-size: 1.4rem; }
  .page-head p { font-size: .92rem; }
}

/* ===========================================================================
   Small touches that stop pages feeling bare
   ======================================================================== */

/* Section headings with a quiet icon. */
.section-head h2 { display: flex; align-items: center; gap: .5rem; }
.section-head h2 svg { width: 17px; height: 17px; color: #94a3b8; flex: none; }

/* Form sections: a numbered marker instead of a plain heading. */
.form-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding-bottom: .7rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.form-section-title svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* Empty states with an illustration instead of one grey line. */
.empty-state {
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.empty-state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #94a3b8;
  background: linear-gradient(160deg, #f8fafc, #eef2f7);
  border: 1px solid var(--line);
}
.empty-state-icon svg { width: 26px; height: 26px; }
.empty-state strong { font-size: 1.02rem; color: var(--ink); }
.empty-state p { color: var(--ink-muted); font-size: .92rem; max-width: 28rem; }
.empty-state .btn { margin-top: .5rem; }

/* Detail lists read as rows, not a wall of text. */
.detail-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 34%) 1fr;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--ink-subtle); font-size: .88rem; }
.detail-list dd { margin: 0; font-weight: 550; }

@media (max-width: 560px) {
  .detail-list > div { grid-template-columns: 1fr; gap: .15rem; }
}

/* ===========================================================================
   Card preview
   ======================================================================== */

.cardviz-wrap {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.cardviz {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1.585;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #14305c 0%, var(--navy-900) 45%, #0a1830 100%);
  box-shadow: 0 20px 44px rgba(11, 27, 51, .32);
}
.cardviz::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 280px;
  height: 280px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .5), transparent 70%);
}
.cardviz-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cardviz-brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 650; letter-spacing: -.01em; }
.cardviz-brand .brand-mark { width: 20px; height: 20px; color: #93b4f5; }
.cardviz-type {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
}
.cardviz-chip {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 40px;
  height: 30px;
  margin: 1.1rem 0 auto;
  padding: 5px 6px;
  border-radius: 7px;
  background: linear-gradient(145deg, #e8c66a, #b98f2c);
}
.cardviz-chip span { display: block; height: 2px; border-radius: 1px; background: rgba(74, 52, 5, .45); }
.cardviz-number {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  margin-bottom: .9rem;
}
.cardviz-foot { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; }
.cardviz-foot em {
  display: block;
  font-style: normal;
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #93a9c9;
  margin-bottom: .15rem;
}
.cardviz-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cardviz-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.cardviz-perks li { display: flex; gap: .6rem; align-items: center; font-size: .94rem; color: var(--ink-muted); }
.cardviz-perks svg {
  width: 20px;
  height: 20px;
  flex: none;
  padding: 3px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

@media (max-width: 720px) {
  .cardviz-wrap { grid-template-columns: 1fr; gap: 1.1rem; }
  .cardviz { max-width: 330px; margin: 0 auto; width: 100%; }
  .cardviz-perks { gap: .55rem; }
  .cardviz-perks li { font-size: .88rem; }
}

/* ===========================================================================
   Stat tiles on phones: a compact row, not one tile per screen
   ======================================================================== */

@media (max-width: 640px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat-strip-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .stat-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon label" "value value";
    align-items: center;
    column-gap: .45rem;
    row-gap: .25rem;
    padding: .7rem .65rem;
  }
  .stat-tile-icon { grid-area: icon; width: 26px; height: 26px; border-radius: 8px; }
  .stat-tile-icon svg { width: 14px; height: 14px; }
  .stat-tile > div { display: contents; }
  .stat-tile-label { grid-area: label; font-size: .72rem; line-height: 1.2; }
  .stat-tile-value { grid-area: value; font-size: 1.02rem; letter-spacing: -.02em; }
  .stat-strip-3 .stat-tile-value { font-size: .95rem; }
}

/* A failed dropdown has to show on the control people can actually see. */
.nbs-native.has-error ~ .nbs-btn,
.nbs-native[aria-invalid="true"] ~ .nbs-btn {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}

/* ===========================================================================
   Frosted pages: soft shapes behind, glass cards on top
   ======================================================================== */

.glass-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glass-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.glass-bg span:first-child {
  width: 460px;
  height: 460px;
  top: -140px;
  right: -120px;
  background: rgba(59, 130, 246, .28);
}
.glass-bg span:last-child {
  width: 380px;
  height: 380px;
  bottom: -120px;
  left: -100px;
  background: rgba(129, 140, 248, .22);
}

.page-glass .card,
.page-glass .panel {
  background: rgba(255, 255, 255, .68);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(15, 30, 60, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.page-glass .section-head h2 { color: var(--navy-900); }
.page-glass .form-section-title { border-bottom-color: rgba(203, 213, 225, .65); }
/* Inputs sit on glass, so they need a touch more substance. */
.page-glass .input,
.page-glass .nbs-btn,
.page-glass .select {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(148, 163, 184, .5);
}

/* Profile icon above the status. */
.verify-hero { display: grid; justify-items: center; text-align: center; gap: .4rem; padding: .5rem 0 1.4rem; }
.verify-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: .6rem;
  border-radius: 50%;
  color: #475569;
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(226, 232, 240, .75));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 26px rgba(15, 30, 60, .12), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.verify-avatar > svg { width: 42px; height: 42px; }
.verify-tick {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(150deg, #34d399, #059669);
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(5, 150, 105, .35);
}
.verify-tick svg { width: 14px; height: 14px; }
.verify-avatar.is-pending .verify-tick { background: linear-gradient(150deg, #fbbf24, #d97706); box-shadow: 0 4px 10px rgba(217, 119, 6, .35); }
.verify-avatar.is-rejected .verify-tick { background: linear-gradient(150deg, #f87171, #dc2626); box-shadow: 0 4px 10px rgba(220, 38, 38, .35); }
.verify-hero h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.verify-hero p { color: var(--ink-muted); font-size: .94rem; max-width: 26rem; line-height: 1.6; }

/* Detail rows with a clean glyph each. */
.info-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.info-rows li {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem .2rem;
  border-top: 1px solid rgba(203, 213, 225, .5);
}
.info-rows li:first-child { border-top: 0; }
.info-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  color: #475569;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(203, 213, 225, .7);
}
.info-ico svg { width: 18px; height: 18px; }
.info-text { display: grid; gap: .1rem; min-width: 0; }
.info-text em { font-style: normal; font-size: .8rem; color: var(--ink-subtle); }
.info-text strong { font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }

.page-glass .mini-title { display: flex; align-items: center; gap: .5rem; }
.page-glass .mini-title svg { width: 17px; height: 17px; color: var(--brand); flex: none; }

@media (max-width: 640px) {
  .verify-avatar { width: 72px; height: 72px; }
  .verify-avatar > svg { width: 36px; height: 36px; }
  .verify-hero h2 { font-size: 1.12rem; }
  .info-ico { width: 34px; height: 34px; border-radius: 10px; }
  .info-ico svg { width: 16px; height: 16px; }
}

/* ===========================================================================
   Glass everywhere in the signed-in app
   Every card and panel gets the same frosted treatment as the verification
   page, over the soft shapes rendered once by the shell.
   ======================================================================== */

.chrome-app .card,
.chrome-app .panel {
  background: rgba(255, 255, 255, .68);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(15, 30, 60, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
/* Controls need a little more body when they sit on glass. */
.chrome-app .input,
.chrome-app .select,
.chrome-app .nbs-btn,
.chrome-app textarea.input {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(148, 163, 184, .5);
}
.chrome-app .form-section-title { border-bottom-color: rgba(203, 213, 225, .65); }
.chrome-app .table th { background: rgba(248, 250, 252, .7); }
.chrome-app .table td { border-bottom-color: rgba(203, 213, 225, .45); }
.chrome-app .tx-item,
.chrome-app .account-card,
.chrome-app .stat-tile { border-color: rgba(203, 213, 225, .55); }

/* Pieces that carry their own colour keep it — they are the anchors. */
.chrome-app .hero-panel,
.chrome-app .banner,
.chrome-app .cardviz { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------------------------------------------------------------------------
   Page heading: a compact glass bar instead of text floating in space
   ------------------------------------------------------------------------ */

.chrome-app .page-head {
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.1rem;
  margin-bottom: 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 6px 20px rgba(15, 30, 60, .06);
}
.chrome-app .page-head-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(226, 232, 240, .8));
}
.chrome-app .page-head-icon svg { width: 20px; height: 20px; }
.chrome-app .page-head h1 { font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.2; }
.chrome-app .page-head p { font-size: .88rem; line-height: 1.45; margin-top: .15rem; }

@media (max-width: 640px) {
  .chrome-app .page-head { padding: .75rem .9rem; gap: .7rem; border-radius: 16px; }
  .chrome-app .page-head-icon { width: 38px; height: 38px; border-radius: 11px; }
  .chrome-app .page-head-icon svg { width: 18px; height: 18px; }
  .chrome-app .page-head h1 { font-size: 1.12rem; }
  .chrome-app .page-head p { font-size: .82rem; }
  /* Fewer, lighter blurs on phones keeps scrolling smooth. */
  .chrome-app .card,
  .chrome-app .panel { backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); }
}

/* ===========================================================================
   Wide tables on phones: each row becomes a small card
   ======================================================================== */

@media (max-width: 700px) {
  .table-stack { border-collapse: separate; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack,
  .table-stack tbody,
  .table-stack tr,
  .table-stack td { display: block; width: 100%; }
  .table-stack tr {
    padding: .85rem 1rem;
    border-bottom: 1px solid rgba(203, 213, 225, .5);
  }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .3rem 0;
    border: 0;
    text-align: right;
  }
  /* The column name travels with the value. */
  .table-stack td::before {
    content: attr(data-label);
    flex: none;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ink-subtle);
    text-align: left;
  }
  .table-stack td:not([data-label])::before { content: none; }
  .table-stack td.cell-right { text-align: right; }
  /* A cell with its own stacked content reads better on its own line. */
  .table-stack td[data-label="Subject"],
  .table-stack td[data-label="Customer"] {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: .15rem;
  }
  .table-stack .row-actions { justify-content: flex-end; width: 100%; }
  .table-stack .req-reply { width: 100%; }
}

/* The account detail header matches the glass bar on every other page. */
.chrome-app .detail-head {
  align-items: center;
  padding: 1rem 1.15rem;
  margin-bottom: 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 6px 20px rgba(15, 30, 60, .06);
}
.chrome-app .detail-head h1 { font-size: 1.3rem; letter-spacing: -.025em; }

@media (max-width: 640px) {
  .chrome-app .detail-head { padding: .85rem .95rem; border-radius: 16px; }
  .chrome-app .detail-head h1 { font-size: 1.12rem; }
}

/* ---------------------------------------------------------------------------
   Section labels between cards
   These sit on the page rather than inside a card, so they read as quiet
   labels for the group below instead of competing with the page heading.
   ------------------------------------------------------------------------ */

.chrome-app .section-head {
  align-items: center;
  margin: 1.6rem .35rem .7rem;
}
.chrome-app .section-head:first-child { margin-top: 0; }
.chrome-app .section-head h2 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.chrome-app .section-head h2 svg { width: 15px; height: 15px; }
.chrome-app .section-head a { font-size: .85rem; font-weight: 600; }

/* Inside a panel the heading is the panel's own title, so it stays a heading. */
.chrome-app .panel > .section-head,
.chrome-app .card .section-head {
  margin: 0 0 .85rem;
}
.chrome-app .panel > .section-head h2,
.chrome-app .card .section-head h2 {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--ink);
}

/* ===========================================================================
   Email confirmation screen
   ======================================================================== */

.verify-card { text-align: center; }
.verify-mail {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: .25rem auto 1rem;
  border-radius: 50%;
  color: var(--brand);
  background: linear-gradient(160deg, #fff, var(--brand-soft));
  border: 1px solid rgba(203, 213, 225, .9);
  box-shadow: 0 8px 22px rgba(15, 30, 60, .1);
}
.verify-mail svg { width: 30px; height: 30px; }
.verify-card .auth-sub { margin-bottom: 1.5rem; }
.code-input {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: .5em;
  text-indent: .5em;   /* keeps the tracking from pushing the text off-centre */
  padding: .75rem .5rem;
  font-variant-numeric: tabular-nums;
}
.code-input::placeholder { color: #cbd5e1; letter-spacing: .5em; }
.verify-resend { margin-top: 1.1rem; }
.verify-resend p { font-size: .9rem; color: var(--ink-muted); }
.link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
}
.link-button[disabled] { color: var(--ink-subtle); cursor: not-allowed; text-decoration: none; }
.verify-wait { color: var(--ink-subtle); font-size: .85rem; }
.alert-info { background: var(--brand-soft); border: 1px solid #c7d8f8; color: #1e3a8a; }

/* A dropdown inside an icon field: fill the row, and leave room for the glyph. */
.input-icon .nbs { flex: 1; min-width: 0; }
.input-icon .nbs-btn { padding-left: 2.75rem; }
.input-icon:focus-within > svg { color: var(--brand); }

/* ===========================================================================
   Appearance picker (Settings)
   ======================================================================== */
.theme-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; border: 0; margin: 0; padding: 0; }
.theme-option { position: relative; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.theme-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .9rem .5rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .6);
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.theme-option-card svg { width: 26px; height: 26px; color: var(--ink-muted); margin-bottom: .15rem; }
.theme-option-card strong { font-size: .88rem; color: var(--ink); }
.theme-option-card small { font-size: .72rem; color: var(--ink-subtle); line-height: 1.3; }
.theme-option:hover .theme-option-card { border-color: #93b4f5; }
.theme-option input:checked + .theme-option-card {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
.theme-option input:checked + .theme-option-card svg { color: var(--brand); }
.theme-option input:focus-visible + .theme-option-card { outline: 2px solid var(--brand); outline-offset: 2px; }
[data-theme="dark"] .theme-option-card { background: rgba(22, 35, 58, .7); }
[data-theme="dark"] .theme-option input:checked + .theme-option-card svg { color: #93c5fd; }

/* Grid columns may shrink below their content's natural width, so long
   dropdown values truncate instead of pushing the page wider than the phone. */
.columns > * { min-width: 0; }

/* ===========================================================================
   Language pill (public pages)
   ======================================================================== */
.lang-switch { position: fixed; left: 16px; bottom: 16px; z-index: 70; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 30, 60, .16);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.lang-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 30, 60, .22); }
.lang-flag { width: 22px; height: 15px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); }
.lang-caret { width: 16px; height: 16px; color: var(--ink-subtle); transition: transform .2s ease; }
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 190px;
  padding: .35rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .1);
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 30, 60, .24);
  animation: langIn .18s ease both;
}
.lang-menu[hidden] { display: none; }
@keyframes langIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lang-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .6rem .7rem;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.lang-option:hover { background: #f1f5fb; }
.lang-option.is-active { color: var(--brand); font-weight: 650; }
.lang-option > svg:not(.lang-flag) { width: 16px; height: 16px; margin-left: auto; color: var(--brand); }
.lang-option > span { flex: 1; }
@media (max-width: 640px) {
  .lang-switch { left: 12px; bottom: 12px; }
  .lang-btn { padding: .5rem .7rem; }
}
@media print { .lang-switch { display: none; } }

/* ===========================================================================
   Contact and mortgage pages
   ======================================================================== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.contact-card {
  padding: 1.4rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: .9rem;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}
.contact-icon svg { width: 21px; height: 21px; }
.contact-label { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: .25rem; }
.contact-value { font-size: 1.02rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.5; }
a.contact-value:hover { color: var(--brand); text-decoration: underline; }
.contact-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1.75rem;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: #fff;
}
.contact-cta h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.contact-cta p { color: #c5d5ee; max-width: 46ch; font-size: .94rem; line-height: 1.6; }
.contact-cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.plan-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.plan-card h2 { font-size: 1.15rem; margin-bottom: .45rem; }
.plan-blurb { color: var(--ink-muted); font-size: .93rem; line-height: 1.6; }
.plan-points { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; gap: .55rem; }
.plan-points li { display: flex; align-items: flex-start; gap: .55rem; font-size: .9rem; color: var(--ink-muted); }
.plan-points svg { width: 16px; height: 16px; color: var(--positive); flex: none; margin-top: .15rem; }
.plan-card .btn { margin-top: auto; }
.plan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.plan-steps li { display: flex; gap: 1rem; align-items: flex-start; }
.plan-step-no {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: .9rem;
}
.plan-steps strong { display: block; font-size: 1rem; }
.plan-steps p { color: var(--ink-muted); font-size: .92rem; margin-top: .15rem; }

.footer-contact { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; margin: 0 auto 1rem; padding: 0 1.5rem; }
.footer-contact-item { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; color: #c5d5ee; }
.footer-contact-item svg { width: 15px; height: 15px; opacity: .8; }
.footer-contact-item a { color: inherit; text-decoration: none; }
.footer-contact-item a:hover { color: #fff; text-decoration: underline; }

/* Mortgage hero: the film sits behind the wording. */
.mortgage-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  padding: 5rem 1.5rem 4.5rem;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, #173a78 100%);
}
.mortgage-hero .hero-media { position: absolute; inset: 0; z-index: -2; }
.mortgage-hero .hero-bg { width: 100%; height: 100%; object-fit: cover; }
.mortgage-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 20, 40, .82), rgba(8, 20, 40, .62) 45%, rgba(8, 20, 40, .88));
}
.mortgage-hero .pill { background: rgba(255, 255, 255, .16); color: #fff; }
.mortgage-hero h1 { color: #fff; }
.mortgage-hero .legal-lead { color: #d6e2f6; }
@media (prefers-reduced-motion: reduce) { .mortgage-hero .hero-bg { display: none; } }

/* Footer links in two columns, so they do not run down one side. */
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1.75rem;
  align-content: start;
}
@media (min-width: 900px) { .footer-links { gap: .6rem 2.5rem; } }

/* A note the customer should read before filling a form in. */
.form-note {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: .9rem 1rem;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid rgba(29, 78, 216, .18);
}
.form-note-tag {
  flex: none;
  padding: .1rem .45rem;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.form-note p { font-size: .9rem; line-height: 1.55; color: var(--ink-muted); }
[data-theme="dark"] .form-note { background: rgba(59, 130, 246, .12); border-color: rgba(96, 165, 250, .3); }
[data-theme="dark"] .form-note p { color: #cfdcf0; }

/* Admin: rows of extra details on the request-form editor. */
.form-field-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .55rem; }
.form-field-row .input { flex: 1 1 14rem; min-width: 0; }
.form-field-row .check { font-size: .84rem; white-space: nowrap; }
@media (max-width: 700px) { .form-field-row .input { flex-basis: 100%; } }

/* ===========================================================================
   Paying money in: where to send it, and the card form
   ======================================================================== */
.pay-panel { margin: 1.25rem 0; }
.pay-panel[hidden] { display: none; }
.pay-lead { font-size: .93rem; color: var(--ink-muted); margin-bottom: .9rem; }
.pay-grid { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.pay-rows { flex: 1 1 18rem; min-width: 0; display: grid; gap: .5rem; }
.pay-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .75rem;
  align-items: center;
  padding: .7rem .85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}
.pay-label { grid-column: 1; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); }
.pay-value { grid-column: 1; font-size: .98rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.pay-address { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.btn-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-copy svg { width: 15px; height: 15px; }
.btn-copy:hover { color: var(--brand); border-color: var(--brand-light); }
.btn-copy.is-copied { background: var(--success-soft); border-color: #86efac; color: var(--positive); }
.pay-qr {
  flex: 0 0 auto;
  margin: 0;
  padding: .7rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}
.pay-qr img { display: block; width: 148px; height: 148px; object-fit: contain; }
.pay-qr figcaption { margin-top: .4rem; font-size: .76rem; color: var(--ink-subtle); }
.pay-note { margin-top: .85rem; font-size: .88rem; color: var(--ink-muted); }

.card-input { position: relative; }
.card-input .input { padding-right: 7.5rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.card-brand {
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-subtle);
  pointer-events: none;
  white-space: nowrap;
}
.card-brand.is-known { color: var(--brand); }

/* Admin: the uploaded QR code preview. */
.qr-preview { margin: 0 0 .85rem; }
.qr-preview img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  padding: .5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

[data-theme="dark"] .pay-row { background: rgba(22, 35, 58, .7); border-color: var(--line); }
[data-theme="dark"] .btn-copy { background: var(--dk-raise); border-color: #2a3c59; color: var(--ink-muted); }
[data-theme="dark"] .btn-copy:hover { color: #93c5fd; border-color: #3f6099; }
[data-theme="dark"] .btn-copy.is-copied { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .4); color: #6ee7b7; }
[data-theme="dark"] .pay-qr { background: #fff; }

@media (max-width: 640px) {
  .pay-row { grid-template-columns: 1fr; }
  .btn-copy { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .4rem; }
  .pay-qr { margin: 0 auto; }
}

/* ===========================================================================
   Cookie notice
   ======================================================================== */
.cookie-notice {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: min(760px, calc(100vw - 32px));
  padding: .9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 48px rgba(15, 30, 60, .22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: cookieIn .3s ease both;
}
@keyframes cookieIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cookie-notice-body { display: flex; gap: .8rem; align-items: flex-start; flex: 1 1 22rem; min-width: 0; }
.cookie-notice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.cookie-notice-icon svg { width: 19px; height: 19px; }
.cookie-notice p { font-size: .87rem; line-height: 1.55; color: var(--ink-muted); }
.cookie-notice strong { display: block; color: var(--ink); font-size: .93rem; }
.cookie-notice a { color: var(--brand); }
.cookie-notice-actions { display: flex; gap: .5rem; flex: none; }

/* Keep the language pill and the phone tab bar clear of it. */
body.has-cookie-notice .lang-switch { bottom: 108px; }
.chrome-app .cookie-notice { bottom: 16px; }
@media (max-width: 860px) {
  .chrome-app .cookie-notice { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .cookie-notice { flex-direction: column; align-items: stretch; gap: .75rem; padding: .9rem 1rem; }
  /* Side by side and only as wide as they need to be. */
  .cookie-notice-actions { justify-content: flex-end; }
  .cookie-notice-actions .btn { flex: 0 0 auto; min-width: 6.5rem; justify-content: center; }
  body.has-cookie-notice .lang-switch { bottom: 156px; }
}

[data-theme="dark"] .cookie-notice {
  background: rgba(17, 28, 46, .96);
  border-color: var(--dk-glass-line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}
@media print { .cookie-notice { display: none; } }
/* Decline sits quietly next to Accept. */
.cookie-notice-actions .btn-ghost-dark { color: var(--ink-muted); border: 1px solid var(--line); background: transparent; }
.cookie-notice-actions .btn-ghost-dark:hover { color: var(--ink); background: rgba(15, 23, 42, .05); }
[data-theme="dark"] .cookie-notice-actions .btn-ghost-dark { border-color: var(--dk-glass-line); }
[data-theme="dark"] .cookie-notice-actions .btn-ghost-dark:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
