* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, sans-serif; color: #1c2430; background: #f4f6f9; }
.muted { color: #7a8699; }
.error, .note.bad { color: #b00020; }
.note.good { color: #0a7d33; }

/* login */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-card { background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.08); width: 320px; }
.login-card h1 { margin: 0 0 4px; font-size: 20px; }
.login-card input { width: 100%; padding: 10px; margin: 14px 0; border: 1px solid #ccd3dd; border-radius: 8px; }
.login-card button { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: #2b6cb0; color: #fff; font-weight: 600; cursor: pointer; }

/* topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #1f2a3a; color: #fff; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; }
.filters { display: flex; gap: 10px; align-items: center; }
.filters select { padding: 6px; border-radius: 6px; border: 0; }
.filters a { color: #cfe0f5; text-decoration: none; }

button { cursor: pointer; border-radius: 7px; padding: 8px 12px; border: 1px solid transparent; font-weight: 600; }
button.primary, .primary { background: #2b6cb0; color: #fff; }
button.ghost, .ghost { background: #eef2f7; color: #24313f; border: 1px solid #d6deea; }
button.danger { background: #fdecec; color: #b00020; border: 1px solid #f3c2c2; }
a.ghost { text-decoration: none; display: inline-block; text-align: center; }
button:disabled { opacity: .5; cursor: default; }

.summary { padding: 10px 20px; font-size: 13px; color: #46536a; }
.chip { padding: 2px 8px; border-radius: 20px; background: #e7edf5; margin-right: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; padding: 0 20px 40px; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); display: grid; grid-template-columns: 200px 1fr; overflow: hidden; }
.card.done { opacity: .7; }
.pdfwrap { background: #f0f2f6; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.thumb { width: 100%; height: auto; border: 1px solid #dde3ec; background: #fff; }
.viewlink { font-size: 12px; }

.fields { padding: 12px 14px; }
.fields label { display: block; font-size: 11px; color: #6b7688; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.fields input { width: 100%; padding: 6px 8px; border: 1px solid #d3dae4; border-radius: 6px; font-size: 13px; margin-top: 2px; }
.dategrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.scan { font-weight: 700; }
.nrflag { font-size: 11px; color: #b06a00; background: #fff3e0; padding: 1px 6px; border-radius: 10px; }
.badge.status { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #e7edf5; text-transform: uppercase; }
.note { font-size: 12px; margin: 8px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.s-uploaded { background: #d7f5df !important; color: #0a7d33; }
.s-error { background: #fde0e0 !important; color: #b00020; }
.s-uploading { background: #fff3cd !important; color: #8a6d00; }
.s-approved { background: #dbe9ff !important; color: #1c4f96; }
.s-removed { background: #eee !important; color: #777; }
