/* ==============================================================================
   Ministry of Health — State Department for Medical Services (PP-SDOMS)
   Comprehensive Production Stylesheet (Vanilla CSS3, No Node.js)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --primary-navy: #0b2347;
  --primary-blue: #0d47a1;
  --accent-blue: #1976d2;
  --light-blue: #e3f2fd;
  --gov-gold: #f59e0b;
  --bg-slate: #f4f7fb;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --card-bg: #ffffff;
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --danger-red: #ef4444;
  --purple-accent: #8b5cf6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-slate);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= Top Ministerial Header ================= */
.top-header {
  background: linear-gradient(135deg, #104e9c 0%, #155cb7 100%);
  color: #ffffff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(16, 78, 156, 0.2);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: #ffffff;
}

.brand-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.brand-text .sub-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3px;
}

.header-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notif-bell {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notif-bell:hover {
  background: rgba(255, 255, 255, 0.25);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--danger-red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0d47a1;
}

.notification-control {
  position: relative;
}

.notif-badge[hidden] {
  display: none;
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel {
  position: absolute;
  z-index: 1300;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 18px 45px rgba(8, 23, 43, .2);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf4;
}

.notification-panel-head > div {
  display: grid;
  gap: 2px;
}

.notification-panel-head strong {
  color: #102c53;
  font-size: .9rem;
}

.notification-panel-head span {
  color: #75849a;
  font-size: .7rem;
}

.notification-mark-all {
  border: 0;
  background: transparent;
  color: #1256ab;
  font: inherit;
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
}

.notification-mark-all:hover {
  color: #0b438c;
  text-decoration: underline;
}

.notification-list {
  max-height: 370px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid #edf1f6;
  color: inherit;
  text-decoration: none;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover,
.notification-item.unread {
  background: #f4f8fd;
}

.notification-item.unread .notification-item-title {
  font-weight: 800;
}

.notification-item-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #cbd5e1;
}

.notification-item.unread .notification-item-dot {
  background: #1976d2;
  box-shadow: 0 0 0 3px #dcecff;
}

.notification-item-content {
  min-width: 0;
}

.notification-item-title {
  display: block;
  color: #173354;
  font-size: .77rem;
}

.notification-item-message {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.45;
}

.notification-item-time {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: .65rem;
}

.notification-empty {
  padding: 20px 16px;
  color: #75849a;
  font-size: .78rem;
  text-align: center;
}

.user-capsule {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.user-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background-color: #ffffff;
  color: var(--primary-blue);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.btn-logout {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ================= Main Navbar (Royal Blue with White Links & Light Grey Active) ================= */
.main-nav {
  background-color: #1256ab;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 4px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link svg {
  stroke: #ffffff;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-link.active {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.2);
  border-bottom-color: #f1f5f9;
}

.nav-link.active svg {
  stroke: #e2e8f0;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  min-width: 220px;
  display: none;
  z-index: 100;
  padding: 6px 0;
}

.nav-item:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background-color: var(--light-blue);
  color: var(--primary-blue);
}

/* ================= Core Values Banner ================= */
.core-values-banner {
  background: linear-gradient(90deg, #185ab4 0%, #1e6edb 50%, #185ab4 100%);
  color: #ffffff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* ================= Container ================= */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  width: 100%;
}

/* ================= Top Segment Cards (Directorates / SAGAs / Divisions) ================= */
.top-segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.segment-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.segment-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  border-color: var(--accent-blue);
}

.segment-card.active {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px var(--primary-blue);
}

.segment-card-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.segment-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.segment-icon-blue { background: linear-gradient(135deg, #1976d2, #0d47a1); }
.segment-icon-green { background: linear-gradient(135deg, #10b981, #047857); }
.segment-icon-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.segment-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.segment-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.segment-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.segment-card:hover .segment-arrow {
  transform: translateX(4px);
  color: var(--primary-blue);
}

/* ================= Section Header & Action Buttons ================= */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title-icon {
  color: var(--primary-blue);
  font-size: 1.3rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.btn-primary-green {
  background-color: #047857;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-primary-green:hover {
  background-color: #065f46;
}

.btn-primary-blue {
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-primary-blue:hover {
  background-color: #0a3880;
}

/* ================= Status Filter Pills ================= */
.status-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.status-pill {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  text-decoration: none;
}

.status-pill:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.status-pill.active {
  background-color: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.status-pill .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-all { background-color: #64748b; }
.dot-inprogress { background-color: #10b981; }
.dot-onhold { background-color: #f59e0b; }
.dot-completed { background-color: #2563eb; }
.dot-planning { background-color: #8b5cf6; }
.dot-delayed { background-color: #f97316; }
.dot-overdue { background-color: #ef4444; }
.dot-cancelled { background-color: #94a3b8; }

/* ================= Filter Controls Toolbar ================= */
.filter-toolbar {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.filter-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.filter-input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.filter-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-main);
  background-color: #f8fafc;
  outline: none;
  transition: border-color 0.2s;
}

.filter-control:focus {
  border-color: var(--accent-blue);
  background-color: #ffffff;
}

/* ================= Table & Color Coded Rows ================= */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  margin-bottom: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  vertical-align: middle;
}

/* Status-Based Row Color Coding */
.status-row-success {
  background-color: #f0fdf4 !important; /* Soft mint green */
}
.status-row-warning {
  background-color: #fffbeb !important; /* Soft amber */
}
.status-row-danger {
  background-color: #fef2f2 !important; /* Soft rose / red */
}
.status-row-default {
  background-color: #ffffff;
}

.data-table tr:hover {
  filter: brightness(0.97);
}

.project-title-cell .title-text {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  font-size: 0.88rem;
  display: block;
}

.project-title-cell .location-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Badges */
.badge-type {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

.badge-completed { background-color: #0f172a; color: #ffffff; }
.badge-in-progress { background-color: #1e293b; color: #ffffff; }
.badge-on-hold { background-color: #334155; color: #ffffff; }
.badge-planning { background-color: #475569; color: #ffffff; }
.badge-delayed { background-color: #e11d48; color: #ffffff; }
.badge-overdue { background-color: #be123c; color: #ffffff; }
.badge-cancelled { background-color: #64748b; color: #ffffff; }

.budget-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
}

/* Progress bar container */
.progress-cell {
  min-width: 140px;
}

.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #1e293b;
  border-radius: 4px;
}

.progress-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  width: 36px;
  text-align: right;
}

.actions-cell {
  white-space: nowrap;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  margin-right: 4px;
  transition: all 0.15s;
}

.btn-icon-action:hover {
  background-color: var(--light-blue);
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

/* Lazy Load Button */
.lazy-load-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.btn-lazy-load {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--primary-blue);
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-lazy-load:hover {
  background-color: var(--light-blue);
  border-color: var(--accent-blue);
}

/* ================= Directorates Grid View (matching directorates.jpeg) ================= */
.directorates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.dir-card {
  background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  box-shadow: 0 10px 20px rgba(13, 71, 161, 0.15);
  transition: transform 0.2s ease;
}

.dir-card:hover {
  transform: translateY(-4px);
}

.dir-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  text-align: center;
}

.dir-card-code {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
  text-align: center;
  margin-bottom: 24px;
}

.btn-view-more-white {
  background-color: #ffffff;
  color: var(--primary-blue);
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin: 0 auto;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.15s;
}

.btn-view-more-white:hover {
  background-color: #f8fafc;
  color: var(--primary-navy);
}

/* ================= SAGAs Grid View (matching sagas.jpeg) ================= */
.sagas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.saga-card {
  background-color: #e8f0fe;
  border: 1px solid #d2e3fc;
  border-radius: 12px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 240px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.saga-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #174ea6;
  margin-bottom: 16px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.saga-logo-box {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.saga-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.btn-view-details-blue {
  background-color: #1a73e8;
  color: #ffffff;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: auto;
}

.btn-view-details-blue:hover {
  background-color: #1557b0;
}

/* ================= Individual Project Details (matching project-details.jpeg) ================= */
.project-detail-header {
  margin-bottom: 20px;
}

.project-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.btn-view-details-toggle {
  background-color: #1a73e8;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.detail-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .detail-layout-grid {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.detail-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-text-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Indicators and Reports */
.indicators-reports-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.indicator-counter-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 14px;
}

.indicator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Gantt Timeline Bar */
.gantt-timeline-box {
  margin-top: 24px;
}

.gantt-task-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.gantt-bar-gradient {
  height: 26px;
  background: linear-gradient(90deg, #1a73e8 0%, #38bdf8 100%);
  border-radius: 6px;
  margin-bottom: 8px;
}

.gantt-month-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Monthly KPI Section */
.monthly-kpi-container {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  margin-bottom: 30px;
}

.kpi-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================= Enhanced Diary & Calendar (diary.php) ================= */
.calendar-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  margin-bottom: 30px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 0;
}

.calendar-day-cell {
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  min-height: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.15s;
}

.calendar-day-cell:hover {
  background-color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.calendar-day-cell.other-month {
  opacity: 0.35;
  background-color: #f1f5f9;
}

.calendar-day-cell.has-event {
  border-color: #93c5fd;
  background-color: #eff6ff;
}

.calendar-day-cell.selected {
  border: 2px solid var(--primary-blue);
  background-color: #e0f2fe;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.calendar-event-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  cursor: pointer;
}

.event-cat-meeting { background-color: #1d4ed8; }
.event-cat-task { background-color: #0d9488; }
.event-cat-deadline { background-color: #dc2626; }
.event-cat-event { background-color: #d97706; }
.event-cat-general { background-color: #475569; }

/* Linked Project Details Drawer */
.linked-project-drawer {
  background-color: #ffffff;
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 25px -5px rgba(13, 71, 161, 0.1);
  margin-top: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background-color: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-main);
  background-color: #f8fafc;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-blue);
  background-color: #ffffff;
}

/* ================= Footer ================= */
.main-footer {
  background-color: #0b192c;
  color: #94a3b8;
  padding: 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.footer-social-label {
  margin-right: 3px;
  color: #cbd5e1;
  font-size: .72rem;
  font-weight: 700;
}

.footer-social-icons a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dbe5f1;
  text-decoration: none;
  font-size: .7rem;
  font-weight: 700;
  transition: color .2s, transform .2s;
}

.footer-social-icons a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-social-mark {
  display: inline-flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
}

.social-facebook { background: #1877f2; }
.social-x { background: #111827; }
.social-instagram { background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.social-linkedin { background: #0a66c2; }

/* ================= Login ================= */
.login-page {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #f6f8fc 0%, #dde4ef 50%, #c4cfe3 100%);
}

.login-shell {
  width: min(450px, 100%);
}

.login-card {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 40, 90, .18);
}

/* Blue header band */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 28px 24px 26px;
  background: #0d47a1;
  color: #ffffff;
  text-align: center;
}

.login-brand img {
  width: 84px;
  height: auto;
  max-height: 84px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.login-brand h1 {
  max-width: 260px;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.login-brand p {
  margin-top: 8px;
  color: rgba(255, 255, 255, .95);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.4;
}

/* Form area */
.login-error {
  margin: 24px 30px 0;
  padding: 11px 13px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #9f1239;
  font-size: .78rem;
  font-weight: 650;
}

.login-form {
  display: block;
  padding: 40px 30px 0;
}

.login-error + .login-form {
  padding-top: 20px;
}

.login-form label {
  display: block;
  margin: 0 0 8px;
  color: #6b7280;
  font-size: .92rem;
  font-weight: 700;
}

.login-input-group {
  display: flex;
  align-items: stretch;
  margin-bottom: 20px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  background: #e8f0fe;
  overflow: hidden;
  transition: border-color .16s, box-shadow .16s;
}

.login-input-group:focus-within {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, .13);
}

.login-input-icon {
  display: flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
  color: #4b5563;
}

.login-input-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.login-form input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px 10px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: .95rem;
  outline: none;
  box-shadow: none;
}

.login-form input:focus {
  border: 0;
  box-shadow: none;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: #0d47a1;
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background .16s;
}

.login-submit svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.login-submit:hover {
  background: #0b3c87;
  transform: none;
  box-shadow: none;
}

.login-submit:focus-visible {
  outline: 3px solid rgba(25, 118, 210, .35);
  outline-offset: 2px;
}

.login-help {
  margin: 18px 30px 0;
  color: #8a94a3;
  font-size: .72rem;
  text-align: center;
}

.login-footer {
  margin: 0;
  padding: 14px 30px 34px;
  border-top: 0;
  color: #6b7280;
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 480px) {
  .login-form { padding: 30px 20px 0; }
  .login-error { margin: 20px 20px 0; }
  .login-help { margin-left: 20px; margin-right: 20px; }
}

/* ================= Royal Blue Quick Access Cards (Dashboard.png) ================= */
.dashboard-title-banner {
  background-color: #5b92e5;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(91, 146, 229, 0.2);
}

.quick-access-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

@media (max-width: 992px) {
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .quick-access-grid {
    grid-template-columns: 1fr;
  }
}

.qa-card {
  background: linear-gradient(135deg, #1d5ec4 0%, #164ea3 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(22, 78, 163, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 155px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.qa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(22, 78, 163, 0.35);
  background: linear-gradient(135deg, #256be3 0%, #1956b3 100%);
}

.qa-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #ffffff;
}

.qa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.qa-subtitle {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
}

/* ================= Priority Flagships Grid (Priority Flagships.png) ================= */
.flagships-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}
@media (max-width: 1024px) {
  .flagships-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .flagships-cards-grid {
    grid-template-columns: 1fr;
  }
}

.flagship-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  cursor: pointer;
}

.flagship-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.flagship-top-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tier-badge-critical {
  background-color: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.tier-badge-high {
  background-color: #f59e0b;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.tier-badge-medium {
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.risk-level-badge {
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.flagship-item-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0b2347;
  line-height: 1.35;
  margin-bottom: 8px;
}

.flagship-item-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flagship-progress-section {
  margin-bottom: 16px;
}

.flagship-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.flagship-progress-labels .lbl {
  color: #475569;
  font-weight: 600;
}

.flagship-progress-labels .pct {
  font-weight: 800;
  color: #0f172a;
}

.flagship-bottom-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.flagship-due-date {
  font-size: 0.78rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

