* { box-sizing: border-box; }
html { min-height: 100%; background: #f4f1ed; }
body { margin: 0; min-height: 100vh; color: var(--afz-ink); font-family: var(--afz-font-body); background: #f4f1ed; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--afz-gold); outline-offset: 3px; }
.client-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 42%) 1fr; }
.client-auth__brand { padding: clamp(32px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--afz-brand-dark); }
.client-auth__brand img { width: 150px; height: auto; filter: var(--afz-shadow-logo); }
.client-auth__brand h1 { max-width: 560px; margin: 64px 0 16px; font: 700 clamp(42px, 5vw, 76px)/1.02 var(--afz-font-title); letter-spacing: 0; }
.client-auth__brand p { max-width: 520px; color: #f1dedb; font-size: 18px; line-height: 1.6; }
.client-auth__panel { display: grid; place-items: center; padding: 28px; }
.auth-form { width: min(100%, 500px); padding: clamp(28px, 5vw, 52px); background: #fff; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); box-shadow: var(--afz-shadow-md); }
.eyebrow { margin: 0 0 10px; color: var(--afz-brand); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.auth-form h2, .page-title h1 { margin: 0; font-family: var(--afz-font-title); letter-spacing: 0; }
.auth-form h2 { font-size: clamp(34px, 5vw, 48px); }
.auth-form__intro { margin: 12px 0 28px; color: var(--afz-text-muted); line-height: 1.55; }
.field { display: grid; gap: 8px; margin: 0 0 18px; }
.field label { font-weight: 750; }
.field input { width: 100%; min-height: 48px; padding: 12px 14px; color: var(--afz-ink); background: #fff; border: 1px solid #cfc9c4; border-radius: var(--afz-radius-sm); }
.field input:disabled { color: var(--afz-text-muted); background: #f2efec; }
.button { min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: var(--afz-radius-sm); font-weight: 800; }
.button--primary { color: #fff; background: var(--afz-brand); }
.button--primary:hover { background: var(--afz-brand-mid); }
.button--secondary { color: var(--afz-brand); background: #fff; border-color: #cfc9c4; }
.button--quiet { color: var(--afz-text-muted); background: transparent; border-color: transparent; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button--full { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.notice { margin: 18px 0; padding: 13px 15px; border-left: 4px solid var(--afz-gold); background: #fff5d9; line-height: 1.45; }
.notice--error { color: #701b24; border-color: var(--afz-brand); background: #fcecef; }
.notice--success { color: #28461d; border-color: var(--afz-green); background: #eef6e9; }
.client-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.client-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 18px 18px; color: #fff; background: var(--afz-brand-dark); }
.client-sidebar__logo { width: 126px; margin: 0 auto 38px; }
.client-nav { display: grid; gap: 5px; }
.client-nav button { min-height: 45px; padding: 10px 13px; color: #f3e6e4; text-align: left; background: transparent; border: 0; border-left: 3px solid transparent; border-radius: 0 var(--afz-radius-sm) var(--afz-radius-sm) 0; }
.client-nav button:hover, .client-nav button[aria-current="page"] { color: #fff; background: rgba(255,255,255,.1); border-left-color: var(--afz-gold); }
.client-sidebar__foot { margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }
.client-sidebar__foot small { display: block; margin-bottom: 12px; color: #d8c5c4; overflow-wrap: anywhere; }
.client-sidebar__foot .button { width: 100%; color: #fff; border-color: rgba(255,255,255,.25); }
.client-main { min-width: 0; }
.client-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(20px, 4vw, 52px); background: #fff; border-bottom: 1px solid var(--afz-border); }
.client-topbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; width: 44px; height: 44px; color: var(--afz-ink); background: #fff; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); }
.demo-chip { flex: 0 0 auto; padding: 7px 11px; color: #6a4700; background: #fff3c8; border-radius: var(--afz-radius-full); font-size: 13px; font-weight: 800; }
.client-content { width: min(100%, 1440px); margin: 0 auto; padding: clamp(28px, 5vw, 58px); }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-title h1 { font-size: clamp(38px, 5vw, 64px); }
.page-title p { max-width: 720px; margin: 10px 0 0; color: var(--afz-text-muted); line-height: 1.55; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat { padding: 22px; background: #fff; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); box-shadow: var(--afz-shadow-sm); }
.stat span { display: block; color: var(--afz-text-muted); }
.stat strong { display: block; margin-top: 8px; font: 700 38px/1 var(--afz-font-title); }
.panel { margin: 0 0 22px; background: #fff; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); box-shadow: var(--afz-shadow-sm); overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--afz-border); }
.panel__head h2 { margin: 0; font-size: 20px; }
.empty { padding: 36px 22px; color: var(--afz-text-muted); text-align: center; }
.data-list { margin: 0; padding: 0; list-style: none; }
.data-list li { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(140px, .8fr) minmax(140px, .8fr) auto; gap: 18px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--afz-border); }
.data-list li:first-child { border-top: 0; }
.data-list strong, .data-list span { min-width: 0; overflow-wrap: anywhere; }
.data-list small { display: block; margin-top: 5px; color: var(--afz-text-muted); }
.status { display: inline-flex; width: fit-content; padding: 6px 9px; color: #562026; background: #f6e8e7; border-radius: var(--afz-radius-full); font-size: 13px; font-weight: 800; }
.profile-form { padding: 24px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.loading { min-height: 60vh; display: grid; place-items: center; color: var(--afz-text-muted); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: min(380px, calc(100vw - 48px)); padding: 15px 18px; color: #fff; background: #222; border-radius: var(--afz-radius-sm); box-shadow: var(--afz-shadow-md); }

@media (max-width: 820px) {
  .client-auth { grid-template-columns: 1fr; }
  .client-auth__brand { min-height: 300px; padding: 30px; }
  .client-auth__brand h1 { margin-top: 48px; font-size: 44px; }
  .client-shell { grid-template-columns: 1fr; }
  .client-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(300px, 86vw); transform: translateX(-101%); transition: transform .2s ease; box-shadow: var(--afz-shadow-lg); }
  .client-sidebar[data-open="true"] { transform: translateX(0); }
  .menu-toggle { display: inline-grid; place-items: center; }
  .client-topbar { justify-content: flex-start; }
  .client-topbar .demo-chip { margin-left: auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { display: block; }
  .data-list li { grid-template-columns: 1fr; gap: 9px; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .client-auth__panel { padding: 14px; }
  .auth-form { padding: 24px 20px; }
  .client-content { padding: 26px 16px 48px; }
  .client-topbar { padding-inline: 14px; }
  .page-title h1 { font-size: 40px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
}
