/* RH Elite Services Site Audit. Brand blues #40678F and #579BDA, house font Roboto
   (bundled, so it works offline). Attention colours as agreed for the reports. */
@font-face { font-family: Roboto; src: url(fonts/Roboto.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --navy: #40678F;
  --navy-deep: #2C4C6E;
  --blue: #579BDA;
  --pale: #F2F7FC;
  --bg: #EEF3F8;
  --ink: #15202B;
  --muted: #5B6875;
  --line: #E1E8F0;
  --red: #B3261E;
  --amber-bg: #F9E9B8;
  --green-bg: #BFE0CE;
  --red-bg: #EDC9C4;
  --radius: 18px;
  --brand: linear-gradient(135deg, #579BDA 0%, #40678F 55%, #2C4C6E 100%);
  --lift: 0 1px 2px rgba(21,32,43,.05), 0 8px 24px rgba(44,76,110,.08);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 100%/1.45 Roboto, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Top bar on inner screens: brand gradient, content scrolls under it */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .5rem;
  padding: calc(var(--top) + .55rem) 1rem .65rem;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(44,76,110,.22);
}
.bar h1 { flex: 1; margin: 0; font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .back, .bar .act, .home-top .act {
  min-width: 44px; min-height: 44px; border: 0; background: none; color: #fff;
  font-size: .98rem; font-weight: 500; padding: 0 .25rem; display: inline-flex; align-items: center; gap: .2rem;
}
.bar .back::before { content: ""; width: .6rem; height: .6rem; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg); margin-right: .25rem; }

/* Home: brand header band with the logo and three counts */
.home-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--top) + .6rem) 1.25rem 1.5rem;
  background: var(--brand); color: #fff;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 12px 32px rgba(44,76,110,.25);
}
.home-hero::after {
  content: ""; position: absolute; right: -6rem; top: -6rem; width: 18rem; height: 18rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); pointer-events: none;
}
.home-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.home-hero .logo { height: 26px; width: auto; display: block; }
.home-hero h1 { margin: 1.1rem 0 .2rem; font-size: 2.1rem; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; position: relative; z-index: 1; }
.home-hero .status-line { color: rgba(255,255,255,.85); margin: 0 0 1.1rem; position: relative; z-index: 1; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; position: relative; z-index: 1; }
.tile {
  border-radius: 16px; padding: .75rem .8rem;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tile b { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.tile span { display: block; font-size: .74rem; color: rgba(255,255,255,.85); margin-top: .15rem; }

main { padding: 1.1rem 1rem calc(7rem + var(--bottom)); max-width: 44rem; margin: 0 auto; }
main.home { padding-top: 1.3rem; }
.list-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 .25rem .7rem; }

.status-line { font-size: .84rem; color: var(--muted); margin: 0 0 1rem; display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: #5ED39A; display: inline-block; box-shadow: 0 0 0 3px rgba(94,211,154,.25); }
.dot.off { background: #C9D1D9; box-shadow: 0 0 0 3px rgba(201,209,217,.25); }

.hero { font-size: 2.2rem; line-height: 1.05; letter-spacing: -.02em; font-weight: 700; margin: .25rem 0 .5rem; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--lift); margin-bottom: 1rem; overflow: hidden; }
.card.pad { padding: 1rem; }

/* Report list: each report its own card, cover photo in a brand ring */
.reports { display: grid; gap: .75rem; }
.report-row {
  display: flex; gap: .9rem; align-items: center; padding: .85rem 1rem; border: 0; width: 100%; text-align: left;
  background: #fff; border-radius: var(--radius); box-shadow: var(--lift);
  transition: transform 120ms ease-out;
}
.report-row:active { transform: scale(.985); }
.report-row .thumb {
  width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; flex: none;
  padding: 3px; background: var(--brand); border: 0;
}
span.thumb.thumb { background: var(--pale); box-shadow: inset 0 0 0 3px #D6E3F0; }
.report-row .meta { flex: 1; min-width: 0; }
.report-row .t { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row .s { font-size: .85rem; color: var(--muted); margin-top: .05rem; }
.chev { width: .55rem; height: .55rem; border-right: 2.5px solid #B4C4D4; border-top: 2.5px solid #B4C4D4; transform: rotate(45deg); flex: none; margin-right: .2rem; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; color: var(--navy); background: var(--pale); margin-top: .35rem; box-shadow: inset 0 0 0 1px #D6E3F0; }
.chip.queued { background: var(--amber-bg); color: var(--ink); box-shadow: none; }
.chip.sent { background: var(--green-bg); color: var(--ink); box-shadow: none; }
.chip.changed { background: var(--red-bg); color: var(--ink); box-shadow: none; }

.empty-state { text-align: center; padding: 2.5rem 1.5rem; background: #fff; border-radius: var(--radius); box-shadow: var(--lift); }
.empty-state .ring { width: 4.5rem; height: 4.5rem; margin: 0 auto 1rem; border-radius: 50%; background: var(--brand); padding: 4px; }
.empty-state .ring::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.empty-state .t { font-weight: 700; margin: 0; font-size: 1.05rem; }
.empty-state .s { color: var(--muted); margin: .3rem 0 0; font-size: .9rem; }

/* Form fields */
label.f { display: block; padding: .7rem 1rem .6rem; border-bottom: 1px solid var(--line); transition: background 120ms ease-out; }
label.f:last-child { border-bottom: 0; }
label.f span { display: block; font-size: .7rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .2rem; }
label.f input, label.f textarea, label.f select {
  width: 100%; border: 0; padding: .2rem 0; background: transparent; font-size: 1.05rem; outline: none; border-radius: 0;
}
label.f input::placeholder, label.f textarea::placeholder { color: #A3AFBB; }
label.f textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
label.f input[type=date] { min-height: 1.9rem; -webkit-appearance: none; appearance: none; }
label.f:focus-within { background: #F7FAFD; box-shadow: inset 4px 0 0 var(--blue); }

/* Cover photo, shown in the circle on the report's front page */
.cover {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem; border: 0; width: 100%; background: #fff; text-align: left;
}
.cover .circle {
  width: 6rem; height: 6rem; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--pale) center/cover no-repeat; color: var(--navy); font-size: .78rem; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--blue), 0 8px 20px rgba(44,76,110,.2);
}
.cover .t { font-weight: 700; color: var(--navy); }
.cover .s { font-size: .85rem; color: var(--muted); }

/* Sections */
h2.sec { font-size: 1.15rem; letter-spacing: -.01em; margin: 1.8rem 0 .6rem; display: flex; align-items: center; gap: .55rem; }
h2.sec::before { content: ""; width: 5px; align-self: stretch; min-height: 1.6rem; border-radius: 3px; background: var(--brand); flex: none; }
h2.sec input { flex: 1; border: 0; background: transparent; font-weight: 700; font-size: 1.15rem; padding: .35rem 0; border-bottom: 2px solid transparent; outline: none; min-width: 0; color: var(--ink); }
h2.sec input:focus { border-bottom-color: var(--blue); }
h2.sec input::placeholder { color: #9AA6B2; font-weight: 600; }

.item-row { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.item-row:last-child { border-bottom: 0; }
.item-row:active { background: var(--pale); }
.item-row .n { width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: .82rem; font-weight: 700; display: grid; place-items: center; flex: none; box-shadow: 0 3px 8px rgba(64,103,143,.3); }
.item-row .body { flex: 1; min-width: 0; }
.item-row .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row .s { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row img { width: 3.2rem; height: 3.2rem; border-radius: 10px; object-fit: cover; flex: none; }
.empty-item { color: var(--muted); font-style: italic; font-weight: 500 !important; }

.row-tools { display: flex; gap: .4rem; justify-content: flex-end; padding: .5rem .6rem; background: #F8FAFD; border-top: 1px solid var(--line); }

/* Buttons */
.btn {
  min-height: 46px; padding: 0 1.25rem; border-radius: 99px; border: 0; font-weight: 700; letter-spacing: .01em;
  background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  box-shadow: 0 6px 16px rgba(64,103,143,.32);
  transition: transform 100ms ease-out, opacity 100ms ease-out;
}
.btn:active { transform: scale(.97); }
.btn.light { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px #CFDCE9; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; }
.btn.danger { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red-bg); }
.btn.small { min-height: 36px; padding: 0 .9rem; font-size: .88rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; box-shadow: none; }
.btns { display: flex; gap: .6rem; flex-wrap: wrap; margin: .6rem 0; }

/* Bottom dock: frosted, primary action on the right */
.dock {
  position: fixed; left: .6rem; right: .6rem; bottom: calc(.6rem + var(--bottom)); z-index: 10;
  padding: .6rem .6rem .6rem 1rem;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(21,32,43,.14), inset 0 0 0 1px rgba(255,255,255,.6);
  display: flex; gap: .6rem; align-items: center;
}
.dock .info { flex: 1; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.dock .btn { flex: none; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .75rem; }
.photo { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--pale); border: 0; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .num { position: absolute; top: .35rem; right: .35rem; width: 1.55rem; height: 1.55rem; border-radius: 50%; background: rgba(21,32,43,.72); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.photo .mk { position: absolute; left: .35rem; bottom: .35rem; background: rgba(179,38,30,.88); color: #fff; font-size: .65rem; font-weight: 700; padding: .08rem .4rem; border-radius: 5px; }
.photo.add { display: grid; place-items: center; color: var(--navy); font-weight: 700; font-size: .9rem; border: 2px dashed #B9CCE0; background: #F8FBFE; }

.note { font-size: .88rem; color: var(--muted); margin: .4rem .2rem 1rem; }
.warn { background: var(--amber-bg); border-radius: 12px; padding: .75rem 1rem; font-size: .92rem; margin-bottom: 1rem; }
.err { background: var(--red-bg); border-radius: 12px; padding: .75rem 1rem; font-size: .92rem; margin-bottom: 1rem; }

/* Full screen layers: photo viewer and mark-up */
.layer { position: fixed; inset: 0; z-index: 50; background: #0D1116; color: #fff; display: flex; flex-direction: column; }
.layer .top, .layer .foot { display: flex; align-items: center; gap: .5rem; padding: calc(var(--top) + .5rem) .75rem .5rem; }
.layer .foot { padding: .5rem .75rem calc(.6rem + var(--bottom)); flex-wrap: wrap; justify-content: center; }
.layer .top .title { flex: 1; text-align: center; font-weight: 700; }
.layer .stage { flex: 1; position: relative; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.layer .stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.layer .stage canvas { position: absolute; touch-action: none; }
.layer .btn { box-shadow: none; }
.layer .btn.light { background: rgba(255,255,255,.12); color: #fff; }
.layer .btn.ghost { color: #fff; }
.layer .btn.on { background: #fff; color: #0D1116; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px #0D1116 inset; }

.busy { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(13,17,22,.45); color: #fff; font-weight: 700; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* Sign in: brand panel with the logo, white sheet with the form */
.login { min-height: 100vh; background: var(--brand); display: flex; flex-direction: column; }
.login-hero { position: relative; overflow: hidden; padding: calc(var(--top) + 3rem) 1.5rem 2.2rem; color: #fff; }
.login-hero::after { content: ""; position: absolute; right: -7rem; top: -5rem; width: 20rem; height: 20rem; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 70%); }
.login-hero .logo { height: 30px; width: auto; display: block; margin-bottom: 2.2rem; position: relative; z-index: 1; }
.login-hero .hero { position: relative; z-index: 1; }
.login-hero p { margin: 0; color: rgba(255,255,255,.88); max-width: 22rem; position: relative; z-index: 1; }
.login-body { flex: 1; background: var(--bg); border-radius: 28px 28px 0 0; padding: 1.6rem 1.25rem calc(2rem + var(--bottom)); }
.login-body form { max-width: 26rem; margin: 0 auto; }
.login-body .btn { margin-top: .4rem; }

@media (min-width: 720px) {
  .home-hero { border-radius: 0 0 36px 36px; }
  .home-hero > * { max-width: 42rem; margin-left: auto; margin-right: auto; }
  .dock { max-width: 42rem; margin: 0 auto; }
}

/* Shared from version 4: icons, the PDF button, the other version of a text */
.ic { width: 1.1em; height: 1.1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:focus-visible, .tool:focus-visible, .side-row:focus-visible, .d-photo:focus-visible, .d-cover:focus-visible { outline: 3px solid rgba(87,155,218,.65); outline-offset: 2px; }
.btn.white { background: #fff; color: var(--navy); box-shadow: 0 6px 16px rgba(21,32,43,.18); }
.bar .saved-text { font-size: .75rem; opacity: .9; max-width: 7.5rem; text-align: right; line-height: 1.2; font-weight: 500; justify-content: flex-end; }

.pdf-ctl { display: flex; align-items: center; gap: .6rem; }
.pdf-btn .ic { width: 1.15rem; height: 1.15rem; }
.pdf-btn[disabled] { background: #DCE6F0; color: var(--navy); opacity: 1; box-shadow: none; cursor: default; }
.pdf-note { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.pdf-note.preparing::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue); margin-right: .45rem; vertical-align: middle; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.dock-pdf .pdf-ctl { flex: 1; flex-direction: row-reverse; }
.dock-pdf .pdf-note { flex: 1; }

.conflict { background: #FFF6DC; border-radius: 12px; padding: .7rem .85rem; margin: .55rem 0 .2rem; box-shadow: inset 0 0 0 1px #F1DFA6; text-transform: none; letter-spacing: 0; }
.conflict-h { font-size: .78rem; font-weight: 700; color: #6B5400; margin-bottom: .25rem; }
.conflict-v { white-space: pre-wrap; font-size: .95rem; color: var(--ink); font-weight: 400; }
.conflict-b { display: flex; gap: .4rem; margin-top: .55rem; flex-wrap: wrap; }

.sig-row { display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; }
.sig-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sig-stage { padding: 1rem; display: block; }
.photo-wait { display: grid; place-items: center; width: 100%; height: 100%; font-size: .72rem; color: var(--muted); text-align: center; padding: .3rem; }
.stage-note { position: absolute; bottom: .75rem; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.62); padding: .4rem .75rem; border-radius: 8px; font-size: .85rem; white-space: nowrap; }

/* Desktop: reports down the left, the open report in the main area */
.desk { display: grid; grid-template-columns: 336px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #F7FAFD; border-right: 1px solid var(--line); min-width: 0; }
.side-top { position: relative; overflow: hidden; background: var(--brand); color: #fff; padding: 1.3rem 1.25rem 1.2rem; }
.side-top::after { content: ""; position: absolute; right: -6rem; top: -7rem; width: 16rem; height: 16rem; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); pointer-events: none; }
.side-top > * { position: relative; z-index: 1; }
.side-top .logo { height: 22px; width: auto; display: block; }
.side-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 1.05rem 0 .95rem; }
.side-search { position: relative; padding: .85rem 1rem .45rem; color: var(--muted); }
.side-search .ic { position: absolute; left: 1.75rem; top: calc(50% + .2rem); transform: translateY(-50%); width: 1rem; height: 1rem; }
.side-search input { width: 100%; border: 1px solid #D3DFEB; background: #fff; border-radius: 12px; padding: .55rem .8rem .55rem 2.25rem; font-size: .95rem; outline: none; }
.side-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(87,155,218,.22); }
.side-list { flex: 1; overflow: auto; padding: .35rem .6rem 1rem; }
.side-row { display: flex; gap: .75rem; align-items: center; padding: .6rem .65rem; border-radius: 14px; color: inherit; text-decoration: none; margin-bottom: .2rem; transition: background 120ms ease-out; }
.side-row:hover { background: #EAF1F8; }
.side-row.on { background: #fff; box-shadow: var(--lift); }
.side-row.on .t { color: var(--navy); }
.side-row .thumb { width: 2.9rem; height: 2.9rem; border-radius: 50%; object-fit: cover; padding: 2px; background: var(--brand); flex: none; }
.side-row span.thumb { background: var(--pale); box-shadow: inset 0 0 0 3px #D6E3F0; padding: 0; }
.side-row .meta { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.side-row .t { font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.side-row .s { font-size: .8rem; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-row .chip { margin-top: .3rem; }
.side-empty { color: var(--muted); font-size: .9rem; padding: .75rem .65rem; margin: 0; }
.side-foot { display: flex; align-items: center; gap: .5rem; padding: .65rem .75rem .65rem 1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.side-foot .sync-line { flex: 1; line-height: 1.3; }

main.pane { height: 100vh; overflow: auto; padding: 0; max-width: none; margin: 0; }
.d-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  padding: 1.7rem max(2.5rem, calc((100% - 68rem) / 2 + 2.5rem)) 1.15rem;
  background: rgba(238,243,248,.86);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgba(21,32,43,.06);
}
.d-head-text { min-width: 0; }
.d-title { font-size: 2.5rem; line-height: 1.05; letter-spacing: -.025em; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sub { color: var(--muted); margin-top: .4rem; font-size: 1rem; }
.d-sync { font-size: .82rem; color: var(--muted); margin-top: .45rem; }
.d-head .pdf-ctl { flex-direction: column; align-items: flex-end; gap: .45rem; flex: none; max-width: 20rem; }
.d-head .pdf-note { text-align: right; line-height: 1.35; }
.d-head .pdf-btn { min-height: 50px; padding: 0 1.5rem; font-size: 1rem; }
.d-body { max-width: 68rem; margin: 0 auto; padding: .75rem 2.5rem 5rem; }
.d-body.narrow { max-width: 40rem; padding-top: 3rem; }
.d-body.narrow .d-title { margin-bottom: 1.25rem; }

.d-details { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; padding: 1.75rem; margin-top: 1rem; overflow: visible; }
.d-cover { display: flex; flex-direction: column; align-items: center; gap: .35rem; border: 0; background: none; padding: .5rem; border-radius: 16px; text-align: center; align-self: start; }
.d-cover .circle {
  width: 10rem; height: 10rem; border-radius: 50%; background: var(--pale) center/cover no-repeat; display: grid; place-items: center; color: var(--navy);
  box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--blue), 0 12px 28px rgba(44,76,110,.22); margin: .7rem 0 .95rem; transition: box-shadow 150ms ease-out;
}
.d-cover .circle .ic { width: 2rem; height: 2rem; }
.d-cover:hover .circle, .d-cover.drop .circle { box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--navy), 0 12px 28px rgba(44,76,110,.28); }
.d-cover-t { font-weight: 700; color: var(--navy); }
.d-cover-s { font-size: .8rem; color: var(--muted); }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.25rem; align-content: start; }
.d-grid .wide { grid-column: 1 / -1; }
.d-grid .sig-row { padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #FBFCFE; }
.df { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.df > span { font-size: .72rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .07em; }
.df input, .df textarea, .df select, .d-notes {
  width: 100%; border: 1px solid #D3DFEB; background: #FBFCFE; border-radius: 10px; padding: .6rem .75rem; font-size: 1rem; outline: none;
  transition: border-color 120ms ease-out, box-shadow 120ms ease-out, background 120ms ease-out;
}
.df input:hover, .df textarea:hover, .df select:hover, .d-notes:hover { border-color: #B9CCE0; }
.df input:focus, .df textarea:focus, .df select:focus, .d-notes:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(87,155,218,.22); }
.df textarea { resize: vertical; line-height: 1.5; min-height: 3.2rem; }
.df input[type=date] { min-height: 2.6rem; }

.d-sec { margin-top: 2.6rem; }
.d-sec-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.d-sec-head::before { content: ""; width: 5px; align-self: stretch; min-height: 1.9rem; border-radius: 3px; background: var(--brand); flex: none; }
.d-sec-title { flex: 1; font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; border: 0; background: transparent; padding: .3rem 0; border-bottom: 2px solid transparent; outline: none; min-width: 0; color: var(--ink); }
.d-sec-title:hover { border-bottom-color: #D3DFEB; }
.d-sec-title:focus { border-bottom-color: var(--blue); }
.d-sec-title::placeholder { color: #9AA6B2; font-weight: 600; }
.d-sec-tools { display: flex; gap: .25rem; }
.tool { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--navy); transition: background 120ms ease-out; }
.tool:hover { background: #E4EDF6; }
.tool:active { transform: scale(.94); }
.tool[disabled] { opacity: .3; cursor: default; background: transparent; transform: none; }
.tool.danger { color: var(--red); }
.tool.danger:hover { background: #F8E6E4; }
.tool .ic { width: 1.15rem; height: 1.15rem; }

.d-item { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 1rem; padding: 1.15rem 1rem 1.2rem 1.25rem; background: #fff; border-radius: 18px; box-shadow: var(--lift); margin-bottom: .8rem; transition: box-shadow 150ms ease-out; }
.d-item:focus-within { box-shadow: 0 0 0 2px rgba(87,155,218,.5), var(--lift); }
.d-item .n { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(64,103,143,.3); margin-top: .2rem; }
.d-item-main { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.d-item-title { font-size: 1.15rem; font-weight: 700; border: 1px solid transparent; border-radius: 10px; padding: .35rem .55rem; margin-left: -.55rem; background: transparent; outline: none; color: var(--ink); letter-spacing: -.01em; transition: border-color 120ms ease-out, box-shadow 120ms ease-out; }
.d-item-title:hover { border-color: #D3DFEB; }
.d-item-title:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(87,155,218,.22); }
.d-item-title::placeholder { color: #9AA6B2; font-weight: 500; }
.d-item-meta { display: flex; gap: .9rem; flex-wrap: wrap; }
.d-item-meta .df { flex: 1 1 13rem; max-width: 20rem; }
.d-item-meta .df.narrow { flex: 0 1 11rem; }
.d-notes { padding: .7rem .85rem; line-height: 1.55; resize: vertical; min-height: 4.8rem; border-radius: 12px; }
.d-photos { display: flex; flex-wrap: wrap; gap: .6rem; padding: .2rem; margin: -.2rem; border-radius: 14px; transition: background 120ms ease-out; }
.d-photos.drop { background: #E4EDF6; outline: 2px dashed var(--blue); outline-offset: 2px; }
.d-photo { position: relative; width: 6.2rem; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; border: 0; padding: 0; background: var(--pale); }
.d-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 200ms ease-out; }
.d-photo:hover img { transform: scale(1.04); }
.d-photo .num { position: absolute; top: .35rem; right: .35rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgba(21,32,43,.72); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.d-photo .mk { position: absolute; left: .35rem; bottom: .35rem; background: rgba(179,38,30,.88); color: #fff; font-size: .62rem; font-weight: 700; padding: .08rem .4rem; border-radius: 5px; }
.d-photo.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: var(--navy); font-weight: 700; font-size: .82rem; border: 2px dashed #B9CCE0; background: #F8FBFE; text-align: center; padding: .4rem; }
.d-photo.add:hover { border-color: var(--blue); background: #F0F6FC; }
.d-photo.add small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.d-photo.add .ic { width: 1.3rem; height: 1.3rem; }
.d-item-tools { display: flex; flex-direction: column; gap: .2rem; }
.d-add { margin-top: .2rem; }
.d-empty { color: var(--muted); font-size: .92rem; margin: .2rem 0 .8rem; }
.d-end { margin-top: 2.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.d-hint { color: var(--muted); font-size: .85rem; margin: 0; max-width: 62ch; line-height: 1.7; }
kbd { font: 600 .76rem/1 Roboto, sans-serif; padding: .2rem .42rem; border-radius: 6px; background: #fff; box-shadow: inset 0 -1px 0 #C9D6E3, 0 0 0 1px #D3DFEB; color: var(--ink); }

.d-welcome { max-width: 34rem; margin: 18vh auto 0; text-align: center; padding: 0 2rem; }
.d-welcome .ring { width: 5.5rem; height: 5.5rem; margin: 0 auto 1.6rem; border-radius: 50%; background: var(--brand); padding: 5px; }
.d-welcome .ring::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--bg); }
.d-welcome h1 { font-size: 2.6rem; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 .8rem; }
.d-welcome p { color: var(--muted); margin: 0 auto 1.6rem; max-width: 30rem; font-size: 1.05rem; }

.layer .sig-stage { max-width: 46rem; width: 100%; margin: 0 auto; }

@media (min-width: 900px) {
  .login { align-items: center; justify-content: center; padding: 2rem; }
  .login-hero { width: 100%; max-width: 28rem; padding: 0 0 2rem; overflow: visible; }
  .login-hero::after { display: none; }
  .login-body { width: 100%; max-width: 28rem; flex: none; border-radius: 24px; padding: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .report-row, .side-row, .tool, .d-photo img, .d-item, .d-cover .circle { transition: none; }
  .pdf-note.preparing::before { animation: none; opacity: 1; }
}
@media (prefers-reduced-transparency: reduce) { .dock { background: #fff; } .tile { background: rgba(255,255,255,.2); } .d-head { background: var(--bg); } }
