* { box-sizing: border-box; }
:root { color-scheme: light; }
body { margin:0; font-family: Calibri, 'Segoe UI', Arial, sans-serif; background:#F4F6F1; color:#2A332A; }
.card { background:#fff; border-radius:14px; padding:24px; border:1px solid #E2E8DC; box-shadow:0 2px 10px rgba(31,92,46,0.05); margin-bottom:16px; }
h1,h2,h3 { font-family: Georgia, 'Times New Roman', serif; color:#1F5C2E; margin:0 0 16px; }
h3 { font-size:15px; }
p { line-height:1.5; }
label.field { font-size:12px; color:#4A5A45; display:block; }
label.field > div.lbl { margin-bottom:4px; }
input, select, textarea { width:100%; box-sizing:border-box; padding:9px 10px; border-radius:8px; border:1px solid #CBD5C4; font-size:14px; font-family:inherit; background:#fff; color:#2A332A; }
input:focus, select:focus, textarea:focus { outline:2px solid #1F5C2E; outline-offset:1px; }
input:disabled { background:#F4F6F1; color:#9AA895; }
button { font-family:inherit; cursor:pointer; }
button:disabled { opacity:0.6; cursor:not-allowed; }
.btn-primary { background:#1F5C2E; color:#fff; border:none; border-radius:10px; padding:12px 22px; font-size:15px; font-weight:600; }
.btn-primary:hover:not(:disabled) { background:#174823; }
.btn-ghost { background:transparent; color:#1F5C2E; border:1px solid #1F5C2E; border-radius:10px; padding:8px 16px; font-size:13px; font-weight:600; }
.btn-ghost:hover:not(:disabled) { background:#EEF3EB; }
.btn-danger { border-color:#B3261E; color:#B3261E; }
.btn-danger:hover:not(:disabled) { background:#FBEAE9; }
.btn-sm { padding:6px 12px; font-size:12px; border-radius:8px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.grid6 { display:grid; grid-template-columns:repeat(6,1fr); gap:10px; }
.grid5 { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
header.app-header { background:#1F5C2E; color:#fff; padding:14px 24px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; position:sticky; top:0; z-index:20; }
header.app-header .brand { display:flex; align-items:center; gap:12px; }
header.app-header img.logo { width:36px; height:36px; object-fit:contain; background:#fff; border-radius:8px; padding:2px; }
.user-chip { display:flex; align-items:center; gap:10px; font-size:12px; }
.user-chip .badge-role { background:rgba(255,255,255,0.18); padding:3px 9px; border-radius:20px; font-weight:600; }
.icon-btn { background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.3); color:#fff; border-radius:8px; padding:7px 12px; font-size:12px; font-weight:600; }
.icon-btn:hover { background:rgba(255,255,255,0.22); }
nav.tabs { display:flex; gap:6px; padding:12px 24px 0; flex-wrap:wrap; background:#fff; border-bottom:1px solid #E2E8DC; }
nav.tabs button { padding:9px 16px; border-radius:10px 10px 0 0; border:1px solid #E2E8DC; background:transparent; color:#4A5A45; font-size:13px; }
nav.tabs button.active { background:#F4F6F1; color:#1F5C2E; font-weight:700; border-bottom:2px solid #1F5C2E; }
main.content { padding:24px; max-width:980px; margin:0 auto; }
footer.app-footer { text-align:center; padding:24px 12px 40px; color:#9AA895; font-size:11px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
table th { text-align:left; color:#6B7A66; border-bottom:1px solid #E2E8DC; padding:6px; }
table td { padding:6px; }
.login-wrap { min-height:100vh; background:linear-gradient(160deg,#F4F6F1 0%,#E7EEE3 100%); display:flex; align-items:center; justify-content:center; padding:20px; }
.login-box { background:#fff; border-radius:16px; padding:40px 36px; width:380px; max-width:100%; box-shadow:0 10px 40px rgba(31,92,46,0.15); border:1px solid #E2E8DC; }
.login-box img.logo { width:64px; height:64px; object-fit:contain; display:block; margin:0 auto; }
.err { color:#B3261E; font-size:13px; margin-bottom:10px; background:#FBEAE9; border:1px solid #F3D0CC; border-radius:8px; padding:9px 11px; }
.pwd-wrap { position:relative; }
.pwd-wrap input { padding-right:44px; }
.pwd-toggle { position:absolute; right:4px; top:4px; bottom:4px; width:38px; background:transparent; border:none; color:#6B7A66; font-size:16px; border-radius:6px; }
.pwd-toggle:hover { background:#F4F6F1; }
.checkbox-row { display:flex; align-items:center; gap:8px; font-size:13px; color:#4A5A45; margin-bottom:14px; }
.checkbox-row input[type=checkbox] { width:auto; }
.ruler-row { display:grid; grid-template-columns:40px 1fr 90px 90px; align-items:center; gap:10px; margin-bottom:10px; }
.ruler-track { position:relative; height:14px; border-radius:7px; }
.ruler-marker { position:absolute; top:-3px; width:8px; height:20px; border-radius:4px; background:#1F5C2E; border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,0.3); }
.zero-line { position:absolute; left:50%; top:-2px; bottom:-2px; width:1px; background:#9AA895; }
.gauge-track { position:relative; height:16px; border-radius:8px; background:linear-gradient(to right, #2E7D32 0%, #2E7D32 20%, #1F5C2E 20%, #1F5C2E 30%, #C77B00 30%, #C77B00 50%, #B3261E 50%, #B3261E 75%, #7A0E0E 75%, #7A0E0E 100%); }
.gauge-marker { position:absolute; top:-3px; width:10px; height:22px; border-radius:5px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,0.35); }
.zone-legend { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; font-size:11px; }
.zone-dot { width:9px; height:9px; border-radius:9px; display:inline-block; margin-right:4px; }
.sample-row { display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-radius:10px; border:1px solid #E2E8DC; cursor:pointer; margin-bottom:8px; }
.sample-row:hover { border-color:#1F5C2E; }
.sample-row.active { border-color:#1F5C2E; background:#F4F6F1; }
.badge { font-size:11px; padding:2px 8px; border-radius:20px; color:#fff; }
.badge-active { background:#1F5C2E; }
.badge-disabled { background:#B3261E; }
.badge-expired { background:#C77B00; }
.toast-stack { position:fixed; top:16px; right:16px; display:flex; flex-direction:column; gap:8px; z-index:999; }
.toast { background:#1F5C2E; color:#fff; padding:11px 16px; border-radius:10px; font-size:13px; box-shadow:0 6px 20px rgba(0,0,0,0.2); max-width:320px; }
.toast.error { background:#B3261E; }
.modal-backdrop { position:fixed; inset:0; background:rgba(20,30,20,0.5); display:flex; align-items:center; justify-content:center; z-index:100; padding:16px; }
.modal-box { background:#fff; border-radius:14px; padding:24px; width:420px; max-width:100%; max-height:90vh; overflow:auto; }
.spinner { width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,255,255,0.4); border-top-color:#fff; display:inline-block; animation:spin 0.7s linear infinite; vertical-align:middle; margin-right:8px; }
@keyframes spin { to { transform:rotate(360deg); } }
.install-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#EAF2E6; border:1px solid #CFE2C9; color:#1F5C2E; padding:10px 16px; font-size:13px; }
.muted { color:#6B7A66; }
@media (max-width:700px){ .grid2{grid-template-columns:1fr;} .grid3{grid-template-columns:1fr;} .grid6{grid-template-columns:repeat(3,1fr);} .grid5{grid-template-columns:repeat(3,1fr);} }

textarea { resize:vertical; }
.radio-row { display:flex; gap:18px; font-size:13px; color:#4A5A45; align-items:center; }
.radio-row label { display:flex; align-items:center; gap:6px; cursor:pointer; }
.radio-row input[type=radio] { width:auto; }
#report-print-area { display:none; }
.report-page { background:#fff; padding:36px; }
.report-head { display:flex; align-items:center; gap:16px; border-bottom:3px solid #1F5C2E; padding-bottom:16px; margin-bottom:20px; }
.report-head img { width:56px; height:56px; object-fit:contain; }
.report-head .title { font-family:Georgia,serif; color:#1F5C2E; font-size:22px; margin:0; }
.report-head .subtitle { font-size:12px; color:#6B7A66; margin-top:2px; }
.report-section-title { font-family:Georgia,serif; color:#1F5C2E; font-size:15px; border-bottom:1px solid #D7E0D2; padding-bottom:4px; margin:22px 0 10px; }
.id-table td { padding:5px 8px; font-size:13px; border:1px solid #E2E8DC; }
.id-table td.label { color:#6B7A66; font-weight:600; width:170px; background:#F4F6F1; }
.attention { color:#B3261E; font-weight:600; }
.discussion-text { font-size:13px; line-height:1.65; color:#2A332A; text-align:justify; }
.pending-table td, .pending-table th { border:1px solid #E2E8DC; padding:6px 8px; font-size:12.5px; }
.signature-block { margin-top:46px; text-align:center; font-size:13px; }
.signature-block .line { border-top:1px solid #4A5A45; width:280px; margin:0 auto 6px; }
@media print {
  body * { visibility:hidden; }
  #report-print-area, #report-print-area * { visibility:visible; }
  #report-print-area { display:block !important; position:absolute; left:0; top:0; width:100%; }
  .no-print { display:none !important; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}
