@import url('/vendor/bootstrap-icons/bootstrap-icons.css');

@font-face {
  font-family: 'Tajawal';
  src: url('/assets/fonts/Tajawal-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('/assets/fonts/Tajawal-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('/assets/fonts/Tajawal-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('/assets/fonts/Tajawal-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --brand-primary: #006d67;
  --brand-accent: #b7852e;
  --brand-bg: #ecf8f6;
  --brand-dark: #004844;
}

* {
  box-sizing: border-box;
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
}
body {
  background:
    linear-gradient(0deg, rgba(236, 248, 246, .95), rgba(236, 248, 246, .95)),
    url("/assets/bg-main.jpg") center/cover no-repeat fixed;
  min-height: 100vh;
}

.app-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark));
  z-index: 5000;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.app-loader.hide { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; color: #fff; }
.logo-pulse {
  width: 110px;
  height: 110px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  display: grid;
  place-items: center;
  animation: pulse 2s infinite;
  overflow: hidden;
  position: relative;
}
.logo-pulse::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #ffffff;
  border-left-color: #b7852e;
  animation: spin 1.15s linear infinite;
  opacity: .9;
}
.logo-pulse img { max-width: 76%; max-height: 76%; z-index: 1; object-fit: contain; }
.loader-content h4 { margin-bottom: .35rem; font-weight: 700; letter-spacing: .2px; }
.loader-content p { margin-bottom: .9rem; opacity: .85; }
.loader-progress {
  width: 210px;
  max-width: 78vw;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  margin: 0 auto;
  overflow: hidden;
}
.loader-progress span {
  display: block;
  height: 100%;
  width: 36%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b7852e, #ffffff);
  animation: slide 1.15s ease-in-out infinite alternate;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
  70% { box-shadow: 0 0 0 30px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(280%); } }

.login-page {
  background:
    linear-gradient(150deg, rgba(0,109,103,.86), rgba(0,109,103,.75)),
    radial-gradient(circle at bottom right, #b7852e55, transparent 45%),
    url("/assets/bg-login.jpg") center/cover no-repeat fixed;
}
.glass-card {
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
}
.brand-logo { max-height: 98px; object-fit: contain; }
.btn-brand {
  background: linear-gradient(120deg, var(--brand-accent), #c99b49);
  color: #fff;
  border: none;
}
.btn-brand:hover { color: #fff; filter: brightness(0.95); }
.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .2rem rgba(0,109,103,.15);
}

.nav-brand {
  background: linear-gradient(90deg, var(--brand-primary), #028f87);
  box-shadow: 0 8px 24px rgba(0,109,103,.25);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
}
.navbar.nav-brand.sticky-top {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1100 !important;
}
.dashboard-page {
  padding-top: 72px;
}
.navbar-brand img {
  height: 58px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  padding: 0;
}
.navbar-brand span { color: #fff; font-weight: 700; }
.top-mini-nav {
  display: flex;
  gap: .35rem;
  margin-inline-start: 1rem;
}
.top-mini-nav a {
  color: #d8eeea;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .55rem;
  border-radius: .5rem;
  transition: .2s ease;
}
.top-mini-nav a:hover { background: #ffffff22; color: #fff; }
.top-mini-nav a.active-mini-link {
  background: #ffffff26;
  color: #ffd082;
  border: 1px solid #ffd08255;
}
.mobile-nav-toggle {
  display: none;
  border-color: #ffffff66;
  color: #fff;
}
.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
  color: #fff;
  background: #ffffff22;
}
.mobile-side-nav .offcanvas-header {
  background: linear-gradient(90deg, var(--brand-primary), #028f87);
  color: #fff;
}
.mobile-side-nav .offcanvas-body {
  background: #f5fbfa;
}
.mobile-side-nav .mobile-link {
  display: block;
  text-decoration: none;
  color: #0f5f59;
  background: #fff;
  border: 1px solid #d8ece8;
  border-radius: 10px;
  padding: .6rem .75rem;
  margin-bottom: .5rem;
  font-weight: 700;
}
.mobile-side-nav .mobile-link.active-mini-link {
  border-color: #b7852e88;
  color: #9a6f22;
  background: #fff9ee;
}
.nav-brand .container {
  gap: 10px;
}
.nav-brand .ms-auto {
  margin-inline-start: 0 !important;
}
.role-badge {
  background: #ffffff22;
  color: #fff;
  border: 1px solid #ffffff55;
}

.hero-head {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #016e68, #005b56);
  color: #fff;
  overflow: hidden;
}
.hero-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(0,48,45,.72), rgba(0,109,103,.62)),
    url("/assets/bg-hero.jpg") center/cover no-repeat;
  z-index: -2;
}
.hero-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(183,133,46,.22), transparent 40%),
    linear-gradient(0deg, rgba(0,0,0,.15), rgba(0,0,0,.15));
  z-index: -1;
}

.stat-card {
  background: #fff;
  border: 1px solid #d9ece8;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,109,103,.08);
  position: relative;
  overflow: hidden;
}
.nav-card-link { text-decoration: none; }
.nav-card {
  background: linear-gradient(160deg, #ffffff, #f8fcfb);
  border: 1px solid #d9ece8;
  border-radius: 14px;
  padding: .95rem .95rem .75rem;
  box-shadow: 0 6px 16px rgba(0,109,103,.07);
  transition: .2s ease;
}
.nav-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,109,103,.14); }
.nav-card h6 { color: #0c5f59; margin-bottom: .35rem; font-weight: 700; }
.nav-card p { color: #587572; font-size: .83rem; margin: 0; }
.nav-card-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: .55rem;
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  background: linear-gradient(135deg, #006d67, #b7852e);
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(var(--brand-primary), var(--brand-accent));
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-primary), #1f8a83);
}
.stat-value { color: var(--brand-dark); font-size: 2rem; font-weight: 800; }
.stat-label { color: #4f6966; font-weight: 600; }

.panel-card {
  background: #fff;
  border: 1px solid #d9ece8;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,109,103,.08);
}

@media (min-width: 1200px) {
  .h1, h1 {
    font-size: 2rem;
  }
}
.project-info-wrap { border-top: 4px solid var(--brand-accent); }
.info-title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, #006d6740, transparent);
}
.info-card-box {
  border: 1px solid #d9ece8;
  border-radius: 14px;
  padding: .95rem .95rem .85rem;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}
.info-card-box h6 {
  color: #0a5853;
  font-weight: 700;
  margin-bottom: .8rem;
  font-size: .98rem;
}
.info-item-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  color: #365c58;
  padding: .28rem 0;
  border-bottom: 1px dashed #e6f2ef;
}
.info-item-row:last-child { border-bottom: 0; }
.info-item-row strong { color: #0a5853; }
.info-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px #d8ece7;
}
.info-dot.c1 { background: #2a9070; }
.info-dot.c2 { background: #4aaa88; }
.info-dot.c3 { background: #c9a84c; }
.info-dot.c4 { background: #5cc0a0; }
.info-dot.c5 { background: #e07a50; }
.info-dot.c6 { background: #9880c0; }

#adminPanel { border-top: 5px solid var(--brand-accent); }
.btn-gold {
  background: linear-gradient(120deg, #b7852e, #cda45a);
  color: #fff;
  border: none;
  font-weight: 600;
}
.btn-gold:hover { color: #fff; filter: brightness(.95); }

.admin-modal {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.admin-modal .modal-header {
  background: linear-gradient(90deg, #006d67, #0c837c);
  color: #fff;
  border-bottom: 0;
}
.admin-modal .modal-title { font-weight: 700; }
.admin-modal .btn-close { filter: invert(1); opacity: .9; }
.admin-modal .modal-footer {
  border-top: 1px solid #e6f0ee;
  background: #fbfdfc;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid #d7eae6;
  color: #406360;
  font-size: .88rem;
  padding: .9rem 0;
  box-shadow: 0 -4px 16px rgba(0,109,103,.06);
}
.site-footer strong { color: var(--brand-accent); font-weight: 700; }

.site-footer-login {
  background: rgba(0,0,0,.14);
  border-top: 1px solid rgba(255,255,255,.22);
  color: #eaf6f4;
  backdrop-filter: blur(4px);
}
.site-footer-login strong { color: #ffd082; }

.timeline-table-wrap { border: 1px solid #deefeb; border-radius: 12px; overflow: auto; }
.timeline-table { margin: 0; min-width: 980px; }
.timeline-table th, .timeline-table td { text-align: center; vertical-align: middle; font-size: .8rem; }
.timeline-table thead th { background: #f2faf8; color: #0f645e; border-color: #e3f1ee; }
.timeline-table .domain-col { min-width: 220px; text-align: right; }
.timeline-table .domain-name { text-align: right; color: #365e5a; font-weight: 600; background: #fbfefd; }
.timeline-table td.active-cell {
  background: color-mix(in srgb, var(--cell-color) 18%, white);
  color: #1b5752;
  font-weight: 700;
}
.phase-legend { display: flex; gap: .65rem; flex-wrap: wrap; }
.phase-legend span { font-size: .78rem; color: #3d625f; display: inline-flex; align-items: center; gap: .35rem; }
.phase-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

@media (max-width: 768px) {
  .dashboard-page { padding-top: 66px; }
  .stat-value { font-size: 1.65rem; }
  .navbar-brand span { font-size: 0.82rem; }
  body { background-attachment: scroll; }
  .login-page { background-attachment: scroll; }
  .site-footer { font-size: .8rem; text-align: center; }
  .info-item-row { font-size: .82rem; }
  .nav-brand .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
  }
  .top-mini-nav { display: none; }
  .navbar-brand span { display: none !important; }
  #logoutBtn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #logoutBtn .logout-text { display: none; }
  #logoutBtn i { margin: 0 !important; font-size: 1rem; }
  .mobile-nav-toggle { display: inline-flex; align-items: center; gap: .35rem; }
  .nav-brand .ms-auto {
    margin-inline-start: auto !important;
    gap: 6px !important;
  }
  .nav-brand .ms-auto .role-badge { order: 1; }
  .nav-brand .ms-auto #logoutBtn { order: 2; }
  .nav-brand .ms-auto .mobile-nav-toggle { order: 3; }
  .role-badge { font-size: .72rem; }
  .hero-head .display-6 { font-size: 1.5rem; }
  .hero-head p { font-size: .92rem; }
  .hero-head .text-end { width: 100%; text-align: right !important; }
  .hero-head-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-main-copy, .hero-user-meta { text-align: center !important; }
  .hero-center-brand { order: 2; }
  .hero-user-meta { order: 3; }
  .hero-program-logo { height: 58px; max-width: 210px; padding: 4px 8px; }
}

.admin-modal .form-label { color: #1b5b55; font-weight: 700; }
.admin-modal .form-control { border-radius: 10px; border-color: #d4e8e4; }
.admin-modal .form-control:focus { border-color: #006d67; box-shadow: 0 0 0 .15rem rgba(0,109,103,.14); }
.admin-modal .form-text { color: #688683; }


/* Global Tajawal enforcement */
html, body,
body *:not(.bi):not([class^='bi-']):not([class*=' bi-']) {
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif !important;
}

.hero-head-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.hero-main-copy { text-align: right; }
.hero-center-brand { display: flex; justify-content: center; align-items: center; }
.hero-user-meta { text-align: right; }
.hero-program-logo {
  height: 78px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 5px 10px;
}

/* Home Intro Page */
.home-intro-page { max-width: 1240px; }
.home-video-wrap { background: transparent; border: 0; box-shadow: none; padding: 0; }
.home-video-frame { max-width: 940px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 0; background: transparent; box-shadow: 0 14px 36px rgba(0, 70, 66, .22); }
.home-intro-video { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.home-overview { background: linear-gradient(160deg, #ffffff, #f7fcfb); }
.home-section-title { font-size: 1.55rem; font-weight: 800; color: #0b5f59; margin-bottom: .65rem; position: relative; display: inline-block; padding-inline-start: .9rem; }
.home-section-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 78%; border-radius: 4px; background: linear-gradient(180deg, #b7852e, #006d67); }
.home-lead { color: #2a5f5a; line-height: 1.95; font-size: 1.05rem; margin-bottom: .2rem; }
.home-info-card { border: 1px solid #dceeea; border-radius: 16px; padding: 1rem 1rem .9rem; background: #fff; box-shadow: 0 8px 22px rgba(0,109,103,.07); }
.home-card-title { font-size: 1.16rem; font-weight: 800; color: #0a5c56; margin-bottom: .75rem; }
.home-points { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.home-points li { position: relative; padding-inline-start: 1rem; color: #335f5a; line-height: 1.85; }
.home-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: .78rem; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #006d67, #b7852e); }
.home-support-box { background: linear-gradient(145deg, #f7fcfb, #f1f9f7); border: 1px dashed #bfded8; border-radius: 12px; padding: .8rem .9rem; }
.home-support-box p { margin: 0; color: #2f5c57; line-height: 1.85; }
.home-support-box p + p { margin-top: .45rem; padding-top: .45rem; border-top: 1px dashed #d6ebe6; }
.home-message { text-align: center; background: linear-gradient(155deg, #ffffff, #f7fcfb); }
.home-quote-head { color: #0a5e58; font-weight: 800; font-size: 1.24rem; margin-bottom: .85rem; }
.home-quote-body { margin: 0 auto; max-width: 820px; font-size: 1.6rem; line-height: 1.7; font-weight: 700; padding: .9rem 1rem; border-radius: 14px; background: linear-gradient(90deg, #0f827b, #0a6e68); color: #fff; box-shadow: 0 10px 24px rgba(0,109,103,.22); }
.home-tagline { margin-top: .95rem; font-size: 1.02rem; font-weight: 700; color: #0f665f; letter-spacing: .2px; }
.home-cta {
  background: linear-gradient(140deg, #ffffff, #f6fbfa);
  border: 1px solid #d7ece8;
}
.home-cta-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #155f59;
}
.home-cta-btn {
  border-radius: 12px;
  padding: .62rem 1.15rem;
  font-weight: 700;
}
@media (max-width: 992px) { .home-section-title { font-size: 1.35rem; } .home-quote-body { font-size: 1.34rem; } }
@media (max-width: 768px) { .home-intro-page { padding-top: .75rem !important; } .home-video-frame { max-width: 940px; margin: 0 auto; border-radius: 18px; overflow: hidden; border: 0; background: transparent; box-shadow: 0 14px 36px rgba(0, 70, 66, .22); } .home-lead { font-size: .98rem; line-height: 1.9; } .home-info-card { padding: .9rem .85rem; } .home-card-title { font-size: 1.05rem; } .home-points li { font-size: .93rem; } .home-quote-head { font-size: 1.05rem; line-height: 1.8; } .home-quote-body { font-size: 1.12rem; line-height: 1.95; padding: .8rem .8rem; } .home-tagline { font-size: .94rem; } .home-cta-text { font-size: .95rem; } .home-cta-btn { width: 100%; justify-content: center; } }


/* Dashboard Team KPI */
.team-kpi-wrap { border-top: 4px solid #0f7f78; }
.program-kpi-wrap { border-top: 4px solid #006d67; }
.dashboard-final-wrap {
  border-top: 4px solid #0f7f78;
  background: linear-gradient(165deg, #ffffff, #f8fcfb);
}
.dashboard-kpi-cell { min-width: 0; }
#dashboardKpiGrid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: .9rem;
}
.ds-kpi-card {
  min-height: 0;
  aspect-ratio: 1.04 / 0.8;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,109,103,.08);
}
.ds-kpi-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .15rem;
  padding: .28rem .2rem;
}
.ds-kpi-card .stat-label {
  font-size: .96rem;
  font-weight: 800;
  color: #1f5f5a;
}
.ds-kpi-card .stat-value {
  margin-top: .1rem;
  font-size: 1.62rem;
  line-height: 1.1;
}
.ds-kpi-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #007c76, #1f948b);
}
.ds-card-hint {
  margin-top: 0;
  color: #6f7f7d;
  font-size: .78rem;
  font-weight: 700;
}
.dashboard-final-wrap .team-chart-card {
  padding: .8rem;
}
.dashboard-final-wrap .team-chart-card h6 {
  font-size: 1rem;
  margin-bottom: .45rem;
}
.dashboard-final-wrap canvas {
  max-height: 260px;
}
@media (min-width: 576px) {
  #dashboardKpiGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  #dashboardKpiGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  #dashboardKpiGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  #dashboardKpiGrid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  #dashboardKpiGrid .dashboard-kpi-cell { grid-column: span 2; }
  #dashboardKpiGrid .dashboard-kpi-cell:nth-last-child(4) { grid-column: 2 / span 2; }

  .ds-kpi-card { aspect-ratio: 1.02 / .76; }
  .ds-kpi-card .stat-label { font-size: .9rem; }
  .ds-kpi-card .stat-value { font-size: 1.48rem; }
  .ds-kpi-card .stat-icon { width: 36px; height: 36px; }
}
.risk-chart-card {
  position: relative;
  overflow: hidden;
}
.risk-chart-card::before {
  content: "";
  position: absolute;
  inset-inline-start: -32px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183,133,46,.18), transparent 68%);
  pointer-events: none;
}
.risk-chart-note {
  color: #1f5f5a;
  font-weight: 800;
  text-align: center;
  margin-top: -.35rem;
}
.team-filter-select {
  min-width: 168px;
  border-radius: 10px;
  border-color: #cfe6e2;
  color: #1d5f59;
  font-weight: 700;
}
.team-filter-select:focus {
  border-color: #0d7b73;
  box-shadow: 0 0 0 .15rem rgba(0,109,103,.14);
}
.team-stat-card {
  background: linear-gradient(150deg, #ffffff, #f8fcfb);
}
.team-chart-card {
  border: 1px solid #dbefeb;
  border-radius: 14px;
  padding: .9rem;
  background: linear-gradient(170deg, #ffffff, #fbfefd);
}
.team-chart-card h6 {
  color: #0e635d;
  font-weight: 800;
  margin-bottom: .7rem;
}
.teams-list-grid {
  display: grid;
  gap: .55rem;
}
.team-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #d7ebe6;
  border-radius: 10px;
  padding: .5rem .65rem;
  background: linear-gradient(140deg, #ffffff, #f8fcfb);
  color: #1e5f59;
  font-weight: 700;
}
.team-list-item strong {
  color: #0f7f78;
  background: #e8f5f2;
  border-radius: 8px;
  padding: .1rem .5rem;
}
@media (max-width: 768px) {
  .team-filter-select { width: 100%; min-width: 0; }
  .ds-kpi-card {
    aspect-ratio: auto;
    min-height: 108px;
  }
  .ds-kpi-card .stat-value {
    font-size: 1.42rem;
  }
  .dashboard-final-wrap canvas {
    max-height: 220px;
  }
}

/* Timeline2 */
.tl2-page .panel-card { border-radius: 16px; }
.tl2-timeline-wrap { overflow: hidden; }
.tl2-table { min-width: 1260px; margin: 0; }
.tl2-domains-overview thead th {
  background: #f2faf8;
  color: #0d645e;
  border-color: #deeeea;
  font-size: .88rem;
}
.tl2-domains-overview td {
  border-color: #e6f2ef;
  color: #255a55;
  font-size: .86rem;
}
.tl2-overview-row {
  cursor: pointer;
  transition: background-color .18s ease;
}
.tl2-overview-row:hover,
.tl2-overview-row:focus-visible {
  background: #f3faf8;
}
.tl2-overview-row td:first-child {
  font-weight: 700;
  color: #0f5f59;
}
.tl2-progress-pill {
  display: inline-block;
  min-width: 72px;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: #e9f5f2;
  color: #0d645e;
  border: 1px solid #cfe7e2;
  font-weight: 800;
}
.tl2-summary-grid {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.tl2-summary-card {
  aspect-ratio: 1 / 1;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .4rem;
}
.tl2-summary-card .stat-label {
  font-size: 1rem;
  font-weight: 800;
  color: #1f5f5a;
}
.tl2-summary-card .stat-value {
  margin-top: .1rem;
  font-size: 1.9rem;
  line-height: 1.1;
}
.tl2-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #006d67, #1f8a83);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 8px 14px rgba(0,109,103,.22);
}
.tl2-table thead th {
  background: #0f7f78;
  color: #fff;
  border-color: #2a9b93;
  font-size: .82rem;
  text-align: center;
  white-space: nowrap;
}
.tl2-domain-col {
  min-width: 260px;
  max-width: 260px;
  font-weight: 700;
  color: #184f49;
  background: #f9fdfc;
}
.tl2-domain-row td {
  background: #edf8f6;
  font-weight: 800;
  color: #0c655f;
  border-top: 2px solid #d5ece8;
  cursor: pointer;
}
.tl2-domain-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  color: #0c655f;
  text-align: right;
  padding: .15rem .25rem;
}
.tl2-domain-toggle i { font-size: .9rem; opacity: .9; }
.tl2-domain-head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tl2-domain-head .tl2-domain-toggle { flex: 1; }
.tl2-domain-delete {
  border-radius: 10px;
  padding: .2rem .45rem;
  line-height: 1;
}
.tl2-domain-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl2-domain-count {
  color: #3e7f79;
  font-size: .8rem;
  background: #dff0ed;
  border: 1px solid #c8e5df;
  border-radius: 999px;
  padding: .12rem .55rem;
}
.tl2-task-title {
  font-size: .84rem;
  line-height: 1.6;
  font-weight: 600;
}
.tl2-divider-row td {
  background: #f7fbfa;
  border-top: 2px dashed #cfe6e2;
  border-bottom: 1px dashed #d9ece8;
  padding-top: .45rem;
  padding-bottom: .45rem;
}
.tl2-divider-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #0e6a63;
  font-weight: 800;
  font-size: .81rem;
  background: #e9f5f2;
  border: 1px solid #cde6e1;
  border-radius: 999px;
  padding: .15rem .7rem;
}
.tl2-divider-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #006d67, #b7852e);
}
.tl2-deliverable-row .tl2-task-title {
  color: #1b615b;
  font-weight: 700;
}
.tl2-add-row .tl2-task-title {
  color: #0d746d;
  font-weight: 800;
}
.tl2-cell {
  min-width: 72px;
  height: 54px;
  border: 1px solid #edf5f3;
  position: relative;
}
.tl2-add-slot {
  cursor: pointer;
  background: linear-gradient(180deg, #f7fcfb 0%, #eff8f6 100%);
  transition: background .2s ease, box-shadow .2s ease;
}
.tl2-add-slot:hover {
  background: linear-gradient(180deg, #eef8f5 0%, #e1f1ed 100%);
  box-shadow: inset 0 0 0 1px #cfe7e1;
}
.tl2-add-plus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  color: #7aaea6;
  opacity: .35;
  user-select: none;
  transition: opacity .2s ease, color .2s ease, transform .2s ease;
}
.tl2-add-slot:hover .tl2-add-plus {
  opacity: .9;
  color: #0d746d;
  transform: scale(1.06);
}
.tl2-bar {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bar), white 35%);
  border-right: 4px solid var(--bar);
  color: #124a45;
  font-size: .77rem;
  line-height: 1.4;
  padding: .35rem .4rem;
  text-align: right;
  cursor: pointer;
  transition: .2s ease;
}
.tl2-bar:hover { transform: translateY(-1px); filter: brightness(.98); }
.tl2-bar small { display: block; opacity: .8; font-size: .7rem; margin-top: .15rem; }
.tl2-quick-head {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.tl2-quick-title {
  color: #0e625c;
  font-weight: 800;
  margin-bottom: .55rem;
}
.tl2-quick-table thead th {
  background: #f2faf8;
  color: #125f59;
  border-color: #deefeb;
  font-size: .82rem;
}
.tl2-quick-table td {
  border-color: #e6f2ef;
  color: #2b5b57;
  font-size: .84rem;
}
.tl2-chart-card canvas {
  max-height: 280px;
}
@media (min-width: 576px) {
  .tl2-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .tl2-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
  .tl2-summary-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .tl2-summary-card { min-height: 158px; }
  .tl2-summary-card .stat-label { font-size: .92rem; }
  .tl2-summary-card .stat-value { font-size: 1.55rem !important; }
  .tl2-summary-icon { width: 42px; height: 42px; font-size: .95rem; }
  .tl2-chart-card canvas { max-height: 220px; }
}
@media (max-width: 768px) {
  .tl2-summary-card {
    aspect-ratio: auto;
    min-height: 136px;
  }
  .tl2-chart-card canvas { max-height: 210px; }
}

