:root {
  font: 16px/1.5 system-ui, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
  --ink: #17332b;
  --forest: #133b30;
  --gold: #e2c879;
  --paper: #f6f5ef;
  --white: #fffefa;
  --line: #dcded4;
  --muted: #52665c;
  --error: #8c271d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { min-height: 2.65rem; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #aa7b1d; outline-offset: 2px; }
a { color: var(--forest); }
.skip { position: absolute; transform: translateY(-150%); z-index: 3; background: white; padding: .65rem; }
.skip:focus { transform: none; }
.shell { display: grid; grid-template-columns: 245px 1fr; min-height: 100vh; }
.rail { color: white; background: var(--forest); display: flex; flex-direction: column; gap: 2.5rem; padding: 1.55rem 1.1rem; }
.brand { display: flex; gap: .8rem; align-items: center; }
.brand strong { display: block; line-height: 1.22; }
.brand small { color: #e6ddc4; }
.mark { display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); border-radius: .45rem; width: 2.65rem; height: 2.65rem; flex-shrink: 0; font: bold 1.05rem Georgia, serif; }
nav { display: grid; gap: .35rem; }
nav button, .account button { text-align: start; background: transparent; color: white; border: 1px solid transparent; padding: .5rem .7rem; border-radius: .35rem; }
nav button[aria-current="page"] { background: var(--gold); color: #172b22; font-weight: 700; }
nav button:hover:not([aria-current]), .account button:hover { border-color: #a2b4a7; }
.account { margin-top: auto; padding: .8rem .55rem 0; border-top: 1px solid #5c7e71; }
.account span { display: block; color: #e1eadf; overflow-wrap: anywhere; }
main { padding: clamp(1.2rem, 4vw, 3.25rem); min-width: 0; }
#screen, #notice { max-width: 1270px; margin-inline: auto; }
h1 { font: bold clamp(2rem, 4vw, 3.15rem)/1.1 Georgia, serif; margin: .15rem 0 .45rem; }
h2 { margin: 0 0 .8rem; font-size: 1.22rem; }
p { margin: .25rem 0 .9rem; }
small, .muted { color: var(--muted); }
.cap { text-transform: capitalize; }
.screen-head { border-bottom: 1px solid var(--line); padding-bottom: 1.15rem; margin-bottom: 1.4rem; }
.screen-head p { margin: 0; }
.card { border: 1px solid var(--line); border-radius: .65rem; padding: 1.1rem; background: var(--white); margin-bottom: 1rem; }
.sign-in { max-width: 28rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; align-items: end; }
.fields .wide, .form-buttons { grid-column: 1 / -1; }
label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 650; min-width: 0; }
label :is(input, select, textarea) { padding: .45rem .55rem; width: 100%; min-width: 0; color: var(--ink); background: #fff; border: 1px solid #bfc8b9; border-radius: .3rem; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .35rem; padding: .7rem; }
legend { font-weight: 700; }
.primary, .secondary { border: 1px solid var(--forest); padding: .47rem .8rem; border-radius: .35rem; }
.primary { background: var(--forest); color: white; }
.secondary { background: transparent; color: var(--forest); }
.form-buttons, .toolbar { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.toolbar { margin-bottom: 1rem; }
.split { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 1rem; align-items: start; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: start; padding: .56rem .6rem; vertical-align: top; }
th { background: #eeefe7; font-size: .83rem; }
td { overflow-wrap: anywhere; }
.grid-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.metric { margin: 0; }
.metric strong { display: block; font-size: 1.45rem; margin-top: .2rem; }
#notice > p { border: 1px solid #b7caba; color: var(--forest); background: #eef4ec; border-radius: .35rem; padding: .65rem .85rem; margin-bottom: 1.05rem; }
#notice > .error { color: var(--error); border-color: #debdb8; background: #fff3ef; }
.urdu { font-family: "Urdu Typesetting", "Segoe UI", Tahoma, sans-serif; }
.print-sheet, .print-heading { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { gap: .75rem; padding: .8rem 1rem; }
  nav { display: flex; overflow: auto; }
  nav button { white-space: nowrap; }
  .account { margin: 0; display: flex; align-items: center; justify-content: space-between; padding: .2rem 0 0; }
}
@media (max-width: 660px) {
  .split, .fields { grid-template-columns: 1fr; }
  .grid-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@page { size: A4 portrait; margin: 13mm; }
@media print {
  body, main { display: block; margin: 0; padding: 0; background: white; color: black; }
  .shell { display: block; min-height: 0; }
  .rail, .skip, #notice, .no-print { display: none !important; }
  .card { border: 0; padding: 0; }
  .print-sheet, .print-heading { display: block; }
  .print-heading { text-align: center; }
  .print-sheet th, .print-sheet td { border: 1px solid #454545; height: 8mm; }
  .print-sheet td { padding: 1mm; }
  .table-wrap { overflow: visible; }
  table { page-break-inside: auto; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
}

