:root {
  --navy:#101d35; --deep:#0b1426; --blue:#386bff; --bg:#f6f8fc; --line:#e3e8f1;
  --ink:#17243b; --muted:#596a80; --green:#107957; --red:#bc394b; --gold:#c7a76c;
  --warning:#a26c19; --surface:white; --radius:16px; --shadow:0 4px 22px #17243b08;
  --font:Inter,"Segoe UI",system-ui,sans-serif;
}
.customer-app,.workflow-app,.app-shell {font:14px/1.5 var(--font);font-variant-numeric:tabular-nums;color:var(--ink);background:var(--bg)}
.customer-sidebar,.workflow-sidebar,.app-shell .sidebar {background:var(--deep);overflow-y:auto}
.customer-brand,.app-shell .brand strong {font:650 23px/1 var(--font);letter-spacing:-.06em}
.customer-brand-mark,.app-shell .brand-mark {color:white;background:#386bff;border:0;border-radius:10px;font:italic 750 25px/1 var(--font)}
.customer-nav a,.app-shell .nav-item {font-size:14px;min-height:44px}
.customer-nav a.selected,.app-shell .nav-item.active {background:#223455;color:white}
.customer-nav a.selected:before {background:#7394ff}
.customer-side-label,.side-label {font-size:10px}
.customer-topbar,.workflow-topbar {min-height:72px}
.customer-breadcrumb,.customer-profile-button strong,.profile-popover button,.visibility-button,.text-button {font-size:13px}
.customer-avatar {width:38px;height:38px;background:#e3eaff;color:#274aaa;font-size:13px}
.customer-page,.workflow-content {max-width:1500px;margin:auto;padding-top:32px}
.overline,.section-title-row .overline,.balance-label,.stat-label,.analytics-value span {font:650 10px/1.5 var(--font);letter-spacing:.12em}
.overline {color:#586a86;text-transform:uppercase}.overline:before{display:none}
.dashboard-greeting h1,.page-heading-customer h1 {font:600 clamp(26px,3vw,32px)/1.15 var(--font);letter-spacing:-.05em}
.dashboard-greeting p,.page-heading-customer p,.inline-message,.info-note,.field-stack span,.review-row,.transaction-sub,.review-item small,.transfer-row small {font-size:13px}
.dashboard-greeting,.page-heading-customer {gap:16px;margin-bottom:24px}
.membership-pill {font-size:10px;padding:7px 12px}
.overview-pair {display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,1fr);gap:20px}
.balance-panel,.app-shell .welcome-panel {background:#102a55 url('/css/engraving.svg') right center/auto 135% no-repeat}
.balance-panel {min-height:238px;border:0;border-radius:var(--radius);padding:24px}
.balance-panel:after,.payment-card:before {display:none}
.balance-value {font:500 clamp(30px,3.6vw,54px)/1.1 var(--font);overflow-wrap:anywhere}
.balance-panel-bottom,.balance-subtitle {font-size:12px}
.wallet-panel,.surface,.data-card,.review-item,.support-item,.analytics-value,.profile-value,.app-shell .metric-card {min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.wallet-panel,.surface,.chart-card,.account-tile,.review-card,.review-item,.support-item {padding:20px}
.wallet-strip {display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin}
.wallet-strip .payment-card {flex:0 0 100%;scroll-snap-align:start}
.card-list {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:16px}
.payment-card {max-width:440px;width:100%;min-height:175px;aspect-ratio:1.65;padding:20px;border-radius:14px;background-color:#203958;background-image:url('/css/engraving.svg');background-position:right center;background-size:cover}
.payment-card.premium {background-image:url('/css/engraving.svg'),linear-gradient(120deg,#19283c,#566779)}
.payment-card.vip {background-image:url('/css/engraving.svg'),linear-gradient(115deg,#100f10,#433b2b);border-color:var(--gold)}
.card-top {position:static}.card-hit {position:absolute;inset:0;z-index:2;background:transparent;border:0;border-radius:inherit}
.card-hit:focus-visible {outline-offset:-4px}.card-bottom {pointer-events:none}
.card-actions {z-index:3}.card-chip {display:inline-block}.card-number {font-size:15px}.card-tier-label,.cardholder-name,.card-expiry,.card-status {font-size:10px}
.card-tier-label {color:#eff4ff}.vip .card-tier-label {color:#f0d498}
.quick-actions {grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:16px}
.quick-action {min-height:80px;padding:12px;align-items:flex-start;border-radius:12px}.quick-action span{font-size:12px}.quick-action i {color:#3256ba;background:#edf2ff}
.section-block {margin-top:22px}.section-title-row h2,.chart-card h2 {font:600 20px/1.25 var(--font);letter-spacing:-.035em}
.cash-grid {display:grid;grid-template-columns:minmax(125px,1fr) minmax(0,3fr);align-items:center;gap:18px}.cash-totals {display:grid;gap:10px}.cash-totals strong,.cash-totals small {display:block}.cash-totals strong,.analytics-value strong,.account-balance{font-size:21px;letter-spacing:-.04em}.cash-totals small{font-size:12px;color:var(--muted)}
#dashboardPeriod {width:auto}.customer-input,.customer-select,.customer-textarea,.support-update :is(select,textarea),.workflow-search {min-height:42px;font-size:14px;border-radius:9px}
.button-customer,.button-customer.small,.app-shell .button {min-height:40px;font-size:13px;border-radius:9px}.button-customer.primary,.app-shell .button-primary {color:white;background:#2959de;border-color:transparent}
.customer-table td,.transfer-row,.review-item strong,.account-kind,.transaction-title,.profile-value strong {font-size:14px}.customer-table th,.status-tag,.account-state {font-size:10px}
.customer-table td,.customer-table th {padding:14px}.customer-table tr[data-transaction-id] td:last-child,.customer-table th:last-child{text-align:right}
.table-wrap {overflow:auto;max-width:100%;border-radius:12px}.customer-main,.workflow-main,.customer-page {min-width:0}
.review-row strong,.support-item p {overflow-wrap:anywhere}.customer-dialog {border-radius:18px;padding:28px}
#transferFormPanel,#transferReviewPanel,#transferSuccessPanel {max-width:720px}.transfer-step {font-size:13px}
#transferForm input[name=amount] {height:56px;font-size:25px}
:focus-visible {outline:3px solid #7097ff;outline-offset:3px}
@media(max-width:980px){.quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.overview-pair{gap:12px}.wallet-panel,.balance-panel{padding:16px}}
@media(max-width:700px){.overview-pair,.cash-grid{grid-template-columns:minmax(0,1fr)}.wallet-strip .payment-card{max-width:320px}.cash-totals{grid-template-columns:repeat(3,minmax(0,1fr))}.cash-totals strong{font-size:16px}.dashboard-greeting{flex-wrap:wrap}.customer-page{padding-top:20px}.quick-action{min-height:64px}.balance-panel{min-height:210px}.surface{padding:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.rail-action,.rail-toggle,.notice-button {border:0;background:transparent;color:inherit;padding:8px;font-size:13px}
.rail-toggle,.notice-button {display:grid;place-items:center;width:40px;height:40px;border-radius:8px}
.rail-toggle:hover,.notice-button:hover{background:#e9eef7}
.customer-breadcrumb{margin-right:auto}.rail-toggle{margin-right:10px}
#notices{width:min(300px,85vw);padding:12px;font-size:13px}#notices small{display:block;color:var(--muted)}
@media(min-width:651px){.rail-collapsed .customer-sidebar{display:none}.rail-collapsed .customer-main{margin-left:0}}
@media(max-width:650px){.rail-toggle{display:none}.customer-sidebar:not(.open){visibility:hidden}.customer-sidebar.open{visibility:visible}.wallet-panel .empty-panel{min-height:100px}}
#transferForm[data-stage=recipient] :is(label:has([name=amount]),label:has(#transferCurrency),label:has([name=description]),#editRecipient,[type=submit]),
#transferForm[data-stage=amount] :is(label:has(#recipientSearch),label:has(#recipientAccount),label:has([name=sourceAccountId]),#recipientNext){display:none}
.auth-story{background:#102a55 url('/css/engraving.svg') bottom right/auto 65% no-repeat}.auth-illustration{visibility:hidden}
.auth-brand-mark{background:#386bff;color:white;border:0;font-style:italic}.tier-card ul,.tier-price small,.empty-panel p,.customer-toast{font-size:13px}
.queue-link,.directory-tools {display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.queue-link{justify-content:space-between;font-size:14px;color:var(--ink)}.queue-link:hover{color:var(--blue)}.directory-tools{flex-wrap:wrap;padding:12px 16px}.directory-tools :is(button,select){background:white;color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:6px 10px}
.wallet-invite{display:flex;width:100%;min-height:165px;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:20px;border:0;border-radius:13px;color:white;text-align:left;background:linear-gradient(95deg,#26384bef,transparent),url('/css/engraving.svg') center/cover,#394d67}
.wallet-invite strong{font-size:22px;letter-spacing:-.04em}.wallet-invite>span:last-child{font-size:13px}.contactless{width:18px;height:18px;margin-left:8px;fill:none;stroke:#dde4ef;stroke-width:1.5}
.tx-icon{display:grid;place-items:center;float:left;margin-right:9px;width:32px;height:32px;border-radius:10px;background:#eef3fa;color:#446287}
.login-visual{background:#102a55 url('/css/engraving.svg') center/cover}
.nav-symbol {width:18px;height:18px;flex:none}.quick-action .nav-symbol{color:inherit}.surface>h2{font:600 19px/1.25 var(--font)}
#transferFailure:not(:empty){padding:12px;background:#fff3f4;color:var(--red);border-radius:8px}
.payment-card.vip .card-chip{background:linear-gradient(120deg,#e8d6aa,#a68c54)}
.payment-card.standard .card-chip,.payment-card.premium .card-chip{background:linear-gradient(120deg,#c6d1df,#8698ac);border-color:#ccdaeb}
.payment-card.vip{background-image:linear-gradient(110deg,#171716a8,#342b1fb8),url('/css/engraving.svg'),linear-gradient(110deg,#101112,#534125)}
.surface .empty-panel,.wallet-panel .empty-panel{border:0}
@media(max-width:650px){
  .app-shell .main-content{margin-left:0;padding:0 16px 16px}
  .app-shell .side-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  .app-shell .side-nav .nav-item{justify-content:flex-start}
  .section-heading{flex-wrap:wrap}.welcome-copy{min-width:0;max-width:100%}
  .app-shell .overview-lower{grid-template-columns:minmax(0,1fr)}
  .app-shell .results-column,.app-shell .results-card{min-width:0}
}
.wallet-strip{position:relative}.wallet-controls{display:flex;justify-content:flex-end;gap:6px;margin-top:8px}.wallet-controls button{border:1px solid var(--line);border-radius:8px;background:white;min-width:36px;min-height:36px}
.wallet-tiers{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));gap:16px}.wallet-tiers small,.wallet-tiers strong{display:block}.wallet-tiers small{font-size:12px;color:var(--muted)}
.finish{display:block;width:54px;height:33px;margin-bottom:10px;border-radius:5px;background:#223859 url('/css/engraving.svg') center/cover}.finish.premium{background-color:#58667d}.finish.vip{background-color:#3a3221}
.skip-link{position:fixed;top:-100px;left:16px;z-index:100;padding:12px;background:white;color:var(--ink);border-radius:9px}.skip-link:focus{top:8px}
.find-page{display:inline-flex;align-items:center;gap:9px;padding:8px 12px;border:1px solid var(--line);background:white;border-radius:10px;color:var(--muted);font-size:13px;min-height:40px}
.service-finder{max-height:80dvh}.service-finder h2{margin-bottom:18px}.finder-count{color:var(--muted);font-size:12px;margin:14px 0 5px}
#serviceResults{display:grid}#serviceResults a{display:flex;align-items:center;gap:12px;min-height:42px;padding:8px 10px;border-radius:8px;color:var(--ink)}#serviceResults a:hover,#serviceResults a:focus-visible{background:#edf2ff;color:#234bae}
.mobile-tabs{display:none}.queue-filter{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}.queue-filter label{font-weight:600}.queue-filter input{width:min(100%,300px)}.queue-filter span{font-size:13px;color:var(--muted)}
@media(max-width:850px){.find-page span{display:none}.find-page{padding:9px}}
@media(max-width:650px){
 .mobile-tabs{position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,1fr);z-index:15;padding:4px 6px max(4px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:white;box-shadow:0 -4px 24px #132b510a}
 .mobile-tabs a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:48px;color:#596a80;font:600 11px var(--font);border-radius:9px}
 .mobile-tabs a.selected{color:#254eb6;background:#eef3ff}.mobile-tabs .nav-symbol{color:inherit}
 .customer-main{padding-bottom:calc(76px + env(safe-area-inset-bottom))}.customer-toast{bottom:calc(68px + env(safe-area-inset-bottom))}
 .customer-top-actions{gap:3px}.customer-breadcrumb{min-width:0;overflow:hidden}.customer-breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(max-width:400px){.customer-breadcrumb>span,.customer-breadcrumb i{display:none}}

/* Keep navigation stationary while the active content changes. */
.customer-page[aria-busy="true"]::before {
  content: "";
  position: fixed;
  z-index: 35;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
  background: var(--blue);
  opacity: 0;
  animation: show-loading-indicator 180ms ease-out 180ms forwards;
}

@keyframes show-loading-indicator {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    --motion-duration: 180ms;
    --motion-ease: cubic-bezier(.2, .7, .25, 1);
  }

  @keyframes reveal-view {
    from { opacity: .35; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .banking-view,
  .app-shell :is(#overviewView, #clientsView, #staffView):not([hidden]),
  #workflowPage > .page-heading-customer,
  #workflowPage > :is(.review-queue, .support-item, .table-wrap, .workflow-empty),
  .auth-form-wrap, .login-form-wrap,
  dialog[open], .profile-popover:not([hidden]),
  :is(#transferReviewPanel, #transferSuccessPanel):not([hidden]) {
    animation: reveal-view var(--motion-duration) var(--motion-ease);
  }

  :is(.customer-nav a, .mobile-tabs a, .button-customer, .find-page, .notice-button) {
    transition: color var(--motion-duration), background-color var(--motion-duration),
                border-color var(--motion-duration), box-shadow var(--motion-duration);
  }
}
@media (prefers-reduced-motion: reduce) {
  .customer-page[aria-busy="true"]::before { animation: none; opacity: 1; }
}

/* Native button and link states also cover controls rendered after navigation. */
:is(button, a[href]):focus-visible {
  outline: 3px solid #638bff;
  outline-offset: 3px;
}

:is(#noticeToggle, #customerProfileButton, #mobileNavToggle)[aria-expanded="true"] {
  background-color: #e7eeff;
  color: #203f85;
}
.customer-profile-button[aria-expanded="true"] .profile-chevron { rotate: 180deg; }

@media (hover: hover) and (pointer: fine) {
  :is(button:enabled, .customer-nav a, .mobile-tabs a, .side-nav a):hover {
    filter: brightness(.95);
  }
  :is(.text-button, .rail-action):enabled:hover { text-decoration: underline; }
}
:is(button:enabled, .customer-nav a, .side-nav a, .mobile-tabs a):active {
  filter: brightness(.88);
}

@media (prefers-reduced-motion: no-preference) {
  :is(button:enabled, .customer-nav a, .side-nav a, .mobile-tabs a):active {
    translate: 0 1px;
  }
  .profile-chevron { transition: rotate var(--motion-duration) var(--motion-ease); }
}

.button-customer[aria-busy="true"] { cursor: progress; }
.button-customer[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .button-customer[aria-busy="true"]::before { animation: spin .7s linear infinite; }
}

.banking-view[data-section="loans"] {
  .page-heading-customer h1 { font-size: clamp(30px, 3vw, 36px); }
  .overline, .customer-table th, .status-tag { font-size: 12px; }
  .page-heading-customer p, .loan-product p, .empty-panel p, .auth-subtitle,
  .customer-table td, .button-customer, .field-stack > span,
  .customer-input, .customer-select, .customer-textarea { font-size: 16px; }
  .loan-product h3, .empty-panel strong { font-size: 18px; }
  .loan-product strong { font-size: 22px; white-space: nowrap; }
  .loan-product { flex-wrap: wrap; gap: 12px; padding: 20px; }
  .page-heading-customer p { max-width: 65ch; }
}
