/* Phase 2 — scan + OTC + interactions (mobile-first) */
:root{
  --bg:#0b1220;
  --card:#111a2e;
  --text:#eef2ff;
  --muted:#aab4d6;
  --line:rgba(255,255,255,.10);
  --primary:#30d5c8;
  --danger:#ff4d88;
  --warn:#ffd700;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(48,213,200,.18), transparent 55%),
              radial-gradient(900px 500px at 80% 20%, rgba(255,77,136,.14), transparent 55%),
              var(--bg);
  color:var(--text);
}

.container{
  width:min(1060px, 92%);
  margin: 18px auto 48px;
  display:grid;
  gap:16px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,.55);
  border-bottom:1px solid var(--line);
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{display:flex; gap:12px; align-items:center}
.brand-mark{
  width:42px; height:42px;
  display:grid; place-items:center;
  background: rgba(48,213,200,.14);
  border:1px solid rgba(48,213,200,.25);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 20px;
}
.brand-name{font-weight:800; letter-spacing:.2px}
.brand-sub{font-size:12px; color:var(--muted); margin-top:2px}

.topbar-actions{display:flex; gap:10px; align-items:center}

.card{
  background: linear-gradient(180deg, rgba(17,26,46,.92), rgba(17,26,46,.74));
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

h1{margin:0 0 10px; font-size: 22px}
h2{margin: 12px 0 8px; font-size: 16px}
p{margin: 8px 0}
.muted{color:var(--muted)}
.small{font-size: 12px}

.field{display:grid; gap:6px; margin: 10px 0}
.field span{font-size: 12px; color: var(--muted)}
input, select, textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline:none;
}
textarea{min-height: 120px; resize: vertical}
input::placeholder, textarea::placeholder{color: rgba(238,242,255,.55)}
select{appearance:none}

.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.grow{flex:1}

.btn{
  padding: 11px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor:pointer;
  font-weight:700;
}
.btn.primary{
  background: rgba(48,213,200,.16);
  border-color: rgba(48,213,200,.35);
}
.btn.danger{
  background: rgba(255,77,136,.14);
  border-color: rgba(255,77,136,.35);
}
.btn:active{transform: translateY(1px)}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field.full{grid-column: 1 / -1}
@media (max-width: 820px){
  .grid-2{grid-template-columns: 1fr}
  .field.full{grid-column: auto}
}

.list{
  display:grid;
  gap:10px;
  margin-top: 10px;
}
.item{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 12px;
}
.item .title{font-weight:800; display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.item .sub{color: var(--muted); font-size: 12px; margin-top: 2px}
.item .meta{color: var(--muted); font-size: 12px; margin-top: 8px}

.badge{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.badge.major{border-color: rgba(255,77,136,.45); background: rgba(255,77,136,.14); color: var(--text)}
.badge.moderate{border-color: rgba(255,215,0,.45); background: rgba(255,215,0,.14); color: var(--text)}
.badge.minor{border-color: rgba(48,213,200,.45); background: rgba(48,213,200,.14); color: var(--text)}

.divider{
  height:1px;
  background: var(--line);
  margin: 14px 0;
}

.note{
  border:1px dashed rgba(48,213,200,.35);
  background: rgba(48,213,200,.08);
  padding: 12px;
  border-radius: 14px;
  color: var(--text);
}

.pill-row{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.pill{
  font-size:12px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}

.footer{
  width:min(1060px, 92%);
  margin: 0 auto 22px;
  padding: 0 2px;
}

.meta{color: var(--muted); font-size: 12px; margin-top: 6px}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.55);
  z-index: 100;
}
.modal[aria-hidden="false"]{display:flex}
.modal-card{
  width:min(980px, 96%);
  background: linear-gradient(180deg, rgba(17,26,46,.96), rgba(17,26,46,.86));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-title{font-weight: 900; font-size: 18px}
.modal-sub{color: var(--muted); font-size: 12px; margin-top: 4px}

.textarea{
  min-height: 140px;
}

/* Progress bar */
.progress{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar{
  height: 100%;
  background: rgba(48,213,200,.65);
  width: 0%;
}
