:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

* { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0; }
.hero { padding: 28px; border-radius: 28px; background: linear-gradient(135deg, #3b5b8c, #5078b3); color: white; box-shadow: 0 24px 60px rgba(59,91,140,.25); }
.eyebrow { margin: 0 0 8px; color: #67e8f9; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.5rem, 3.75vw, 3rem); line-height: 1; }
.subtitle { max-width: 760px; color: #cbd5e1; font-size: 1.1rem; }
.grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; margin-top: 20px; align-items: start; }
.card { background: white; border: 1px solid #e2e8f0; border-radius: 24px; padding: 22px; box-shadow: 0 18px 50px rgba(15,23,42,.08); }
h2 { margin-top: 0; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .9rem; color: #334155; margin-bottom: 14px; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 14px; padding: 12px 13px; font: inherit; background: #fff; }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button { border: none; border-radius: 16px; padding: 12px 16px; font-weight: 800; cursor: pointer; background: #3b5b8c; color: white; margin-bottom: 12px; }
button:hover { background: #2f4a73; }
button.secondary { background: #e2e8f0; color: #0f172a; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.message { min-height: 24px; font-weight: 700; }
.message.ok { color: #047857; }
.message.error { color: #b91c1c; }
.camera-list { display: grid; gap: 14px; }
.camera-item { border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px; background: #f8fafc; }
.camera-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.caid { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 900; color: #0f172a; }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: .75rem; font-weight: 800; background: #dbeafe; color: #1e40af; }
.badge.risk { background: #fee2e2; color: #991b1b; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.meta { color: #475569; font-size: .9rem; line-height: 1.6; }
.preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-top: 8px; border: 1px solid #e2e8f0; }
.link-btn { background: transparent; color: #1e40af; padding: 8px 0; margin-top: 8px; font-weight: 700; text-align: left; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; z-index: 50; }
.overlay.hidden { display: none; }
.overlay-card { width: min(820px, 100%); background: white; border-radius: 24px; padding: 24px; box-shadow: 0 30px 80px rgba(15,23,42,.3); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 12px 0 18px; }
.detail-row { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.detail-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 800; }
.detail-value { color: #0f172a; word-break: break-word; }
.dup-list { padding-left: 18px; }
.dup-list li { margin-bottom: 8px; }
.review-form { margin-top: 12px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.review-actions button { margin-bottom: 0; }
.review-actions button.danger { background: #b91c1c; }
@media (max-width: 850px) { .grid, .row, .detail-grid { grid-template-columns: 1fr; } }
