/* Supervisory Staff pages - BISE D.G.Khan */
:root {
  --brand: #0f6b3f;
  --brand-dark: #0a4d2d;
  --brand-soft: #e7f2ec;
  --accent: #c9a227;
  --bg: #eef3f0;
  --card: #ffffff;
  --text: #1c2a23;
  --muted: #5d6d65;
  --line: #dbe5df;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

/* ---------- header ---------- */
.topbar { background: var(--brand); color: #fff; border-bottom: 4px solid var(--accent); }
.topbar-inner {
  max-width: 1000px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px;
}
.logo { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; flex-shrink: 0; }
.brand-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { margin: 0; font-size: 13px; opacity: .85; }

main { flex: 1; width: 100%; max-width: 1000px; margin: 32px auto; padding: 0 16px; }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 20px 16px 28px; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(15,107,63,.07);
}

h1 { margin: 10px 0 6px; font-size: 24px; line-height: 1.25; color: var(--brand-dark); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 600;
  letter-spacing: .3px; text-transform: uppercase;
}

/* ---------- login form ---------- */
.login { max-width: 460px; margin: 8px auto; padding: 32px 28px; }
.lead { color: var(--muted); margin: 0 0 22px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 14px; font-size: 17px; letter-spacing: .5px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fbfdfc; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,107,63,.15); background: #fff; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 12.5px; }

.note { margin: 20px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.alert { padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; font-size: 14px; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5c2bd; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; font-size: 15px; font-weight: 600; font-family: inherit;
  border-radius: 8px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-block { width: 100%; padding: 13px; font-size: 16px; }
.btn:focus-visible { outline: 3px solid rgba(15,107,63,.35); outline-offset: 2px; }

/* ---------- report ---------- */
.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.report { padding: 28px; }
.report-head { text-align: center; margin-bottom: 22px; }

.centre-info {
  display: grid; grid-template-columns: 1fr 2.4fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin: 0 0 26px;
}
.centre-info > div { background: var(--brand-soft); padding: 12px 16px; }
.centre-info dt { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.centre-info dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--brand-dark); }

.staff-section { margin-bottom: 26px; }
.staff-section h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; margin: 0 0 10px; padding-left: 10px; border-left: 4px solid var(--accent);
}
.count {
  font-size: 12px; font-weight: 700; background: var(--brand); color: #fff;
  border-radius: 999px; padding: 1px 9px;
}
.empty { color: var(--muted); font-style: italic; margin: 0; padding: 10px 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f6f9f7; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fafcfb; }
td.name { font-weight: 600; }
.col-sr { width: 56px; text-align: center; }
.col-mobile { white-space: nowrap; font-variant-numeric: tabular-nums; }

.printed-on { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: right; }
.print-only { display: none; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .brand-title { font-size: 15px; }
  .logo { width: 44px; height: 44px; }
  main { margin: 20px auto; }
  .login, .report { padding: 22px 18px; }
  .centre-info { grid-template-columns: 1fr 1fr; }
  .centre-info .wide { grid-column: 1 / -1; order: -1; }
  th, td { padding: 9px 10px; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 12px; }
  .no-print, .footer { display: none !important; }
  .print-only { display: flex; }
  main { margin: 0; padding: 0; max-width: none; }
  .topbar { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .topbar-inner { justify-content: center; padding: 0 0 8px; }
  .logo { border: 1px solid #ccc; }
  .card { border: 0; box-shadow: none; }
  .report { padding: 10px 0 0; }
  .badge { background: none; color: #000; border: 1px solid #000; }
  h1 { color: #000; font-size: 18px; }
  .centre-info > div { background: #fff; }
  .centre-info dd { color: #000; font-size: 14px; }
  .count { background: #000; }
  .table-wrap { overflow: visible; border-color: #999; }
  th, td { border-bottom-color: #bbb; padding: 6px 8px; }
  tr { break-inside: avoid; }
  .staff-section h2 { break-after: avoid; }
  .signatures { justify-content: space-between; margin-top: 60px; }
  .signatures div { width: 40%; border-top: 1px solid #000; padding-top: 4px; text-align: center; font-weight: 600; }
}
