:root{--navy:#12355b;--blue:#1f6fb2;--sky:#eaf4ff;--gold:#e8a317;--ink:#1f2937;--muted:#64748b;--line:#d8e0e8;--white:#fff;--success:#18794e;--danger:#b42318;--bg:#f3f6f9}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.45}
a{color:var(--blue);text-decoration:none}
button,input,select,textarea{font:inherit}
.topbar{display:flex;align-items:center;justify-content:space-between;background:var(--navy);color:#fff;padding:12px max(20px,calc((100vw - 1200px)/2));gap:18px}
.brand{display:flex;align-items:center;color:#fff;gap:10px}
.brand span:last-child{display:flex;flex-direction:column}
.brand small{opacity:.78}
.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:76px;height:76px;flex:0 0 auto}
.brand-mark.small{width:48px;height:48px}
.brand-mark img{display:block;width:100%;height:100%;object-fit:contain}
.topbar nav{display:flex;align-items:center;gap:14px}
.topbar nav a{color:#fff}
.user-name{opacity:.8}
.navwrap{background:#fff;border-bottom:1px solid var(--line);overflow:auto}
.mainnav{max-width:1200px;margin:auto;display:flex;gap:4px;padding:8px 12px;white-space:nowrap}
.mainnav a{padding:8px 11px;border-radius:7px;color:var(--ink)}
.mainnav a:hover{background:var(--sky)}
.container{max-width:1200px;margin:24px auto;padding:0 16px;min-height:calc(100vh - 180px)}
.site-footer{text-align:center;color:var(--muted);padding:22px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.page-head h1,.card h2{margin:0 0 5px}
.muted{color:var(--muted)}
.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:18px;box-shadow:0 3px 14px rgba(18,53,91,.05)}
.grid{display:grid;gap:16px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.stats .card{margin:0}
.stat-number{font-size:28px;font-weight:800;color:var(--navy)}
label{display:block;font-weight:600;margin-bottom:13px}
input,select,textarea{display:block;width:100%;margin-top:6px;border:1px solid #b9c5d1;border-radius:7px;padding:10px;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(31,111,178,.22);border-color:var(--blue)}
.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:7px;padding:10px 14px;cursor:pointer;font-weight:700;text-decoration:none}
.btn.primary{background:var(--blue);color:#fff}
.btn.secondary{background:#e8edf3;color:var(--ink)}
.btn.success{background:var(--success);color:#fff}
.btn.danger{background:var(--danger);color:#fff}
.btn.small{padding:6px 9px;font-size:12px}
.btn.full{width:100%}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.alert{padding:12px 14px;border-radius:8px;margin:0 0 16px;border:1px solid}
.alert.success{color:#12623f;background:#e9f8f0;border-color:#a7ddbf}
.alert.danger{color:#8c1d18;background:#fff0ef;border-color:#f3b7b2}
.alert.info{color:#164e78;background:#eef7ff;border-color:#b7dbf5}
.table-wrap{overflow:auto}
.data-table{width:100%;border-collapse:collapse;background:#fff}
.data-table th,.data-table td{border-bottom:1px solid var(--line);padding:10px 9px;text-align:left;vertical-align:top}
.data-table th{background:#edf3f8;color:#183b5d;white-space:nowrap}
.data-table .center{text-align:center}
.badge{display:inline-block;border-radius:20px;padding:3px 9px;font-size:12px;font-weight:700;background:#e8edf3}
.badge.present{background:#dff5e9;color:#12623f}
.badge.pending{background:#fff1c9;color:#7b5700}
.filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:end}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#e8f2fb,#f8fafc)}
.auth-card{width:min(430px,100%);background:#fff;padding:30px;border-radius:16px;border:1px solid var(--line);box-shadow:0 18px 45px rgba(18,53,91,.13);text-align:center}
.auth-card.wide{width:min(760px,100%)}
.auth-card form{text-align:left;margin-top:18px}
.auth-card .brand-mark{margin:auto}
.visit-card{display:grid;grid-template-columns:100px 1fr auto;gap:18px;align-items:center}
.visit-number{font-weight:800;color:var(--navy);font-size:20px;text-align:center}
.visit-number span{display:block;font-size:44px;line-height:1}
.timeline{padding:0;margin:0;list-style:none}
.timeline li{position:relative;padding:0 0 18px 28px}
.timeline li:before{content:'';position:absolute;left:7px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--blue)}
.timeline li:after{content:'';position:absolute;left:11px;top:17px;bottom:0;border-left:2px solid #cbd7e2}
.timeline li:last-child:after{display:none}
.qr-code{display:block;width:84px;height:84px;margin:auto;background:#fff}
.qr-code .qr-svg{display:block;width:100%;height:100%}
.credential{font-family:Consolas,monospace;background:#eef3f8;padding:3px 6px;border-radius:4px}
.note{border-left:4px solid var(--gold);background:#fff9e7;padding:12px 14px}
.pagination{display:flex;gap:5px;flex-wrap:wrap;margin-top:16px}
.pagination a,.pagination span{padding:6px 10px;background:#fff;border:1px solid var(--line);border-radius:5px}
.pagination .active{background:var(--blue);color:#fff}
.report-page{background:#fff;color:#000}
.report-toolbar{position:sticky;top:0;background:#102f50;color:#fff;padding:10px;text-align:center;z-index:10}
.report-toolbar .btn{margin:0 3px}
.report-sheet{width:190mm;min-height:277mm;margin:10mm auto;background:#fff;padding:8mm 7mm}
.report-title{text-align:center;margin-bottom:16px}
.report-title h1{font-size:16px;margin:0 0 4px;text-transform:uppercase}
.report-title h2,.report-title h3{font-size:14px;margin:2px}
.report-meta{display:flex;justify-content:space-between;margin:10px 0}
.report-table{width:100%;border-collapse:collapse;font-size:9pt;table-layout:fixed}
.report-table th,.report-table td{border:1px solid #000;padding:5px 4px;vertical-align:middle;line-height:1.25;overflow-wrap:anywhere;word-wrap:break-word;word-break:normal;hyphens:auto}
.report-table th{text-align:center;font-size:8pt;line-height:1.15}
.report-table .num{width:8mm;text-align:center}
.report-table .date{width:27mm;text-align:center}
.report-table .sign{width:34mm;text-align:center}
.report-table .sign small{display:block;font-size:6.5pt;line-height:1.1;overflow-wrap:anywhere;word-break:break-all}
.report-table .qr-code{width:22mm;height:22mm;margin:auto}
.ppl-report-table .ppl-col-number{width:10mm}
.ppl-report-table .ppl-col-name{width:42mm}
.ppl-report-table .ppl-col-location{width:51mm}
.ppl-report-table .ppl-col-date{width:28mm}
.ppl-report-table .ppl-col-signature{width:40mm}
.ppl-report-table .num{width:10mm}
.ppl-report-table .date{width:28mm}
.ppl-report-table .sign{width:40mm}
.ppl-report-table th:nth-child(1),.ppl-report-table td:nth-child(1){font-size:8pt;text-align:center}
.ppl-report-table td:nth-child(2){font-size:9pt}
.ppl-report-table td:nth-child(3){font-size:8.5pt}
.ppl-report-table th:nth-child(4),.ppl-report-table td:nth-child(4){font-size:8pt;text-align:center}
.ppl-report-table th:nth-child(5),.ppl-report-table td:nth-child(5){font-size:7.5pt;text-align:center}
.qr-note{font-size:9px;margin:7px 0 0}
.signatory{width:78mm;margin:18px 0 0 auto;font-size:11px;line-height:1.35}
.signature-space{height:20mm}
.coordinator-signature-area{height:34mm;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.coordinator-signature-area.wet{height:27mm}
.coordinator-signature-area .coordinator-qr{width:24mm;height:24mm;margin:0 auto 1mm}
.coordinator-signature-area small{font-size:8px;line-height:1.2}
.monthly-report-title h1{font-size:18px;letter-spacing:.4px}
.monthly-report-title h2{font-size:15px;max-width:170mm;margin:4px auto;line-height:1.35}
.monthly-report-title h3{font-size:14px;text-transform:uppercase}
.monthly-period{margin:14px 0 7px;text-align:left;font-size:11px}
.monthly-report-table{font-size:9pt;table-layout:fixed}
.monthly-report-table .monthly-col-number{width:14mm}
.monthly-report-table .monthly-col-job{width:45mm}
.monthly-report-table .monthly-col-signature{width:38mm}
.monthly-report-table .num{width:14mm}
.monthly-report-table .sign{width:38mm}
.monthly-report-table th:nth-child(1),.monthly-report-table td:nth-child(1){font-size:8pt;text-align:center}
.monthly-report-table td:nth-child(2){font-size:9.5pt}
.monthly-report-table th:nth-child(3),.monthly-report-table td:nth-child(3){font-size:8.5pt}
.monthly-report-table th:nth-child(4),.monthly-report-table td:nth-child(4){font-size:7.5pt;text-align:center}
.monthly-report-table td{height:30mm}
.monthly-report-table .qr-code{width:24mm;height:24mm}
.overtime-report-table .monthly-col-number,.overtime-report-table .num{width:10mm}
.overtime-report-table .monthly-col-job{width:38mm}
.overtime-report-table .monthly-col-start,.overtime-report-table .monthly-col-end,.overtime-report-table .time{width:20mm;text-align:center}
.overtime-report-table .monthly-col-signature,.overtime-report-table .sign{width:36mm}
.overtime-report-table th:nth-child(1),.overtime-report-table td:nth-child(1){font-size:7.5pt;text-align:center}
.overtime-report-table td:nth-child(2){font-size:9pt}
.overtime-report-table th:nth-child(3),.overtime-report-table td:nth-child(3){font-size:8pt}
.overtime-report-table th:nth-child(4),.overtime-report-table td:nth-child(4),.overtime-report-table th:nth-child(5),.overtime-report-table td:nth-child(5){font-size:8pt;text-align:center;white-space:nowrap}
.overtime-report-table th:nth-child(6),.overtime-report-table td:nth-child(6){font-size:7pt;text-align:center}
.overtime-report-table td{height:27mm}
.overtime-report-table .qr-code{width:21mm;height:21mm}
.overtime-recap-table{min-width:1050px}
.overtime-recap-table th:nth-child(1),.overtime-recap-table td:nth-child(1){width:55px;text-align:center}
.overtime-recap-table th:nth-child(2),.overtime-recap-table td:nth-child(2){width:190px;white-space:nowrap}
.overtime-recap-table th:nth-child(4),.overtime-recap-table td:nth-child(4),.overtime-recap-table th:nth-child(5),.overtime-recap-table td:nth-child(5),.overtime-recap-table th:nth-child(6),.overtime-recap-table td:nth-child(6){width:125px;text-align:center}
.overtime-recap-table th:nth-child(7),.overtime-recap-table td:nth-child(7){width:175px}
.overtime-recap-table th:nth-child(8),.overtime-recap-table td:nth-child(8){width:145px}
.verify-card{max-width:720px;margin:40px auto}
.verify-ok{font-size:48px;color:var(--success);text-align:center}
.detail-grid{display:grid;grid-template-columns:180px 1fr;border-top:1px solid var(--line)}
.detail-grid div{padding:9px;border-bottom:1px solid var(--line)}
.detail-grid div:nth-child(odd){font-weight:bold;background:#f6f8fa}
.benchmark-heading{text-align:center}
.benchmark-heading h1{margin:0 0 10px;color:var(--navy)}
.benchmark-heading p{margin:4px 0}
.benchmark-back-button{background:#fff!important;color:var(--navy)!important;white-space:nowrap}
.benchmark-filter{grid-template-columns:minmax(220px,560px) auto;justify-content:center}
.benchmark-public-qr{width:120px;height:120px}
.benchmark-list{table-layout:fixed;min-width:860px}
.benchmark-list .benchmark-col-number{width:105px}
.benchmark-list .benchmark-col-institution{width:240px}
.benchmark-list .benchmark-col-signature{width:220px}
.benchmark-list td:nth-child(2),.benchmark-list td:nth-child(3),.benchmark-admin-list td:nth-child(2),.benchmark-admin-list td:nth-child(3){word-wrap:break-word;overflow-wrap:anywhere;word-break:normal}
.benchmark-admin-list{table-layout:fixed;min-width:1200px}
.benchmark-admin-list .benchmark-col-number{width:75px}
.benchmark-admin-list .benchmark-col-institution{width:220px}
.benchmark-admin-list .benchmark-col-signature{width:190px}
.benchmark-admin-list .benchmark-col-time{width:155px}
.benchmark-admin-list .benchmark-col-action{width:285px}
.signature-thumb{display:block;width:160px;height:58px;max-width:100%;margin:0 auto;object-fit:contain;background:#fff}
.benchmark-sign-cell .btn{margin-top:8px}
.signature-card{max-width:900px;margin:24px auto}
.signature-pad-wrap{padding:10px;background:#eef3f8;border-radius:10px}
#signature-pad{display:block;width:100%;height:auto;border:2px dashed #8294a7;border-radius:8px;background:#fff;touch-action:none;cursor:crosshair}
.signature-actions{margin-top:14px}
.signature-delete-actions{justify-content:center;margin-top:12px}
.existing-signature{margin-top:18px;padding:14px;background:#f7fafc;border:1px solid var(--line);border-radius:8px;text-align:center}
.existing-signature img{max-width:420px;width:100%;max-height:130px;object-fit:contain}
.benchmark-report-title h1{font-size:18px;letter-spacing:.4px}
.benchmark-report-title h2{font-size:16px;max-width:170mm;margin:4px auto;line-height:1.35}
.benchmark-report-title h3{font-size:14px;text-transform:uppercase}
.benchmark-report-meta{margin:14px 0 8px;font-size:11px}
.benchmark-report-meta div{margin:3px 0}
.benchmark-report-table{font-size:9pt;table-layout:fixed}
.benchmark-report-table .benchmark-col-number{width:8%}
.benchmark-report-table .benchmark-col-name{width:40%}
.benchmark-report-table .benchmark-col-institution{width:30%}
.benchmark-report-table .benchmark-col-signature{width:22%}
.benchmark-report-table th:nth-child(1),.benchmark-report-table td:nth-child(1){width:8%;max-width:8%}
.benchmark-report-table th:nth-child(2),.benchmark-report-table td:nth-child(2){width:40%;max-width:40%}
.benchmark-report-table th:nth-child(3),.benchmark-report-table td:nth-child(3){width:30%;max-width:30%}
.benchmark-report-table th:nth-child(4),.benchmark-report-table td:nth-child(4){width:22%;max-width:22%}
.benchmark-report-table th:nth-child(1),.benchmark-report-table td:nth-child(1){font-size:8pt;text-align:center}
.benchmark-report-table td:nth-child(2){font-size:9pt}
.benchmark-report-table th:nth-child(3),.benchmark-report-table td:nth-child(3){font-size:8pt}
.benchmark-report-table th:nth-child(4),.benchmark-report-table td:nth-child(4){font-size:7.5pt;text-align:center}
.benchmark-report-table td{height:25mm}
.benchmark-report-table .sign img{display:block;width:90%;height:17mm;max-width:90%;max-height:17mm;margin:auto;object-fit:contain}
.rlk-report-meta{margin:14px 0 8px;font-size:11px}
.rlk-report-meta div{margin:3px 0}
.rlk-report-table{font-size:9pt;table-layout:fixed}
.rlk-report-table .rlk-col-number,.rlk-report-table .num{width:16mm}
.rlk-report-table .rlk-col-job,.rlk-report-table .job{width:38mm}
.rlk-report-table .rlk-col-signature,.rlk-report-table .sign{width:42mm}
.rlk-report-table th:nth-child(1),.rlk-report-table td:nth-child(1){font-size:8pt;text-align:center}
.rlk-report-table td:nth-child(2){font-size:9.5pt}
.rlk-report-table th:nth-child(3),.rlk-report-table td:nth-child(3){font-size:8.25pt}
.rlk-report-table th:nth-child(4),.rlk-report-table td:nth-child(4){font-size:7.5pt;text-align:center}
.rlk-report-table td{height:30mm}
.rlk-report-table .qr-code{width:24mm;height:24mm}
@media(max-width:780px){.grid.two,.grid.three,.grid.four,.filters{grid-template-columns:1fr}
.topbar{align-items:flex-start}
.topbar nav{flex-wrap:wrap;justify-content:flex-end}
.user-name{display:none}
.page-head{flex-direction:column}
.visit-card{grid-template-columns:70px 1fr}
.visit-card .actions{grid-column:1/-1}
.container{margin-top:16px}
}
@media print{body{background:#fff}
.report-toolbar,.no-print{display:none!important}
.report-sheet{width:auto;min-height:0;margin:0;padding:0}
.report-table{font-size:9pt}
.report-table thead{display:table-header-group}
.report-table tr{page-break-inside:avoid}
.signatory{page-break-inside:avoid}
.qr-code{filter:contrast(200%)}
@page{size:A4 portrait;margin:12mm 10mm}
}
.invalid-date{color:#b42318;font-weight:700}
