:root{
--exec-bg:#f5f7fb;--exec-surface:#fff;--exec-ink:#121a31;--exec-muted:#65708a;--exec-line:#e4e8f1;
--exec-purple:#6d28d9;--exec-blue:#2f6bd8;--exec-teal:#0e9f9a;--exec-green:#34a853;--exec-red:#dc3d4b;
--exec-radius:18px;--exec-shadow:0 12px 30px rgba(31,42,78,.07);--exec-body:16px;--exec-body-ar:17px;
}
.exec-page{display:grid;gap:16px;color:var(--exec-ink);font-size:var(--exec-body)}
html[dir="rtl"] .exec-page{font-size:var(--exec-body-ar)}
.exec-surface,.exec-kpi-card,.exec-filter-card{background:var(--exec-surface);border:1px solid var(--exec-line);border-radius:var(--exec-radius);box-shadow:var(--exec-shadow)}
.exec-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.exec-kpi-card{position:relative;display:grid;grid-template-columns:58px 1fr;gap:14px;align-items:center;padding:18px;min-height:118px;overflow:hidden}
.exec-kpi-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;font-size:24px;color:#fff;background:linear-gradient(145deg,var(--exec-blue),#21a3dc)}
.exec-tone-drug .exec-kpi-icon{background:linear-gradient(145deg,var(--exec-purple),#8b5cf6)}
.exec-tone-net .exec-kpi-icon{background:linear-gradient(145deg,var(--exec-teal),#20b9ac)}
.exec-tone-positive .exec-kpi-icon{background:linear-gradient(145deg,var(--exec-green),#68c94c)}
.exec-tone-negative .exec-kpi-icon{background:linear-gradient(145deg,var(--exec-red),#ef6a72)}
.exec-kpi-label{display:block;font-size:14px;font-weight:750;color:var(--exec-muted)}
.exec-kpi-value{display:block;margin:6px 0 4px;font-size:clamp(28px,2.2vw,38px);line-height:1;letter-spacing:-.02em}
.exec-kpi-comparison{font-size:13px;color:var(--exec-muted)}
.exec-kpi-metric{position:absolute;inset-inline-end:16px;top:16px;font-weight:850;color:var(--exec-green)}
.exec-filter-card{display:grid;grid-template-columns:190px minmax(150px,1fr) minmax(150px,1fr) minmax(190px,1fr);gap:14px;align-items:end;padding:18px}
.exec-filter-title h2{font-size:20px;margin:4px 0}.exec-filter-title span,.exec-overline,.exec-section-heading>div>span{font-size:12px;font-weight:850;letter-spacing:.09em;color:var(--exec-purple)}
.exec-field span{display:block;font-size:13px;font-weight:750;margin-bottom:6px}.exec-field select{width:100%;height:48px;border:1px solid var(--exec-line);border-radius:12px;padding:0 12px;background:#fff;font:inherit}
.exec-primary{height:48px;border:0;border-radius:12px;color:#fff;background:linear-gradient(90deg,var(--exec-purple),var(--exec-blue));font:inherit;font-weight:850;cursor:pointer}
.exec-section-bar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:0 4px}
.exec-section-heading h2{font-size:24px;margin:5px 0 0}.exec-section-heading p{margin:5px 0 0;color:var(--exec-muted)}
.exec-segmented{display:flex;border:1px solid var(--exec-line);border-radius:12px;padding:3px;background:#fff}.exec-segmented button{border:0;background:transparent;padding:8px 14px;border-radius:9px;font-weight:750;color:var(--exec-muted)}.exec-segmented button.active{background:var(--exec-purple);color:#fff}
.exec-chart-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.exec-chart-card{padding:18px;min-width:0}.exec-chart-card header{display:flex;justify-content:space-between;gap:12px}.exec-chart-card h3{font-size:20px;margin:5px 0 2px}.exec-chart-card header small,.exec-chart-unit{color:var(--exec-muted);font-size:12px}
.exec-chart-stage{position:relative;height:390px;margin-top:10px}.exec-chart-stage canvas{width:100%!important;height:100%!important}
.exec-chart-state{display:none;position:absolute;inset:0;place-items:center;border:1px dashed var(--exec-line);border-radius:14px;color:var(--exec-muted)}
.exec-chart-card[data-chart-state="empty"] canvas,.exec-chart-card[data-chart-state="error"] canvas{display:none}
.exec-chart-card[data-chart-state="empty"] .exec-chart-empty,.exec-chart-card[data-chart-state="error"] .exec-chart-error{display:grid}
.exec-chart-card footer{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding:10px 12px;border:1px solid var(--exec-line);border-radius:10px}.exec-chart-card footer strong{font-size:20px;color:var(--exec-purple)}
.exec-lower-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);gap:14px}
.exec-table-card,.exec-insight-card{padding:18px}.exec-table-wrap{overflow:auto;max-height:520px}.exec-table{width:100%;border-collapse:separate;border-spacing:0;min-width:820px}.exec-table thead th{position:sticky;top:0;background:#f7f8fc;z-index:1}.exec-table th,.exec-table td{padding:13px 12px;border-bottom:1px solid var(--exec-line);text-align:start}.exec-table th{font-size:12px;color:var(--exec-muted)}.exec-table tbody tr:hover{background:#f8fbff}.exec-rank{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#f0ecff;color:var(--exec-purple);font-weight:850}
.exec-insight-list{display:grid;gap:10px;margin-top:14px}.exec-insight-item{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:12px;border:1px solid var(--exec-line);border-radius:12px;line-height:1.5}.exec-insight-item i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#eaf8f6;color:var(--exec-teal);font-style:normal;font-weight:900}
@media(max-width:1350px){.exec-chart-grid{grid-template-columns:1fr 1fr}.exec-chart-card:last-child{grid-column:1/3}.exec-kpi-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.exec-filter-card{grid-template-columns:1fr 1fr}.exec-filter-title{grid-column:1/3}.exec-chart-grid,.exec-lower-grid{grid-template-columns:1fr}.exec-chart-card:last-child{grid-column:auto}}
@media(max-width:620px){.exec-kpi-grid,.exec-filter-card{grid-template-columns:1fr}.exec-filter-title{grid-column:auto}.exec-section-bar{align-items:flex-start;flex-direction:column}.exec-chart-stage{height:430px}}

/* =====================================================================
   EXEC_UI_GLOBAL_CONTRACT_V2
   H11.0-P5.1 — Shared Executive Design System

   Architecture rule:
   - shared global styles only
   - no new page-specific CSS
   - reusable components/tokens for all dashboard pages
   - page views may compose shared classes, but visual behavior lives here
   ===================================================================== */

:root{
  --exec-v2-space-1:4px;
  --exec-v2-space-2:8px;
  --exec-v2-space-3:12px;
  --exec-v2-space-4:16px;
  --exec-v2-space-5:20px;
  --exec-v2-space-6:24px;
  --exec-v2-space-7:32px;
  --exec-v2-radius-sm:12px;
  --exec-v2-radius-md:18px;
  --exec-v2-radius-lg:24px;
  --exec-v2-control-h:48px;
  --exec-v2-content-gap:16px;
  --exec-v2-section-gap:18px;
  --exec-v2-title:clamp(28px,2.2vw,38px);
  --exec-v2-section-title:clamp(22px,1.65vw,28px);
  --exec-v2-card-title:clamp(19px,1.35vw,23px);
  --exec-v2-body:16px;
  --exec-v2-body-ar:17px;
  --exec-v2-muted:#66758c;
  --exec-v2-line:#e1e7f0;
  --exec-v2-surface:#ffffff;
  --exec-v2-surface-soft:#f8fafc;
  --exec-v2-shadow:0 14px 38px rgba(24,35,68,.07);
}

/* Global shell contract — intentionally applies across the whole site. */
.exec-shell-v2 .elite-main{
  padding-top:16px;
}

.exec-shell-v2 .elite-topbar{
  min-height:76px;
  margin-top:-16px;
  margin-bottom:16px;
  padding-block:10px;
  padding-inline:24px;
  gap:12px;
}

.exec-shell-v2 .elite-title-block{
  min-width:0;
}

.exec-shell-v2 .elite-title-block h1{
  font-size:clamp(1.35rem,1.75vw,1.8rem);
  line-height:1.08;
  margin:0;
}

.exec-shell-v2 .elite-title-block p{
  max-width:560px;
  margin-top:4px;
  font-size:.84rem;
  line-height:1.4;
  font-weight:750;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.exec-shell-v2 .elite-branch-select{
  min-width:176px;
  padding:8px 11px;
  border-radius:13px;
}

.exec-shell-v2 .elite-search{
  min-width:220px;
  max-width:400px;
  min-height:46px;
}

.exec-shell-v2 .elite-search input{
  padding:11px;
}

.exec-shell-v2 .elite-meta{
  min-width:84px;
}

.exec-shell-v2 .elite-lang{
  padding:10px 13px;
}

.exec-shell-v2 .elite-user>span{
  width:40px;
  height:40px;
}

/* Shared page intro */
.exec-page-intro{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(260px,.55fr);
  gap:18px;
  align-items:stretch;
  padding:22px 24px;
  margin-bottom:16px;
  border:1px solid var(--exec-v2-line);
  border-radius:var(--exec-v2-radius-lg);
  background:
    radial-gradient(circle at 88% 15%,rgba(34,197,194,.10),transparent 32%),
    linear-gradient(135deg,#fff 0%,#fbfcff 52%,#f5f9ff 100%);
  box-shadow:var(--exec-v2-shadow);
  color:var(--exec-ink);
}

.exec-page-intro__copy{
  min-width:0;
  align-self:center;
}

.exec-page-intro__copy h2{
  margin:6px 0 8px;
  max-width:820px;
  font-size:var(--exec-v2-title);
  line-height:1.08;
  letter-spacing:-.045em;
}

.exec-page-intro__copy>p{
  max-width:760px;
  margin:0;
  color:var(--exec-v2-muted);
  font-size:var(--exec-v2-body);
  line-height:1.6;
}

html[dir="rtl"] .exec-page-intro__copy>p{
  font-size:var(--exec-v2-body-ar);
}

.exec-page-intro__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.exec-primary-link,
.exec-secondary-button{
  min-height:var(--exec-v2-control-h);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border-radius:13px;
  font:inherit;
  font-weight:850;
  text-decoration:none;
  cursor:pointer;
}

.exec-primary-link{
  border:0;
  color:#fff;
  background:linear-gradient(90deg,var(--exec-purple),var(--exec-teal));
  box-shadow:0 10px 24px rgba(109,40,217,.16);
}

.exec-secondary-button{
  border:1px solid var(--exec-v2-line);
  color:var(--exec-ink);
  background:#fff;
}

.exec-page-context{
  display:grid;
  align-content:center;
  gap:7px;
  min-width:0;
  padding:18px 20px;
  border:1px solid #dde7f1;
  border-radius:20px;
  background:rgba(255,255,255,.82);
}

.exec-page-context small{
  color:var(--exec-v2-muted);
  font-size:13px;
  font-weight:800;
}

.exec-page-context strong{
  font-size:clamp(22px,1.8vw,30px);
  line-height:1.15;
  letter-spacing:-.025em;
}

.exec-page-context p{
  margin:0;
  color:var(--exec-v2-muted);
  font-size:14px;
  line-height:1.5;
}

.exec-status-pill{
  justify-self:start;
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
}

.exec-status-pill--positive{
  color:#047857;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
}

/* Shared hierarchy */
.exec-section-label{
  margin-bottom:14px;
}

.exec-section-label h2{
  margin:6px 0 4px;
  font-size:var(--exec-v2-section-title);
  line-height:1.16;
  letter-spacing:-.035em;
}

.exec-section-label p{
  max-width:820px;
  margin:0;
  color:var(--exec-v2-muted);
  font-size:var(--exec-v2-body);
  line-height:1.55;
}

.exec-filter-panel,
.exec-summary-strip,
.exec-kpi-zone,
.exec-insight-band,
.exec-analysis-layout,
.exec-compact-data-card{
  scroll-margin-top:96px;
}

.exec-filter-panel{
  padding:20px 22px;
  margin-bottom:14px;
}

.exec-summary-strip{
  margin-bottom:14px;
}

.exec-kpi-zone{
  margin-bottom:14px;
}

.exec-insight-band{
  margin-bottom:14px;
}

.exec-analysis-layout{
  gap:14px;
}

.exec-chart-collection{
  display:grid;
  gap:14px;
}

.exec-chart-card--compact{
  padding:14px 14px 10px;
  border:1px solid var(--exec-v2-line);
  border-radius:16px;
  background:#fff;
}

.exec-chart-card--compact canvas{
  width:100%;
  min-height:240px;
  max-height:300px;
}

.exec-compact-data-card{
  min-height:0 !important;
  height:auto !important;
  align-self:start;
}

.exec-compact-data-card .daily-bars{
  min-height:180px !important;
  height:190px !important;
  padding-top:12px;
}

.exec-compact-data-card .rank-list{
  min-height:0;
}

/* Shared empty/unavailable state */
.exec-empty-state{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-height:88px;
  padding:14px 16px;
  border:1px dashed #d7e0eb;
  border-radius:16px;
  background:var(--exec-v2-surface-soft);
  color:var(--exec-v2-muted);
}

.exec-empty-state>span{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:12px;
  background:#eef3fa;
  color:var(--exec-purple);
  font-weight:900;
}

.exec-empty-state strong{
  display:block;
  color:var(--exec-ink);
  font-size:16px;
}

.exec-empty-state p{
  margin:3px 0 0;
  color:var(--exec-v2-muted);
  font-size:14px;
  line-height:1.45;
}

.exec-empty-state--info{
  border-color:#cfe2f5;
  background:#f7fbff;
}

.exec-data-table-empty{
  padding-top:2px;
}

/* Common density adjustments that can be reused by any executive page. */
.exec-shell-v2 .surface-card{
  box-shadow:var(--exec-v2-shadow);
}

.exec-shell-v2 .section-head.compact{
  margin-bottom:12px;
}

.exec-shell-v2 .section-head.compact h2{
  margin:5px 0 4px;
  font-size:var(--exec-v2-card-title);
  line-height:1.18;
}

.exec-shell-v2 .section-head.compact p{
  font-size:var(--exec-v2-body);
  line-height:1.5;
}

html[dir="rtl"] .exec-shell-v2 .section-head.compact p{
  font-size:var(--exec-v2-body-ar);
}

/* Responsive contract */
@media (max-width:1500px){
  .exec-shell-v2 .elite-topbar{
    padding-inline:20px;
  }

  .exec-shell-v2 .elite-search{
    max-width:330px;
  }

  .exec-page-intro{
    grid-template-columns:minmax(0,1.35fr) minmax(240px,.65fr);
  }
}

@media (max-width:1200px){
  .exec-page-intro{
    grid-template-columns:1fr;
  }

  .exec-page-context{
    grid-template-columns:auto minmax(0,1fr);
    column-gap:12px;
  }

  .exec-page-context .exec-status-pill{
    grid-column:1/3;
  }

  .exec-page-context p{
    grid-column:2;
  }
}

@media (max-width:920px){
  .exec-shell-v2 .elite-main{
    padding-top:14px;
  }

  .exec-shell-v2 .elite-topbar{
    margin-top:0;
    padding:14px;
  }

  .exec-page-intro{
    padding:18px;
  }

  .exec-chart-card--compact canvas{
    min-height:220px;
  }
}

@media (max-width:620px){
  .exec-page-intro__actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .exec-primary-link,
  .exec-secondary-button{
    width:100%;
  }

  .exec-page-context{
    display:block;
  }

  .exec-page-context>*+*{
    margin-top:7px;
  }
}

