:root{font:16px/1.55 "Segoe UI","Microsoft JhengHei",sans-serif;color:#182c29;background:#eef3f1;--green:#075e4b;--line:#d4e1dc;--muted:#506762}
*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}
.top{background:#102f29;color:#fff}.bar,main{max-width:1120px;margin:auto;padding:0 24px}
.bar{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:flex;align-items:center;gap:12px}.brand strong,.brand small{display:block}.brand small{color:#b9d1c9}.mark{background:#d4f2e2;color:#104239;border-radius:10px;padding:6px 11px;font-size:22px;font-weight:750}
nav{display:flex;gap:6px}nav button{background:transparent;border-color:transparent;color:#d9eee7}nav [aria-pressed=true]{background:#d4f2e2;color:#123d33}
main{padding-bottom:45px}.hero{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:30px 0 20px}
h1,h2,p{margin:0}h1{font-size:clamp(1.8rem,5vw,2.45rem);letter-spacing:.025em}h2{font-size:1.18rem}.hero p,small{color:var(--muted);font-size:.88rem}
.card{padding:18px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 2px 8px #163e3010}
.date-card,.report-controls{display:flex;gap:14px 22px;flex-wrap:wrap;align-items:end}.date-card label{flex:1 1 200px}.returned{width:100%;color:#96351d}
.section-title,.entry-head,.dialog-head,.sheet-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-title{margin:22px 0 10px}
.entry{margin-bottom:10px}.entry-head{margin-bottom:12px}.grid,.photos{display:grid;gap:12px}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.photos{grid-template-columns:repeat(2,minmax(0,1fr))}
label{display:grid;gap:5px;font-weight:650;font-size:.9rem;min-width:0}input,textarea{width:100%;padding:8px 10px;font:inherit;font-size:1rem;border:1px solid #a9bfb6;border-radius:8px;background:#fff;color:inherit}textarea{resize:vertical}
button{font:inherit;font-weight:650;font-size:.9rem;cursor:pointer;min-height:42px;padding:7px 12px;border:1px solid #a9bfb6;border-radius:8px;background:#fff;color:#17463b}
button:hover:not(:disabled){box-shadow:inset 0 0 0 2px #61a28f55}button:disabled{cursor:default;opacity:.48}button.primary{background:var(--green);border-color:var(--green);color:#fff}:focus-visible{outline:3px solid #208f75;outline-offset:2px}
.actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}.date-card+.actions,form>.actions{margin-top:16px}
.pill{padding:5px 10px;border-radius:999px;background:#dcebe5;font-size:.88rem;font-weight:650;white-space:nowrap}.pill:empty{display:none}
.photo img,.detail-image{display:block;max-width:100%;max-height:210px;border-radius:8px;margin:8px 0;object-fit:contain}.photo input{font-size:.86rem}
#notice:not(:empty){background:#d9eee4;padding:10px 14px;margin-top:16px;border-radius:8px}#notice.error{background:#ffe4d7;color:#6d2818}
.report-controls{justify-content:space-between}.sheet{margin-top:16px}.sheet h2,.sheet>p{text-align:center}.sheet>p{margin:5px 0 16px}
.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:695px;font-size:.88rem}th,td{border:1px solid #a9bfb6;padding:7px;vertical-align:top;overflow-wrap:anywhere;white-space:pre-wrap}th{background:#e3eee8;text-align:left}th:first-child,th:last-child{width:100px}th:nth-child(6){width:57px}td button{padding:4px 7px;min-height:32px;font-size:.85rem}td.empty{color:var(--muted)}.sheet-footer{margin-top:14px;flex-wrap:wrap}
dialog{width:min(730px,calc(100% - 24px));max-height:90vh;border:1px solid var(--line);border-radius:14px;padding:20px;color:inherit}dialog::backdrop{background:#0b2721a8}.dialog-head{margin-bottom:12px}dialog p,dialog label,dialog .actions{margin:8px 0}.history-list{padding-left:20px}.history-list li{margin:8px 0}.history-list button{margin-left:6px}
.identity{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.voice{margin-top:14px;display:grid;gap:10px}.voice p{font-size:.9rem;color:var(--muted)}
.voice button{min-height:54px;font-size:1.1rem}.voice #voice-mic{min-height:64px}
.voice-missing{border:2px solid #b45a22;background:#fff8e8}
#login,#supervisor-access{max-width:460px}#login label,#create-employee label,#supervisor-login label{margin:12px 0}.account-admin{margin-top:16px}.account-admin summary{cursor:pointer;font-weight:650}
select{padding:9px;font:inherit;border:1px solid #a9bfb6;border-radius:8px;background:white;color:inherit}
@media(max-width:640px){.bar,main{padding-left:14px;padding-right:14px}.brand{gap:7px}.brand small{font-size:.78rem}.bar button{padding:7px}.grid,.photos{grid-template-columns:repeat(2,minmax(0,1fr))}.grid label:last-child{grid-column:1/-1}.photos{grid-template-columns:1fr}.hero{align-items:flex-start}}
@page{size:A4 portrait;margin:10mm}
.print-probe{position:absolute;visibility:hidden;pointer-events:none;top:0;left:0;width:190mm;margin:0;padding:0;border:0}
.print-probe .table-wrap{overflow:visible}.print-probe .screen-only{display:none}
.print-probe table{min-width:0;font-size:9pt}.print-probe th,.print-probe td{padding:4px}
.print-probe th:first-child,.print-probe th:last-child{width:17mm}.print-probe th:nth-child(6){width:12mm}
.print-probe .sheet-footer{font-size:10pt}
@media print{
  html,body{background:#fff;color:#000}body>*:not(main),main>*:not(#supervisor-panel),#supervisor-panel>*:not(.sheet),.screen-only{display:none!important}
  main{max-width:none;padding:0}.sheet{margin:0;padding:0;border:0;box-shadow:none;border-radius:0;width:190mm;zoom:var(--print-scale,1)}
  .table-wrap{overflow:visible}table{min-width:0;font-size:9pt}th,td{border-color:#444;padding:4px}th:first-child,th:last-child{width:17mm}th:nth-child(6){width:12mm}
  tr{break-inside:avoid}th{background:#eee}.sheet-footer{font-size:10pt}
}
