/* Signed-in pages: sign-in card, captures list, report view. */
body { background: var(--page); }

/* sign-in: the app's sign-in screen, as a card over the gold mesh */
.signin { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 28px 16px; background: var(--bg); overflow: hidden; }
.signin .card { position: relative; z-index: 1; width: min(100%, 400px); display: flex; flex-direction: column; gap: 12px; }
.signin .logo { align-self: center; width: 277px; margin: -13px 0 18px; }
.signin .fine { text-align: center; font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.signin .fine a { color: var(--muted); }
.signin .note { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }
.field { width: 100%; height: 52px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-family: inherit; font-size: 17px; font-weight: 400; padding: 0 14px; }
.field.code { letter-spacing: 8px; font-size: 24px; text-align: center; }
.msg { min-height: 20px; font-size: 14px; text-align: center; color: var(--bad); }
.msg.ok { color: var(--muted); }
.home { text-align: center; font-size: 14px; color: var(--muted); }

/* signed-in header: the stacked logo and the account */
.bar { background: var(--page); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bar .wrap { display: flex; align-items: center; gap: 12px; height: 68px; }
.bar .who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .bar .who span { display: none; } .bar .lock i { font-size: 9.5px; letter-spacing: 1.1px; } }

main.page { padding: 26px 0 60px; }
.title { font-size: 34px; font-weight: 800; letter-spacing: -.6px; margin: 4px 0 18px; }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }

/* captures list: the app's capture cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cap { display: flex; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line2); border-radius: 14px; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.cap:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,29,78,.09); }
.cap .thumb { width: 84px; height: 84px; border-radius: 10px; background: var(--surface2); flex: none; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 30px; }
.cap .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cap b { display: block; font-size: 16px; line-height: 1.3; }
.cap .city { font-size: 14px; font-weight: 600; }
.cap .meta { font-size: 13px; }
.cap .sub { font-size: 12.5px; color: var(--muted); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.chip.in { background: var(--in); } .chip.out { background: var(--out); }
.empty { background: var(--surface); border: 1px dashed var(--line2); border-radius: 14px; padding: 34px; text-align: center; color: var(--muted); }

/* report */
.phasebar { color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px; padding: 5px 0; }
.phasebar.in { background: var(--in); } .phasebar.out { background: var(--out); }
.rhead { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.rhead h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.rhead .city { font-size: 17px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.panel h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 22px; margin: 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.surfaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .surfaces { grid-template-columns: repeat(2, 1fr); } }
.surf { margin: 0; }
.surf .ph { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.surf .ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; touch-action: pan-y; }
.surf .none { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.surf figcaption { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 5px; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.sev-minor { background: var(--minor); } .sev-moderate { background: var(--moderate); } .sev-major { background: var(--major); }
table.dmg { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.dmg th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.dmg td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.dmg td.num, table.dmg th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dmg .dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; }
table.dmg tfoot td { font-weight: 800; border-bottom: 0; }
.tag { white-space: nowrap; display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 12px; border: 1px solid var(--line2); color: var(--muted); }
.tag.new { border-color: var(--moderate); color: var(--moderate); }
table.dmg .show-s { display: none; }
@media (max-width: 640px) { table.dmg .hide-s { display: none; } table.dmg .show-s { display: block; margin-top: 4px; } }

/* video with its own controls, so a two-finger pinch on it zooms instead of being caught by the browser's player */
.vid { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.vid video { width: 100%; max-height: 70vh; display: block; touch-action: pan-y; }
.vid .ctl span { white-space: nowrap; }
.vid .ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.vid button { appearance: none; border: 0; background: rgba(255,255,255,.18); color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.vid input[type=range] { flex: 1; accent-color: #F5C300; }
.vid .big { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; background: rgba(0,0,0,.5); }
.jumps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.jumps button { appearance: none; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); border-radius: 16px; font-family: inherit; font-size: 13px; font-weight: 600; padding: 5px 11px; cursor: pointer; }

/* pinch-to-zoom: the photo or video lifts over the page while two fingers are down, then springs back */
.lift-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 50; pointer-events: none; transition: background .2s ease; }
.lift { position: fixed; z-index: 51; pointer-events: none; transform-origin: 0 0; will-change: transform; border-radius: 10px; overflow: hidden; }
.lift img, .lift video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* a click on a computer opens the photo full size */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox .cap2 { position: fixed; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; font-size: 14px; }

@media print {
  body { background: #fff; }
  .bar, .noprint, .vid .ctl, .vid .big, .jumps { display: none !important; }
  .panel { break-inside: avoid; border-color: #ccc; }
  .vid { display: none; }
  .print-only { display: block !important; }
  main.page { padding: 0; }
}
.print-only { display: none; }
