/* =============================================================================
   AdminKit — base.css
   Resets, typography defaults, body-level rules.
   Loaded AFTER Bootstrap RTL so it can override default body styles.
============================================================================= */

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  color-scheme: var(--color-scheme);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Keep horizontal scrollbar out — most layout bugs in RTL trigger this. */
  overflow-x: hidden;
}

/* On pages that use .app-shell, the SHELL is the scrolling container.
   That way the vertical scrollbar always sits on the inline-end side
   (visual LEFT in RTL — opposite the sidebar). On other pages
   (login, 404, maintenance) body scrolls normally. */
html:has(.app-shell),
body:has(.app-shell) {
  height: 100%;
  overflow: hidden;
}

/* Scroll-lock — applied when sidebar opens on mobile, or a modal opens.
   We lock both the body (for non-shell pages) and the shell (for shell pages). */
body.is-scroll-locked              { overflow: hidden; }
body.is-scroll-locked .app-shell   { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p { margin: 0 0 var(--space-4); }

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--duration) var(--easing);
}
a:hover { color: var(--color-link-hover); }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-5) 0;
  opacity: 1;
}

/* Focus ring — keyboard users only (the JS adds .is-using-keyboard to <html>) */
:focus { outline: none; }
.is-using-keyboard :focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Helper text classes used throughout */
.text-muted   { color: var(--color-text-muted) !important; }
.text-faint   { color: var(--color-text-faint) !important; }
.text-success { color: var(--status-success) !important; }
.text-danger  { color: var(--status-danger) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-info    { color: var(--status-info) !important; }
.text-accent  { color: var(--brand-accent) !important; }

.font-bold  { font-weight: var(--fw-bold) !important; }
.font-heavy { font-weight: var(--fw-heavy) !important; }

/* Scrollbar polish (WebKit + Firefox) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
*::-webkit-scrollbar       { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); background-clip: padding-box; border: 2px solid transparent; }

/* Selection */
::selection { background: var(--brand-accent-soft); color: var(--color-text); }

/* Reset Bootstrap's default container padding override on RTL — avoids horizontal bleed */
.container-fluid, .container { padding-inline: var(--space-5); }


/* =============================================================================
   عِيار — هوية العرض: Thmanyah Serif Display للبراند والعناوين الكبيرة
============================================================================= */
.app-sidebar__brand-name,
.auth-visual__name,
.app-page-header__title,
.setup-top__name,
.brand-mockup__name {
  font-family: var(--font-display);
}
