:root {
  --navy: #17324d;
  --blue: #2f6f9f;
  --teal: #2c7a7b;
  --green: #148653;
  --red: #c53030;
  --amber: #b7791f;
  --line: #d7dee7;
  --muted: #667085;
  --bg: #f4f7fb;
  --white: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: #1f2933;
}
a { color: inherit; }
.topbar {
  background: var(--white);
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 6vw, 72px);
  border-top: 8px solid var(--navy);
  border-bottom: 1px solid var(--line);
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
  flex: 1 1 auto;
}
.brand-lockup img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px;
}
.brand-lockup strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
}
.brand-lockup small {
  display: block;
  font-size: 14px;
  color: #667085;
  opacity: 1;
  margin-top: 2px;
}
.iata-mark {
  height: 58px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  order: 3;
}
.topbar span {
  display: block;
}
.topbar nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  order: 2;
  flex: 1 1 auto;
}
.topbar a { text-decoration: none; opacity: 0.98; }
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.management-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.management-card h2 {
  margin-top: 0;
  color: var(--navy);
}
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.kpi strong {
  display: block;
  font-size: 28px;
  color: var(--navy);
  margin-top: 8px;
}
.muted { color: var(--muted); }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 0;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.button.green { background: var(--green); }
.button.red { background: var(--red); }
.button.secondary { background: #eef4fb; color: var(--navy); border: 1px solid var(--line); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 6px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}
th, td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
th {
  background: #eaf3fa;
  color: var(--navy);
  font-weight: 700;
}
.notice {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  background: #fff7e6;
  border: 1px solid #f6d48b;
  color: #6b4700;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.badge.approved, .badge.present, .badge.active { background: #e8f7ef; color: #145a38; }
.badge.today, .badge.sent { background: #e8f7ef; color: #145a38; }
.badge.pending, .badge.late { background: #fff7e6; color: #6b4700; }
.badge.rejected, .badge.absent, .badge.inactive, .badge.terminated, .badge.failed { background: #fdeaea; color: #842029; }
.badge.no_email { background: #fff7e6; color: #6b4700; }
.badge.missing-punch-out, .badge.half-day { background: #ffe8d6; color: #8a3a00; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
textarea { min-height: 90px; resize: vertical; }
input[type="checkbox"] { width: auto; min-height: auto; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .management-grid { grid-template-columns: 1fr; }
}
.success {
  background: #e8f7ef;
  border-color: #9fd9b8;
  color: #145a38;
}
.error {
  background: #fdeaea;
  border-color: #f0aaa8;
  color: #842029;
}
.login {
  max-width: 420px;
  margin: 60px auto;
}
@media (max-width: 760px) {
  .topbar { align-items: center; gap: 12px; flex-direction: row; flex-wrap: wrap; }
  .brand-lockup { flex: 1 1 260px; min-width: 0; }
  .brand-lockup strong { font-size: 20px; }
  .brand-lockup img, .iata-mark { height: 54px; width: auto; }
  .iata-mark { order: 1; }
  .topbar nav {
    flex: 1 0 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .topbar nav a { white-space: nowrap; }
  .page { padding: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
  .card {
    overflow-x: auto;
  }
  table {
    min-width: 100%;
  }
  th, td {
    padding: 8px;
    font-size: 13px;
  }
  .button {
    min-height: 40px;
    padding: 9px 12px;
  }
}
