/* ============================================================
   EA Executive Dashboard - Global Styles
   Color Palette: Light Gray + Green
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --bg-primary:    #F0F2F5;
  --bg-secondary:  #E4E8EE;
  --bg-card:       #FFFFFF;
  --bg-card-hover: #F7F9FC;
  --bg-sidebar:    #1E293B;
  --accent-green:  #16A34A;
  --accent-green2: #15803D;
  --accent-blue:   #2563EB;
  --accent-orange: #D97706;
  --accent-red:    #DC2626;
  --accent-yellow: #CA8A04;
  --text-primary:  #0F172A;
  --text-secondary:#334155;
  --text-muted:    #64748B;
  --border:        #CBD5E1;
  --border-light:  #E2E8F0;
  --high-color:    #DC2626;
  --medium-color:  #D97706;
  --low-color:     #16A34A;
  --on-track:      #16A34A;
  --at-risk:       #D97706;
  --behind:        #DC2626;
  --sidebar-w:     260px;
  --header-h:      64px;
  --radius:        10px;
  --radius-lg:     16px;
  --shadow:        0 2px 12px rgba(0,0,0,0.08);
  --font-ar:       'Tajawal', sans-serif;
  --font-en:       'Tajawal', sans-serif;
  --transition:    0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  min-height: 100vh;
  overflow-x: hidden;
}
body[dir="rtl"] { font-family: var(--font-ar); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Layout ── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: #E2E8F0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
body[dir="rtl"] .sidebar { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; }
.sidebar-logo-text { display: flex; flex-direction: column; }
.sidebar-logo-text .logo-title { font-size: 13px; font-weight: 700; color: #F1F5F9; line-height: 1.2; }
.sidebar-logo-text .logo-sub { font-size: 10px; color: #94A3B8; margin-top: 2px; }

.sidebar-section-title {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted); letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 20px 6px;
}
body[dir="rtl"] .sidebar-section-title { letter-spacing: 0; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; color: #E2E8F0; }
.sidebar * { color: inherit; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
body[dir="rtl"] .nav-item { border-left: none; border-right: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #FFFFFF; }
.nav-item.active { background: rgba(22,163,74,0.18); color: #4ADE80; border-left-color: #4ADE80; }
body[dir="rtl"] .nav-item.active { border-left-color: transparent; border-right-color: #4ADE80; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--accent-red); color: white; font-size: 10px; padding: 1px 6px; border-radius: 10px; }
body[dir="rtl"] .nav-badge { margin-left: 0; margin-right: auto; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.user-info { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-green); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--bg-primary); flex-shrink: 0; }
.user-details { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #F1F5F9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: #94A3B8; }

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
body[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--sidebar-w); }

/* ── Header ── */
.page-header {
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.page-header-left { display: flex; flex-direction: column; }
.page-breadcrumb { font-size: 11px; color: var(--text-muted); }
.page-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.page-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
body[dir="rtl"] .page-header-right { margin-left: 0; margin-right: auto; }

.lang-toggle {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px;
}
.lang-btn {
  padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 600;
  cursor: pointer; color: var(--text-muted); transition: all var(--transition);
  border: none; background: transparent;
}
.lang-btn.active { background: var(--accent-green); color: var(--bg-primary); }

.project-selector {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  min-width: 200px;
  font-family: inherit;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none;
  transition: all var(--transition);
}
.btn-primary { background: var(--accent-green); color: var(--bg-primary); }
.btn-primary:hover { background: var(--accent-green2); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-danger { background: var(--accent-red); color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 7px; }

/* ── Page Body ── */
.page-body { padding: 24px; flex: 1; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
body[dir="rtl"] .card-title { letter-spacing: 0; }

/* ── KPI Cards ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-green);
}
.kpi-card.risk::before { background: var(--accent-red); }
.kpi-card.issue::before { background: var(--accent-orange); }
.kpi-card.behind::before { background: var(--accent-red); }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.kpi-value { font-size: 36px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.kpi-value.green { color: var(--accent-green); }
.kpi-value.red { color: var(--accent-red); }
.kpi-value.orange { color: var(--accent-orange); }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.kpi-status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-top: 6px; }
.status-on-track { background: rgba(46,204,113,0.2); color: var(--on-track); }
.status-at-risk { background: rgba(243,156,18,0.2); color: var(--at-risk); }
.status-behind { background: rgba(231,76,60,0.2); color: var(--behind); }
.status-completed { background: rgba(52,152,219,0.2); color: var(--accent-blue); }
.status-on-hold { background: rgba(108,117,125,0.2); color: #6c757d; }

/* ── Progress Ring ── */
.progress-ring-wrapper { display: flex; flex-direction: column; align-items: center; }
.progress-ring-container { position: relative; width: 100px; height: 100px; }
.progress-ring-svg { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.progress-ring-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.progress-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-ring-pct { font-size: 20px; font-weight: 800; }
.progress-ring-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Horizontal Bar ── */
.ws-bar-item { margin-bottom: 14px; }
.ws-bar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.ws-bar-name { font-size: 12px; color: var(--text-secondary); flex: 1; min-width: 0; padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[dir="rtl"] .ws-bar-name { padding-right: 0; padding-left: 8px; }
.ws-bar-pct { font-size: 12px; font-weight: 700; color: var(--text-primary); flex-shrink: 0; }
.ws-bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; position: relative; }
.ws-bar-actual { height: 100%; border-radius: 4px; background: var(--accent-green); transition: width 1s ease; }
.ws-bar-planned { position: absolute; top: 0; height: 100%; width: 2px; background: var(--accent-orange); border-radius: 2px; }

/* ── Risk Heat Map ── */
.heat-map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.heat-cell { box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: 60px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; cursor: default;
  transition: transform var(--transition);
  border: 2px solid transparent;
}
.heat-cell:hover { transform: scale(1.05); }
.heat-cell .cell-count { font-size: 22px; font-weight: 800; line-height: 1; }
.heat-cell .cell-label { font-size: 9px; color: rgba(255,255,255,0.7); margin-top: 2px; text-transform: uppercase; }
.heat-hh { background: rgba(231,76,60,0.85); }
.heat-hm { background: rgba(231,76,60,0.6); }
.heat-hl { background: rgba(243,156,18,0.6); }
.heat-mh { background: rgba(243,156,18,0.7); }
.heat-mm { background: rgba(243,156,18,0.45); }
.heat-ml { background: rgba(46,204,113,0.45); }
.heat-lh { background: rgba(243,156,18,0.45); }
.heat-lm { background: rgba(46,204,113,0.3); }
.heat-ll { background: rgba(46,204,113,0.6); }
.heat-axis-label { font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* ── Achievements ── */
.achievement-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.achievement-item:last-child { border-bottom: none; }
.achievement-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); flex-shrink: 0; margin-top: 4px; }
.achievement-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  padding: 10px 12px; text-align: left;
  background: #475569; color: #FFFFFF;
  font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
body[dir="rtl"] .data-table th { text-align: right; letter-spacing: 0; }
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Severity Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge-high { background: rgba(231,76,60,0.2); color: var(--high-color); }
.badge-medium { background: rgba(243,156,18,0.2); color: var(--medium-color); }
.badge-low { background: rgba(46,204,113,0.2); color: var(--low-color); }
.badge-open { background: rgba(52,152,219,0.2); color: var(--accent-blue); }
.badge-resolved { background: rgba(46,204,113,0.2); color: var(--accent-green); }
.badge-pending { background: rgba(108,117,125,0.2); color: #aaa; }
.badge-in-progress { background: rgba(243,156,18,0.2); color: var(--accent-yellow); }

/* ── Timeline ── */
.timeline-container { overflow-x: auto; padding-bottom: 8px; }
.timeline-track { display: flex; align-items: flex-start; gap: 0; position: relative; min-width: 700px; padding: 20px 0; }
.timeline-track::before { content: ''; position: absolute; top: 36px; left: 0; right: 0; height: 2px; background: var(--border); }
.milestone-item { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.milestone-dot { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--bg-card); z-index: 1; margin-top: 28px; flex-shrink: 0; }
.milestone-dot.completed { background: var(--accent-green); }
.milestone-dot.in-progress { background: var(--accent-orange); }
.milestone-dot.pending { background: var(--border); }
.milestone-dot.delayed { background: var(--accent-red); }
.milestone-label { font-size: 11px; color: var(--text-secondary); text-align: center; margin-top: 8px; max-width: 90px; line-height: 1.3; }
.milestone-date { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-dashboard { display: grid; grid-template-columns: 340px 1fr 280px; gap: 20px; }
@media (max-width: 1400px) { .grid-dashboard { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .grid-dashboard { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* ── Sections ── */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
body[dir="rtl"] .section-title { letter-spacing: 0; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 9px 12px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent-green); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform var(--transition);
  box-shadow: var(--shadow);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
body[dir="rtl"] .modal-footer { justify-content: flex-start; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; background: var(--bg-secondary); border-radius: var(--radius); padding: 4px; margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
  padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  border: none; background: transparent; transition: all var(--transition);
  font-family: inherit;
}
.tab-btn.active { background: var(--bg-card); color: var(--text-primary); }
.tab-btn:hover:not(.active) { color: var(--text-secondary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(46,204,113,0.15); border: 1px solid rgba(46,204,113,0.3); color: var(--accent-green); }
.alert-error { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: var(--accent-red); }
.alert-warning { background: rgba(243,156,18,0.15); border: 1px solid rgba(243,156,18,0.3); color: var(--accent-yellow); }

/* ── Loading ── */
.loading-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent-green);
  animation: spin 0.8s linear infinite;
  margin: 40px auto; display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%); background-size: 400% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Report Header (matches PPTX) ── */
.report-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.report-header-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.report-header-sub { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.report-header-meta { text-align: right; }
body[dir="rtl"] .report-header-meta { text-align: left; }
.report-header-meta span { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.report-header-meta strong { color: var(--text-secondary); }

/* ── Project Overview Banner ── */
.project-banner {
  background: linear-gradient(135deg, #0F2040 0%, #0A1628 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex; gap: 24px; align-items: center;
  flex-wrap: wrap;
}
.project-banner-name { font-size: 20px; font-weight: 800; color: var(--text-primary); flex: 1; min-width: 200px; }
.project-banner-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.meta-value { font-size: 13px; color: var(--text-primary); font-weight: 600; margin-top: 2px; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ── Pagination / utils ── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-muted { color: var(--text-muted); font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  body[dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; margin-right: 0 !important; }
  .page-body { padding: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .mobile-menu-btn { display: flex !important; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
.mobile-menu-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; color: var(--text-primary); }

/* ── Login Page ── */
.login-page { min-height: 100vh; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; font-weight: 800; margin-top: 12px; }
.login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ============================================================
   V2 Additions
   ============================================================ */

/* ── Notification Bell ── */
.notif-btn {
  position: relative; width: 36px; height: 36px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition);
}
.notif-btn:hover { border-color: var(--accent-green); color: var(--accent-green); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent-red); color: white;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Notification Panel ── */
.notif-panel {
  position: fixed; top: 72px; right: 16px;
  width: 360px; max-height: 500px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  z-index: 200; overflow: hidden;
  display: none; flex-direction: column;
}
body[dir="rtl"] .notif-panel { right: auto; left: 16px; }
.notif-panel.open { display: flex; }
.notif-panel-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700;
}
.notif-panel-body { overflow-y: auto; flex: 1; }
.notif-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
  transition: background var(--transition); cursor: pointer;
}
.notif-item:hover { background: var(--bg-secondary); }
.notif-item.unread { background: rgba(46,204,113,0.05); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.notif-dot.danger { background: var(--accent-red); }
.notif-dot.warning { background: var(--accent-orange); }
.notif-dot.info { background: var(--accent-blue); }
.notif-title { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.notif-msg { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ── Chart Container ── */
.chart-container { position: relative; height: 220px; }
.chart-container-sm { position: relative; height: 160px; }

/* ── Overview Cards ── */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.overview-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.overview-card:hover { border-color: var(--accent-green); transform: translateY(-2px); }
.overview-card-status-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
}

/* ── Comment Box ── */
.comment-item {
  padding: 10px 12px; background: var(--bg-secondary);
  border-radius: 8px; margin-bottom: 8px;
}
.comment-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.comment-author { font-size: 12px; font-weight: 700; color: var(--accent-green); }
.comment-time { font-size: 10px; color: var(--text-muted); }
.comment-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.comment-input-row { display: flex; gap: 8px; margin-top: 12px; }
.comment-input { flex: 1; padding: 8px 12px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); font-size: 13px; font-family: inherit; }
.comment-input:focus { outline: none; border-color: var(--accent-green); }

/* ── Search / Filter Bar ── */
.filter-bar {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.filter-bar .form-control { max-width: 200px; }
.search-input { flex: 1; min-width: 180px; }

/* ── Team Member Card ── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.team-card {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.team-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-green); color: var(--bg-primary);
  font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 8px;
}
.team-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.team-role { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Print / PDF ── */
@media print {
  .sidebar, .page-header, .btn, .filter-bar, .notif-panel,
  #snapshot-btn, .modal-backdrop { display: none !important; }
  .main-content { margin: 0 !important; }
  .page-body { padding: 0 !important; }
  body { background: white !important; color: black !important; }
  .card { border: 1px solid #ccc !important; background: white !important; break-inside: avoid; }
  .kpi-value, .card-title, .ws-bar-name { color: #000 !important; }
  .kpi-status-badge { border: 1px solid #ccc; }
  .report-header { background: #f5f5f5 !important; color: #000 !important; }
  .ws-bar-track { background: #eee !important; }
  .ws-bar-actual { background: #2ECC71 !important; }
  .heat-cell { box-shadow: 0 1px 3px rgba(0,0,0,0.1); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .grid-dashboard { grid-template-columns: 1fr 1fr 1fr !important; }
  @page { margin: 15mm; size: A4 landscape; }
}

/* ── Agenda Page ── */
.agenda-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 12px;
  transition: border-color var(--transition);
}
.agenda-item:hover { border-color: var(--border-light); }
.agenda-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-green); color: var(--bg-primary);
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.agenda-content { flex: 1; }
.agenda-title-en { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.agenda-title-ar { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Progress History Chart ── */
.history-section { margin-top: 24px; }
