:root{
  --bg:#002244;        /* Seahawks navy */
  --panel:#071f3d;
  --card:#0b2a52;

  --text:#F1F5F9;
  --muted:#A5ACAF;     /* wolf gray */

  --line:rgba(241,245,249,.14);

  --brand:#69BE28;     /* action green */
  --brand2:#A5ACAF;    /* wolf gray */
  --accent:#69BE28;

  --shadow:0 18px 40px rgba(0,0,0,.40);
  --radius:18px;
  --max:1120px;
}

    body {
  background: var(--bg);
  color: #0c0b0b;;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      margin: 0;
      padding: 0;

    }

    .app-shell {
      display: flex;
      min-height: 100vh;
    }
    .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-backdrop.hidden { display: none; }

.modal {
  width: min(720px, 100%);
  background: var(--text);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e6e6e6;
}

.modal-meta {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.modal-body { padding: 12px 16px; max-height: 60vh; overflow: auto; }

.modal-close {
  font-size: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.modal-list { list-style: none; padding: 0; margin: 0; }
.modal-list li { padding: 10px 8px; border-bottom: 1px solid #f3f3f3; }
.modal-list li:last-child { border-bottom: none; }

.modal-link {
  text-decoration: none;
  font-weight: 600;
}

.modal-sub {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 2px;
}

    /* Sidebar */
    .sidebar {
      width: 220px;
      background: #002b4f;
      color: var(--text);
      padding: 16px 12px;
      box-sizing: border-box;
      position: sticky;
      top: 0;
      align-self: flex-start;
      height: 100vh;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .sidebar-header {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .sidebar-subtitle {
      font-size: 0.8rem;
      opacity: 0.8;
      margin-bottom: 12px;
    }

    .nav-section-title {
      font-size: 0.75rem;
      text-transform: uppercase;
      opacity: 0.7;
      margin: 8px 6px 4px;
    }

    .nav-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .nav-button {
      width: 100%;
      text-align: left;
      padding: 8px 10px;
      border-radius: 6px;
      border: none;
      font-size: 0.9rem;
      cursor: pointer;
      background: transparent;
      color: #f0f4f8;
    }

    .nav-button:hover {
      background: rgba(255, 255, 255, 0.08);
    }

    .nav-button.active {
      background: #0f78d1;
      color: var(--text);
      font-weight: 600;
    }

    .sidebar-footer {
      margin-top: auto;
      font-size: 0.75rem;
      opacity: 0.7;
    }

    /* Main area */
    .main-area {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
    }

    header {
      background: #004578;
      color: white;
      padding: 12px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

    header h1 {
      margin: 0;
      font-size: 1.25rem;
    }

    header p {
      margin: 2px 0 0;
      font-size: 0.85rem;
      opacity: 0.9;
    }

    main {
  max-width: none;
  width: 100%;
  padding: 0 24px;
}

    .card {
      background: white;
      border-radius: 8px;
      padding: 20px 24px;
      margin-bottom: 20px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

    h2 {
      margin-top: 0;
      font-size: 1.2rem;
      color: #004578;
    }

    h3 {
      margin-top: 0;
      font-size: 1rem;
      color: #333;
    }

    .section-description {
      font-size: 0.9rem;
      color: #555;
      margin-bottom: 12px;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 16px 24px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 0.9rem;
    }

    label {
      font-weight: 600;
    }

    select,
    input[type="number"],
    input[type="text"],
    input[type="date"],
    textarea {
      padding: 6px 8px;
      border-radius: 4px;
      border: 1px solid #ccc;
      font-size: 0.9rem;
    }

    select:focus,
    input:focus,
    textarea:focus {
      outline: 2px solid #004578;
      outline-offset: 1px;
      border-color: #004578;
    }

    textarea {
      min-height: 80px;
      resize: vertical;
    }

    .checkbox-group {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 0.9rem;
    }

    .checkbox-group label {
      font-weight: 400;
    }

    .inline {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .inline input[type="number"] {
      max-width: 120px;
    }

    .footer-actions {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 16px;
      flex-wrap: wrap;
      align-items: center;
    }

    .footer-actions-right {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    button {
      padding: 8px 16px;
      border-radius: 4px;
      border: none;
      font-size: 0.9rem;
      cursor: pointer;
    }

    button.primary {
      background: #004578;
      color: white;
    }

    button.secondary {
      background: #e1e1e1;
      color: #333;
    }

    button.small {
      padding: 4px 8px;
      font-size: 0.75rem;
    }

    small {
      font-size: 0.8rem;
      color: #777;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 12px;
      font-size: 0.8rem;
    }

    th,
    td {
      border: 1px solid #ddd;
      padding: 6px 8px;
      text-align: left;
      vertical-align: top;
    }

    th {
      background: #f0f0f0;
      font-weight: 600;
    }

    .metrics-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      font-size: 0.85rem;
    }

    .metric-pill {
      background: #f0f4f8;
      border-radius: 999px;
      padding: 6px 12px;
    }

    .badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 999px;
      font-size: 0.75rem;
      background: #e5f1ff;
      color: #004578;
      margin-left: 8px;
    }

    .subtle {
      opacity: 0.8;
    }

    .pill-counter {
      padding: 4px 8px;
      border-radius: 999px;
      background: #f0f0f0;
      font-size: 0.8rem;
    }

    .editing-indicator {
      color: #c00;
      font-size: 0.85rem;
      margin-left: 8px;
    }

    .note-box {
      background: var(--text)8e5;
      border-left: 4px solid #f0a500;
      padding: 8px 10px;
      font-size: 0.85rem;
      margin-top: 8px;
    }

    /* Option F: highlight projects with overdue PM tasks */
    tr.pm-overdue-row td {
      background: var(--text)4f4;
    }

    .view {
      display: none;
    }
    .view.active {
      display: block;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 16px 24px;
    }

    .summary-tile {
      background: #f8fafc;
      border-radius: 8px;
      padding: 12px 14px;
      border: 1px solid #dde3ea;
    }

    .summary-number {
      font-size: 1.4rem;
      font-weight: 600;
      color: #004578;
      margin: 4px 0;
    }

    .month-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 4px;
      font-size: 0.85rem;
    }

    .month-bar .bar {
      height: 8px;
      border-radius: 999px;
      background: #0f78d1;
      min-width: 4px;
    }

    .status-flag-heading {
      margin-top: 0;
      margin-bottom: 6px;
      font-size: 0.95rem;
    }

    .status-tag {
      display: inline-block;
      padding: 2px 6px;
      border-radius: 999px;
      font-size: 0.7rem;
      background: #ffe5e5;
      color: #b30000;
      margin-left: 4px;
    }

    .status-tag-warning {
      background: var(--text)3cd;
      color: #664d03;
    }

    /* Completion Calendar styles */
    .calendar-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
      margin-top: 8px;
    }

    .calendar-month {
      background: #f8fafc;
      border-radius: 8px;
      border: 1px solid #dde3ea;
      padding: 8px 10px;
    }

    .calendar-month-title {
      font-weight: 600;
      font-size: 0.9rem;
      margin-bottom: 4px;
    }

    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 2px;
      font-size: 0.7rem;
    }

    .calendar-cell {
      min-height: 40px;
      background: var(--text);
      border-radius: 4px;
      border: 1px solid #edf2f7;
      padding: 2px 3px;
      box-sizing: border-box;
      overflow: hidden;
    }

    .calendar-header {
      background: #eef2f7;
      font-weight: 600;
      text-align: center;
    }

    .calendar-day-number {
      font-weight: 600;
      margin-bottom: 1px;
    }

    .calendar-project {
      margin-top: 1px;
      line-height: 1.2;
      word-wrap: break-word;
    }

    @media (max-width: 800px) {
      .app-shell {
        flex-direction: column;
      }
      .sidebar {
        position: static;
        height: auto;
        width: 100%;
        flex-direction: row;
        align-items: center;
      }
      .nav-section-title, .sidebar-footer, .sidebar-subtitle {
        display: none;
      }
      .nav-list {
        flex-direction: row;
        gap: 4px;
      }
      .nav-button {
        font-size: 0.8rem;
      }
    }
  /* DASHBOARD LAYOUT */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* KPI cards grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

/* Each KPI card spans 3 columns on desktop (4 cards per row) */
.kpi-card {
  grid-column: span 3;
  background: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #eef2f7;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}

.kpi-label {
  font-size: 0.85rem;
  color: #556;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #004578;
  margin-top: 6px;
}

.kpi-sub {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #667;
  opacity: 0.9;
}

/* Dashboard “sections” under KPIs: use two columns on desktop */
.dashboard-sections {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

/* Responsive breakpoints */
@media (max-width: 1100px) {
  .kpi-card { grid-column: span 4; } /* 3 per row */
  .dashboard-sections { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  main { padding: 0 14px; }
  .kpi-card { grid-column: span 6; } /* 2 per row */
}

@media (max-width: 520px) {
  .kpi-card { grid-column: span 12; } /* 1 per row */
}
.kpi-card {
  opacity: 0;
  transform: translateY(6px);
}

.kpi-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 180ms ease;
}
/* Constrained content (forms like Add Project) */
.narrow-content {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

/* RAID status pills */
.pm-pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  line-height:1.4;
  border:1px solid rgba(0,0,0,0.12);
}
.pm-pill--ok{ background: rgba(0, 128, 0, 0.08); }
.pm-pill--warn{ background: rgba(255, 165, 0, 0.10); }

/* ------------------------------
   PM Modal System (PM Dashboard)
   ------------------------------ */
.pm-hidden { display: none !important; }

.pm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}

.pm-modal__content {
  width: 100%;
  background: var(--text);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.pm-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.pm-modal__body {
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}

.pm-muted { opacity: 0.85; }

.pm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pm-btn {
  border: 1px solid rgba(0,0,0,0.18);
  background: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.pm-btn:hover { background: rgba(0,0,0,0.03); }

/* ---------------------------
   Dashboard visual upgrades
   --------------------------- */
.dash-header{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  justify-content:space-between;
  margin-top: 4px;
}
.dash-filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.dash-filters input, .dash-filters select{
  padding:8px;
  border:1px solid #ddd;
  border-radius:10px;
  background:var(--text);
  min-width: 180px;
}
.dash-section{
  margin-top:14px;
  padding:12px;
  border:1px solid #e3e3e3;
  border-radius:14px;
  background:var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.dash-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.dash-section-title{
  font-weight:800;
  font-size:16px;
}
.dash-section-sub{
  font-size:12px;
  opacity:0.75;
}
.dash-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.dash-grid-3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.dash-grid-4{ display:grid; grid-template-columns:repeat(4, minmax(180px, 1fr)); gap:12px; }
@media (max-width: 980px){
  .dash-grid-3{ grid-template-columns: 1fr; }
  .dash-grid-2{ grid-template-columns: 1fr; }
  .dash-grid-4{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .dash-grid-4{ grid-template-columns: 1fr; }
  .dash-filters input{ min-width: 220px; }
}
.dash-card{
  border:1px solid #e8e8e8;
  border-radius:14px;
  padding:12px;
  background:#fafafa;
}
.dash-card-title{
  font-weight:800;
  margin-bottom:8px;
}
.dash-card-body{ }
.dash-legend{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}
.dash-legend-item{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
}
.dash-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.dash-quad-tiles{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.dash-kpi{
  padding:12px;
  border-radius:14px;
  border:1px solid #e6e6e6;
  background:var(--text);
}
.dash-kpi-label{ font-size:12px; opacity:0.75; }
.dash-kpi-value{ font-size:22px; font-weight:800; margin-top:4px; }
.dash-kpi-neutral{ border-left:6px solid #3b6fb6; }
.dash-kpi-good{ border-left:6px solid #2e8b57; }
.dash-kpi-warn{ border-left:6px solid #c77d2e; }
.dash-kpi-bad{ border-left:6px solid #d64545; }
.dash-bar-empty{
  border-radius:8px;
  background:#eee;
}

.dash-kpi-click{cursor:pointer;}
.dash-kpi-click:hover{filter:brightness(0.98);}

.dash-modal-overlay{
  position: fixed; inset:0; background: rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center; padding:18px; z-index:9999;
}
.dash-modal{ background:var(--text); width:min(1100px,96vw); max-height:88vh; overflow:hidden; border-radius:14px;
  box-shadow:0 18px 60px rgba(0,0,0,.25); display:flex; flex-direction:column; }
.dash-modal-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #eee; }
.dash-modal-title{ font-weight:700; }
.dash-modal-close{ border:none; background:transparent; font-size:22px; cursor:pointer; padding:2px 8px; }
.dash-modal-body{ padding:14px 16px 18px; overflow:auto; }

/* --- Sprint 8/9: Manager Dashboard layout helpers --- */
.grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
}
@media (max-width: 900px) {
  .grid-two { grid-template-columns: 1fr; }
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* BA Tabs */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.75);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.tab-btn.active {
  border-color: rgba(0,0,0,0.28);
  background: rgba(0,0,0,0.06);
  font-weight: 600;
}

.tabs-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tab-status {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
  padding: 2px 6px;
}

.tab-btn.primary {
  border-color: rgba(0,0,0,0.28);
  background: rgba(0,0,0,0.08);
  font-weight: 600;
}

/* --- Stakeholder Request Tracker --- */
.sr-card { margin-bottom: 12px; }
.sr-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.sr-id { font-weight:700; letter-spacing:0.2px; }
.sr-name { font-size: 1.05rem; font-weight: 650; margin-top: 2px; }
.trk { display:flex; gap:10px; overflow-x:auto; padding: 10px 2px 2px; }
.trk-step { min-width: 120px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding: 10px; border-radius: 12px; border:1px solid rgba(0,0,0,0.08); }
.trk-dot { width: 14px; height: 14px; border-radius: 999px; border: 2px solid rgba(0,0,0,0.25); }
.trk-label { font-size: 0.9rem; font-weight: 600; line-height: 1.2; }

/* color states */
.trk-step.done { background: rgba(34,197,94,0.12); }
.trk-step.done .trk-dot { background: rgba(34,197,94,1); border-color: rgba(34,197,94,1); }

.trk-step.current { background: rgba(59,130,246,0.12); }
.trk-step.current .trk-dot { background: rgba(59,130,246,1); border-color: rgba(59,130,246,1); }

.trk-step.todo { background: rgba(0,0,0,0.03); }
.trk-step.todo .trk-dot { background: transparent; }
