/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

body {
  background: #fff7ed;
  color: #333;
  line-height: 1.6;
}


/* Header */
header {
  text-align: center;
  padding: 60px 20px;
  background: #fff4e6;
  color: #d97706;
}

header h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

header p {
  font-size: 18px;
  color: #6b7280;
}

/* Container & Cards */
.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.card h2 {
  color: #f97316;
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: bold;
}

/* Stats Boxes */
.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.stat {
  background: #fff7ed;
  border: 2px solid #fb923c;
  padding: 20px;
  border-radius: 12px;
  flex: 1;
  min-width: 150px;
  text-align: center;
}

.stat h3 {
  color: #d97706;
  font-size: 24px;
  margin-bottom: 5px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 15px;
}

table th, table td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  text-align: center;
}

th {
  background: #f97316;
  color: white;
  position: sticky; /* sticky header */
  top: 0;
  z-index: 2;
}

tbody tr:nth-child(even) {
  background: #fff4e6;
}

tbody tr:hover {
  background: #fde68a;
  transition: 0.2s;
}

.total-row {
  background: #fde68a !important;
  font-weight: bold;
}

/* Footer */
footer {
  background: #d97706;
  color: white;
  text-align: center;
  padding: 25px 15px;
  margin-top: 50px;
}

footer a {
  color: #fde68a;
  font-weight: bold;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  header h2 {
    font-size: 24px;
  }

  .side-by-side {
    flex-direction: column;
  }

  .side-by-side .card {
    max-width: 100%;
  }
}

/* Table + Chart Layout */
.chart-table {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px; /* space between table and chart */
}

.table-wrapper {
  flex: 2; /* table takes more space */
}

.chart-wrapper {
  flex: 1;
  max-width: 350px;
  margin-left: 80px; /* pushes chart farther from the table */
}

.chart-wrapper canvas {
  width: 100% !important;
  height: auto !important;
}

/* Side-by-side layout for Table and Chart */
.side-by-side {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap; /* responsive */
}

.side-by-side .card {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.side-by-side .card:first-child {
  flex: 2; /* wider for table */
}

.side-by-side .card:last-child {
  flex: 1.2;
  max-width: 500px;
}

.side-by-side canvas {
  max-height: 350px;
  width: 100% !important;
  height: auto !important;
}

/* Organization Chart Styling */
.org-chart {
  text-align: center;
  margin: 40px auto;
}

.org-chart ul {
  padding-top: 20px;
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* 🔴 Remove all connector lines */
.org-chart li::before,
.org-chart li::after,
.org-chart li ul::before {
  display: none !important;
}

.org-chart li {
  list-style: none;
  text-align: center;
  position: relative;
  padding: 30px 15px 0 15px;
}

/* Official box */
.official {
  background: #fff7ed;
  border: 2px solid #f97316;
  border-radius: 12px;
  padding: 15px 5px;
  display: inline-block;
  min-width: 180px;
  max-width: 400px;
  font-weight: 600;
  color: #d97706;
  transition: 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.official small {
  display: block;
  font-weight: normal;
  color: #555;
  margin-top: 4px;
}

/* Group Labels */
.branch-label {
  background: #fde68a;
  border: 2px dashed #f97316;
  border-radius: 8px;
  padding: 10px 15px;
  display: inline-block;
  font-weight: 600;
  color: #b45309;
  margin-bottom: 15px;
}

/* Hover effect */
.official:hover {
  background: #fef3c7;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

/* Responsive */
@media (max-width: 768px) {
  .org-chart ul {
    flex-direction: column;
    align-items: center;
  }
}
