 /* ===========================
       PwC Brand Colours
    =========================== */
    :root {
      --pwc-black: #000000;
      --pwc-red: #AD1B02;
      --pwc-dark-orange: #DB4E18;
      --pwc-light-orange: #E88D14;
      --pwc-yellow: #F3BE26;
      --pwc-pink: #E669A2;
      --pwc-bg-gradient: linear-gradient(to right, #E4E5E6, #AD1B02);
    }

    /* Global reset and container */
    *, *::before, *::after { box-sizing: border-box; }

    .container {
      max-width: 1120px;
      margin: 0 auto;
      padding: 24px;
      width: 100%;
    }

    /* ======= Background ======= */
    body {
      margin: 0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
      color: var(--pwc-black);
      background: var(--pwc-bg-gradient);
      min-height: 100dvh;
    }

    /* ======= Header ======= */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      background: rgba(255,255,255,0.7);
      backdrop-filter: blur(6px);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 16px;
      padding: 16px 20px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* Optimized for 1200x1200 PNG */
    .brand-icon img {
      width: 44px;          /* feel free to drop to 36px */
      height: 44px;
      object-fit: contain;
      border-radius: 6px;
      background: #ffffff;
      padding: 2px;
      box-shadow: 0 0 4px rgba(0,0,0,0.1);
      display: block;
    }

    .title {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: 0.2px;
      color: var(--pwc-black);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,0.12);
      background: white;
      color: var(--pwc-black);
      text-decoration: none;
      box-shadow: 0 3px 10px rgba(0,0,0,0.06) inset;
    }

    .badge a {
      color: var(--pwc-red);
      text-decoration: none;
      font-weight: 600;
    }

    .badge a:hover { text-decoration: underline; }

    /* ======= Grid Layout ======= */
    .grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      margin-top: 20px;
    }

    @media (min-width: 960px) {
      .grid {
        grid-template-columns: 1fr 2fr;
      }
    }

    /* ======= Cards ======= */
    .card {
      background: rgba(255,255,255,0.8);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 16px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.06);
      overflow: hidden;
    }

    .card-header {
      padding: 16px 18px 8px 18px;
      border-bottom: 1px dashed rgba(0,0,0,0.08);
    }

    .card-title {
      font-size: 16px;
      font-weight: 700;
      margin: 0;
      color: var(--pwc-dark-orange);
    }

    .card-desc {
      font-size: 13px;
      color: #5b6472;
      margin: 6px 0 0 0;
    }

    .card-body {
      padding: 16px 18px 18px 18px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    /* ======= Forms ======= */
    .field { margin-bottom: 12px; }
    .label { font-size: 12px; color: #5b6472; margin-bottom: 6px; display: block; }

    .input, .select, .textarea {
      width: 100%;
      border: 1px solid rgba(0,0,0,0.14);
      border-radius: 10px;
      padding: 10px 12px;
      font: inherit;
      background: white;
      color: #0b1220;
      outline: none;
      transition: border-color 120ms ease;
    }

    .input:focus, .select:focus, .textarea:focus {
      border-color: var(--pwc-dark-orange);
      box-shadow: 0 0 0 3px rgba(219,78,24,0.15);
    }

    .btn {
      display: inline-block;
      width: 100%;
      text-align: center;
      padding: 10px 14px;
      border-radius: 10px;
      background: var(--pwc-red);
      color: white;
      border: none;
      cursor: pointer;
      font-weight: 600;
      transition: background 120ms ease;
    }

    .btn:hover { background: var(--pwc-dark-orange); }

    /* ======= Candidate cards ======= */
    .candidate {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px;
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 14px;
      background: rgba(255,255,255,0.6);
      transition: transform 120ms ease, box-shadow 120ms ease;
    }

    .candidate:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 18px rgba(0,0,0,0.08);
    }

    .avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: var(--pwc-light-orange);
      color: white;
      font-weight: 700;
      border: 2px solid rgba(0,0,0,0.1);
    }

    .pill {
      font-size: 11px;
      padding: 4px 8px;
      border-radius: 999px;
      border: 1px solid rgba(0,0,0,0.1);
      background: #f1f5f9;
    }

    .metric small { color: #5b6472; display: block; }

    /* ======= Footer ======= */
    .footer {
      text-align: center;
      font-size: 12px;
      color: #334155;
      opacity: 0.9;
      margin: 22px 0 8px;
    }

    .chart-section {
  background-color: #EB8C00;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: none;

}

.filter-tree {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px 15px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.242);
  font-size: 13px;
}

  .filter-tree-list {
    list-style-type: none;
    padding-left: 5px;
  }

  .filter-tree-list li {
    margin: 6px 0;
    padding: 5px;
    background: #fff;
    border-left: 4px solid #AD1B02;
    border-radius: 4px;
  }

  .remove-btn {
    margin-left: 10px;
    background: #767676;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
  }

  .remove-btn:hover {
    background: #e63946;
  }

  /* Modal Table Styling */
#modalContent table {
    width: 100%;
    border-collapse: collapse; /* avoids double borders */
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#modalContent th,
#modalContent td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd; /* single line separator */
}

#modalContent th {
    position: sticky;
    top: 0;
    background-color: #f2f2f2; /* light header background */
    color: #333;
    font-weight: bold;
    z-index: 2;
    box-shadow: inset 0 -1px 0 #ccc; /* subtle bottom line */
}

#modalContent tr:nth-child(even) {
    background-color: #fafafa; /* light alternating row colors */
}

#modalContent tr:hover {
    background-color: #f1e0d6; /* subtle hover highlight */
}

/* Scrollable modal content (already defined but reinforce for table) */
#modalContent {
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 8px;
    background-color: #fff;
}

/* Optional: heading inside modal */
#modalContent h3 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #eb8c00;
    color: #d04a02;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal content box */
.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 900px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}
/* Close button */
.close-btn {
  float: right;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.close-btn:hover {
  color: #d04a02;
}

/* Loading ring inside the shared modal */
.loading-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 20px;
}

.progress-ring {
  --size: 96px;
  --track: #eee;
  --fill: #D04A02;      /* PwC orange */
  --bg: #fff;
  --p: 0;               /* 0-100 */
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, var(--bg) 79%, transparent 80% 100%),
    conic-gradient(var(--fill) calc(var(--p) * 1%), var(--track) 0);
  position: relative;
}

.progress-ring__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 600 14px/1.2 system-ui, sans-serif;
  color: #333;
}
