:root{--forest:#103b32;--forest2:#175b4a;--mint:#e7f3ef;--gold:#b68b35;--ink:#172b28;--muted:#5e706c;--paper:#f5f7f6;--line:#dce6e2;--white:#fff;--shadow:0 14px 38px rgba(16,59,50,.08);color-scheme:light}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:linear-gradient(155deg,#edf4f0 0%,#f8faf9 45%,#f4f6f5 100%);font:15px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);min-height:100vh}a{color:#16664f;text-decoration:none}a:hover{text-decoration:underline}img{max-width:100%}button,input,select,textarea{font:inherit}button{cursor:pointer}.skip-link{position:absolute;left:10px;top:-70px;background:#fff;padding:12px;z-index:999}.skip-link:focus{top:5px}.site-header{position:sticky;top:0;z-index:20;background:rgba(16,59,50,.98);color:#fff;box-shadow:0 3px 18px #103b321c}.header-inner{max-width:1220px;margin:auto;min-height:80px;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{color:#fff;display:flex;align-items:center;gap:12px;min-width:0}.brand:hover{text-decoration:none}.brand img{width:52px;height:52px;object-fit:contain;background:#fff;border-radius:14px;padding:4px}.brand strong{display:block;font-size:20px;line-height:1.1;letter-spacing:.03em}.brand small{display:block;font-size:11px;color:#dcebe6;line-height:1.35;margin-top:4px}.version{opacity:.75}.primary-nav{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.primary-nav a{color:#e6f4ed;padding:9px 12px;border-radius:9px;font-weight:600;font-size:13px}.primary-nav a:hover,.primary-nav a:focus-visible{background:#ffffff19;text-decoration:none}.primary-nav .nav-logout{border:1px solid #ffffff6e}.page-shell{max-width:1220px;margin:auto;padding:32px 24px 16px;min-height:calc(100vh - 80px);display:flex;flex-direction:column}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:6px 0 26px}.page-heading h1{font-size:clamp(25px,3vw,36px);line-height:1.15;letter-spacing:-.035em;margin:6px 0 8px}.page-heading p{margin:0;color:var(--muted);max-width:650px}.eyebrow{text-transform:uppercase;letter-spacing:.11em;color:#27715b;font-weight:800;font-size:11px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:24px;min-width:0}.card h2{font-size:19px;letter-spacing:-.018em;margin:0 0 9px}.card p{color:var(--muted);margin-top:0}.grid-two{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(245px,1fr);gap:20px}.summary-stack{display:grid;gap:18px;align-content:start}.profile-row{display:flex;gap:16px;align-items:center}.profile-photo{width:100px;height:116px;object-fit:cover;border-radius:13px;border:1px solid var(--line);background:#e8eeeb;flex:none}.detail-list{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px;margin:20px 0 0}.detail-list dt{font-size:12px;color:var(--muted);font-weight:600}.detail-list dd{margin:3px 0 0;font-weight:700;overflow-wrap:anywhere}.pill{display:inline-flex;align-items:center;border-radius:30px;padding:5px 10px;font-size:12px;font-weight:800;background:#eef2f0;color:#526862}.pill-ready{background:#ddf4e4;color:#1a6a40}.pill-process{background:#e0eeff;color:#285c9a}.pill-pending{background:#fff3d9;color:#875a13}.pill-draft{background:#eef0f2;color:#5d6a72}.notice{border-radius:12px;padding:14px 17px;margin:0 0 19px;border:1px solid transparent;font-weight:600}.notice-ok{background:#e7f7ee;border-color:#9bd7b5;color:#1b6943}.notice-error{background:#fff0ef;border-color:#efbab4;color:#a1342a}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:11px 17px;border-radius:10px;border:1px solid transparent;font-weight:750;line-height:1.4;text-decoration:none!important;transition:background .15s,transform .15s;white-space:normal;text-align:center}.btn:hover{transform:translateY(-1px)}.btn-primary{background:#165b49;color:white!important}.btn-primary:hover{background:#0d4939}.btn-secondary{background:#f1f7f4;color:#165b49!important;border-color:#bdd4c9}.btn-secondary:hover{background:#e0f0e9}.btn-danger{color:#a73531!important;background:#fff2f1;border-color:#edbbb7}.btn-text{background:transparent;color:#296a55!important;border:1px solid var(--line)}.btn-row{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0}.text-muted{color:var(--muted)}.meta{font-size:12px;color:#657973}.form-section{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;margin-bottom:18px;box-shadow:0 5px 20px #173b3210}.form-section h2{font-size:19px;margin:0 0 5px}.form-section>p{margin:0 0 18px;color:var(--muted);font-size:13px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field.wide{grid-column:1 / -1}.field label{font-weight:700;font-size:13px;color:#334c44}.field input:not([type=checkbox]),.field select,.field textarea,.search-input,.auth-form input{width:100%;max-width:100%;min-width:0;border-radius:9px;padding:11px 12px;border:1px solid #becfc7;background:#fff;color:#152d25;outline:none;transition:box-shadow .15s,border-color .15s}.field input:focus,.field textarea:focus,.field select:focus,.search-input:focus,.auth-form input:focus{border-color:#24765c;box-shadow:0 0 0 3px #2c876526}.field input[readonly]{background:#f0f4f2;color:#526d62}.field textarea{resize:vertical;min-height:88px}.field .help{font-size:11px;color:#687b74}.checkbox-list{display:flex;flex-wrap:wrap;gap:10px}.checkbox-list label{display:flex;align-items:center;gap:9px;background:#f6f9f7;border:1px solid #deebe4;border-radius:11px;padding:10px 13px;font-size:13px;font-weight:650}.checkbox-list input{width:17px;height:17px;accent-color:#17654c}.form-actions{display:flex;flex-wrap:wrap;gap:10px;padding:20px 0 8px}.photo-box{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.photo-box img{width:112px;height:136px;object-fit:cover;background:#e9efec;border:1px dashed #b9cec4;border-radius:12px}.photo-box .field{flex:1;min-width:210px}.info-line{padding:12px 14px;background:#f2f8f5;border-radius:10px;border:1px solid #dfebe4;font-size:13px;color:#4b6658}.site-footer{border-top:1px solid #d8e3de;color:#64776f;text-align:center;padding:26px 10px 12px;margin-top:auto;font-size:13px}.site-footer small{display:block;font-size:11px;margin-top:4px}.auth-shell{max-width:900px;margin:28px auto 50px;display:grid;grid-template-columns:1fr 1.15fr;box-shadow:var(--shadow);background:#fff;border:1px solid var(--line);border-radius:22px;overflow:hidden}.auth-hero{padding:34px;background:radial-gradient(circle at 85% 5%,#438a69,transparent 45%),linear-gradient(145deg,#103b32,#195e4d);color:#fff;display:flex;flex-direction:column;justify-content:space-between;min-height:405px}.auth-hero img{width:94px;height:94px;object-fit:contain;background:#fff;border-radius:19px;padding:9px}.auth-hero h1{font-size:28px;line-height:1.2;letter-spacing:-.03em}.auth-hero p{color:#e1f1e9}.auth-panel{padding:34px}.auth-panel h2{margin:0;font-size:24px}.auth-panel>p{color:var(--muted);font-size:13px}.auth-form{display:grid;gap:17px;margin-top:25px}.auth-form label{display:grid;gap:6px;font-weight:700;font-size:13px}.auth-form .btn{width:100%;margin-top:2px}.auth-links{margin-top:17px;display:flex;justify-content:space-between;gap:10px;font-size:13px}.table-wrap{width:100%;overflow:auto;border-radius:12px;border:1px solid var(--line)}.data-table{width:100%;min-width:740px;border-collapse:collapse;background:#fff}.data-table th{background:#f0f6f2;padding:13px;text-align:left;color:#476052;font-size:12px;white-space:nowrap}.data-table td{border-top:1px solid #e3ebe7;padding:12px 13px;font-size:13px}.data-table tbody tr:hover{background:#f9fbfa}.data-table .record-name{font-weight:750}.table-avatar{width:36px;height:42px;border-radius:7px;object-fit:cover}.filter-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:16px}.filter-bar input{flex:1;min-width:180px}.filter-bar select{width:auto;padding:11px;border:1px solid #bed0c7;border-radius:9px}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.stat{padding:17px 19px;background:#fff;border-radius:14px;border:1px solid var(--line);box-shadow:0 2px 12px #173b320c}.stat b{display:block;font-size:26px;letter-spacing:-.04em}.stat span{color:var(--muted);font-size:12px;font-weight:650}.pagination{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin-top:15px}.empty{padding:35px 14px;text-align:center;color:var(--muted)}.card-preview{max-width:780px;margin:auto;background:#fff;padding:32px;border:1px solid #ccd7d2;border-radius:15px;box-shadow:var(--shadow)}.print-head{display:flex;gap:19px;align-items:center;border-bottom:3px solid #144f40;padding-bottom:16px}.print-head img{width:72px;height:72px;object-fit:contain}.print-head h1{font-size:21px;margin:0;line-height:1.25}.print-grid{display:grid;grid-template-columns:1fr 115px;gap:19px;margin:20px 0}.print-details{display:grid;grid-template-columns:130px 1fr;gap:9px;font-size:13px}.print-details dt{font-weight:700;color:#405a4e}.print-details dd{margin:0;overflow-wrap:anywhere}.barcode{max-width:100%;width:100%;height:auto}.print-footer{font-size:11px;color:#64766f;margin-top:10px;text-align:center}.only-print{display:none}@media(max-width:900px){.grid-two{grid-template-columns:1fr}.auth-shell{max-width:680px}.stat-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:640px){.site-header{position:static}.header-inner{padding:12px 16px;align-items:flex-start;flex-direction:column;gap:9px}.brand img{width:45px;height:45px}.primary-nav{width:100%;gap:5px}.primary-nav a{padding:7px 9px}.page-shell{padding:18px 13px}.page-heading{align-items:flex-start;flex-direction:column;margin-bottom:18px}.card,.form-section{padding:18px;border-radius:14px}.field-grid{grid-template-columns:1fr;gap:15px}.auth-shell{grid-template-columns:1fr;margin:5px 0 28px}.auth-hero{min-height:180px;padding:21px}.auth-hero img{width:66px;height:66px}.auth-hero h1{font-size:23px;margin:12px 0 4px}.auth-hero p{margin:0;font-size:12px}.auth-panel{padding:24px 20px}.detail-list{grid-template-columns:1fr 1fr}.stat-grid{gap:9px}.stat{padding:13px}.stat b{font-size:22px}.print-head{align-items:start}.print-head h1{font-size:16px}.print-head img{width:48px;height:48px}.print-grid{grid-template-columns:1fr 84px}.print-details{grid-template-columns:100px 1fr}.print-details dt,.print-details dd{font-size:11px}.print-grid .profile-photo{width:80px;height:100px}.card-preview{padding:16px}}@media print{@page{size:A4;margin:15mm}body{background:#fff!important;font:12px/1.4 Arial,sans-serif}.site-header,.site-footer,.no-print,.btn-row,.notice,.page-heading,.form-actions{display:none!important}.page-shell{padding:0;max-width:none;display:block}.card-preview{border:0;box-shadow:none;border-radius:0;padding:0;max-width:none}.only-print{display:block}.print-head h1{font-size:17px}.barcode{max-width:650px}a{color:inherit!important;text-decoration:none!important}}


/* v1.03 photo crop dialog */
.photo-status{font-size:12px;color:#237256;margin:3px 0}.photo-status.is-error{color:#aa3434;font-weight:700}.crop-open{overflow:hidden}.crop-modal[hidden],#photo-adjust[hidden]{display:none!important}.crop-modal{position:fixed;inset:0;z-index:1000;background:rgba(9,25,22,.76);display:grid;place-items:center;padding:16px;overflow:auto}.crop-panel{background:#fff;border-radius:18px;width:min(96vw,465px);max-height:calc(100dvh - 24px);overflow:auto;padding:19px 20px 16px;box-shadow:0 20px 70px #0007}.crop-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.crop-top h2{font-size:19px;margin:0}.crop-top p{font-size:12px;color:#61726e;margin:5px 0 12px}.crop-x{border:0;background:#eef3f0;border-radius:9px;width:38px;height:38px;font-size:24px}.crop-canvas-wrap{display:flex;justify-content:center;background:#273c35;border-radius:12px;padding:12px}.crop-canvas-wrap canvas{display:block;width:min(100%,252px);height:auto;max-height:48dvh;aspect-ratio:4/5;object-fit:contain;touch-action:none;cursor:grab;box-shadow:0 0 0 1px white}.crop-canvas-wrap canvas:active{cursor:grabbing}.crop-controls{padding:15px 2px 0}.crop-controls label{font-weight:700;font-size:13px}.crop-controls input[type=range]{width:100%;accent-color:#17654c}.crop-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:13px;flex-wrap:wrap}
/* v1.03 official paper — preserve numbered content, two-page application/requirements structure */
.official-document{max-width:794px;margin:0 auto}.official-page{background:white;color:black;border:1px solid #d4d9d7;box-shadow:0 8px 30px #143e2e13;padding:26px 31px;margin-bottom:18px;font:12px/1.37 Arial,Helvetica,sans-serif}.official-head{display:grid;grid-template-columns:88px 1fr;align-items:center;gap:9px;margin-bottom:10px;text-align:center}.official-head img{width:75px;height:80px;object-fit:contain}.official-head h1{font:bold 17px/1.2 Arial,sans-serif;margin:0;padding-right:60px}.official-title{text-align:center;margin-bottom:10px}.official-title>strong{font-size:17px}.official-title small{display:block;font-size:9px;letter-spacing:1px;margin-top:0}.official-barcode{width:304px;height:35px;max-width:95%;margin:2px auto 0}.official-barcode svg{display:block;width:100%;height:100%;max-height:35px;max-width:100%;preserveAspectRatio:none}.official-record-head{display:flex;justify-content:space-between;align-items:flex-start;min-height:76px;gap:12px}.official-record-head>div{padding-top:8px}.official-record-head>div>div{margin:3px 0}.official-photo{width:78px;height:96px;object-fit:cover;object-position:center top;border:1px solid #ccc}.official-section{font:bold 13px/1.4 Arial,sans-serif;text-decoration:underline;background:#ececec;padding:3px 5px;margin:9px 0 3px;break-after:avoid}.official-space{margin-top:12px}.official-line{display:grid;grid-template-columns:24px 1fr;gap:3px;padding:3px 2px;min-height:23px;overflow-wrap:anywhere;break-inside:avoid}.official-no{font-weight:normal}.official-line.official-pair{grid-template-columns:24px 1fr 1fr;column-gap:9px}.official-line strong.filled,.official-record-head strong.filled{font-weight:bold;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}.official-signatures{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}.official-signatures b{display:block;min-height:20px}.official-signatures p{margin:14px 0 18px}.official-requirements{min-height:350px;padding-top:42px}.official-requirements h2{font-size:14px;text-decoration:underline;margin:0 0 14px}.official-requirements li{margin-bottom:8px}.official-requirements ol{margin:0 0 34px;padding-left:25px}
.table-avatar{width:46px;height:54px;object-fit:cover;object-position:center top;border-radius:6px;display:block;border:1px solid #d8e4de;background:#f2f5f3}
@media(max-width:650px){.official-page{padding:17px 13px;font-size:11px}.official-head{grid-template-columns:58px 1fr}.official-head img{width:53px;height:56px}.official-head h1{font-size:12px;padding-right:3px}.official-line.official-pair{grid-template-columns:19px 1fr;gap:4px}.official-line.official-pair span:last-child{grid-column:2}.official-title>strong{font-size:15px}.official-record-head{min-height:90px}.official-signatures{gap:10px;font-size:10px}.official-signatures p{margin:13px 0}}
@media print{@page{size:A4 portrait;margin:11mm 13mm}html,body{margin:0!important;padding:0!important;background:#fff!important}.official-document{max-width:none;margin:0}.official-page{box-shadow:none!important;border:0!important;padding:0!important;margin:0!important;font-size:10pt;min-height:0;break-after:page;page-break-after:always}.official-page:last-child{break-after:auto;page-break-after:auto}.official-head{grid-template-columns:80px 1fr;margin-bottom:8px}.official-head img{width:70px;height:74px}.official-head h1{font-size:16px}.official-title{margin-bottom:6px}.official-title>strong{font-size:16px}.official-barcode{width:300px;height:30px}.official-barcode svg{height:30px;max-height:30px}.official-record-head{min-height:74px}.official-photo{width:80px;height:97px}.official-section{font-size:12pt!important;margin:7px 0 3px!important;background:#ececec!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.official-line{min-height:21px;padding:3px 2px;line-height:1.22}.official-signatures{margin-top:19px}.official-signatures p{margin:13px 0 17px}.official-requirements{padding-top:22px!important}.official-requirements li{margin-bottom:7px}.official-requirements ol{margin-bottom:31px}.crop-modal{display:none!important}}

/* v1.03 — compact, responsive layout (screen only; official A4 print styles are unchanged). */
@media screen {
  html, body {max-width:100%;overflow-x:clip}
  body {font-size:14px;line-height:1.45;background:#f5f7f6}
  .page-shell {max-width:1320px;padding:19px 20px 12px;min-width:0}
  .header-inner {max-width:1320px;min-height:64px;padding:8px 20px;gap:12px}
  .brand {flex:0 1 auto;min-width:0;gap:9px}
  .brand img {width:42px;height:42px;border-radius:9px;padding:3px;flex:none}
  .brand strong {font-size:18px;letter-spacing:0}
  .brand small {font-size:11px;margin-top:1px}
  .primary-nav {gap:3px;flex:0 1 auto}
  .primary-nav a {display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:7px 9px}
  .menu-toggle {display:none;align-items:center;justify-content:center;gap:5px;border:1px solid #ffffff55;background:transparent;color:white;border-radius:8px;padding:8px 10px;font-size:12px;font-weight:700;line-height:1.1;min-height:36px}
  .ui-icon {display:inline-block;width:17px;height:17px;flex:0 0 17px;vertical-align:middle;stroke-width:1.8;pointer-events:none}
  .page-heading {margin:0 0 16px;gap:10px;min-width:0}
  .page-heading>div {min-width:0}
  .page-heading h1 {font-size:clamp(21px,2.15vw,29px);letter-spacing:-.02em;margin:3px 0 4px}
  .page-heading p {font-size:12px}
  .eyebrow {font-size:10px;letter-spacing:.075em}
  .page-heading .btn-row {margin:0}
  .card,.form-section {padding:16px;border-radius:10px;box-shadow:0 2px 12px #103b3208}
  .card h2,.form-section h2 {font-size:17px;margin:0 0 7px}
  .form-section {margin-bottom:12px}
  .form-section>p {margin-bottom:12px;font-size:12px}
  .btn {padding:7px 12px;min-height:36px;font-size:12px;font-weight:700;border-radius:7px;gap:6px;max-width:100%;overflow-wrap:anywhere}
  .btn-row {margin-top:12px;gap:6px}
  .form-actions {gap:8px;padding:12px 0 3px}
  .notice {padding:10px 12px;border-radius:8px;margin-bottom:12px;font-size:12px}
  .stat-grid {gap:10px;margin-bottom:13px}
  .stat {padding:12px 14px;border-radius:9px;box-shadow:none}
  .stat b {font-size:22px;letter-spacing:-.015em}
  .stat span {font-size:11px}
  .filter-bar {gap:7px;margin-bottom:12px}
  .filter-bar input {min-width:0;min-height:36px}
  .filter-bar select,.search-input {padding:7px 10px;border-radius:7px;font-size:13px}
  .table-wrap {border-radius:8px}
  .data-table {min-width:880px}
  .data-table th {padding:8px 9px;font-size:11px;font-weight:700}
  .data-table td {padding:6px 9px;font-size:12px;vertical-align:middle;overflow-wrap:anywhere}
  .data-table .record-name {display:block;line-height:1.3;font-size:12px}
  .record-designation {display:block;color:var(--muted);font-size:10px;margin-top:3px;line-height:1.3}
  .data-table .cell-photo {text-align:center;width:57px}
  .table-avatar {display:block;width:36px;height:44px;object-fit:cover;object-position:center top;border-radius:4px;border:1px solid #d2ddd8;margin:auto}
  .data-table .cell-actions {white-space:nowrap;width:125px}
  .table-actions {display:flex;align-items:center;justify-content:center;gap:5px}
  .icon-action {width:31px;height:31px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 31px;border-radius:7px;background:#f1f5f4;border:1px solid #dbe6df;color:#185440;text-decoration:none;transition:background .12s,border-color .12s}
  .icon-action .ui-icon {width:16px;height:16px;flex-basis:16px}
  .icon-action:hover,.icon-action:focus-visible {text-decoration:none;color:#fff;background:#185440;border-color:#185440}
  .icon-action-approve {color:#1f6643;background:#eef8f0;border-color:#cbe5d2}
  .pill {padding:4px 7px;border-radius:6px;font-size:10px;line-height:1.35;max-width:100%;white-space:normal}
  .pagination {gap:7px;margin-top:11px}
  .pagination .btn-row {margin:0}
  .field-grid {gap:11px 14px}
  .field {gap:4px}
  .field label,.auth-form label {font-size:12px}
  .field input:not([type=checkbox]),.field select,.field textarea,.auth-form input,.auth-form select,.search-input {padding:8px 10px;border-radius:7px;font-size:14px;min-height:39px}
  .auth-form select {width:100%;border:1px solid #becfc7;background:white;color:var(--ink)}
  .field textarea {min-height:68px}
  .field .help {font-size:11px}
  .checkbox-list {gap:7px}
  .checkbox-list label {border-radius:7px;padding:7px 9px;font-size:12px}
  .photo-box {gap:12px}
  .photo-box img {width:91px;height:112px;border-radius:7px;flex:0 0 91px}
  .photo-box .field {flex:1 1 190px;min-width:0}
  .grid-two {gap:12px}
  .detail-list {gap:9px 12px;margin-top:12px}
  .detail-list dt {font-size:11px}
  .detail-list dd {font-size:12px}
  .profile-photo {width:73px;height:88px;border-radius:7px}
  .profile-row {gap:11px;min-width:0}
  .profile-row>div {min-width:0;overflow-wrap:anywhere}
  .summary-stack {gap:12px}
  .auth-shell {max-width:785px;grid-template-columns:.88fr 1.12fr;margin:17px auto 32px;border-radius:12px}
  .auth-hero {padding:23px;min-height:300px}
  .auth-hero img {width:66px;height:66px;border-radius:11px;padding:5px}
  .auth-hero h1 {font-size:22px}
  .auth-panel {padding:24px}
  .auth-panel h2 {font-size:22px}
  .auth-form {gap:12px;margin-top:14px;min-width:0}
  .auth-links {margin-top:12px}
  .site-footer {padding:17px 8px 11px;font-size:11px}
  .site-footer small {font-size:10px}
  .crop-panel {width:min(100%,430px);border-radius:12px;padding:14px;max-height:calc(100dvh - 20px)}
  .crop-canvas-wrap {padding:7px}
  .crop-canvas-wrap canvas {width:min(100%,232px);max-height:43dvh}
  .crop-top h2 {font-size:17px}
  .crop-top p {margin:3px 0 7px}
  .crop-controls {padding-top:10px}
  .crop-actions {margin-top:8px;gap:7px}
  .paper-hint {display:none}
  .site-header a:focus-visible,.btn:focus-visible,.menu-toggle:focus-visible,.icon-action:focus-visible {outline:3px solid #c99837;outline-offset:2px}
}
@media screen and (max-width:1000px) {
  .grid-two {grid-template-columns:1fr}
  .primary-nav a {padding:7px}
  .data-table {min-width:865px}
}
@media screen and (max-width:850px) {
  .header-inner {flex-wrap:wrap;justify-content:space-between;min-height:60px;align-items:center;padding:8px 14px}
  .menu-toggle {display:inline-flex;margin-left:auto;flex:0 0 auto}
  .primary-nav {order:3;flex:0 0 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:100%;padding:5px 0 2px}
  .primary-nav a {min-width:0;justify-content:flex-start;border:1px solid #ffffff24;background:#ffffff0d;padding:9px 10px;white-space:normal}
  html.js-enhanced .site-header:not(.nav-open) .primary-nav {display:none}
  .page-shell {padding:14px 14px 10px}
}
@media screen and (max-width:760px) {
  .page-heading {flex-direction:column;align-items:stretch;gap:9px}
  .page-heading .btn-row {align-self:flex-start}
  .card,.form-section {padding:13px}
  .stat-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:11px}
  .stat {padding:10px 11px}
  .stat b {font-size:20px}
  .stat span {font-size:10px}
  .field-grid {grid-template-columns:1fr;gap:12px}
  .field.wide {grid-column:auto}
  .table-wrap {border:0;overflow:visible;border-radius:0}
  .data-table {display:block;min-width:0;width:100%;background:transparent}
  .data-table thead {display:none}
  .data-table tbody {display:grid;gap:9px}
  .data-table tr {display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:auto auto auto auto auto auto auto;gap:1px 9px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:10px;min-width:0;overflow:hidden}
  .data-table tbody tr:hover {background:#fff}
  .data-table td {display:flex;min-width:0;align-items:center;gap:6px;border:0;padding:0;line-height:1.4;font-size:11px}
  .data-table .cell-photo {grid-column:1;grid-row:1 / 4;width:auto;align-self:start}
  .table-avatar {width:46px;height:56px;margin:0;object-fit:cover}
  .data-table .cell-name {grid-column:2 / 4;grid-row:1;display:block}
  .data-table .record-name {font-size:13px}
  .record-designation {font-size:11px;margin:1px 0 2px}
  .data-table .cell-card {grid-column:2 / 4;grid-row:2;color:#21624c}
  .data-table .cell-card strong {font-size:11px}
  .data-table .cell-status {grid-column:2 / 4;grid-row:3;justify-content:flex-start;margin:4px 0 5px}
  .data-table .cell-cnic {grid-column:1 / 4;grid-row:4}
  .data-table .cell-personnel {grid-column:1 / 4;grid-row:5}
  .data-table .cell-office {grid-column:1 / 4;grid-row:6}
  .data-table .cell-cnic::before,.data-table .cell-personnel::before,.data-table .cell-office::before {content:attr(data-label) ':';display:inline-block;flex:0 0 82px;color:var(--muted);font-size:10px}
  .data-table .cell-actions {grid-column:1 / 4;grid-row:7;width:auto;border-top:1px solid #e8eeeb;padding-top:7px;margin-top:6px}
  .table-actions {width:100%;justify-content:flex-end}
  .icon-action {width:35px;height:35px;flex-basis:35px}
  .page-heading .btn-row,.form-actions {width:100%}
  .filter-bar .search-input {flex:1 1 100%;width:100%}
  .auth-shell {grid-template-columns:1fr;max-width:600px;margin:0 auto 22px}
  .auth-hero {min-height:0;padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:13px}
  .auth-hero img {width:50px;height:50px;flex:0 0 50px}
  .auth-hero h1 {font-size:17px;margin:0 0 3px}
  .auth-hero p {font-size:11px;line-height:1.4;margin:0}
  .auth-hero>small {display:none}
  .auth-panel {padding:16px}
  .auth-panel h2 {font-size:20px}
  .auth-form {gap:10px;margin-top:12px}
  .paper-hint {display:block;font-size:11px;color:var(--muted);margin:0 0 8px}
  .official-document {display:block;max-width:100%;width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;border:1px solid #e0e6e3;border-radius:6px}
  .official-page {width:690px;min-width:690px;max-width:none;margin:0 0 10px;padding:24px 30px}
}
@media screen and (max-width:380px) {
  .header-inner {padding:7px 10px}
  .brand img {width:37px;height:37px}
  .brand strong {font-size:16px}
  .brand small {font-size:10px;max-width:156px;line-height:1.2}
  .menu-toggle {padding:7px 8px;font-size:11px}
  .page-shell {padding:10px 9px 8px}
  .page-heading h1 {font-size:20px}
  .card,.form-section {padding:11px}
  .photo-box img {width:76px;height:94px;flex-basis:76px}
  .photo-box {gap:9px}
  .auth-panel {padding:14px}
  .auth-hero {padding:12px}
  .btn-row {gap:5px}
  .btn {padding:7px 9px}
  .crop-modal {padding:7px}
  .crop-panel {padding:10px;max-height:calc(100dvh - 12px)}
}
@media screen and (max-height:520px) {
  .crop-modal {place-items:start center;padding:6px}
  .crop-panel {max-height:calc(100dvh - 12px)}
  .crop-top p {display:none}
  .crop-canvas-wrap canvas {max-height:30dvh}
  .crop-controls {padding-top:5px}
}
@media (prefers-reduced-motion:reduce) {
  .btn,.icon-action {transition:none}
  html {scroll-behavior:auto}
}
/* Keep brand and menu on one line; the v1.02 640px rule used a column header. */
@media screen and (max-width:850px) {
  .header-inner {flex-direction:row}
  .brand {max-width:calc(100% - 90px)}
  .brand>span {min-width:0;overflow-wrap:anywhere}
}
/* Mobile print preview flows as a readable form; the @media print A4 layout above is preserved. */
@media screen and (max-width:760px) {
  .official-document {overflow:visible;border:0;border-radius:0}
  .official-page {width:100%;min-width:0;max-width:100%;margin:0 0 12px;padding:14px 13px;overflow-wrap:anywhere}
  .official-head {grid-template-columns:48px minmax(0,1fr);gap:6px;margin-bottom:9px}
  .official-head img {width:46px;height:48px}
  .official-head h1 {font-size:clamp(10px,2.25vw,14px);padding:0;min-width:0}
  .official-title>strong {font-size:14px}
  .official-barcode {width:245px;max-width:90%;height:27px}
  .official-barcode svg {height:27px;max-height:27px}
  .official-record-head {gap:9px;min-height:76px}
  .official-photo {width:67px;height:82px;flex:0 0 67px}
  .official-section {font-size:12px}
  .official-line {grid-template-columns:19px minmax(0,1fr);gap:3px;min-height:0;padding:4px 1px;font-size:11px}
  .official-signatures {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:17px;font-size:10px}
  .official-signatures p {margin:11px 0}
  .official-requirements {min-height:0;padding-top:20px}
  .official-requirements li {margin-bottom:8px}
}
@media screen and (max-width:420px) {
  .official-page {padding:10px 9px}
  .official-head {grid-template-columns:38px minmax(0,1fr);gap:4px}
  .official-head img {width:37px;height:42px}
  .official-head h1 {font-size:10px}
  .official-record-head {font-size:10px}
  .official-photo {width:57px;height:72px;flex-basis:57px}
  .official-line.official-pair {grid-template-columns:19px minmax(0,1fr)}
  .official-line.official-pair span:last-child {grid-column:2}
  .official-signatures {grid-template-columns:minmax(0,1fr) minmax(0,1fr);font-size:9px}
}

/* Tablet: show compact two-column records rather than a horizontally scrolled 880px table. */
@media screen and (min-width:761px) and (max-width:980px) {
  .table-wrap {border:0;overflow:visible;border-radius:0}
  .data-table {display:block;min-width:0;width:100%;background:transparent}
  .data-table thead {display:none}
  .data-table tbody {display:grid;gap:9px}
  .data-table tr {display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:auto auto auto auto auto auto auto;gap:1px 9px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:10px;min-width:0;overflow:hidden}
  .data-table tbody tr:hover {background:#fff}
  .data-table td {display:flex;min-width:0;align-items:center;gap:6px;border:0;padding:0;line-height:1.4;font-size:11px}
  .data-table .cell-photo {grid-column:1;grid-row:1 / 4;width:auto;align-self:start}
  .table-avatar {width:46px;height:56px;margin:0;object-fit:cover}
  .data-table .cell-name {grid-column:2 / 4;grid-row:1;display:block}
  .data-table .record-name {font-size:13px}
  .record-designation {font-size:11px;margin:1px 0 2px}
  .data-table .cell-card {grid-column:2 / 4;grid-row:2;color:#21624c}
  .data-table .cell-card strong {font-size:11px}
  .data-table .cell-status {grid-column:2 / 4;grid-row:3;justify-content:flex-start;margin:4px 0 5px}
  .data-table .cell-cnic {grid-column:1 / 4;grid-row:4}
  .data-table .cell-personnel {grid-column:1 / 4;grid-row:5}
  .data-table .cell-office {grid-column:1 / 4;grid-row:6}
  .data-table .cell-cnic::before,.data-table .cell-personnel::before,.data-table .cell-office::before {content:attr(data-label) ':';display:inline-block;flex:0 0 82px;color:var(--muted);font-size:10px}
  .data-table .cell-actions {grid-column:1 / 4;grid-row:7;width:auto;border-top:1px solid #e8eeeb;padding-top:7px;margin-top:6px}
  .table-actions {width:100%;justify-content:flex-end}
  .icon-action {width:35px;height:35px;flex-basis:35px}
  .data-table tbody {grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v1.04: square photographs and no white logo plate */
.brand img,.auth-hero img{background:transparent!important;border-radius:0!important;padding:0!important;box-shadow:none!important}
.table-avatar{width:40px;height:40px;aspect-ratio:1;object-fit:cover}
.profile-photo{width:94px;height:94px;aspect-ratio:1;object-fit:cover}
.photo-box img{width:112px;height:112px;aspect-ratio:1;object-fit:cover}
.official-photo{width:80px;height:80px;aspect-ratio:1;object-fit:cover}
.crop-canvas-wrap canvas{width:min(100%,252px);height:auto;aspect-ratio:1/1;max-height:min(54dvh,340px)}
.status-icon{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:24px;height:24px}
.status-icon .ui-icon{width:19px;height:19px}
.status-icon.approved{color:#168149}.status-icon.unapproved{color:#c23636}
.icon-action-danger{color:#a92226!important;background:#fff1ef;border-color:#ebbbb8}
.icon-action-danger:hover{background:#fce1de}
.delete-review{border:1px solid #eed2ce;background:#fff9f8;padding:15px;border-radius:12px;margin-top:16px}
.delete-review h3{font-size:14px;margin:0 0 8px}.delete-review p{font-size:12px}
.delete-review textarea{width:100%;min-height:70px;padding:10px;border:1px solid #cdbbb8;border-radius:8px;resize:vertical}
.nav-backdrop[hidden]{display:none!important}
@media screen and (max-width:850px){
 .site-header .primary-nav{display:flex!important;flex-direction:column;flex-wrap:nowrap;position:fixed;top:0;left:0;height:100dvh;width:min(82vw,320px);max-width:320px;padding:76px 18px 24px;background:#123d31;box-shadow:12px 0 44px #071c1690;overflow:auto;z-index:51;align-items:stretch;gap:6px;transform:translateX(-110%);visibility:hidden;transition:transform .2s ease,visibility .2s ease;overscroll-behavior:contain;}
 .site-header.nav-open .primary-nav{transform:translateX(0);visibility:visible}
 .primary-nav a{min-height:43px;padding:10px 13px!important;display:flex;align-items:center;gap:8px;border-radius:9px}
 .menu-toggle{display:inline-flex!important;position:relative;z-index:53;align-items:center;gap:6px;justify-content:center;min-height:40px}
 .site-header.nav-open .menu-toggle{position:fixed;left:15px;top:15px;margin:0;background:#285f4c}
 body.drawer-active{overflow:hidden}
 .nav-backdrop:not([hidden]){display:block!important;position:fixed;inset:0;z-index:49;background:rgba(8,26,20,.55);border:0;width:100%;height:100%;padding:0}
 .table-avatar{width:46px;height:46px}
 .site-header .header-inner{z-index:52;position:relative}
}
@media screen and (max-width:420px){.photo-box img{width:88px;height:88px}.official-photo{width:65px;height:65px;flex-basis:65px}.crop-canvas-wrap canvas{width:min(100%,252px);max-height:42dvh}}
@media screen and (max-height:520px){.crop-canvas-wrap canvas{max-height:34dvh}}
@media print{.official-photo{width:80px!important;height:80px!important}.nav-backdrop{display:none!important}}
@media(prefers-reduced-motion:reduce){.site-header .primary-nav{transition:none!important}}
/* Keep the drawer above its backdrop: the sticky header establishes its own stacking context. */
@media screen and (max-width:850px){.site-header.nav-open{z-index:100}.nav-backdrop:not([hidden]){z-index:90}.site-header.nav-open .primary-nav{z-index:101}}
@media screen and (max-width:850px){.site-header.nav-open .primary-nav a{color:#fff!important;opacity:1!important}.site-header.nav-open .menu-toggle{z-index:103!important;color:#fff!important;opacity:1!important}}
@media screen and (max-width:850px){.site-header.nav-open .header-inner{z-index:110!important}.site-header.nav-open .primary-nav{z-index:111!important}.site-header.nav-open .menu-toggle{z-index:113!important}.site-header.nav-open .nav-backdrop{z-index:90!important}}

/* v1.05 compact icon+label navigation; keep drawer fully accessible on small devices. */
.primary-nav a .ui-icon{width:16px;height:16px;flex:0 0 16px}
.record-history{display:block;font-size:10px;line-height:1.4;color:#567a6c;margin-top:3px}
.mobile-dock{display:none}
.section-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.staff-create{max-width:800px;margin:15px auto 0;width:100%}
.staff-create .auth-form{margin-top:10px}.staff-create .auth-form .btn{width:auto}
.staff-create label{min-width:0}.staff-create label input,.staff-create select{width:100%;min-width:0;border:1px solid #bccdc6;border-radius:7px;padding:9px;background:white;color:#18362b}
.staff-create .checkbox-inline{display:flex;align-items:center;gap:9px;justify-content:flex-start}.staff-create .checkbox-inline input{width:20px;height:20px}
.audit-sub{display:block;font-size:10px;color:#68817a}.audit-timeline{display:grid;gap:8px}.audit-item{border-left:3px solid #a4c8b8;padding:7px 11px;background:#f8faf9;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.audit-item>div{min-width:145px}.audit-item small{display:block;color:#6d8078;font-size:10px}.audit-item p{margin:0;font-size:12px;flex:1 1 180px}
@media(max-width:850px){
 body{padding-bottom:calc(62px + env(safe-area-inset-bottom,0px))}
 .mobile-dock{position:fixed;left:0;right:0;bottom:0;z-index:45;display:flex;align-items:stretch;justify-content:space-around;gap:1px;background:#fff;border-top:1px solid #d6e3dc;box-shadow:0 -3px 18px #102d241a;padding:5px max(4px,env(safe-area-inset-left,0px)) calc(5px + env(safe-area-inset-bottom,0px));}
 .mobile-dock a{display:flex;flex:1 1 0;min-width:0;max-width:140px;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:5px 2px;border-radius:8px;text-decoration:none;color:#175743;line-height:1.15}
 .mobile-dock a .ui-icon{width:20px;height:20px;flex:0 0 20px}
 .mobile-dock a span{font-size:10px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
 .mobile-dock a:focus-visible,.mobile-dock a:hover{background:#e9f4ee;outline:1px solid #237856}
 .site-header.nav-open .mobile-dock{visibility:hidden;pointer-events:none}
 .staff-table,.audit-table{min-width:0}
 .staff-table thead,.audit-table thead{display:none}
 .staff-table tr,.audit-table tr{display:block;border:1px solid #dce7e1;border-radius:9px;margin:8px;padding:7px;background:#fff}
 .staff-table td,.audit-table td{display:flex!important;align-items:flex-start;justify-content:space-between;gap:10px;padding:5px 6px!important;border:0!important;white-space:normal!important;min-width:0;width:auto!important;overflow-wrap:anywhere;text-align:right}
 .staff-table td::before,.audit-table td::before{content:attr(data-label);font-size:10px;color:#678076;font-weight:700;flex:0 0 78px;text-align:left}
 .staff-table td>* ,.audit-table td>*{min-width:0}
 .staff-table td .pill,.audit-table td .pill{max-width:100%}
}
@media(max-width:340px){.mobile-dock a span{font-size:9px}.mobile-dock a .ui-icon{width:18px;height:18px}}
@media print{.mobile-dock{display:none!important}}

/* v1.06 -- visible processing history in the employee profile. */
.track-intro{font-size:12px;line-height:1.5;margin:0 0 14px!important}
.card-tracker{list-style:none;margin:7px 0 2px;padding:0;display:grid;gap:0}
.track-step{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:0 0 17px;min-width:0}
.track-step:not(:last-child)::before{content:"";position:absolute;left:14px;top:28px;bottom:1px;width:2px;background:#dce8e2}
.track-step.track-completed:not(:last-child)::before{background:#368660}
.track-marker{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#eef2f1;border:1px solid #ceddd6;color:#6a7971;font-size:12px;font-weight:800}
.track-completed .track-marker{color:#fff;background:#237650;border-color:#237650}
.track-current .track-marker{background:#fff4dc;border-color:#c98e33;color:#78540a;box-shadow:0 0 0 3px #fff6e6}
.track-title{font-size:13px;font-weight:800;line-height:1.35;margin:2px 0 3px;overflow-wrap:anywhere}
.track-upcoming .track-title{color:#697a73}
.track-description{font-size:11px!important;line-height:1.5;color:#596f65!important;margin:0!important}
.track-note{font-size:11px!important;background:#fff7e9;border:1px solid #efd8ad;padding:10px;border-radius:7px}
/* v1.06 -- match the original A4 departmental form's readable type and spacing. */
@media screen and (min-width:651px){
 .official-document{max-width:794px;width:100%}
 .official-page{font:14px/1.42 Arial,Helvetica,sans-serif;padding:30px 36px;min-height:1030px}
 .official-head h1{font-size:19px}
 .official-title>strong{font-size:19px}
 .official-record-head{min-height:97px}
 .official-line{font-size:13px;min-height:26px;padding:4px 2px}
 .official-section{font-size:15px;line-height:1.35;background:transparent;text-decoration:underline;margin:15px 0 7px;padding:1px 2px}
 .official-signatures{margin-top:30px;font-size:12px}
 .official-requirements{padding-top:50px}
 .official-requirements h2{text-align:center;text-decoration:underline;text-underline-offset:5px;font-size:19px;margin-bottom:24px}
 .official-requirements li{font-size:14px;margin-bottom:13px}
 .official-requirements ol{margin-bottom:48px}
}
@media print{
 @page{size:A4 portrait;margin:10mm 12mm}
 .official-document{max-width:none!important;width:auto!important;overflow:visible!important}
 .official-page{font:11pt/1.32 Arial,Helvetica,sans-serif!important;width:auto!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;break-after:page;page-break-after:always}
 .official-page:last-child{break-after:auto;page-break-after:auto}
 .official-head{grid-template-columns:76px 1fr;gap:8px;margin-bottom:10px}
 .official-head h1{font-size:16pt!important;line-height:1.18;padding-right:54px}
 .official-head img{width:72px;height:75px}
 .official-title{margin-bottom:8px}
 .official-title>strong{font-size:15pt!important}
 .official-title small{font-size:8pt!important}
 .official-barcode{width:275px;height:26px}
 .official-barcode svg{height:26px!important;max-height:26px!important}
 .official-record-head{min-height:98px}
 .official-photo{width:76px!important;height:76px!important}
 .official-section{font-size:11.3pt!important;line-height:1.3;background:transparent!important;text-decoration:underline;margin:15px 0 8px!important;padding:0!important;color:#000!important}
 .official-line{font-size:10.5pt!important;min-height:31px!important;line-height:1.32!important;padding:5px 1px!important;break-inside:avoid}
 .official-signatures{font-size:9.8pt!important;gap:17px;margin-top:36px!important}
 .official-signatures b{min-height:18px}
 .official-signatures p{margin:24px 0!important}
 .official-requirements{padding-top:25px!important}
 .official-requirements h2{text-align:center;font-size:13pt!important;text-decoration:underline;text-underline-offset:4px;background:transparent!important;margin:0 0 23px!important;break-after:avoid}
 .official-requirements li{font-size:11pt!important;line-height:1.35;margin-bottom:15px!important}
 .official-requirements ol{margin:0 0 52px!important;padding-left:23px}
}
/* v1.06 preview polish: proportional A4 sheets on desktop, readable flow on phones. */
@media screen and (min-width:761px){
 .official-page{aspect-ratio:210 / 297;min-height:0}
 .official-title>strong,.official-requirements h2{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}
}
@media screen and (max-width:760px){
 .official-page{aspect-ratio:auto;font-size:12.5px;line-height:1.45}
 .official-title>strong{font-size:16px;text-decoration:underline;text-underline-offset:4px}
 .official-line{font-size:12px;line-height:1.45;padding:5px 1px}
 .official-section{font-size:13px}
 .official-requirements h2{font-size:14px;text-align:center;text-decoration:underline;text-underline-offset:4px;line-height:1.35}
 .official-requirements li{font-size:12px;line-height:1.5}
}
@media print{
 .official-page{aspect-ratio:auto!important}
 .official-title>strong{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:.8px}
}

/* v1.07: high-contrast, scannable Code39 barcode in browser A4 print preview. */
.official-title{margin-bottom:11px}
.official-title>strong{display:inline-block;font-size:22px;line-height:1.15}
.official-barcode{width:min(100%,455px)!important;height:58px!important;max-width:100%!important;margin:8px auto 4px}
.official-barcode svg{width:100%!important;height:58px!important;max-height:58px!important;display:block}
.official-title small{font:bold 15px/1.25 Arial,Helvetica,sans-serif;letter-spacing:2px;color:#000;margin-top:4px}
/* Left-hand menu opens only as wide as its text needs, not 82% of the viewport. */
@media screen and (max-width:850px){
 .header-inner{justify-content:flex-start}
 .menu-toggle{order:-1;margin:0 9px 0 0!important;flex:0 0 auto}
 .site-header .primary-nav{width:min(222px,calc(100vw - 54px))!important;max-width:222px!important;padding:74px 10px 18px!important;gap:3px!important}
 .site-header .primary-nav a{min-height:40px!important;padding:8px 10px!important;gap:9px!important;font-size:12px!important;white-space:nowrap!important}
 .site-header .primary-nav a span{overflow:hidden;text-overflow:ellipsis}
 .site-header.nav-open .menu-toggle{left:9px!important;top:13px!important}
 .site-header .primary-nav a .ui-icon{width:18px;height:18px;flex:0 0 18px}
}
@media print{
 .official-title{margin-bottom:8px!important}
 .official-title>strong{font-size:20pt!important;line-height:1.15!important}
 .official-barcode{width:455px!important;height:58px!important;max-width:90%!important;margin:9px auto 4px!important}
 .official-barcode svg{height:58px!important;max-height:58px!important}
 .official-title small{font-size:12pt!important;letter-spacing:2px!important;margin-top:4px!important}
 /* Recover the increased barcode height without shrinking employee details. */
 .official-record-head{min-height:88px!important}
 .official-section{margin-top:12px!important;margin-bottom:7px!important}
 .official-line{min-height:29px!important;padding:4px 1px!important}
 .official-signatures{margin-top:26px!important}
 .official-signatures p{margin:18px 0!important}
}
/* The recovery confirmation checkbox is a row, not a full-width text input. */
.auth-form label.checkbox-inline{display:flex;flex-direction:row;align-items:flex-start;gap:9px;font-size:12px;line-height:1.4}
.auth-form label.checkbox-inline input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:#206b51}

/* v1.08: compact official barcode matched to approved legacy browser print form. */
.official-head h1{font-size:22px;line-height:1.18}
.official-title>strong{font-size:19px;line-height:1.2}
.official-title{text-align:center}
.official-barcode{width:270px!important;height:31px!important;max-width:92%!important;margin:6px auto 2px!important}
.official-barcode svg{width:100%!important;height:31px!important;max-height:31px!important;display:block}
.official-title small{display:block;font:700 12px/1.3 Arial,Helvetica,sans-serif;letter-spacing:1px;margin:3px auto 0}
/* Logo stays on the left and the menu trigger stays on the right. */
@media screen and (max-width:850px){
 .header-inner{justify-content:space-between!important;align-items:center!important}
 .header-inner>.brand{order:0;flex:0 1 auto;margin-right:auto;max-width:calc(100% - 94px)!important}
 .header-inner>.menu-toggle{order:1!important;flex:0 0 auto;margin:0 0 0 8px!important}
 .site-header.nav-open .menu-toggle{position:fixed!important;left:auto!important;right:12px!important;top:13px!important;margin:0!important}
 .brand img{object-fit:contain!important;flex:0 0 auto}
}
/* Employee and staff authentication cards remain centered on larger viewports. */
@media screen and (min-width:641px){
 .page-shell:has(> .auth-shell){min-height:calc(100dvh - 80px);padding-top:18px}
 .page-shell:has(> .auth-shell)>.auth-shell{width:100%;margin:auto auto!important;flex:0 0 auto}
 .page-shell:has(> .auth-shell)>.site-footer{margin-top:0}
}
/* Additional employee details reuse only fields already in usr_dat. */
.profile-section{border-top:1px solid var(--line);padding-top:17px;margin-top:22px}
.profile-section h3{font-size:14px;letter-spacing:.01em;color:#245745;margin:0 0 4px;font-weight:800}
.profile-section .detail-list{margin-top:10px}
.detail-list-compact{gap:13px 18px}
.detail-list-compact dd{font-weight:650;font-size:13px;line-height:1.45}
.detail-list-compact .detail-full{grid-column:1/-1}
#application>.card{display:flex;flex-direction:column}
#application>.card>.btn-row{margin-top:auto;padding-top:22px}
@media(max-width:380px){.detail-list-compact{grid-template-columns:1fr 1fr;gap:12px}}
/* Accessible checkbox-style super-administrator preference. */
.portal-setting-card{max-width:760px;width:100%}
.portal-setting-card h2{display:flex;align-items:center;gap:9px}
.portal-setting-card h2 .ui-icon{width:21px;height:21px}
.setting-switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px;border:1px solid var(--line);border-radius:12px;background:#fafdfb;cursor:pointer}
.setting-copy{display:grid;gap:3px;min-width:0}.setting-copy strong{font-size:14px}.setting-copy small{font-size:12px;color:var(--muted)}
.setting-switch{position:relative;flex:0 0 46px;width:46px;height:27px}
.setting-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;z-index:2;cursor:pointer}
.setting-slider{position:absolute;inset:0;background:#a3b5ad;border-radius:99px;transition:background .15s}
.setting-slider:before{content:"";position:absolute;left:3px;top:3px;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0002;transition:transform .15s}
.setting-switch input:checked+.setting-slider{background:#156b4f}.setting-switch input:checked+.setting-slider:before{transform:translateX(19px)}
.setting-switch input:focus-visible+.setting-slider{outline:3px solid #b68b35;outline-offset:3px}
@media print{
 .official-head h1{font-size:17pt!important;line-height:1.15!important}
 .official-title>strong{font-size:14pt!important;line-height:1.2!important}
 .official-title{text-align:center!important;margin-bottom:8px!important}
 .official-barcode{width:70mm!important;height:8mm!important;max-width:70mm!important;margin:5px auto 1px!important}
 .official-barcode svg{width:100%!important;height:8mm!important;max-height:8mm!important}
 .official-title small{font-size:10pt!important;letter-spacing:.75px!important;margin:2px auto 0!important}
}

/* v1.09: equal-height, compact employee profile and tracking overview. */
@media screen and (min-width:1001px){
  .application-overview{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:14px}
}
.application-overview>.profile-card,.application-overview>.summary-stack>.tracking-card{min-width:0;display:flex;flex-direction:column}
.application-overview>.summary-stack{display:block;min-width:0;height:100%}
.application-overview>.summary-stack>.tracking-card{height:100%}
.application-overview .profile-intro{margin-top:7px;align-items:center}
.application-overview .profile-photo{width:90px;height:90px;flex:0 0 90px;object-fit:cover;object-position:center;border-radius:10px}
.application-overview .profile-name{font-size:19px;line-height:1.25;display:block;overflow-wrap:anywhere}
.application-overview .profile-identity .text-muted{font-size:13px}
.application-overview .profile-identity .meta{margin-top:2px}
.application-overview .profile-state{margin-top:7px}
.application-overview .profile-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 18px;margin:21px 0 10px}
.application-overview .profile-facts dt{font-size:11px}
.application-overview .profile-facts dd{font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.application-overview .profile-actions{margin-top:auto;padding-top:17px;gap:8px}
.application-overview .profile-actions .btn{padding:9px 12px;font-size:12px}
.application-overview .tracking-card .card-tracker{margin-top:10px}
.application-overview .tracking-card .track-step{padding-bottom:14px;grid-template-columns:29px minmax(0,1fr)}
.application-overview .tracking-card .track-intro{margin-bottom:9px!important}
.application-overview .tracking-help{font-size:11px;line-height:1.45;border-top:1px solid var(--line);padding-top:11px;margin:auto 0 0!important;color:var(--muted)}
.status-review-link{display:inline-flex;vertical-align:middle;max-width:100%;text-decoration:none!important;border-radius:6px}
.status-review-link .pill{border-bottom:1px solid #65a58a}
.status-review-link:hover .pill,.status-review-link:focus-visible .pill{outline:2px solid #277657;outline-offset:2px}
@media screen and (max-width:1000px){
  .application-overview{grid-template-columns:1fr;gap:12px}
  .application-overview>.summary-stack,.application-overview>.summary-stack>.tracking-card{height:auto}
}
@media screen and (max-width:640px){
  .application-overview .profile-photo{width:76px;height:76px;flex-basis:76px}
  .application-overview .profile-name{font-size:18px}
  .application-overview .profile-facts{gap:12px 12px;margin-top:16px}
  .application-overview .profile-actions{padding-top:16px}
  .application-overview .profile-actions .btn{flex:1 1 145px}
}
@media screen and (max-width:340px){
  .application-overview .profile-facts dd{font-size:12px}
  .application-overview .profile-actions .btn{flex:1 1 100%}
}
@media print{.status-review-link{display:inline}}

/* v1.10: staff request bell, collection controls and mobile-friendly recovery queue. */
.header-alert{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#f2fff8;background:#ffffff16;border:1px solid #ffffff45;border-radius:10px;padding:9px 11px;font-weight:650;font-size:12px;position:relative;white-space:nowrap}
.header-alert:hover,.header-alert:focus-visible{background:#ffffff30;color:#fff;text-decoration:none}
.header-alert .ui-icon{width:19px;height:19px;flex-basis:19px}
.header-alert-count{display:inline-flex;align-items:center;justify-content:center;background:#f3c45b;color:#222;font-size:11px;font-weight:800;min-width:20px;height:20px;padding:0 4px;border-radius:999px}
.collection-card{max-width:none}
.collection-form{max-width:690px}
.collection-form .checkbox-inline{display:flex;align-items:center;gap:10px}
.collection-form .checkbox-inline input{width:18px;height:18px;flex-shrink:0}
.collection-correction{margin-top:12px;max-width:690px;border-top:1px solid var(--line);padding-top:12px}
.collection-correction summary,.recovery-queue-actions summary{cursor:pointer;color:var(--forest2);font-weight:700}
.collection-correction .auth-form{margin-top:12px}
.recovery-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.recovery-actions>.btn{flex:1 1 195px;min-width:0;white-space:normal}
.requests-top{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
.requests-top h2{margin:0}
.recovery-queue-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.recovery-queue-actions details{min-width:135px}
.recovery-queue-actions details[open]{width:100%;min-width:200px}
.recovery-queue-actions .auth-form{margin-top:10px}
@media(min-width:851px){.header-alert{margin-left:auto}}
@media(max-width:850px){.header-alert{margin-left:auto;padding:7px 9px}.header-alert-label{display:none}.header-alert .ui-icon{width:21px;height:21px}}
@media(max-width:360px){.header-alert{padding:6px;gap:3px}.header-alert-count{min-width:17px;height:17px;font-size:10px}.recovery-actions>.btn{flex-basis:100%}}
@media print{.header-alert,.collection-card,.recovery-actions{display:none!important}}

/* v1.10 QA adjustments: keep the request bell, brand and Menu on a single line; ensure queue is readable at 280px. */
@media screen and (max-width:850px){
 .site-header .header-inner{flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;align-items:center!important}
 .site-header .header-inner>.brand{order:0!important;flex:1 1 110px!important;min-width:0!important;max-width:none!important;margin-right:0!important;gap:6px!important}
 .site-header .header-inner>.brand img{width:35px!important;height:35px!important;flex:0 0 35px!important}
 .site-header .header-inner>.brand>span{min-width:0!important;overflow-wrap:anywhere}
 .site-header .header-inner>.brand strong{font-size:14px!important}
 .site-header .header-inner>.brand small{font-size:9px!important;line-height:1.1!important}
 .site-header .header-inner>.header-alert{order:1!important;flex:0 0 auto!important;margin-left:0!important}
 .site-header .header-inner>.menu-toggle{order:2!important;flex:0 0 auto!important;margin:0!important}
 .requests-table{min-width:0!important;width:100%!important;display:block!important}
 .requests-table thead{display:none!important}
 .requests-table tbody{display:block!important;width:100%!important}
 .requests-table tbody tr{display:block!important;width:calc(100% - 8px)!important;max-width:100%!important;margin:5px 4px 10px!important;padding:9px!important;border:1px solid var(--line)!important;background:#fff;border-radius:9px!important}
 .requests-table tbody td{display:flex!important;flex-wrap:nowrap!important;width:100%!important;min-width:0!important;max-width:100%!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;padding:6px 2px!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:left!important;border:0!important;font-size:12px!important}
 .requests-table tbody td::before{content:attr(data-label);flex:0 0 77px!important;max-width:77px!important;text-align:left!important;font-size:10px!important;font-weight:700!important;color:var(--muted)!important}
 .requests-table tbody td>*{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
 .requests-table .request-value{display:block;flex:1 1 auto!important;line-height:1.4}
 .requests-table .request-value small{display:block;overflow-wrap:anywhere}
 .requests-table .recovery-queue-actions{flex:1 1 auto!important}
}
@media screen and (max-width:340px){
 .site-header .header-inner>.brand img{width:30px!important;height:30px!important;flex-basis:30px!important}
 .site-header .header-inner>.header-alert{padding:6px 5px!important}
 .site-header .header-inner>.menu-toggle{padding:6px!important;min-height:30px!important}
 .site-header .header-inner>.menu-toggle .ui-icon{width:14px!important;height:14px!important;flex-basis:14px!important}
 .requests-table tbody td::before{flex-basis:68px!important;max-width:68px!important}
}


/* v1.11: persistent left navigation rail. This applies to authenticated pages only. */
@media screen {
 body.has-side-rail{--rail-width:76px;min-width:0}
 body.has-side-rail.rail-expanded{--rail-width:242px}
 .nav-rail{position:fixed;inset:0 auto 0 0;width:var(--rail-width);height:100vh;height:100dvh;
   z-index:60;display:flex;flex-direction:column;background:#fff;color:#203b33;
   border-right:1px solid #d5e3dc;box-shadow:2px 0 14px #092e2411;
   transition:width .2s ease;overflow:hidden}
 .rail-toolbar{height:71px;min-height:71px;padding:8px 7px;display:flex;align-items:center;justify-content:center;border-bottom:1px solid #e2ebe6}
 .rail-toggle{min-height:53px;width:100%;padding:6px 4px;border:1px solid transparent;border-radius:11px;
   background:transparent;color:#244f40;display:flex;flex-direction:column;align-items:center;justify-content:center;
   gap:3px;font:700 10px/1.2 system-ui,-apple-system,'Segoe UI',sans-serif;white-space:nowrap}
 .rail-toggle:hover,.rail-toggle:focus-visible{background:#e9f4ee;outline-offset:0}
 .rail-toggle .ui-icon{width:23px;height:23px;flex:0 0 23px}
 .rail-toggle-label{max-width:100%;overflow:hidden;text-overflow:ellipsis}
 .rail-links{display:flex;flex-direction:column;gap:3px;align-items:stretch;overflow:auto;overscroll-behavior:contain;
   padding:10px 6px max(12px,env(safe-area-inset-bottom));min-height:0;scrollbar-width:thin;scrollbar-color:#c1d4ca transparent}
 .rail-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
   min-height:61px;min-width:0;padding:7px 3px;border-radius:12px;text-align:center;
   font-size:10px;line-height:1.2;font-weight:650;color:#3d504a;text-decoration:none!important;overflow-wrap:anywhere}
 .rail-link .ui-icon{width:22px;height:22px;flex:0 0 22px;stroke-width:1.8}
 .rail-label-mini{display:block;max-width:100%;overflow-wrap:normal;word-break:normal;font-size:9.5px;line-height:1.12}
 .rail-label-full{display:none}
 .rail-link:hover,.rail-link:focus-visible{background:#edf4f0;color:#125b43;outline-offset:-2px}
 .rail-link.is-active,.rail-link[aria-current="page"]{background:#e0f0e7;color:#12664a}
 .rail-link.nav-logout{color:#8b3b35;border-top:1px solid #e3e8e5;border-radius:9px}
 .rail-backdrop[hidden]{display:none!important}
 .rail-backdrop{position:fixed;inset:0;background:rgba(16,29,25,.46);border:0;padding:0;z-index:54;width:100vw;height:100vh;height:100dvh}
 body.has-side-rail .site-header{margin-left:var(--rail-width);width:calc(100% - var(--rail-width));z-index:25;transition:margin-left .2s ease,width .2s ease}
 body.has-side-rail .page-shell{max-width:none;width:calc(100% - var(--rail-width));margin:0 0 0 var(--rail-width);
   padding-left:clamp(14px,2.1vw,32px);padding-right:clamp(14px,2.1vw,32px);transition:margin-left .2s ease,width .2s ease}
 body.has-side-rail .header-inner{max-width:none;min-height:71px;padding:8px clamp(14px,2.1vw,32px)}
 body.has-side-rail .brand img{width:47px;height:47px;object-fit:contain}
 body.has-side-rail .mobile-dock{display:none!important}
 body.rail-expanded .rail-toolbar{padding:8px 12px;justify-content:flex-start}
 body.rail-expanded .rail-toggle{width:100%;flex-direction:row;justify-content:flex-start;gap:13px;padding:8px 14px;font-size:13px}
 body.rail-expanded .rail-links{padding:10px 10px 15px;gap:4px}
 body.rail-expanded .rail-link{min-height:45px;flex-direction:row;justify-content:flex-start;gap:13px;
   padding:8px 13px;text-align:left;font-size:13px;white-space:normal;overflow-wrap:anywhere}
 body.rail-expanded .rail-link .ui-icon{width:20px;height:20px;flex:0 0 20px}
 body.rail-expanded .rail-label-mini{display:none}
 body.rail-expanded .rail-label-full{display:block;min-width:0;font-size:13px;font-weight:650}
 .has-side-rail .rail-toggle:focus-visible,.has-side-rail .rail-link:focus-visible{outline:2px solid #ba8a24;outline-offset:-2px}
}
@media screen and (max-width:760px){
 body.has-side-rail,body.has-side-rail.rail-expanded{--rail-width:68px}
 body.has-side-rail .header-inner{min-height:59px;padding:6px 9px;flex-direction:row!important;flex-wrap:nowrap!important;gap:6px!important;align-items:center!important}
 body.has-side-rail .header-inner>.brand{flex:1 1 auto!important;min-width:0!important;max-width:none!important;gap:5px!important}
 body.has-side-rail .header-inner>.brand img{width:37px!important;height:37px!important;flex:0 0 37px!important}
 body.has-side-rail .header-inner>.brand strong{font-size:15px!important}
 body.has-side-rail .header-inner>.brand small{font-size:10px!important;line-height:1.15!important}
 body.has-side-rail .header-inner>.header-alert{flex:0 0 auto!important;padding:7px!important}
 body.has-side-rail .page-shell{padding:14px 11px 10px}
 body.rail-expanded .nav-rail{width:min(242px,calc(100vw - 22px));box-shadow:12px 0 30px #071c1645}
 body.rail-expanded .rail-link{min-height:45px}
 body.rail-overlay-active{overflow:hidden}
}
@media screen and (max-width:350px){
 body.has-side-rail,body.has-side-rail.rail-expanded{--rail-width:62px}
 .rail-toolbar{padding:5px 3px}
 .rail-links{padding:8px 3px}
 .rail-link{min-height:58px;padding:6px 2px}
 .rail-label-mini{font-size:9px}
 body.has-side-rail .header-inner>.brand img{width:31px!important;height:31px!important;flex-basis:31px!important}
 body.has-side-rail .header-inner>.brand strong{font-size:13px!important}
 body.has-side-rail .header-inner>.brand small{font-size:9px!important}
 body.has-side-rail .page-shell{padding:10px 8px 8px}
}
@media print{
 .nav-rail,.rail-backdrop{display:none!important}
 body.has-side-rail .site-header{display:none!important}
 body.has-side-rail .page-shell{margin:0!important;width:100%!important;max-width:none!important;padding:0!important;transition:none!important}
}
@media(prefers-reduced-motion:reduce){body.has-side-rail .nav-rail,body.has-side-rail .site-header,body.has-side-rail .page-shell{transition:none!important}}

/* v2.00: compact, responsive staff list controls and predictable navigation. */
@media screen {
 .applications-card{min-width:0}
 .application-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
 .application-list-heading h2{margin-bottom:3px}
 .application-list-heading .meta{margin:0;color:#61766e;font-size:12px}
 .application-filters{align-items:center;gap:9px;margin-bottom:15px}
 .application-filters .search-input{flex:1 1 260px;min-width:130px}
 .page-size-field{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;font-size:12px;color:#49675b;font-weight:700;white-space:nowrap}
 .page-size-field select{width:auto;min-width:68px;min-height:36px;padding:7px 10px;border:1px solid #b7cec2;border-radius:8px;background:#fff;color:#183d30;font-size:13px;font-weight:700;cursor:pointer}
 .page-size-field select:focus-visible{outline:3px solid #b1d8bc;outline-offset:1px}
 .application-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 0 1px;margin-top:0}
 .application-pagination .btn-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
 .application-pagination .page-btn{min-width:100px}
 .application-pagination .page-btn:disabled{cursor:not-allowed;opacity:.45;transform:none}
 #applications{scroll-margin-top:90px}
}
@media screen and (max-width:650px){
 .application-filters .search-input{flex:1 1 100%;min-width:0}
 .application-filters .page-size-field{margin-right:auto}
 .application-pagination{gap:10px}
 .application-pagination .page-btn{min-width:82px}
}
@media screen and (max-width:360px){
 .application-filters{gap:7px}
 .application-filters .page-size-field{flex-basis:100%;justify-content:flex-start}
 .application-filters .btn{flex:1 1 auto}
 .application-pagination{justify-content:center;text-align:center}
 .application-pagination>small{flex:1 1 100%}
 .application-pagination .btn-row{width:100%;justify-content:space-between}
 .application-pagination .page-btn{min-width:0;flex:1 1 0}
}

/* v2.00 employee-account directory: actions remain tap-friendly on narrow phones. */
@media screen{
 #employee-accounts{scroll-margin-top:90px}
 #employee-accounts .account-actions{display:flex;align-items:center;gap:7px;justify-content:flex-end}
 #employee-accounts .account-actions .icon-action{min-width:36px;min-height:36px}
 #employee-accounts .staff-table{width:100%}
 #employee-accounts .staff-table td{overflow-wrap:anywhere}
 #employee-accounts .staff-table .btn{max-width:100%;white-space:normal}
}
@media screen and (max-width:700px){
 #employee-accounts .staff-table td .account-actions{width:auto;min-width:80px}
 #employee-accounts .staff-table td .account-actions .icon-action{flex:0 0 36px}
}
