/* CPH Portal – mobile first, high contrast, big targets (SCREENS-PHONE.md §2) */
:root { --red:#B8282D; --logo:#ED1B24; --text:#222; --muted:#4a4a4a; --line:#767676; --bg:#fff; --soft:#f3f3f3;
  --green:#0b6b2b; --amber:#8a5300; --amberbg:#fff3d6; --redbg:#fde8e8; --greenbg:#e5f4ea; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color:var(--text); background:var(--bg); }
body.phone { padding-bottom: 96px; }
a { color: #8f1d22; }
h1 { font-size: 1.5rem; margin: .4em 0; } h2 { font-size: 1.2rem; margin: 1em 0 .4em; }
.topbar { position: sticky; top: 0; z-index: 5; display:flex; align-items:center; gap:10px; background:var(--red); color:#fff; min-height:56px; padding: env(safe-area-inset-top) 12px 0; }
.topbar .logo { height: 30px; }
.topbar .apptitle { font-weight: 700; font-size: 1.05rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back { color:#fff; font-weight:700; text-decoration:none; padding:12px 8px 12px 0; }
.topbar .signout button { background: transparent; color:#fff; border:2px solid #fff; border-radius:8px; padding:8px 10px; font-size:.9rem; font-weight:700; }
body.phone .topbar .signout { display:none; }
.topbar .bell { position:relative; color:#fff; text-decoration:none; font-size:1.3rem; padding:10px 6px; min-width:44px; text-align:center; }
.topbar .bell-n { position:absolute; top:2px; right:0; background:#fff; color:var(--red); border-radius:999px; font-size:.75rem; font-weight:700; padding:1px 6px; }
.notice.unread { border-left: 6px solid var(--red); padding-left: 10px; }
.page { padding: 12px; max-width: 640px; margin: 0 auto; }
.desk-page { padding: 16px; max-width: 1200px; margin: 0 auto; }
.card { border: 2px solid #c8c8c8; border-radius: 12px; padding: 14px; margin: 12px 0; background:#fff; }
.card.link { display:block; text-decoration:none; color:inherit; }
.card-red { border-color: var(--red); background: var(--redbg); }
.card-head { font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; color: var(--muted); }
.card.narrow { max-width: 420px; margin: 24px auto; }
.big { font-size: 1.2rem; font-weight: 700; margin: .3em 0; }
.sub { display:block; color: var(--muted); font-size: .95rem; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.warn { color: var(--amber); font-weight: 700; }
.biglogo { display:block; margin: 0 auto 8px; max-width: 160px; }
label { display:block; font-weight: 700; margin: 12px 0 6px; }
input, textarea, select { width:100%; font: inherit; padding: 14px 12px; border: 2px solid var(--line); border-radius: 10px; background:#fff; color: var(--text); min-height: 56px; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 3px solid #1a55c4; outline-offset: 2px; }
input[type=range] { padding: 0; min-height: 44px; }
.btn { display:flex; align-items:center; justify-content:center; width:100%; min-height:60px; margin: 10px 0; padding: 12px; border: 2px solid var(--text); border-radius: 12px; background:#fff; color: var(--text); font: inherit; font-weight: 700; text-decoration:none; cursor:pointer; }
.btn.primary { background: var(--red); border-color: var(--red); color:#fff; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.small { width:auto; min-height:44px; display:inline-flex; padding: 6px 12px; margin: 6px 0; }
.btn[disabled] { opacity: .6; }
.flash { padding: 12px; border-radius: 10px; margin: 10px 0; font-weight: 700; }
.flash.ok { background: var(--greenbg); color: var(--green); border: 2px solid var(--green); }
.flash.err { background: var(--redbg); color: #8f1d22; border: 2px solid var(--red); }
.badge { display:inline-block; padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 2px solid currentColor; vertical-align: middle; }
.badge.green { color: var(--green); background: var(--greenbg); }
.badge.amber { color: var(--amber); background: var(--amberbg); }
.badge.red { color: #fff; background: var(--red); border-color: var(--red); }
.badge.grey, .badge.outline { color: var(--muted); background: #fff; }
.list { list-style:none; padding:0; margin: 8px 0; }
.list li { border-bottom: 2px solid #e2e2e2; }
.list li a { display:block; padding: 14px 4px; min-height: 56px; text-decoration:none; color: inherit; }
.list li.muted { padding: 14px 4px; }
.tabbar { position: fixed; left:0; right:0; bottom:0; z-index: 6; display:flex; background:#fff; border-top: 2px solid #c8c8c8; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex:1; display:flex; align-items:center; justify-content:center; min-height: 64px; font-weight:700; text-decoration:none; color: var(--text); }
.tabbar a.on { color: var(--red); box-shadow: inset 0 4px 0 var(--red); }
.queue-strip { position: fixed; left:0; right:0; bottom: 66px; z-index: 6; display:block; background: var(--amberbg); color: var(--amber); border-top: 2px solid var(--amber); padding: 12px; font-weight: 700; text-decoration:none; }
.install-banner { display:flex; align-items:center; gap: 10px; justify-content: space-between; background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.hello { margin-top: 10px; }
/* Walk-round */
fieldset.group { border: 0; padding: 0; margin: 18px 0; }
fieldset.group legend { font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: .9rem; color: var(--muted); padding: 0; margin-bottom: 4px; }
.item { border-bottom: 2px solid #e2e2e2; padding: 10px 0; scroll-margin: 72px 0 100px; }
.item.has-err { border-left: 6px solid var(--red); padding-left: 8px; }
.item-text { font-weight: 600; margin-bottom: 8px; }
.open-defect { background: var(--amberbg); color: var(--amber); border-radius: 8px; padding: 6px 8px; font-size: .95rem; font-weight: 700; margin: 4px 0 8px; }
.pfn, .sev { display:flex; gap: 8px; }
.pfn-btn, .sev-btn { flex:1; margin:0; }
.pfn-btn input, .sev-btn input { position:absolute; opacity:0; width:1px; height:1px; }
.pfn-btn span, .sev-btn span { display:flex; align-items:center; justify-content:center; text-align:center; min-height: 62px; border: 2px solid var(--line); border-radius: 12px; font-weight: 800; background:#fff; padding: 4px; }
.pfn-btn input:focus-visible + span, .sev-btn input:focus-visible + span { outline: 3px solid #1a55c4; }
.pfn-btn.pass input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.pfn-btn.pass input:checked + span::before { content: "✓ "; }
.pfn-btn.defect input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.pfn-btn.defect input:checked + span::before { content: "! "; }
.pfn-btn.na input:checked + span { background: #444; border-color: #444; color: #fff; }
.sev-btn.minor input:checked + span { background: var(--amberbg); border-color: var(--amber); color: var(--amber); }
.sev-btn.vor input:checked + span { background: var(--red); border-color: var(--red); color:#fff; }
.defect-card { background: var(--soft); border-radius: 12px; padding: 4px 12px 12px; margin-top: 10px; }
.field-err { color: #8f1d22; font-weight: 700; margin: 6px 0 0; }
.photo-row { display:flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-row .photo-add { width: auto; padding: 12px 18px; margin: 0; }
.thumb { display:flex; flex-direction: column; align-items:center; }
.thumb img, .thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 2px solid #c8c8c8; }
.thumbs { display:flex; flex-wrap: wrap; gap: 8px; }
.declaration { background: var(--soft); padding: 10px; border-radius: 10px; }
.result { text-align:center; border-radius: 14px; padding: 18px; margin: 12px 0; }
.result.green { background: var(--greenbg); color: var(--green); }
.result.amber { background: var(--amberbg); color: var(--amber); }
.result.red { background: var(--redbg); color: #8f1d22; }
.result .symbol { font-size: 3rem; font-weight: 900; line-height: 1; }
/* Desk (manager) */
.desknav { display:flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.desknav a { padding: 10px 14px; border: 2px solid #c8c8c8; border-radius: 10px; text-decoration:none; color: var(--text); font-weight:700; }
.desknav a.on { border-color: var(--red); color: var(--red); }
.depot-filter { display:flex; align-items:center; gap: 10px; max-width: 360px; }
.depot-filter label { margin: 0; } .depot-filter select { min-height: 44px; padding: 8px; }
.stats { display:flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.stat { border: 2px solid #c8c8c8; border-radius: 12px; padding: 10px 16px; text-decoration:none; color: inherit; font-weight: 700; }
.stat .n { font-size: 1.6rem; display:block; }
.stat.red { border-color: var(--red); color: var(--red); }
.tbl { width:100%; border-collapse: collapse; margin: 8px 0 20px; }
.tbl th, .tbl td { text-align:left; padding: 10px 8px; border-bottom: 1px solid #d0d0d0; vertical-align: top; }
.tbl th { background: var(--soft); font-size: .9rem; }
.rectify textarea { min-height: 90px; }
body.desk .btn { max-width: 360px; }
@media (max-width: 760px) { .tbl thead { display:none; } .tbl tr { display:block; border-bottom: 2px solid #ccc; padding: 6px 0; } .tbl td { display:block; border: 0; padding: 3px 4px; } }
[hidden] { display: none !important; }
fieldset.group .all-ok { float: right; min-height: 48px; margin: -6px 0 6px 8px; }
.card.warn { border-left: 6px solid var(--amber); color: inherit; font-weight: normal; }
