/* Generated from src/*.css: edit the originals, not this file. MSDS 1.1.0 */

/* ---- src/tokens.css ---- */
/* MSDS v1.1.0 | Canonical dark design tokens from MS Analytics v2.1.1/web/style.css.
 * This file is the ONLY canonical place for MSDS colors, dimensions and type scales.
 * Scope: <html class="msds" data-msds-theme="dark">; no global :root pollution.
 */
html.msds[data-msds-theme="dark"], html.msds:not([data-msds-theme]) {
  color-scheme: dark;
  --msds-bg: #0b0c0e;
  --msds-side: #101114;
  --msds-surface: #151719;
  --msds-raised: #1b1c1e;
  --msds-surface-hover: #1f2022;
  --msds-line: #303137;
  --msds-line-soft: #28292d;
  --msds-text: #f6f3ee;
  --msds-muted: #c7c3bc;
  --msds-subtle: #a4a09a;
  --msds-gold: #d6b77e;
  --msds-gold-soft: #c1a16d;
  --msds-green: #91d5a7;
  --msds-danger: #e79f9f;
  --msds-input-bg: #1d1e21;
  --msds-input-border: #454549;
  /* Additional component colors taken from the same Analytics CSS. */
  --msds-nav-hover: #222225;
  --msds-hover-text: #fff;
  --msds-metric-highlight-start: #211e19;
  --msds-metric-highlight-end: #171819;
  --msds-metric-highlight-border: #52412c;
  --msds-chip-bg: #242324;
  --msds-chip-border: #3f3b37;
  --msds-nav-active-bg: #2b261f;
  --msds-nav-active-border: #50432f;
  --msds-nav-active-text: #f2ddb9;
  --msds-button-border: #6b5538;
  --msds-button-text: #17120d;
  --msds-button-secondary-bg: #31281e;
  --msds-button-secondary-text: #f1d6ad;
  --msds-radius-panel: 13px;
  --msds-radius-control: 9px;
  --msds-radius-nav: 8px;
  --msds-sidebar-width: 205px;
  --msds-topbar-height: 59px;
  --msds-content-max: 1630px;
  --msds-content-gutter: clamp(22px, 2.5vw, 42px);
  --msds-font-latin: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  /* Tajawal is mandatory for Arabic MS UI. Font-face rules reference locally
     provisioned fonts under dist/fonts/ (see scripts/install-tajawal.py).
     The font binaries are deliberately not distributed in this repository. */
  --msds-font-arabic: "Tajawal", Tahoma, Arial, sans-serif;
  --msds-font-base: 16px;
  --msds-line-base: 1.48;
  --msds-heading-xl: clamp(32px, 2.7vw, 42px);
  --msds-heading-lg: 19px;
  --msds-heading-md: 14px;
  --msds-body-size: 14px;
  --msds-nav-size: 14px;
  --msds-button-size: 13px;
  --msds-eyebrow-size: 10px;
}

/* ---- src/typography.css ---- */
/* Tajawal (SIL OFL 1.1): self-hosted font files are installed separately.
 * Relative URLs resolve against dist/ms-design-system.css in deployed projects.
 * This repo does not redistribute any font binaries. */
@font-face { font-family:"Tajawal"; src:local("Tajawal Regular"),url("./fonts/Tajawal-Regular.ttf") format("truetype"); font-style:normal; font-weight:400; font-display:swap; }
@font-face { font-family:"Tajawal"; src:local("Tajawal Medium"),url("./fonts/Tajawal-Medium.ttf") format("truetype"); font-style:normal; font-weight:500; font-display:swap; }
@font-face { font-family:"Tajawal"; src:local("Tajawal Bold"),url("./fonts/Tajawal-Bold.ttf") format("truetype"); font-style:normal; font-weight:700; font-display:swap; }
@font-face { font-family:"Tajawal"; src:local("Tajawal ExtraBold"),url("./fonts/Tajawal-ExtraBold.ttf") format("truetype"); font-style:normal; font-weight:800; font-display:swap; }
/* Source sizes/weights/spacing: Analytics v2.1.1 style.css lines 1-88. */
html.msds { font: var(--msds-font-base)/var(--msds-line-base) var(--msds-font-latin); font-synthesis:none; -webkit-font-smoothing:antialiased; }
html.msds:lang(ar), html.msds :lang(ar) { font-family:var(--msds-font-arabic); }
.msds :where(*) { box-sizing:border-box; }
.msds :where(body) { margin:0; background:var(--msds-bg); color:var(--msds-text); }
.msds :where(a) { color:inherit; text-decoration:none; }
.msds :where(button, input, select, textarea) { font:inherit; }
.msds :where(button) { cursor:pointer; }
.msds :where(button:disabled) { opacity:.48; cursor:not-allowed; }
.msds [hidden] { display:none !important; }
.msds :focus-visible { outline:2px solid var(--msds-gold); outline-offset:3px; }
.msds .msds-eyebrow { font-size:var(--msds-eyebrow-size); letter-spacing:.16em; color:var(--msds-gold-soft); font-weight:750; text-transform:uppercase; }
.msds .msds-h1 { font-size:var(--msds-heading-xl); line-height:1.08; letter-spacing:-.038em; margin:6px 0 8px; font-weight:760; }
.msds .msds-h2 { font-size:var(--msds-heading-lg); letter-spacing:-.02em; line-height:1.25; margin:5px 0 0; font-weight:710; }
.msds .msds-h3 { font-size:var(--msds-heading-md); font-weight:690; letter-spacing:-.01em; margin:0; }
.msds .msds-paragraph { margin:0; line-height:1.54; font-size:var(--msds-body-size); color:var(--msds-muted); }
.msds .msds-muted { color:var(--msds-muted); }
.msds .msds-subtle { color:var(--msds-subtle); }
.msds .msds-gold { color:var(--msds-gold); }
.msds .msds-tabular { font-variant-numeric:tabular-nums; }

/* ---- src/layout.css ---- */
/* Canonical header contract: sticky, never position:fixed.
 * The standard shell has exactly one vertical scroller (msds-main-scroll),
 * while the topbar stays in layout flow above it. Standalone topbars and the
 * generic msds-sticky-header also stick during document scrolling. */
.msds .msds-shell { display:grid; grid-template-columns:var(--msds-sidebar-width) minmax(0,1fr); height:100vh; height:100dvh; min-height:0; overflow:hidden; background:var(--msds-bg); }
.msds .msds-sidebar { min-width:0; min-height:0; display:flex; flex-direction:column; padding:23px 12px 15px; background:var(--msds-side); border-inline-end:1px solid var(--msds-line-soft); }
.msds .msds-brand { display:flex; align-items:center; gap:10px; padding:0 7px 33px; }
.msds .msds-brand-logo { width:43px; height:43px; object-fit:contain; flex:none; }
.msds .msds-brand-text { font-size:14px; font-weight:780; letter-spacing:.025em; white-space:nowrap; }
.msds .msds-brand-text small { display:block; font-size:9px; color:var(--msds-subtle); letter-spacing:.15em; font-weight:500; margin-top:3px; }
.msds .msds-sidebar-label { color:var(--msds-subtle); font-size:10px; letter-spacing:.15em; padding:0 12px 10px; }
.msds .msds-side-nav { display:flex; flex-direction:column; overflow-y:auto; min-height:0; flex:1; scrollbar-width:thin; }
.msds .msds-nav-item { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 13px; border-radius:var(--msds-radius-nav); margin:2px 0; border:1px solid transparent; font-size:var(--msds-nav-size); font-weight:540; color:var(--msds-muted); white-space:nowrap; }
.msds .msds-nav-item:hover { background:var(--msds-nav-hover); color:var(--msds-hover-text); }
.msds .msds-nav-item[aria-current="page"], .msds .msds-nav-item.is-active { background:var(--msds-nav-active-bg); border-color:var(--msds-nav-active-border); color:var(--msds-nav-active-text); font-weight:680; }
.msds .msds-nav-icon { width:21px; display:inline-flex; flex:none; align-items:center; justify-content:center; }
.msds .msds-nav-icon img { width:18px; height:18px; display:block; }
.msds .msds-sidebar-bottom { padding:16px 8px 3px; border-top:1px solid var(--msds-line-soft); font-size:10px; color:var(--msds-subtle); margin-top:auto; }
.msds .msds-content-shell { display:flex; flex-direction:column; min-width:0; min-height:0; }
.msds .msds-topbar { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:var(--msds-topbar-height); flex:none; padding:0 var(--msds-content-gutter); background:var(--msds-bg); border-bottom:1px solid var(--msds-line-soft); position:sticky; top:0; z-index:30; }
/* For projects with ordinary page/document scrolling and their own header markup. */
.msds .msds-sticky-header { position:sticky; top:0; z-index:30; background:var(--msds-bg); }
.msds .msds-breadcrumbs { font-size:13px; color:var(--msds-subtle); }
.msds .msds-breadcrumbs strong { color:var(--msds-text); font-weight:650; }
.msds .msds-main-scroll { overflow-y:auto; overscroll-behavior:contain; min-height:0; flex:1; }
.msds .msds-main { width:100%; max-width:var(--msds-content-max); margin:0 auto; padding:27px var(--msds-content-gutter) 25px; }
.msds .msds-page-heading { display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:22px; margin-bottom:18px; }
.msds .msds-section { margin-bottom:20px; }
.msds .msds-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.msds .msds-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; margin-bottom:13px; }
@media(max-width:1050px) {
  html.msds { --msds-sidebar-width:68px; }
  .msds .msds-sidebar { padding:16px 9px; }
  .msds .msds-brand { justify-content:center; padding:0 0 20px; }
  .msds .msds-brand-text, .msds .msds-sidebar-label, .msds .msds-sidebar-bottom { display:none; }
  .msds .msds-nav-item { justify-content:center; padding:0; }
  .msds .msds-nav-item > :not(.msds-nav-icon) { display:none; }
}
@media(max-width:720px) {
  .msds .msds-shell { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
  .msds .msds-sidebar { flex-direction:row; align-items:center; gap:7px; overflow:hidden; border-inline-end:0; border-bottom:1px solid var(--msds-line-soft); padding:7px 12px; }
  .msds .msds-brand { padding:0; }
  .msds .msds-brand-logo { width:34px; height:34px; }
  .msds .msds-side-nav { flex-direction:row; gap:2px; align-items:center; overflow-x:auto; overflow-y:hidden; flex:1; scrollbar-width:thin; }
  .msds .msds-nav-item { width:39px; min-width:39px; min-height:40px; }
  html.msds { --msds-topbar-height:48px; --msds-content-gutter:16px; }
  .msds .msds-grid { grid-template-columns:minmax(0,1fr); }
  .msds .msds-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .msds .msds-page-heading { gap:12px; }
}
@media(max-width:390px) { .msds .msds-metrics { grid-template-columns:minmax(0,1fr); } }

/* ---- src/components.css ---- */
/* Matched Analytics classes are restated as source components, never CSS overrides.
   Component class prefix prevents cross-app collisions. */
.msds .msds-panel { min-width:0; background:var(--msds-surface); border:1px solid var(--msds-line); border-radius:var(--msds-radius-panel); padding:19px 20px; }
.msds .msds-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:13px; }
.msds .msds-metric { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; position:relative; padding:14px 18px 16px; min-height:156px; background:var(--msds-surface); border:1px solid var(--msds-line); border-radius:var(--msds-radius-panel); }
.msds .msds-metric:first-child { background:linear-gradient(120deg,var(--msds-metric-highlight-start),var(--msds-metric-highlight-end) 65%); border-color:var(--msds-metric-highlight-border); }
.msds .msds-metric-icon { width:22px; height:22px; object-fit:contain; margin-bottom:7px; opacity:.92; }
.msds .msds-metric-title { font-size:14px; color:var(--msds-muted); line-height:1.25; font-weight:600; }
.msds .msds-metric-value { font-size:clamp(40px,3vw,54px); font-weight:780; line-height:1; letter-spacing:-.055em; margin:9px 0 8px; font-variant-numeric:tabular-nums; }
.msds .msds-metric-hint { font-size:12px; color:var(--msds-subtle); line-height:1.36; }
.msds .msds-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:9px 15px; border:1px solid var(--msds-button-border); border-radius:var(--msds-radius-control); font-size:var(--msds-button-size); font-weight:700; white-space:nowrap; color:var(--msds-button-secondary-text); background:var(--msds-button-secondary-bg); }
.msds .msds-button--primary { background:var(--msds-gold); color:var(--msds-button-text); }
.msds .msds-button:hover { filter:brightness(1.15); }
.msds .msds-button-icon { width:17px; height:17px; flex:none; }
.msds .msds-button--primary .msds-button-icon { filter:brightness(0); }
.msds .msds-field { display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--msds-muted); }
.msds .msds-input, .msds .msds-select, .msds .msds-textarea { color:var(--msds-text); background:var(--msds-input-bg); border:1px solid var(--msds-input-border); border-radius:var(--msds-radius-control); min-height:42px; padding:9px 11px; min-width:0; font-size:14px; }
.msds .msds-select { min-width:128px; max-width:230px; }
.msds .msds-input:focus, .msds .msds-select:focus, .msds .msds-textarea:focus { border-color:var(--msds-gold); }
.msds .msds-chip { display:inline-flex; align-items:center; gap:6px; color:var(--msds-subtle); background:var(--msds-chip-bg); border:1px solid var(--msds-chip-border); padding:6px 9px; border-radius:7px; font-size:11px; white-space:nowrap; }
.msds .msds-status { display:inline-flex; align-items:center; gap:8px; font-size:12px; color:var(--msds-green); }
.msds .msds-status--error { color:var(--msds-danger); }
.msds .msds-dot { width:7px; height:7px; display:inline-block; background:currentColor; border-radius:50%; flex:none; }
.msds .msds-table-scroll { min-width:0; overflow-x:auto; }
.msds .msds-table { width:100%; border-collapse:collapse; text-align:start; color:var(--msds-text); font-size:13px; }
.msds .msds-table th { padding:12px 11px; color:var(--msds-subtle); font-size:11px; font-weight:650; text-align:start; border-bottom:1px solid var(--msds-line); white-space:nowrap; }
.msds .msds-table td { padding:12px 11px; border-bottom:1px solid var(--msds-line-soft); }
.msds .msds-table tbody tr:hover { background:var(--msds-surface-hover); }
.msds .msds-table tbody tr:last-child td { border-bottom:0; }
.msds .msds-empty { color:var(--msds-subtle); font-size:13px; padding:13px 5px; text-align:center; }

/* ---- src/rtl.css ---- */
/* The Analytics source itself is EN/LTR. This limited logical-direction adapter
 * preserves typography without pretending a full Arabic RTL audit took place. */
html.msds[dir="rtl"] .msds-brand-text { letter-spacing:normal; }
html.msds[dir="rtl"] .msds-sidebar-label,
html.msds[dir="rtl"] .msds-eyebrow { letter-spacing:normal; }
html.msds[dir="rtl"] .msds-h1 { letter-spacing:normal; }
html.msds[dir="rtl"] .msds-table { direction:rtl; }
html.msds[dir="rtl"] .msds-metric-value,html.msds[dir="rtl"] .msds-tabular { direction:ltr; unicode-bidi:isolate; }
