/* OFIIRO · Signature visual language, shared across customer and authorised workspaces. */
:root{--ofiiro-midnight:#071e36;--ofiiro-navy:#102e50;--ofiiro-gold:#be9856;--ofiiro-gold-light:#e1c78f;--ofiiro-soft:#f3f6f9}
body{background:linear-gradient(180deg,#e9eff6 0%,#f7f9fb 360px,#edf2f8 100%)}
body>header{background:linear-gradient(115deg,var(--ofiiro-midnight),var(--ofiiro-navy))!important;border-bottom:4px solid var(--ofiiro-gold)!important;box-shadow:0 10px 36px #0413272b!important}
body>header .brand small{color:#e1c990!important}
body>header .header-right .mode{border:1px solid var(--ofiiro-gold)!important;color:var(--ofiiro-gold-light)!important}
main .pagehead,main .customer-welcome{position:relative;border-bottom:2px solid #bea16b!important;padding-bottom:20px}
main .pagehead:after{content:"";position:absolute;left:0;bottom:-2px;width:120px;height:3px;background:var(--ofiiro-gold)}
main .pagehead h1,main .customer-welcome h1{color:#092846!important}
main .eyebrow{color:#85632d!important;letter-spacing:.12em;font-weight:800}
main .card{background:#fff!important;border:1px solid #d4dfe8!important;border-top:3px solid var(--ofiiro-gold)!important;box-shadow:0 10px 28px #0a244512!important}
main .metric,main .tinted,main .personal-balance,main .customer-balance{background:linear-gradient(120deg,#092542,#164268)!important;color:#eff5fa!important;border:1px solid #244c6c!important;border-top:3px solid var(--ofiiro-gold)!important}
/* Explicit text colours beat earlier light-theme descendant rules. */
main :is(.metric,.tinted,.personal-balance,.customer-balance) :is(h1,h2,h3,h4,p,span,small,strong,b,em,label){color:#f5f7f9!important}
main :is(.metric,.tinted,.personal-balance,.customer-balance) :is(.note,.badge,.message,.card:not(.metric)):not(.tinted){color:#173b56!important}
main :is(.metric,.tinted,.personal-balance,.customer-balance) :is(.note,.message,.card:not(.metric)):not(.tinted) :is(h1,h2,h3,h4,p,span,small,strong,b,em,label){color:#173b56!important}
main :is(.metric,.tinted,.personal-balance,.customer-balance) :is(.note,.message,.card:not(.metric)):not(.tinted) a{color:#123e5b!important}
main :is(.metric,.tinted,.personal-balance,.customer-balance) a{color:var(--ofiiro-gold-light)!important}
main .tool-grid>a,main .customer-actions a{border-top:2px solid var(--ofiiro-gold)!important;background:#fff!important;box-shadow:0 5px 18px #0a274010!important}
main .tool-grid>a:hover,main .customer-actions a:hover{border-color:var(--ofiiro-gold)!important}
main button.primary,main .button.primary,main a.button-link.primary{background:#0b3155!important;border:1px solid #0b3155!important;border-top:2px solid var(--ofiiro-gold)!important;color:#fff!important}
main button.primary:hover,main .button.primary:hover{background:#185079!important}
main .badge{border-color:#d7c3a1}
/* Column headings and row labels have distinct visual roles. */
main thead th{background:#112f50!important;color:#f5f7f9!important}
main thead th a{color:#fff!important}
main tbody th,main th[scope=row]{background:transparent!important;color:#173b56!important;font-size:inherit;letter-spacing:normal;text-transform:none;white-space:normal;text-align:left}
main tbody th a,main th[scope=row] a{color:#123e5b!important;text-decoration:underline;text-underline-offset:.15em}
main .workspace-hero .eyebrow{color:#fff1cf!important}
main .customer-tabs a[aria-current=page]{border-bottom:3px solid var(--ofiiro-gold)!important;color:#103455!important}
.alicia-launch{background:#0a2544!important;border:1px solid var(--ofiiro-gold)!important;color:#fff!important}
.alicia-header{background:#0a2544!important;border-bottom:3px solid var(--ofiiro-gold)!important}
.ofiiro-brand-belt{height:12px;background:linear-gradient(90deg,#081e35 0%,#133b5d 45%,#081e35 100%)!important;border-bottom:3px solid var(--ofiiro-gold)!important}
body>footer{border-top:0!important}
@media(max-width:650px){main .card{border-radius:11px!important}.ofiiro-brand-belt{height:9px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Keep shared app chrome inside cutouts and gesture areas in installed web apps. */
body.ofiiro-brand-consistent {
  --frame-gutter: clamp(14px, 3vw, 48px);
}
body.ofiiro-brand-consistent > header,
body.ofiiro-brand-consistent > footer {
  padding-left: max(var(--frame-gutter), env(safe-area-inset-left)) !important;
  padding-right: max(var(--frame-gutter), env(safe-area-inset-right)) !important;
}
body.ofiiro-brand-consistent > header {
  padding-top: max(14px, env(safe-area-inset-top)) !important;
  flex-wrap: wrap;
}
body.ofiiro-brand-consistent > footer {
  padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
}
body.ofiiro-brand-consistent > header .brand,
body.ofiiro-brand-consistent > header .header-right {
  min-width: 0;
  max-width: 100%;
}
body.ofiiro-brand-consistent > header .header-right {
  flex-wrap: wrap;
}
body.ofiiro-brand-consistent > header .ofiiro-wordmark {
  max-width: 100%;
}
body.ofiiro-brand-consistent > .workspace-frame {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.customer-sign-in > .workspace-frame > main {
  max-width: 580px;
  padding: clamp(16px, 5vw, 40px);
  padding-top: max(clamp(16px, 5vw, 40px), env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.customer-sign-in .auth-layout { display: block; }
.customer-sign-in .auth-card { margin-inline: auto; max-width: 100%; }
.customer-sign-in .recovery-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
