@charset "UTF-8";

/* ============================= smooth cross-page navigation ============================= */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .22s;
  animation-timing-function: ease-out;
}

/* ============================= design tokens ============================= */
:root {
  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --surface-2: #F1EDE3;
  --ink: #18181A;
  --ink-muted: #5C574D;
  --ink-faint: #8F887A;
  --border: #E6E0D3;
  --border-strong: #D3CAB6;

  --sytel: #BF8A35;
  --sytel-ink: #7A5620;
  --sytel-soft: #F4E8CE;
  --sytel-soft-2: #E9D4A4;

  --mtn: #127D5A;
  --mtn-ink: #0B4E39;
  --mtn-soft: #D8EEE4;
  --mtn-soft-2: #AEDCC8;

  --good: #2E7D4F;
  --good-soft: #DEEFE2;
  --bad: #9C2E3F;
  --bad-soft: #F4DDE1;
  --warn: #A8701E;
  --warn-soft: #F1E2C4;

  --shadow-1: 0 1px 2px rgba(24,20,10,.06), 0 1px 1px rgba(24,20,10,.04);
  --shadow-2: 0 10px 28px rgba(24,20,10,.10), 0 3px 8px rgba(24,20,10,.06);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-width: 272px;

  --font-ui: "Cairo", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131210;
  --surface: #1B1916;
  --surface-2: #232019;
  --ink: #F4F0E6;
  --ink-muted: #BAB2A0;
  --ink-faint: #82796A;
  --border: #332E26;
  --border-strong: #453F33;

  --sytel: #D3A254;
  --sytel-ink: #EFCE93;
  --sytel-soft: #3B2C15;
  --sytel-soft-2: #4C3A1A;

  --mtn: #2FB585;
  --mtn-ink: #96E4C4;
  --mtn-soft: #123329;
  --mtn-soft-2: #164536;

  --good: #55BB7C;
  --good-soft: #1D3527;
  --bad: #E08A96;
  --bad-soft: #3C2226;
  --warn: #DBAC5C;
  --warn-soft: #3C2F18;

  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 14px 32px rgba(0,0,0,.48);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
.num, [data-money], [data-num] { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--sytel-soft-2); }
svg.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ============================= personal brand bar ============================= */
.brand-bar {
  position: fixed; top: 16px; left: 16px; z-index: 120;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px 6px 6px; box-shadow: var(--shadow-2);
  direction: rtl;
}
.brand-bar .avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--border-strong);
}
.brand-bar .who { display: flex; flex-direction: column; line-height: 1.25; }
.brand-bar .who .name { font-weight: 800; font-size: 12.5px; color: var(--ink); }
.brand-bar .who .role { font-size: 10.5px; color: var(--ink-muted); font-weight: 600; }
.brand-bar .social { display: flex; align-items: center; gap: 4px; margin-inline-start: 8px; padding-inline-start: 10px; border-inline-start: 1px solid var(--border); }
.brand-bar .social a {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); transition: background .15s, color .15s;
}
.brand-bar .social a:hover { background: var(--surface-2); color: var(--ink); }
.brand-bar .social svg { width: 14px; height: 14px; }

.brand-bar--inline { display: none; }

/* ============================= side navigation ============================= */
.side-nav {
  position: fixed; top: 0; bottom: 0; right: 0; width: var(--nav-width);
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 100; overflow-y: auto;
}
.nav-brand { padding: 26px 22px 18px; border-bottom: 1px solid var(--border); }
.nav-brand-title { font-weight: 900; font-size: 17px; letter-spacing: -0.01em; }
.nav-brand-sub { font-size: 11.5px; color: var(--ink-muted); margin-top: 4px; font-weight: 600; }
.nav-list { display: flex; flex-direction: column; padding: 12px; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700; color: var(--ink-muted); transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--ink); color: var(--bg); }
.nav-item svg.icon { width: 18px; height: 18px; stroke-width: 1.9; }
.nav-theme { padding: 16px 22px; border-top: 1px solid var(--border); }
.nav-theme .label { font-size: 11px; color: var(--ink-faint); margin-bottom: 8px; font-weight: 700; }
.nav-foot { padding: 14px 22px 22px; font-size: 10.5px; color: var(--ink-faint); border-top: 1px solid var(--border); font-weight: 600; }
.nav-mobile-toggle { display: none; }

.theme-toggle { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--bg); width: 100%; }
.theme-toggle button { flex: 1; border: none; background: transparent; color: var(--ink-muted); cursor: pointer; font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; padding: 6px 6px; border-radius: 999px; }
.theme-toggle button.active { background: var(--ink); color: var(--bg); }

/* ============================= page shell ============================= */
.page { margin-right: var(--nav-width); padding: 0 30px 80px; max-width: 1180px; }
@media (max-width: 900px) {
  .side-nav { transform: translateX(100%); transition: transform .2s; box-shadow: var(--shadow-2); }
  .side-nav.open { transform: translateX(0); }
  .page { margin-right: 0; padding: 0 16px 60px; }
  .nav-mobile-toggle {
    display: flex; align-items: center; gap: 6px; position: fixed; top: 14px; left: 14px; z-index: 101;
    background: var(--ink); color: var(--bg); border: none; border-radius: 999px;
    padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-2);
  }
  .brand-bar--floating { display: none; }
  .brand-bar--inline {
    display: flex; position: static; border-radius: 0; box-shadow: none;
    border: none; border-bottom: 1px solid var(--border);
    padding: 20px 22px; background: var(--surface-2);
  }
  .brand-bar--inline .avatar { width: 46px; height: 46px; }
  .brand-bar--inline .who .name { font-size: 13.5px; }
  .brand-bar--inline .who .role { font-size: 11px; }
}

/* ============================= masthead ============================= */
.masthead { padding: 78px 0 28px; border-bottom: 1px solid var(--border); }
@media (max-width: 720px) { .masthead { padding-top: 90px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .03em; color: var(--ink-muted); text-transform: uppercase; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--sytel), var(--mtn)); }
.masthead h1 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -0.015em; font-weight: 900; }
.masthead .sub { margin-top: 12px; max-width: 68ch; color: var(--ink-muted); font-size: 15.5px; font-weight: 500; }
.meta-row { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--ink-muted); background: var(--surface);
}
.chip.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.chip.disclaimer { background: var(--surface-2); }

/* ============================= control bar (filters) ============================= */
.control-bar {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px) saturate(1.15); border-bottom: 1px solid var(--border);
  padding: 13px 0; margin: 0 -30px 32px; padding-inline: 30px;
}
@media (max-width: 900px) { .control-bar { margin: 0 -16px 30px; padding-inline: 16px; } }
.control-bar .row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.control-group { display: flex; align-items: center; gap: 10px; }
.control-group .label { font-size: 12px; color: var(--ink-muted); font-weight: 700; white-space: nowrap; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 11px; padding: 3px; background: var(--surface); gap: 2px; }
.segmented button {
  border: none; background: transparent; cursor: pointer; font-family: var(--font-ui); font-size: 12.5px;
  padding: 7px 13px; border-radius: 8px; color: var(--ink-muted); font-weight: 700; transition: background .15s, color .15s;
}
.segmented button.active { background: var(--ink); color: var(--bg); }
.control-note { font-size: 11.5px; color: var(--ink-faint); margin-inline-start: auto; max-width: 34ch; font-weight: 600; }

/* ============================= sections & cards ============================= */
section { margin-bottom: 54px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; font-weight: 800; }
.section-head .desc { font-size: 13px; color: var(--ink-muted); max-width: 56ch; font-weight: 500; }
.section-num { font-size: 12px; color: var(--ink-faint); direction: ltr; display: inline-block; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.pad { padding: 22px 24px; }

/* ============================= hero kpis ============================= */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-card { border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-2); position: relative; overflow: hidden; border: 1px solid; }
.hero-card.sytel { background: linear-gradient(155deg, var(--sytel-soft), var(--surface) 62%); border-color: var(--sytel-soft-2); }
.hero-card.mtn { background: linear-gradient(155deg, var(--mtn-soft), var(--surface) 62%); border-color: var(--mtn-soft-2); }
.hero-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.co-badge { display: flex; align-items: center; gap: 11px; }
.co-mark {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; color: #fff; flex-shrink: 0; box-shadow: var(--shadow-1);
}
.hero-card.sytel .co-mark { background: var(--sytel); }
.hero-card.mtn .co-mark { background: var(--mtn); }
.co-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.hero-card.sytel .co-dot { background: var(--sytel); }
.hero-card.mtn .co-dot { background: var(--mtn); }
.co-badge .name { font-weight: 800; font-size: 16px; }
.co-badge .sub { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.kpi-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.kpi .label { font-size: 11.5px; color: var(--ink-muted); margin-bottom: 4px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.kpi .value { font-size: 21px; font-weight: 800; }
.kpi .value small { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); margin-inline-start: 3px; }
.trend { font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--ink-faint); }
.period-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; padding: 2px 7px;
  border-radius: 999px; background: var(--warn-soft); color: var(--warn); vertical-align: middle;
}

/* ============================= profile / fact rows ============================= */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card .pad { display: flex; flex-direction: column; gap: 10px; }
.profile-fact-row { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.profile-fact-row:last-child { border-bottom: none; }
.profile-fact-row .k { color: var(--ink-muted); font-weight: 600; }
.profile-fact-row .v { font-weight: 700; }
.consolidation-note { font-size: 12px; color: var(--ink-muted); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 4px; font-weight: 500; line-height: 1.6; }

/* ============================= explainers ============================= */
.explainer { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 780px) { .explainer { grid-template-columns: 1fr; } }
.explain-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px 17px; background: var(--surface-2); }
.explain-box .term { font-weight: 800; font-size: 13.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.explain-box .def { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; line-height: 1.65; }

/* ============================= charts ============================= */
.chart-card .pad { padding: 20px 22px 16px; }
.chart-title-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.chart-title-row h3 { font-size: 14px; font-weight: 800; }
.legend-row { display: flex; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-muted); font-weight: 700; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg.chart text { font-family: var(--font-ui); fill: var(--ink-muted); font-weight: 600; }
svg.chart text.num-label { direction: ltr; font-weight: 700; }
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .chart-grid-2, .chart-grid-3 { grid-template-columns: 1fr; } }
.chart-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; font-weight: 500; line-height: 1.6; }

.tooltip {
  position: absolute; pointer-events: none; z-index: 200; background: var(--ink); color: var(--bg);
  border-radius: 9px; padding: 9px 12px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-2); opacity: 0;
  transition: opacity .1s; white-space: nowrap;
}
.tooltip .tt-title { font-weight: 800; margin-bottom: 3px; }
.tooltip.show { opacity: 1; }

/* ============================= growth chips ============================= */
.growth-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.growth-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px 7px 9px; background: var(--surface); font-size: 12.5px; font-weight: 600; }
.growth-chip .dot { width: 9px; height: 9px; border-radius: 2px; }
.growth-chip b { direction: ltr; display: inline-block; font-weight: 800; }

/* ============================= composition (stacked bars) ============================= */
.comp-block { margin-bottom: 22px; }
.comp-block:last-child { margin-bottom: 0; }
.comp-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comp-block-head .name { font-weight: 800; font-size: 13.5px; }
.stack-bar { display: flex; width: 100%; height: 36px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border); }
.stack-seg { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 9px; }
.stack-legend .item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-muted); font-weight: 600; }
.stack-legend .sw { width: 9px; height: 9px; border-radius: 2px; }

/* ============================= ledger table rows ============================= */
.ledger { border-top: 1px solid var(--border); }
.ledger-row { display: grid; grid-template-columns: 1.6fr repeat(var(--cols, 2), 1fr); gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--border); align-items: center; font-size: 13px; }
.ledger-row.head { color: var(--ink-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.ledger-row.total { font-weight: 800; border-top: 2px solid var(--border-strong); border-bottom: 2px solid var(--border-strong); background: var(--surface-2); }
.ledger-row.subtotal { font-weight: 700; background: var(--surface-2); }
.ledger-row .lbl { font-weight: 600; }
.ledger-row .cell { text-align: left; font-weight: 600; }
.ledger-wrap { overflow-x: auto; }

/* ============================= ratio cards grid ============================= */
.ratio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ratio-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px 17px; background: var(--surface); transition: box-shadow .15s, border-color .15s; }
.ratio-card:hover { box-shadow: var(--shadow-1); border-color: var(--border-strong); }
.ratio-card .rlabel { font-size: 11.5px; color: var(--ink-muted); margin-bottom: 7px; font-weight: 700; }
.ratio-card .rvalue { font-size: 23px; font-weight: 800; }
.ratio-card .rdef { font-size: 11px; color: var(--ink-faint); margin-top: 7px; font-weight: 500; line-height: 1.5; }

/* ============================= limits list ============================= */
.limits-list { display: flex; flex-direction: column; }
.limit-item { display: grid; grid-template-columns: 30px 1fr; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.limit-item:last-child { border-bottom: none; }
.limit-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--warn-soft); color: var(--warn); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.limit-icon svg.icon { width: 15px; height: 15px; stroke-width: 2.1; }
.limit-item .t { font-weight: 800; font-size: 13.5px; margin-bottom: 3px; }
.limit-item .d { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; line-height: 1.65; }

/* ============================= misc ============================= */
.kv-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.kv-badge.sytel { background: var(--sytel-soft); color: var(--sytel-ink); }
.kv-badge.mtn { background: var(--mtn-soft); color: var(--mtn-ink); }
.kv-badge.consolidated { background: var(--good-soft); color: var(--good); }
.kv-badge.standalone { background: var(--surface-2); color: var(--ink-muted); }

.nav-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.nav-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; background: var(--surface); transition: box-shadow .18s, transform .18s, border-color .18s; }
.nav-card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--border-strong); }
.nav-card .nc-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.nav-card .t { font-weight: 800; font-size: 15px; }
.nav-card .d { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; line-height: 1.6; }
.nav-card .arrow { font-size: 12px; color: var(--ink-faint); font-weight: 700; margin-top: 2px; }

footer.page-footer { border-top: 1px solid var(--border); padding-top: 26px; margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.page-footer .col { font-size: 11.5px; color: var(--ink-faint); max-width: 46ch; font-weight: 500; line-height: 1.6; }
footer.page-footer .col b { color: var(--ink-muted); }
