:root {
  --bg: #04112b; --card: #0a2150; --line: rgba(86,168,255,.22); --text: #e8f0ff; --dim: #8fa8d4;
  --blue: #2a7bff; --green: #1fc98a; --amber: #ffb020; --red: #ff5c6c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: radial-gradient(ellipse 120% 70% at 50% 0%, #0b2f6e 0%, #04112b 55%, #020917 100%) fixed; color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100%; }
#app { max-width: 560px; margin: 0 auto; padding: env(safe-area-inset-top) 14px 90px; }
header { display: flex; align-items: center; gap: 10px; padding: 14px 2px; }
header img { height: 34px; mix-blend-mode: screen; }
header h1 { font-size: 18px; margin: 0; flex: 1; }
header button { background: none; border: 0; color: var(--dim); font-size: 14px; padding: 8px; }
h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 22px 4px 8px; }
h2.late { color: var(--red); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; display: block; }
a.card { color: inherit; text-decoration: none; }
.card:active { transform: scale(.99); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.title { font-weight: 600; }
.sub { color: var(--dim); font-size: 14px; }
.time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; text-align: right; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(86,168,255,.18); }
.badge.IN_PROGRESS { background: rgba(255,176,32,.2); color: var(--amber); }
.badge.COMPLETED { background: rgba(31,201,138,.2); color: var(--green); }
.badge.URGENT { background: rgba(255,92,108,.2); color: var(--red); }
button.primary, a.btn { display: block; width: 100%; text-align: center; border: 0; border-radius: 999px; padding: 15px; font-size: 17px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2a7bff, #1252d6); box-shadow: 0 8px 24px rgba(30,107,255,.4); text-decoration: none; margin-top: 12px; }
button.green { background: linear-gradient(135deg, #1fc98a, #0e9f6a); box-shadow: 0 8px 24px rgba(31,201,138,.35); }
button.ghost, a.btn.ghost { background: rgba(86,168,255,.14); box-shadow: none; color: var(--text); }
button:disabled { opacity: .5; }
input, textarea { width: 100%; background: rgba(2,9,23,.6); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 17px; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--dim); margin: 14px 2px 6px; }
.login { margin-top: 12vh; text-align: center; }
.login img { width: 190px; mix-blend-mode: screen; }
.login form { text-align: left; margin-top: 16px; }
.err { color: var(--red); margin: 10px 2px; min-height: 1.3em; }
.back { display: inline-block; margin: 10px 0; color: var(--blue); text-decoration: none; font-size: 16px; background: none; border: 0; padding: 6px 0; }
.kv { margin: 4px 0; }
.kv b { color: var(--dim); font-weight: 500; display: inline-block; min-width: 82px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.empty { text-align: center; color: var(--dim); padding: 36px 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #123a82; border: 1px solid var(--line); padding: 12px 18px; border-radius: 999px; z-index: 9; }
.pre { white-space: pre-wrap; }
