/* Volume Broker Portal – demo styles (Volume Design System colours and type) */
:root {
  --core-01: #141e2e;   /* text, dark surfaces */
  --core-02: #a9dbdc;   /* buttons, active nav */
  --core-03: #eeeedf;   /* highlights */
  --teal: #97c2c3;      /* icons */
  --teal-deep: #6d9293;
  --grey-050: #f3f4f5;
  --tint-05: rgba(20, 30, 46, 0.05);
  --tint-10: rgba(20, 30, 46, 0.1);
  --tint-15: rgba(20, 30, 46, 0.15);
  --tint-20: rgba(20, 30, 46, 0.2);
  --tint-30: rgba(20, 30, 46, 0.3);
  --text-2: rgba(20, 30, 46, 0.75);
  --font-heading: "Exo 2", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: var(--core-01); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--core-01); }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--core-02); outline-offset: 2px; }
h1, h2 { font-family: var(--font-heading); font-weight: 500; line-height: 1; margin: 0; }
.icon { width: 1em; height: 1em; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 260px; max-width: 100%; background: var(--core-01); color: #fff; padding: 40px 30px; display: flex; flex-direction: column; gap: 40px; }
.brand { display: flex; align-items: center; gap: 0; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-sub { white-space: nowrap; font-family: var(--font-heading); font-size: 15px; line-height: 1; color: var(--core-02); margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.3); align-self: center; padding-top: 4px; padding-bottom: 4px; }
.nav { display: flex; flex-direction: column; gap: 10px; }
.nav a { display: flex; align-items: center; gap: 15px; height: 50px; padding: 0 20px; border-radius: 10px; color: #fff; text-decoration: none; }
.nav a .icon { font-size: 18px; color: var(--teal); }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a[aria-current="page"] { background: var(--core-02); color: var(--core-01); font-weight: 700; }
.nav a[aria-current="page"] .icon { color: var(--core-01); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 20px; padding: 0 20px; }
.side-foot a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.side-foot a:hover { color: var(--core-02); }
.legal { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.legal a { color: rgba(255, 255, 255, 0.75); }

.main { flex: 999 1 560px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 30px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 20px; }
.avatar { width: 50px; height: 50px; border-radius: 999px; background: var(--core-03); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head h1 { font-size: 40px; }
.page-head p { margin: 10px 0 0; color: var(--text-2); }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 43px; padding: 0 20px; border: none; border-radius: 10px; font: 600 15px var(--font-body); text-decoration: none; cursor: pointer; }
.btn-dark { background: var(--core-01); color: var(--core-03); }
.btn-dark:hover { color: var(--core-03); filter: brightness(1.15); }
.btn-accent { background: var(--core-02); color: var(--core-01); }
.btn-accent:hover { color: var(--core-01); filter: brightness(0.97); }
.btn-outline { height: 35px; padding: 0 15px; border-radius: 5px; background: #fff; box-shadow: inset 0 0 0 1px var(--tint-20); font-size: 12px; color: var(--core-01); }
.btn-outline:hover { background: var(--tint-05); }

.seg { display: inline-flex; gap: 5px; padding: 5px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--tint-20); }
.seg button { height: 35px; padding: 0 15px; border: none; border-radius: 5px; background: transparent; font: 400 15px var(--font-body); color: var(--core-01); cursor: pointer; }
.seg button:hover { background: var(--tint-05); }
.seg button[aria-pressed="true"] { background: var(--core-01); color: var(--core-03); font-weight: 600; }

.tabs { display: inline-flex; gap: 30px; border-bottom: 1px solid var(--tint-15); }
.tabs button { height: 44px; padding: 0; margin-bottom: -1px; border: none; border-bottom: 3px solid transparent; background: transparent; font: 400 15px var(--font-body); color: var(--core-01); cursor: pointer; }
.tabs button[aria-selected="true"] { font-weight: 700; border-bottom-color: var(--core-01); }

.input { height: 40px; padding: 0 15px; border: none; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--tint-20); background: #fff; font: 15px var(--font-body); color: var(--core-01); }
.search { position: relative; width: 300px; max-width: 100%; }
.search .icon { position: absolute; left: 15px; top: 12px; color: var(--teal-deep); }
.search .input { width: 100%; padding-left: 40px; }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-wrap: wrap; gap: 30px; align-items: stretch; }
.tiles { flex: 2 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 15px; min-height: 260px; padding: 30px; border-radius: 15px; text-decoration: none; color: var(--core-01); text-align: center; }
.tile:hover { color: var(--core-01); filter: brightness(0.98); }
.tile-head { align-self: stretch; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 17px; text-align: left; }
.tile-num { font-family: var(--font-heading); font-weight: 500; font-size: 80px; line-height: 1; }
.tile-sub { color: var(--text-2); }
.tile-grey { background: var(--grey-050); }
.tile-outline { background: #fff; box-shadow: inset 0 0 0 2px var(--tint-30); }
.tile-sand { background: var(--core-03); justify-content: center; }
.tile-dark { background: var(--core-01); color: var(--core-02); justify-content: center; }
.tile-dark:hover { color: var(--core-02); filter: brightness(1.15); }
.tile-dark .tile-num { font-size: clamp(28px, 3.2vw, 44px); }
.tile-dark .tile-sub { color: var(--core-03); display: inline-flex; align-items: center; gap: 10px; }

.panel { flex: 1 1 300px; min-width: 0; padding: 30px; border-radius: 15px; background: #fff; box-shadow: inset 0 0 0 1px var(--tint-10); display: flex; flex-direction: column; gap: 20px; }
.panel h2 { font: 600 17px/1.2 var(--font-body); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed li { display: flex; gap: 15px; align-items: flex-start; padding: 15px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--tint-10); }
.dot { flex: 0 0 auto; width: 12px; height: 12px; margin-top: 5px; border-radius: 999px; }
.dot-protection { background: var(--teal); }
.dot-mortgage { background: #9a8deb; }
.feed .t { font-weight: 600; display: block; }
.feed .m { font-size: 12px; color: var(--text-2); display: block; }

/* ---------- Tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.table-box { overflow-x: auto; border-radius: 15px; box-shadow: inset 0 0 0 1px var(--tint-20); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; border-bottom: 1px solid var(--tint-15); text-align: left; white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--grey-050); }
.num { text-align: right; }
tbody tr:hover { background: var(--tint-05); }
tfoot td { background: var(--grey-050); font-weight: 700; border-bottom: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-live { background: rgba(99, 229, 186, 0.25); color: #0b5e43; }
.pill-left { background: var(--tint-10); color: var(--text-2); }
.empty { padding: 30px 20px; text-align: center; color: var(--text-2); }

/* ---------- Statements ---------- */
.latest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; padding: 40px; border-radius: 15px; background: var(--core-01); color: #fff; }
.latest h2 { font-size: 30px; color: #fff; }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--core-02); color: var(--core-01); font-size: 12px; font-weight: 700; }
.latest .meta { color: rgba(255, 255, 255, 0.75); }
.figures { display: flex; flex-wrap: wrap; gap: 40px; margin: 0; }
.figures dt { font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.figures dd { margin: 5px 0 0; font: 500 25px var(--font-heading); }
.figures .net dt, .figures .net dd { color: var(--core-02); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; }
.section-head h2 { font-size: 20px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; padding: 40px 16px; display: flex; flex-direction: column; align-items: center; gap: 60px; background: var(--core-01); color: #fff; }
.signin form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 15px; margin-top: 60px; }
.signin h1 { margin-bottom: 20px; text-align: center; font-size: 48px; line-height: 1.05; }
.signin h1 span { color: var(--core-02); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span:first-child { font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.field .wrap { position: relative; }
.field input { width: 100%; height: 56px; padding: 0 50px 0 20px; border: none; border-radius: 10px; font: 15px var(--font-body); color: var(--core-01); }
.field input::placeholder { color: rgba(20, 30, 46, 0.5); }
.field .icon { position: absolute; right: 20px; top: 19px; font-size: 18px; color: var(--teal-deep); }
.signin-btn { position: relative; height: 56px; margin-top: 10px; border: none; border-radius: 10px; background: var(--core-02); color: var(--core-01); font: 600 17px var(--font-body); cursor: pointer; }
.signin-btn .go { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border-radius: 8px; background: var(--core-01); color: var(--core-02); display: inline-flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--core-02); }
.signin .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 30px; font-size: 12px; }
.signin .links a { color: #fff; text-decoration: none; }
.signin .links a:hover { color: var(--core-02); }
.error { min-height: 20px; font-size: 12px; color: #f87171; text-align: center; }
.demo-note { font-size: 12px; color: rgba(255, 255, 255, 0.5); text-align: center; }

@media (max-width: 600px) {
  .main { padding: 24px 16px; }
  .sidebar { padding: 24px 16px; gap: 20px; }
  .side-foot { margin-top: 0; }
  .page-head h1 { font-size: 32px; }
  .tile-num { font-size: 64px; }
  .latest { padding: 24px; }
  .signin h1 { font-size: 36px; }
}

/* Hide signed-in pages until the session is confirmed */
body:not([data-page="signin"]) .shell { visibility: hidden; }
html.authed body .shell { visibility: visible; }
.sample { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--core-03); color: var(--core-01); font-size: 11px; font-weight: 600; vertical-align: middle; }
.note { margin: 0; font-size: 12px; color: var(--text-2); }

/* Refresh control */
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.refresh { display: flex; align-items: center; gap: 10px; }
.updated { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--tint-20); color: var(--core-01); cursor: pointer; font-size: 18px; }
.icon-btn:hover { background: var(--tint-05); }
.icon-btn.spinning .icon { animation: bp-spin 0.9s linear infinite; }
@keyframes bp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.spinning .icon { animation: none; } .icon-btn.spinning { opacity: 0.5; } }

/* Clickable rows and policy modal */
tr.clickable { cursor: pointer; }
.link-btn { padding: 0; border: none; background: none; font: 700 15px var(--font-body); color: var(--core-01); text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--teal-deep); }
.modal { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: none; border-radius: 15px; color: var(--core-01); box-shadow: 0 20px 60px rgba(20, 30, 46, 0.25); }
.modal::backdrop { background: rgba(20, 30, 46, 0.55); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 30px 20px; background: #fff; border-bottom: 1px solid var(--tint-15); }
.modal-head h2 { font-size: 28px; }
.modal-kicker { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--teal-deep); text-transform: uppercase; letter-spacing: 0.04em; }
.modal-sub { margin: 8px 0 0; color: var(--text-2); }
.modal-body { padding: 10px 30px 30px; }
.modal-body section { padding-top: 20px; }
.modal-body h3 { margin: 0 0 10px; font: 700 15px var(--font-heading); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 20px; margin: 0; }
.fields > div { padding: 10px 0; border-bottom: 1px solid var(--tint-10); min-width: 0; }
.fields dt { font-size: 12px; color: var(--text-2); }
.fields dd { margin: 3px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.muted { color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
@media (max-width: 600px) { .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; } }

/* Make sure hidden screens stay hidden (e.g. "Choose a new password" until it is needed) */
[hidden] { display: none !important; }

/* Adviser modal */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mini-stat { display: flex; flex-direction: column; gap: 5px; padding: 15px; border-radius: 10px; background: var(--grey-050); }
.mini-num { font: 500 30px/1 var(--font-heading); }
.mini-lbl { font-size: 12px; color: var(--text-2); }
.modal-table { max-height: 320px; overflow: auto; }
.modal-table th { position: sticky; top: 0; }
.modal-sub .pill { vertical-align: middle; }
