:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #111827; background: #f3f6fa; }
.loading-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 15px; background: rgba(7, 24, 48, .58); }
.loading-card { width: min(100%, 420px); padding: 28px 24px 22px; border-radius: 14px; background: #fff; box-shadow: 0 24px 80px rgba(0, 20, 55, .34); text-align: center; }
.loading-card p { margin: 16px 0 20px; color: #102443; font-size: 21px; font-weight: 800; line-height: 1.35; }
.loading-card a { color: #0756af; font-size: 14px; }
.section-gap { grid-column: 1 / -1; height: 16px; background: #fff; border-bottom: 1px solid #d9dee6; }
.muted-head { background: #f1f2f4; color: #9198a1; }
.muted-cell .muted-value { display: block; width: 100%; height: 44px; border: 1px solid #eceef1; border-radius: 5px; background: #f5f6f7; }
@media (max-width: 430px) { .muted-cell .muted-value { height: 40px; } }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(#fff, #f4f7fb); }
.report-app { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 10px 10px 28px; background: #fff; }
.report-header { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 12px; color: #082e6e; }
.report-header img { width: 45px; height: 45px; object-fit: contain; }
.report-header h1 { margin: 0; font-size: clamp(28px, 7vw, 45px); line-height: 1.05; text-align: center; white-space: nowrap; }
.report-meta { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(290px, 1.2fr); gap: 10px 14px; margin: 4px 6px 12px; }
.date-field, .guard-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 18px; }
.date-field input, .guard-field select, .remarks-field textarea { width: 100%; border: 1px solid #b7bdc7; border-radius: 6px; background: #fff; color: #111; font: inherit; }
.date-field input { min-width: 0; min-height: 48px; padding: 8px 10px; }
.guard-field select { min-height: 48px; padding: 8px 42px 8px 12px; }
.report-grid { display: grid; grid-template-columns: minmax(94px, 1.12fr) repeat(3, minmax(60px, .9fr)); border-top: 1px solid #d9dee6; border-left: 1px solid #d9dee6; }
.grid-head, .item-cell, .value-cell { min-width: 0; border-right: 1px solid #d9dee6; border-bottom: 1px solid #d9dee6; }
.grid-head { display: flex; min-height: 56px; align-items: center; justify-content: center; padding: 6px 3px; text-align: center; font-size: clamp(11px, 3.1vw, 18px); font-weight: 800; line-height: 1.05; }
.item-head { background: #f7f7f7; }.collected-head { background: #dcf7df; }.issue-head { background: #fff7d7; }.stock-head { background: #e5f0ff; }
.item-cell { display: flex; align-items: center; padding: 8px; font-size: clamp(13px, 3.7vw, 19px); line-height: 1.12; overflow-wrap: anywhere; }
.group-npvh { background: #eaf4ff; }.group-pnd { background: #f1f1f1; }.group-other { background: #e4e4e4; }
.value-cell { display: flex; align-items: center; padding: 5px; background: #fff; }
.value-cell input, .pallet-field input { width: 100%; min-width: 0; height: 44px; border: 1px solid #c8cdd5; border-radius: 5px; background: #fff; color: #050505; text-align: center; font-size: clamp(17px, 4.5vw, 22px); font-weight: 600; font-variant-numeric: tabular-nums; }
.value-cell input.changed, .pallet-field input.changed { border-color: #ecd77e; background: #fff3bd; box-shadow: inset 0 0 12px rgba(248, 205, 45, .12); }
.pallet-field { display: grid; grid-template-columns: auto minmax(64px, 100px); align-items: center; gap: 12px; margin: 14px 6px 10px; font-size: 18px; }
.remarks-field { display: grid; gap: 5px; margin: 0 6px 10px; font-size: 18px; }
.remarks-field textarea { min-height: 88px; padding: 10px 12px; resize: vertical; }
.save-button, .access-card button { width: 100%; min-height: 58px; border: 0; border-radius: 5px; background: linear-gradient(135deg, #083c91, #0062c9); color: #fff; font-size: clamp(17px, 4.6vw, 24px); font-weight: 800; cursor: pointer; }
.save-button { width: calc(100% - 12px); margin: 0 6px; }
.save-button:disabled { opacity: .68; cursor: wait; }
.save-status { margin: 10px 0 0; color: #087328; text-align: center; font-size: 17px; font-weight: 800; }.save-status span { margin-right: 8px; font-size: 24px; }
.notice { margin: 0 6px 10px; padding: 10px 12px; border-radius: 6px; font-weight: 700; }.notice:empty { display: none; }
.notice.success { background: #e2f7e7; color: #086425; }.notice.warning { background: #fff4c8; color: #704e00; }.notice.error, .field-error { color: #a91e1e; }
.field-error { display: block; margin: 4px 0 10px; }
.logout-form { text-align: center; margin-top: 18px; }.logout-form button { border: 0; background: transparent; color: #687386; text-decoration: underline; cursor: pointer; }
.access-card { width: min(calc(100% - 28px), 430px); margin: max(8vh, 36px) auto; padding: 28px; border: 1px solid #dae2ed; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(18, 42, 76, .12); text-align: center; }
.access-card img { width: min(100%, 320px); height: auto; }.access-card h1 { margin: 22px 0 6px; color: #082e6e; }.access-card p { color: #5c6879; }
.access-card label { display: grid; gap: 7px; margin: 14px 0 8px; text-align: left; font-weight: 700; }.access-card input { height: 50px; border: 1px solid #b7bdc7; border-radius: 6px; padding: 8px 12px; font-size: 20px; }
.save-dialog { width: min(calc(100% - 30px), 420px); padding: 28px 24px 22px; border: 0; border-radius: 14px; box-shadow: 0 24px 80px rgba(0, 20, 55, .34); text-align: center; }
.save-dialog::backdrop { background: rgba(7, 24, 48, .58); }
.save-dialog p { margin: 16px 0 20px; color: #102443; font-size: 21px; font-weight: 800; line-height: 1.35; }
.save-dialog-spinner { width: 42px; height: 42px; margin: 0 auto; border: 5px solid #dce8f8; border-top-color: #0756af; border-radius: 50%; animation: save-spin .8s linear infinite; }
.save-dialog-spinner[hidden] { display: none; }
.dialog-ok { min-width: 130px; min-height: 48px; border: 0; border-radius: 6px; background: #0756af; color: #fff; font-size: 19px; font-weight: 800; cursor: pointer; }
@keyframes save-spin { to { transform: rotate(360deg); } }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(17, 96, 206, .28); outline-offset: 1px; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; } input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { margin: 0; appearance: none; }
@media (max-width: 430px) {
  .report-app { padding-inline: 4px; }.report-header img { display: none; }.report-header h1 { font-size: clamp(24px, 7.7vw, 34px); }
  .report-meta { grid-template-columns: 1fr; gap: 7px; margin-inline: 3px; }.date-field, .guard-field { grid-template-columns: 112px 1fr; gap: 7px; font-size: 16px; }.date-field input, .guard-field select { min-height: 43px; padding-left: 8px; font-size: 16px; }
  .item-cell { padding: 6px 5px; }.value-cell { padding: 4px; }.value-cell input { height: 40px; }
  .pallet-field, .remarks-field { margin-inline: 4px; font-size: 16px; }.save-button { width: calc(100% - 8px); margin-inline: 4px; }
}
