/* Authenticated workspace: the sign-in page keeps its own auth.css composition. */
@media screen {
  body:has(#bank-navigation) {
    --ink: #172538;
    --muted: #5d6c7d;
    --line: #dce5ee;
    --blue: #367eae;
    --pale: #edf5fc;
    --bg: #f4f7fb;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.6 Inter, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  /* One alignment track for the navigation, utilities and footer. The complete
     sidebar scrolls on short screens, so no bottom action can be clipped. */
  body:has(#bank-navigation) .shell { max-width: none; grid-template-columns: 256px minmax(0, 1fr); }
  body:has(#bank-navigation) #bank-navigation {
    padding: 26px 16px 24px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c7d7e4 transparent;
    scrollbar-gutter: stable;
    background: #fff;
  }
  body:has(#bank-navigation) #bank-navigation > * { flex-shrink: 0; }
  body:has(#bank-navigation) #bank-navigation .nav-label { margin: 0 12px 16px; color: #64798d; font-size: 11px; line-height: 1.6; font-weight: 650; letter-spacing: 1.35px; }
  body:has(#bank-navigation) #bank-navigation nav { gap: 4px; }
  body:has(#bank-navigation) #bank-navigation :is(nav a, .aside-bottom > button) {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5b7084;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body:has(#bank-navigation) #bank-navigation :is(nav a, .aside-bottom > button) > svg { grid-column: 1; width: 20px; height: 20px; }
  body:has(#bank-navigation) #bank-navigation :is(nav a, .aside-bottom > button):hover { background: #f2f7fb; color: #2c6e9d; }
  body:has(#bank-navigation) #bank-navigation nav a.active { color: #286997; background: #eaf3fb; font-weight: 650; }
  body:has(#bank-navigation) #bank-navigation .aside-bottom { display: grid; gap: 4px; margin-top: auto; padding: 26px 0 0; }
  body:has(#bank-navigation) #bank-navigation .aside-bottom > [data-action="logout"] { color: #81505a; justify-content: start; }
  body:has(#bank-navigation) #bank-navigation .aside-note { margin: 16px 12px 0; padding: 18px 0 4px; color: #60758a; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }

  body:has(#bank-navigation) #app > header { border-bottom-color: var(--line); }
  body:has(#bank-navigation) .brand-icon { background: linear-gradient(135deg, #60ace4, #54a7c6); }
  body:has(#bank-navigation) .tagline { color: #60758a; font-size: 11px; }
  body:has(#bank-navigation) .profile-btn { min-height: 46px; font-size: 14px; }
  body:has(#bank-navigation) .avatar { width: 38px; height: 38px; font-size: 13px; }
  body:has(#bank-navigation) .icon-button { min-width: 44px; min-height: 44px; border-radius: 10px; }
  body:has(#bank-navigation) .profile-menu-summary strong { font-size: 15px; }
  body:has(#bank-navigation) .profile-menu-summary :is(span, small) { font-size: 12px; }
  body:has(#bank-navigation) .profile-dropdown [role="menuitem"] { font-size: 14px; min-height: 46px; }

  body:has(#bank-navigation) #page { padding: 32px clamp(24px, 3vw, 48px); }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) { font-family: Inter, Arial, sans-serif; }
  body:has(#bank-navigation) #page .crumb { color: #596f85; font-size: 12px; margin-bottom: 24px; }
  body:has(#bank-navigation) #page .page-head { margin-bottom: 28px; gap: 18px; }
  body:has(#bank-navigation) #page h1 { color: #172538; font-size: clamp(30px, 2.5vw, 36px); font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) h2 { font-size: 20px; font-weight: 750; line-height: 1.35; letter-spacing: -.35px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) h3 { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -.2px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) p { color: var(--muted); font-size: 15px; line-height: 1.7; }
  body:has(#bank-navigation) #page .panel { border-radius: 16px; box-shadow: 0 3px 15px #24496e04; }
  body:has(#bank-navigation) #page .panel-head { gap: 14px; }
  body:has(#bank-navigation) #page .panel-head > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) :is(.button, .tabs button) { min-height: 46px; font-size: 14px; font-weight: 600; line-height: 1.5; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) .button { padding: 11px 16px; border-radius: 9px; white-space: normal; overflow-wrap: anywhere; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) .button svg { width: 17px; height: 17px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) .primary { background: linear-gradient(105deg, #2f74a4, #2b7c90); border-color: transparent; box-shadow: 0 5px 14px #438fc814; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog, #install-ui) .primary:hover:not(:disabled) { background: linear-gradient(105deg, #286b99, #297588); }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.field label, .switch-row label) { font-size: 14px; font-weight: 600; color: #334b61; line-height: 1.55; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.field input, .field select, .field textarea, .filters input, .filters select) { min-height: 48px; padding: 12px 14px; border-color: #d8e2ed; border-radius: 8px; font-size: 16px; line-height: 1.5; color: #233b51; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .field textarea { min-height: 112px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(input, select, textarea):focus { border-color: #438bbb; box-shadow: 0 0 0 3px #59a9df22; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .switch-row { min-height: 64px; gap: 16px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .switch-row input { width: 22px; height: 22px; margin: 11px; accent-color: #367eae; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.summary-line, .detail-row dt, .detail-row dd, .goal-bottom) { font-size: 14px; line-height: 1.7; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .summary-line strong { font-weight: 650; color: #294760; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .summary-line.total { font-size: 17px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .info { font-size: 14px; line-height: 1.75; color: #526b82; border-radius: 11px; background: #eef5fb; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) .info strong { color: #355b7b; font-size: 15px; font-weight: 650; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.sub, .footnote, .field small, .switch-row small, .chart-legend, .bar-group span) { font-size: 12px; line-height: 1.7; color: #60758a; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.status-pill, .ticket-status, .owner-pill, .status, .badge) { font-size: 12px; line-height: 1.5; padding: 5px 10px; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(.empty, .form-error, .storage-warning) { font-size: 14px; line-height: 1.7; }
  body:has(#bank-navigation) #page .faq summary { min-height: 44px; font-size: 15px; line-height: 1.6; }
  body:has(#bank-navigation) :is(#page, #dialog, #owner-dialog) :is(a, button, summary):focus-visible { outline: 3px solid #438bbb; outline-offset: 3px; }

  body:has(#bank-navigation) #page .account-card:not(.secondary) { background: linear-gradient(125deg, #294a69, #38668f 65%, #579ed2); }
  body:has(#bank-navigation) #page .account-label { font-size: 15px; font-weight: 600; }
  body:has(#bank-navigation) #page .account-card:not(.secondary) :is(.sub, .balance-label, .account-foot, .money small) { color: #d3e7f6; }
  body:has(#bank-navigation) #page :is(.balance-label, .account-foot, .account-card .money small) { font-size: 12px; line-height: 1.6; }
  body:has(#bank-navigation) #page .account-foot a { min-height: 44px; }
  body:has(#bank-navigation) #page .kpi > span { font-size: 13px; color: #63798d; }
  body:has(#bank-navigation) #page .kpi strong { font-size: clamp(25px, 2.1vw, 30px); font-weight: 700; line-height: 1.3; }
  body:has(#bank-navigation) #page .kpi small { font-size: 12px; line-height: 1.65; color: #60758a; }
  body:has(#bank-navigation) #page .transaction strong { font-size: 14px; font-weight: 600; }
  body:has(#bank-navigation) #page .transaction :is(small, time) { font-size: 12px; line-height: 1.65; color: #60758a; }
  body:has(#bank-navigation) #page .transaction .tx-amount { font-size: 15px; font-weight: 600; }
  body:has(#bank-navigation) #page .transaction { padding-block: 18px; }
  body:has(#bank-navigation) #page .loan-value { font-weight: 700; }

  /* Increase card captions without enlarging or overflowing the number grid. */
  body:has(#bank-navigation) #page .card-art :is(.card-number-label, .card-caption, .card-currency, .card-state-label, .card-holder > span) { font-size: 12px; line-height: 1.6; }
  body:has(#bank-navigation) #page .card-art .card-number-label { letter-spacing: .7px; }
  body:has(#bank-navigation) #page .card-art .card-holder-name { font-size: 16px; }
  body:has(#bank-navigation) #page .card-art .card-brand { font-size: 18px; }
  body:has(#bank-navigation) #page .card-freeze-notice strong { display: flex; align-items: center; gap: 8px; }

  body:has(#bank-navigation) #page .owner-eyebrow { font-size: 11px; font-weight: 700; color: #5f7b94; }
  body:has(#bank-navigation) #page .owner-detail-head { background: linear-gradient(115deg, #fff, #f0f6fc); }
  body:has(#bank-navigation) #page .owner-detail-head h2 { font-size: 23px; }
  body:has(#bank-navigation) #page .owner-detail-meta strong { font-size: 26px; font-weight: 700; }
  body:has(#bank-navigation) #page :is(.owner-customer-main strong, .owner-profile dt, .owner-profile dd, .owner-audit-top strong, .owner-audit-target, .owner-audit-reason) { font-size: 14px; line-height: 1.7; }
  body:has(#bank-navigation) #page :is(.owner-customer-main small, .owner-customer-balance small, .owner-detail-meta small, .owner-account-type, .owner-role, .owner-iban, .owner-audit-top time, .owner-audit-target span, .owner-audit-diff h3, .owner-audit-diff pre) { font-size: 12px; line-height: 1.7; color: #60758a; }
  body:has(#bank-navigation) #page .owner-customer-balance { max-width: 100%; }
  body:has(#bank-navigation) #page .owner-customer-balance strong { font-size: 20px; }
  body:has(#bank-navigation) #page .owner-account { border-radius: 12px; background: #f8fbfe; }
  body:has(#bank-navigation) #page .owner-account-balance { font-size: 29px; font-weight: 700; line-height: 1.4; }
  body:has(#bank-navigation) #page .owner-table { font-size: 14px; min-width: 640px; }
  body:has(#bank-navigation) #page .owner-table :is(td, td strong, .owner-numeric) { font-size: 14px; }
  body:has(#bank-navigation) #page .owner-table th { font-size: 13px; color: #61788e; }
  body:has(#bank-navigation) #page .owner-table td small { font-size: 12px; color: #60758a; }
  body:has(#bank-navigation) #page .owner-audit summary { font-size: 14px; }

  body:has(#bank-navigation) :is(#dialog, #owner-dialog) { width: min(560px, 94vw); border-radius: 16px; }
  body:has(#bank-navigation) :is(#dialog, #owner-dialog) > h2,
  body:has(#bank-navigation) #dialog-body > h2 { font-size: 23px; }
  body:has(#bank-navigation) :is(#dialog, #owner-dialog) .close { min-width: 44px; min-height: 44px; margin: -8px -8px 8px 8px; font-size: 24px; }
  body:has(#bank-navigation) #page :is(.footer, .footer button) { font-size: 12px; color: #596f85; }
  body:has(#bank-navigation) #page .footer button { min-height: 44px; padding-inline: 4px; }
  body:has(#bank-navigation) #toast { font-size: 14px; line-height: 1.6; }
}

@media screen and (min-width: 731px) {
  body:has(#bank-navigation) #bank-navigation { top: 86px; height: calc(100vh - 86px - var(--disclosure-height, 0px)); height: calc(100dvh - 86px - var(--disclosure-height, 0px) - env(safe-area-inset-bottom)); align-self: start; }
}

@media screen and (max-width: 730px) {
  body:has(#bank-navigation) #page { padding: 26px max(16px, env(safe-area-inset-right)) 30px max(16px, env(safe-area-inset-left)); }
  body:has(#bank-navigation) #page h1 { font-size: 30px; }
  body:has(#bank-navigation) #page .pad { padding: 18px; }
  body:has(#bank-navigation) #bank-navigation { width: min(290px, calc(100vw - 44px)); padding: 20px 12px 24px; height: calc(100vh - 74px - var(--disclosure-height, 0px)); height: calc(100dvh - 74px - var(--disclosure-height, 0px) - env(safe-area-inset-bottom)); }
  body:has(#bank-navigation) #bank-navigation .aside-bottom { padding-top: 22px; }
  body:has(#bank-navigation) .tagline { font-size: 9px; }
  body:has(#bank-navigation) .wordmark { font-size: 17px; }
  body:has(#bank-navigation) #page .card-art { padding: 20px; }
  body:has(#bank-navigation) #page .card-art .card-brand { font-size: 16px; }
  body:has(#bank-navigation) #page .card-art .card-holder-name { font-size: 15px; }
  body:has(#bank-navigation) #page .owner-detail-head h2 { font-size: 21px; }
  body:has(#bank-navigation) #page .owner-customer-list { max-height: 360px; }
}

@media screen and (max-width: 420px) {
  body:has(#bank-navigation) #page .card-art { padding: 18px; }
  body:has(#bank-navigation) #page .card-topline { margin-bottom: 24px; }
  body:has(#bank-navigation) #page .card-caption { gap: 4px 8px; }
  body:has(#bank-navigation) #page .card-currency { min-width: 38px; }
  body:has(#bank-navigation) #page .card-state-label { padding: 5px 8px; }
}
/* Account metadata forms retain the existing modal scrolling and mobile grid. */
@media screen {
  body:has(#bank-navigation) .owner-account-editor { border: 1px solid #dce6ee; border-radius: 10px; padding: 14px; margin: 18px 0; min-width: 0; }
  body:has(#bank-navigation) .owner-account-editor summary { cursor: pointer; font-weight: 650; line-height: 1.5; }
  body:has(#bank-navigation) .owner-account-editor[open] summary { margin-bottom: 18px; }
  body:has(#bank-navigation) #owner-dialog input[readonly] { background: #f4f7fa; color: #60758a; }
  body:has(#bank-navigation) #owner-dialog .field:has(input[name$="iban"], input[name$="internalReference"], textarea[name$="holderAddress"]) { grid-column: 1 / -1; }
  body:has(#bank-navigation) :is(#page, #owner-dialog) .account-holder-address { white-space: pre-line; overflow-wrap: anywhere; }
}
