/* ================================================================
   SYAKEERA ZAHRA | GOLD BRAND UI — PATCH 13M
   This file intentionally loads AFTER FITMAX + FitCore stylesheets.
   Brand palette replaces FitCore coral while preserving the FitCore
   component sizes, semantics, responsive breakpoints, and behavior.
   ================================================================ */
:root,html[data-theme="light"]{
  color-scheme:light;
  --sz-ink:#151318;--sz-charcoal:#17171B;--sz-charcoal-2:#202024;
  --sz-gold-50:#FFF9E9;--sz-gold-100:#FEF0C6;--sz-gold-200:#FBE19A;
  --sz-gold-300:#F1CB70;--sz-gold-400:#E3B957;--sz-gold-500:#D7AF56;
  --sz-gold-600:#B78731;--sz-gold-700:#8A621F;--sz-gold-800:#63430F;
  --sz-metal:linear-gradient(115deg,#F7DE8E 0%,#D6A646 42%,#F7DE94 76%,#B8862D 100%);
  --brand-500:#D7AF56;--brand-600:#D7AF56;--brand-700:#805818;
  --brand-gradient:var(--sz-metal);
  --page:#F8F7F4;--surface:#FFFFFF;--surface-muted:#FBF9F5;
  --text:#201D19;--text-secondary:#5B554C;--text-muted:#756F66;
  --border:#E9E4D8;--border-strong:#CCC2B0;
  --sidebar:#141416;--topbar:#19191D;
  --shadow-card:0 6px 23px rgba(56,44,19,.045);
  --primary:#B78731;--primary-hover:#8A621F;--primary-soft:rgba(215,175,86,.13);
  --primary-glow:rgba(215,175,86,.21);--bg-primary:var(--page);
  --bg-secondary:var(--surface);--bg-tertiary:var(--surface-muted);
  --card-bg:var(--surface);--card-bg-hover:var(--surface-muted);
  --text-primary:var(--text);--text-disabled:#A7A093;
  --chart-1:#B78731;--chart-2:#D7AF56;--chart-3:#896327;
  --chart-4:#23805E;--chart-5:#657FA5;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --brand-500:#E3B957;--brand-600:#D7AF56;--brand-700:#F1D489;
  --page:#101014;--surface:#1B1B20;--surface-muted:#25242A;
  --text:#F6F0E4;--text-secondary:#C3BDB1;--text-muted:#A69F94;
  --border:#393630;--border-strong:#554D3F;
  --sidebar:#101014;--topbar:#18171B;
  --shadow-card:0 8px 24px rgba(0,0,0,.19);
  --primary:#D7AF56;--primary-hover:#F1CB70;--primary-soft:rgba(215,175,86,.14);
  --primary-glow:rgba(215,175,86,.25);
  --text-primary:var(--text);--text-disabled:#79746B;
}
html{accent-color:#B78731}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid var(--sz-gold-500)!important;outline-offset:2px;
}
::selection{background:rgba(215,175,86,.35);color:#211704}

/* Admin workspace — topbar and sidebar use rich dark charcoal rather than black/glass. */
body.app-shell .sidebar,html[data-theme="light"] body.app-shell .sidebar{
  background:var(--sidebar)!important;border-right:1px solid #3A3023!important;
}
body.app-shell .sidebar-brand{display:flex;align-items:center;gap:8px;min-height:80px;padding:10px 12px!important;border-color:#3A3023!important}
.sz-sidebar-identity{display:flex;align-items:center;gap:8px;flex:1;min-width:0;text-decoration:none;color:#F8EBD3}
body.app-shell .sidebar-brand .brand-logo{width:52px!important;height:52px!important;max-width:52px;max-height:52px;flex:0 0 52px;object-fit:contain;border:0;border-radius:0;background:transparent}
.sz-wordmark{font-family:Inter,"Plus Jakarta Sans",system-ui,sans-serif;display:flex;flex-direction:column;gap:0;min-width:0;color:#F7E8CA;white-space:nowrap;font-size:13px;line-height:1.06;letter-spacing:.004em;font-weight:670}
.sz-wordmark strong{display:block;color:#F4CC77;font-size:16px;font-weight:840;letter-spacing:.025em}
.sz-wordmark small{display:block;margin-top:5px;color:#A7A092;font-size:8px;letter-spacing:.18em;font-weight:650}
body.app-shell .sidebar-brand .sidebar-toggle{flex:0 0 29px;width:29px;height:34px;min-height:34px;border-color:rgba(213,174,80,.25)!important;background:transparent!important;color:#DDC68D!important}
body.app-shell .nav-section-label{color:#A79B85!important}
body.app-shell .nav-item{color:#C4BEB4!important}
body.app-shell .nav-item:hover{background:rgba(215,175,86,.085)!important;color:#F3D99C!important}
body.app-shell .nav-item.active,html[data-theme="light"] body.app-shell .nav-item.active{
  background:rgba(215,175,86,.16)!important;color:#F4D38A!important;
  box-shadow:inset 3px 0 0 #D7AF56!important;
}
body.app-shell .nav-group> .nav-group-toggle,
body.app-shell .nav-group.is-open> .nav-group-toggle,
body.app-shell .nav-group> .nav-group-toggle:hover{
  background:transparent!important;
}
body.app-shell .nav-group> .nav-group-toggle:hover{color:#F4D38A!important}
body.app-shell .nav-submenu{border-left:1px solid rgba(215,175,86,.21)!important}
body.app-shell .nav-subitem{color:#BDB5A9!important}
body.app-shell .nav-subitem:hover{background:rgba(215,175,86,.10)!important;color:#FFF0CC!important}
body.app-shell .nav-subitem.active,html[data-theme="light"] body.app-shell .nav-subitem.active{
  background:rgba(215,175,86,.18)!important;color:#F3CE7F!important;
  box-shadow:inset 2px 0 0 #E3B957!important;
}
body.app-shell .sidebar-version{background:#19191E!important;border-color:#332E25!important}
body.app-shell .sidebar-version .status-dot{background:#E4BD67!important;box-shadow:0 0 0 4px rgba(215,175,86,.13)}
body.app-shell .sidebar-version strong{color:#F5E7C8!important}
body.app-shell .topbar,html[data-theme="light"] body.app-shell .topbar{
  background:var(--topbar)!important;border-bottom:1px solid #393126!important;
}
body.app-shell .topbar .eyebrow{color:#D4B66E!important;letter-spacing:.12em}
body.app-shell .fitcore-topbar-identity strong{color:#F5EBD6!important}
.sz-identity-dot{color:#C59B47}
body.app-shell .topbar .fitcore-search-link{background:#25242A!important;border-color:#494033!important;color:#EADAB4!important}
body.app-shell .topbar .icon-button:not(:disabled){background:#27262A!important;border-color:#4D412E!important;color:#E9CF96!important}
body.app-shell .topbar .icon-button:hover:not(:disabled){background:#343026!important}
body.app-shell .topbar .avatar{color:#161410!important;background:var(--sz-metal)!important;border:1px solid #B88B3A!important}
body.app-shell .topbar .user-copy strong{color:#F5EAD2!important}
body.app-shell .topbar .user-copy small{color:#BFB7A9!important}
body.app-shell .page-intro h2{color:var(--text)}
body.app-shell .eyebrow{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.app-shell .eyebrow{color:#E5BE67!important}
body.app-shell .card,html[data-theme="light"] body.app-shell .card{
  border-color:var(--border)!important;background:var(--surface)!important;
  box-shadow:var(--shadow-card)!important;
}
body.app-shell .card-header h3{font-size:18px!important}
body.app-shell .card:hover{border-color:rgba(183,135,49,.30)!important}
/* Gold primary has dark lettering, so it remains legible in both light/dark mode. */
body.app-shell .button-primary,body.login-page .button-primary,
html[data-theme="light"] body.app-shell .button-primary,
body.member-login-page .button-primary,html[data-theme="light"] body.member-login-page .button-primary,
body.member-portal-shell .button-primary,html[data-theme="light"] body.member-portal-shell .button-primary{
  color:#231A0B!important;border:1px solid #CFAC59!important;
  background:var(--sz-metal)!important;box-shadow:0 5px 14px rgba(158,113,36,.15)!important;
  font-weight:800!important;
}
body.app-shell .button-primary:hover:not(:disabled),body.login-page .button-primary:hover:not(:disabled),
body.member-login-page .button-primary:hover:not(:disabled),body.member-portal-shell .button-primary:hover:not(:disabled){
  border-color:#E7C475!important;background:linear-gradient(110deg,#FBE8AB,#E3B354)!important;color:#22190C!important;
}
body.app-shell .button-secondary,body.login-page .button-secondary,
html[data-theme="light"] body.app-shell .button-secondary,
body.member-portal-shell .button-secondary,html[data-theme="light"] body.member-portal-shell .button-secondary{
  color:var(--text)!important;background:var(--surface)!important;border:1px solid var(--border-strong)!important;
}
body.app-shell .button-secondary:hover:not(:disabled),body.member-portal-shell .button-secondary:hover:not(:disabled){
  color:var(--sz-gold-700)!important;border-color:var(--sz-gold-600)!important;background:var(--sz-gold-50)!important;
}
html[data-theme="dark"] body.app-shell .button-secondary:hover:not(:disabled),html[data-theme="dark"] body.member-portal-shell .button-secondary:hover:not(:disabled){
 color:#F3D99C!important;background:#342C20!important;
}
/* Keep destructive actions red and semantic success indicators green. */
body.app-shell .button-danger,body.member-portal-shell .button-danger{background:#B42333!important;border-color:#B42333!important;color:white!important}
body.app-shell .status-success,body.member-portal-shell .status-success{background:#E4F6EA!important;color:#176442!important}
body.app-shell .stage-badge,body.login-page .stage-badge,body.member-login-page .stage-badge{
 color:#6D4A0C!important;background:#FFF2D4!important;border:1px solid #E9C87C!important;
}
html[data-theme="dark"] body.app-shell .stage-badge,html[data-theme="dark"] body.member-login-page .stage-badge{background:#362B1A!important;color:#E9C77A!important;border-color:#755D2C!important}
body.app-shell .kpi-card .fitmax-icon,body.app-shell .metric-card .fitmax-icon,
body.app-shell .report-feature-icon{color:var(--sz-gold-600)!important}
body.app-shell .member-progress>span,body.app-shell .ranking-track>span{background:var(--sz-metal)!important}
body.app-shell .form-field input:focus-visible,body.app-shell .form-field textarea:focus-visible,
body.app-shell .form-field select:focus-visible{outline-color:var(--sz-gold-500)!important}
/* Compatibility: FitCore patch13L report and search components. */
body.app-shell .manual-member-result[aria-selected="true"],body.app-shell [data-member-result].is-active{
 background:var(--primary-soft)!important;border-color:var(--sz-gold-600)!important}

/* Admin login — gold mark and elegant hierarchy. */
body.login-page .login-visual{background:linear-gradient(145deg,#0D0D11 0%,#211D17 56%,#141316 100%)!important}
body.login-page .login-visual:before{background:radial-gradient(circle at 22% 18%,rgba(215,175,86,.22),transparent 54%)!important}
.sz-login-brand{display:flex;align-items:center;gap:13px;margin-bottom:22px}
.sz-login-brand img{width:86px!important;height:86px!important;max-height:none!important;object-fit:contain!important;flex:0 0 86px}
.sz-login-brand span{display:block;color:#F7E8C9;font-size:26px;line-height:1.06;letter-spacing:-.025em;font-weight:680}
.sz-login-brand span strong{display:block;color:#E9C46F;font-weight:840;letter-spacing:.025em}
.sz-login-brand span small{display:block;font-size:10px;line-height:1.6;color:#BFB193;font-weight:700;letter-spacing:.15em;margin-top:8px}
body.login-page .login-visual h1 span{color:#E9C46F!important}
body.login-page .login-card h2{color:var(--text)!important}
body.login-page .eyebrow{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.login-page .eyebrow{color:#E4BA5B!important}
body.login-page .mini-feature{border-color:rgba(215,175,86,.17)!important}
body.login-page .mini-feature svg{color:#E5BE67!important}
body.login-page .login-card{border-color:var(--border)!important;background:var(--surface)!important}
body.login-page .password-toggle{background:var(--surface-muted)!important;color:var(--text)!important;border-color:var(--border)!important}
body.login-page .mobile-login-brand img{width:63px!important;height:63px!important;max-height:63px!important;object-fit:contain}

/* Member app remains truly mobile-first (460px max), including on wide screens. */
body.member-portal-shell,html[data-theme="light"] body.member-portal-shell,
body.member-login-page,html[data-theme="light"] body.member-login-page{
 background:var(--page)!important;color:var(--text)!important;
}
body.member-portal-shell .member-topbar,html[data-theme="light"] body.member-portal-shell .member-topbar{
 background:#17171B!important;border-bottom:1px solid #4B3C23!important;
}
.sz-member-brand{display:flex!important;align-items:center!important;gap:9px;text-decoration:none!important;min-width:0}
.sz-member-brand>img{width:45px!important;height:45px!important;max-height:45px!important;max-width:45px!important;object-fit:contain!important}
.sz-member-wordmark{font-size:15px;font-weight:680;letter-spacing:-.015em;white-space:nowrap;color:#EEE0BD}
.sz-member-wordmark strong{color:#F3CF7C;font-weight:830}
body.member-portal-shell .member-topbar .member-icon-button,
body.member-portal-shell .member-topbar .member-avatar-link{
 color:#EDDAAD!important;background:#262429!important;border:1px solid #5A4930!important;
}
body.member-portal-shell .member-topbar .member-icon-button:hover{background:#373026!important}
body.member-portal-shell .member-main .eyebrow,body.member-login-page .eyebrow{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.member-portal-shell .member-main .eyebrow,
html[data-theme="dark"] body.member-login-page .eyebrow{color:#EAC66E!important}
body.member-portal-shell .member-main .member-card,
body.member-portal-shell .member-main .member-kpi{
 background:var(--surface)!important;border-color:var(--border)!important;box-shadow:var(--shadow-card)!important;
}
body.member-portal-shell .member-main .member-card-highlight,
html[data-theme="light"] body.member-portal-shell .member-card-highlight{
 color:#F7EDDA!important;
 background:linear-gradient(120deg,#18171C,#2C281E 72%,#40321D)!important;
 border:1px solid #7B6031!important;
 box-shadow:0 16px 26px rgba(32,25,9,.13)!important;
}
body.member-portal-shell .member-card-highlight:after{background:radial-gradient(circle,rgba(231,184,82,.20),transparent 69%)!important}
body.member-portal-shell .member-card-highlight .eyebrow{color:#EFC875!important}
body.member-portal-shell .member-card-highlight strong,body.member-portal-shell .member-card-highlight h2{color:#FFF0CA!important}
body.member-portal-shell .member-quick-actions a{border-color:var(--border)!important;background:var(--surface)!important;color:var(--text)!important}
body.member-portal-shell .member-quick-actions svg{color:var(--sz-gold-600)!important}
body.member-portal-shell .member-quick-actions a:hover{border-color:var(--sz-gold-500)!important;background:var(--primary-soft)!important}
body.member-portal-shell .member-kpi>span{color:var(--sz-gold-600)!important;background:var(--primary-soft)!important}
body.member-portal-shell .member-progress>span{background:var(--sz-metal)!important}
body.member-portal-shell .member-class-date{border-color:rgba(215,175,86,.4)!important;background:var(--primary-soft)!important}
body.member-portal-shell .member-class-date strong,body.member-portal-shell .member-class-date span{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.member-portal-shell .member-class-date strong,html[data-theme="dark"] body.member-portal-shell .member-class-date span{color:#F1CB70!important}
body.member-portal-shell .member-notice-icon,body.member-portal-shell .member-more-link>span{color:var(--sz-gold-700)!important;background:var(--primary-soft)!important}
body.member-portal-shell .member-profile-head strong,body.member-portal-shell .member-back-link,
body.member-portal-shell .member-section-head>a{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.member-portal-shell .member-section-head>a{color:#EAC66E!important}
body.member-portal-shell .member-bottom-nav,html[data-theme="light"] body.member-portal-shell .member-bottom-nav{
 background:var(--surface)!important;border-color:var(--border)!important;
}
body.member-portal-shell .member-bottom-nav a.active,html[data-theme="light"] body.member-portal-shell .member-bottom-nav a.active{
 color:#221808!important;background:var(--sz-metal)!important;border:1px solid #CEAA5E!important;
}
body.member-portal-shell .member-digital-card,html[data-theme="light"] body.member-portal-shell .member-digital-card{
 background:linear-gradient(135deg,#151418,#30271C 70%,#4B351A)!important;
 border:1px solid #A37B31!important;color:#F8EFD9!important;
 box-shadow:0 14px 30px rgba(35,24,9,.18)!important;
}
body.member-portal-shell .member-digital-card:after{background:rgba(227,185,87,.11)!important}
.sz-card-brand{display:flex;align-items:center;gap:7px;min-width:0}
.sz-card-brand img{width:39px!important;height:39px!important;object-fit:contain!important;max-height:39px!important}
.sz-card-brand span{font-size:14px;font-weight:680;color:#F2E4BE;white-space:nowrap}
.sz-card-brand strong{color:#F2CA75}
body.member-portal-shell .member-digital-person strong{color:#F1CB70!important}
body.member-portal-shell .member-digital-summary strong{color:#F7E3AC!important}
body.member-portal-shell .member-qr-box{background:#FFFFFF!important;border:1px solid #DDCA9E!important}
body.member-portal-shell .member-qr-box .fitmax-qr-canvas{background:white!important}
body.member-portal-shell .member-qr-box svg{max-width:100%;height:auto}

/* Member login is a narrow standalone app even at desktop viewport widths. */
body.member-login-page .member-login-shell{width:min(100%,460px)!important;background:var(--surface)!important}
body.member-login-page .member-login-hero{
 background:linear-gradient(140deg,#111116,#32291C 70%,#211C16)!important;color:#FAF0D9!important;
}
.sz-member-login-brand{margin-bottom:12px!important;gap:12px!important}
.sz-member-login-brand img{width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important;flex:0 0 72px!important}
.sz-member-login-brand span{font-size:23px!important}
.sz-member-login-brand span small{font-size:8px!important;white-space:nowrap;letter-spacing:.12em!important}
body.member-login-page .member-login-hero h1 span{color:#F1CB70!important}
body.member-login-page .member-login-card{background:var(--surface)!important}
body.member-login-page .member-staff-link{color:var(--sz-gold-700)!important}
html[data-theme="dark"] body.member-login-page .member-staff-link{color:#EFC875!important}
body.member-login-page .stage-badge{background:#493922!important;color:#F6DE9E!important;border-color:#806332!important}
body.member-login-page .password-toggle{border-color:var(--border)!important;background:var(--surface-muted)!important;color:var(--text)!important}

/* Keep legible design from FITCORE DNA across form, reports and staff mobile. */
body.app-shell .report-module-card h3,body.app-shell .report-card h3{font-size:16px!important}
body.app-shell .report-module-card p,body.app-shell .report-card p{font-size:14px!important;line-height:1.55}
body.app-shell .button:disabled,body.member-portal-shell .button:disabled{opacity:.50!important}
@media(min-width:761px){
 body.app-shell .sidebar:not(.collapsed) .sz-wordmark{display:flex}
}
@media(max-width:1050px){
 body.app-shell .sidebar-brand{padding:10px 12px!important}
}
body.sidebar-collapsed .sidebar .sz-wordmark{display:none!important}
body.sidebar-collapsed .sidebar .sz-sidebar-identity{justify-content:center}
body.sidebar-collapsed .sidebar .brand-logo{width:46px!important;height:46px!important;flex-basis:46px!important}
@media(max-width:430px){
 .sz-member-brand>img{width:39px!important;height:39px!important;max-width:39px!important;max-height:39px!important}
 .sz-member-wordmark{font-size:13px}
 .sz-login-brand span{font-size:20px}
 .sz-member-login-brand span{font-size:20px!important}
 body.member-portal-shell .member-topbar{gap:8px!important}
 body.member-portal-shell .member-main{min-width:0}
}
@media(max-width:370px){
 .sz-member-wordmark{font-size:12px}
 .sz-member-brand>img{width:35px!important;height:35px!important}
 body.member-portal-shell .member-top-actions{gap:3px}
 .sz-member-login-brand img{width:62px!important;height:62px!important;flex-basis:62px!important}
 .sz-member-login-brand span small{font-size:7px!important}
}
@media(prefers-reduced-motion:reduce){
 body.app-shell *,body.login-page *,body.member-login-page *,body.member-portal-shell *{
  transition-duration:.01ms!important;animation-duration:.01ms!important;
 }
}

/* Accessible gold text on dark panels. */
html[data-theme="dark"] body.member-portal-shell .member-profile-head strong,
html[data-theme="dark"] body.member-portal-shell .member-back-link,
html[data-theme="dark"] body.member-portal-shell .member-class-date strong,
html[data-theme="dark"] body.member-portal-shell .member-class-date span,
html[data-theme="dark"] body.member-portal-shell .member-more-link:hover,
html[data-theme="dark"] body.app-shell a:not(.button):focus-visible{
 color:#F1CB70!important;
}
