:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #66747f;
  --line: #d9e2e7;
  --surface: #ffffff;
  --page: #f5f7f8;
  --accent: #0f766e;
  --accent-dark: #0b5d56;
  --warn: #a15c00;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
}

.brand-logo {
  display: block;
  height: 24px;
  width: auto;
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px;
}

section,
article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 24px;
}

.hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

h1,
h2 {
  margin: 0 0 12px;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
}

.eyebrow,
.muted {
  color: var(--muted);
  margin: 0 0 6px;
}

.summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
}

.summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.summary span,
.net-pay span {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.summary strong {
  display: block;
  font-size: 26px;
}

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.button,
button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
}

.button.secondary {
  background: #50606a;
}

.narrow {
  max-width: 640px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  font: inherit;
  max-width: 100%;
  padding: 10px;
  width: 100%;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.message {
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.message.success {
  background: #e6f6f1;
}

.message.warning {
  background: #fff4dc;
}

.status {
  border-radius: 999px;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
}

.status.approved {
  background: #dff3ea;
  color: var(--accent-dark);
}

.status.rejected {
  background: #fde7e4;
  color: var(--danger);
}

.status.cancelled {
  background: #eceff1;
  color: var(--muted);
}

.status.pending {
  background: #fff4dc;
  color: var(--warn);
}

.metric {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 8px;
}

dl {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

dt {
  color: var(--muted);
}

dd {
  font-weight: 800;
  margin: 0;
}

.net-pay {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.net-pay strong {
  font-size: 34px;
}

@media (max-width: 760px) {
  .topbar,
  .hero,
  .section-title,
  .net-pay {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 16px;
  }

  .grid,
  .summary {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  .topbar,
  .button,
  .messages {
    display: none;
  }

  body,
  section,
  article {
    background: white;
  }
}
