body {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  scrollbar-color: var(--border-strong) var(--bg);
}
::selection { background: var(--cta); color: var(--on-cta); }
h1, h2, h3, .metric {
  font-family: Alexandria, Tahoma, sans-serif;
  letter-spacing: normal;
  font-weight: 700;
}
h1 { font-size: clamp(30px, 4vw, 54px); line-height: 1.25; }
h2 { font-size: clamp(24px, 3vw, 39px); line-height: 1.35; }
h3 { font-size: clamp(17px, 2vw, 22px); }
a { color: var(--link); }
a:hover { color: var(--text); }
small { font-size: max(12px, .875em); }
button, .btn, .filters button {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 8px;
  box-shadow: none;
  transition: color var(--ease), background var(--ease), border-color var(--ease), transform var(--ease);
}
button:hover, .btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--link); }
button.primary, .btn.primary, .top-actions .btn.primary {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--on-cta);
  box-shadow: none;
}
button.primary:hover, .btn.primary:hover, .top-actions .btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--on-cta); }
button.primary:active, .btn.primary:active { background: var(--cta-active); border-color: var(--cta-active); }
button:disabled, button.primary:disabled, .btn[aria-disabled=true] {
  background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--border-strong);
  opacity: 1; cursor: not-allowed;
}
:is(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:is(input,select,textarea) {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
  font-size: 16px; min-height: 46px;
}
:is(input,textarea)::placeholder { color: var(--text-muted); opacity: 1; }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--surface-2) inset; }
input[type=checkbox], input[type=radio], progress { accent-color: var(--primary); }
.form label, .form .helptext, .notice { font-size: 14px; }
.notice { border-inline-start-color: var(--info); background: var(--info-soft); }
.notice.success { border-inline-start-color: var(--success); background: var(--success-soft); }
.notice.warning { border-inline-start-color: var(--warning); background: var(--warning-soft); }
.notice.error, .form .errorlist { border-inline-start-color: var(--danger); background: var(--danger-soft); }
summary { min-height: 44px; font-size: 16px; padding-block: 8px; }
details p { font-size: 16px; }
.main { max-width: calc(var(--container) + var(--gutter) * 2); padding-inline: var(--gutter); }
.identity-wrap { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.top {
  display: block; padding: 0; background: var(--surface); box-shadow: none;
  min-height: 76px;
}
.site-bar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 14px; }
.site-brand-group { display: flex; align-items: center; gap: 10px; }
.external-logo { max-width: 70px; max-height: 38px; object-fit: contain; }
.brand { flex: none; display: inline-flex; min-height: 44px; align-items: center; }
.brand img { display: block; inline-size: auto; block-size: 42px; max-inline-size: min(260px, 52vw); object-fit: contain; }
.site-custom-name { color: var(--text-muted); font-weight: 600; font-size: 14px; max-width: 16ch; overflow-wrap: anywhere; }
.brand-image-dark { display: none !important; }
[data-theme=dark] .brand-image-light { display: none !important; }
[data-theme=dark] .brand-image-dark { display: block !important; }
.top-actions { flex-wrap: nowrap; justify-content: flex-end; }
.top-actions .login-button, .top-actions .login-button:hover {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.top-actions .theme-control { width: 44px; min-height: 44px; border-color: var(--border-strong); }
.top-actions .theme-control:hover { background: var(--surface-2); }
.ui-icon { width: 20px; height: 20px; flex: none; }
.theme-sun, [data-theme=dark] .theme-moon { display: none; }
[data-theme=dark] .theme-sun { display: block; }
.site-footer { display: block; margin: 0; padding: 0; background: var(--surface); border-color: var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding-block: 24px; }
.footer-brand, .footer-links { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 48px; height: 44px; }
.footer-brand, .footer-links a { font-size: 14px; }
.footer-links a { display: inline-grid; align-items: center; min-height: 44px; }
.eyebrow { color: var(--link); font-size: 14px; letter-spacing: normal; }
.sidebar { inset-block-start: 76px; }
.sidebar a[aria-current] { border-inline-start-color: var(--link); }
.sidebar a, .section-label, .nav-search input, .nav-search button { font-size: 14px; }
.nav-count { background: var(--cta); color: var(--on-cta); font-size: 12px; }
.sidebar .sidebar-brand { display: inline-flex; align-items: center; padding: 3px 10px; margin-block-end: 15px; }
.sidebar-brand img { width: 55px; height: 44px; }
@media (max-width: 760px) {
  .top, .site-bar { min-height: 66px; }
  .sidebar { inset-block-start: 66px; }
  .brand img { block-size: 30px; }
  .top-actions { width: auto; gap: 6px; }
  .top-actions .btn, .top-actions button { font-size: 14px; padding-inline: 10px; }
  .top-actions>a:not(.btn) { font-size: 14px; padding-inline: 0; }
  .footer-inner { gap: 8px; }
  .site-brand-group :is(.external-logo, .site-custom-name) { display: none; }
}
.identity-palettes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; margin-block-end: 24px; }
.identity-palette { border: 1px solid var(--border); background: var(--bg); border-radius: 12px; padding: 18px; }
.identity-palette h3 { color: var(--text); }
.identity-palette img { width: min(100%, 220px); height: auto; }
.identity-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 14px; }
.identity-swatches span { border: 1px solid var(--border); padding: 5px 10px; border-radius: 6px; font-size: 14px; }
.swatch-bg { color: var(--text); background: var(--bg); }
.swatch-surface { color: var(--text); background: var(--surface); }
.swatch-cta { color: var(--on-cta); background: var(--cta); }
.swatch-lime { color: var(--on-lime); background: var(--lime); }
.swatch-accent { color: var(--on-accent); background: var(--accent); }
.swatches .swatch { font-size: 14px; }
.style-guide-page .swatches { display: none; }
.identity-palettes .identity-palette img { margin-block: 8px; }
.tag { color: var(--link); background: var(--surface-2); font-size: 13px; }
.registration-steps .step { font-size: 13px; }
.steps.registration-steps .step small { font-size: 12px; color: inherit; }
.steps.registration-steps .step.reached { color: var(--link); background: var(--surface-2); border-color: var(--link); }
.steps.registration-steps .step.active, .steps.registration-steps .step[aria-current=step] { color: var(--on-cta); background: var(--cta); border-color: var(--cta); }
.profile-stats > div, .eligibility { background: var(--surface-2); }
.kpi::before { background: var(--link); }
.kpi > span, .kpi small, .cash-day label, .cash-day > small, .dashboard-cash .cash-day > small { font-size: 14px; }
.cash-day progress { accent-color: var(--chart-in); }
.cash-day .cash-out { accent-color: var(--chart-out); }
.cash-day progress::-webkit-progress-value { background: var(--chart-in); }
.cash-day .cash-out::-webkit-progress-value { background: var(--chart-out); }
th, td { text-align: start; font-size: 14px; }
.calendar-key .slot, .time-event small, .calendar-gap { font-size: 12px; }
.time-calendar[tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.slot { --slot-color: var(--success); --slot-bg: var(--success-soft); border-inline-start-color: var(--slot-color); background: var(--slot-bg); }
.slot.training { --slot-color: var(--info); --slot-bg: var(--info-soft); }
.slot.makeup { --slot-color: var(--link); --slot-bg: var(--surface-2); }
.slot.rental { --slot-color: var(--warning); --slot-bg: var(--warning-soft); }
.slot.closed, .slot.maintenance { --slot-color: var(--danger); --slot-bg: var(--danger-soft); }
.slot:is(.training,.makeup,.rental,.closed,.maintenance) { border-color: var(--slot-color); background: var(--slot-bg); }
@media (max-width: 430px) {
  .site-bar { gap: 6px; }
  .brand img { max-inline-size: 145px; }
  .top-actions .login-button { border-color: transparent; }
}
@media (max-width: 350px) {
  .site-bar { flex-wrap: wrap; }
}
