/* ===================================== */
/* Google Font - Tajawal                */
/* ===================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800&display=swap');

/* ===================================== */
/* Root Variables - HRDF Inspired       */
/* ===================================== */

:root {
  --blue: #003f6b;
  --green: #007a4d;
  --gray: #6b7280;
  --bg: #f4f6f9;
  --white: #ffffff;
  --border: #d9dee5;
}

/* ===================================== */
/* Base                                 */
/* ===================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: #1f2937;
  font-size: 16px;
  line-height: 1.6;
}

/* ===================================== */
/* Headings                             */
/* ===================================== */

h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: var(--blue);
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--blue);
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--blue);
}

/* ===================================== */
/* Topbar                               */
/* ===================================== */

.topbar {
  background: var(--white);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--green);
}

.logo {
  height: 50px;
}

.kicker {
  font-size: 14px;
  color: var(--gray);
}

/* ===================================== */
/* Layout                               */
/* ===================================== */

.shell {
  padding: 25px;
}

.main {
  max-width: 1200px;
  margin: auto;
}

/* ===================================== */
/* Toolbar                              */
/* ===================================== */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

/* ===================================== */
/* Inputs                               */
/* ===================================== */

.input {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 14px;
  min-width: 200px;
}

.input:focus {
  outline: none;
  border-color: var(--blue);
}

/* ===================================== */
/* KPI Cards                            */
/* ===================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.card {
  background: var(--white);
  padding: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: none;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 4px;
  width: 100%;
  background: var(--green);
  border-radius: 6px 6px 0 0;
}

.card__value {
  font-size: 36px;
  font-weight: 700;
  margin: 10px 0 5px;
  color: var(--green);
}

.card__label {
  font-size: 14px;
  color: var(--gray);
}

/* ===================================== */
/* Panel                                */
/* ===================================== */

.panel {
  background: var(--white);
  padding: 25px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: none;
}

.panel__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--blue);
}

/* ===================================== */
/* Table                                */
/* ===================================== */

.tableWrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 900px;
}

.table thead th {
  text-align: right;
  background: var(--blue);
  color: white;
  padding: 12px;
  font-weight: 600;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px;
}

.table tbody tr:hover {
  background: #eef3f8;
}

/* ===================================== */
/* Buttons                              */
/* ===================================== */

.btn {
  padding: 8px 18px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.btn--primary {
  background: var(--green);
  color: white;
}

.btn--primary:hover {
  background: #006842;
}

.btn--ghost {
  background: white;
  border: 1px solid var(--blue);
  color: var(--blue);
}

.btn--ghost:hover {
  background: var(--blue);
  color: white;
}

/* ===================================== */
/* Stats Grid                           */
/* ===================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.stats-item:last-child {
  border-bottom: none;
}

.stats-number {
  font-weight: 700;
  color: var(--green);
}

/* ===================================== */
/* Modal                                */
/* ===================================== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.modal__dialog {
  position: relative;
  background: var(--white);
  width: 95%;
  max-width: 600px;
  padding: 25px;
  border-radius: 6px;
  border-top: 4px solid var(--green);
  box-shadow: none;
  z-index: 10;
}

/* ===================================== */
/* Responsive                           */
/* ===================================== */

@media (max-width: 1100px) {
  .shell { padding: 15px; }
}
