/* public/assets/css/app.css */
:root { --border: #e5e7eb; --muted:#6b7280; --bg:#f7f7f9; --card:#ffffff; --ink:#111827; }
*{ box-sizing:border-box; }
body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:var(--bg); color:var(--ink); }
a{ color:inherit; }
.container{ max-width: 1000px; margin: 0 auto; padding: 16px; }
.narrow{ max-width: 440px; }
.topbar{ display:flex; justify-content:space-between; align-items:center; padding: 14px 16px; background: var(--card); border-bottom:1px solid var(--border); position:sticky; top:0; }
.title{ font-size: 18px; font-weight: 700; }
.card{ background:var(--card); border:1px solid var(--border); border-radius:12px; padding: 14px; margin: 12px 0; }
.grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.row{ display:flex; gap: 10px; align-items:center; margin-top: 5px;}
.loginrow{ display:flex; gap: 10px; justify-content: center; margin-top: 12px;}
.space{ justify-content: space-between; }
.stack{ display:flex; flex-direction:column; gap: 10px; }
.kicker{ font-size: 12px; color: var(--muted); }
.big{ font-size: 18px; font-weight: 600; }
.small{ font-size: 12px; }
.tiny{ font-size: 11px; }
.muted{ color: var(--muted); }
.pill{ border:1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.sep{ color: var(--muted); }
.link{ text-decoration:none; color:#2563eb; }
label{ display:block; font-size: 12px; color: var(--muted); margin-top: 10px; margin-bottom: 6px; }
input, textarea, select{ width:100%; padding: 10px; border:1px solid var(--border); border-radius:10px; font-size: 14px; }
button, .btn{ cursor:pointer; border:1px solid var(--border); background:#111827; color:white; padding:10px 12px; border-radius: 10px; font-size: 14px; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.btn.secondary{ background:white; color:#111827; }
.actions{ display:flex; gap: 10px; margin-top: 12px; }
.task{ display:flex; flex-direction:column; gap:10px; }
.taskHead{ display:flex; justify-content:space-between; gap:10px; }
.badge{ font-size: 11px; border:1px solid var(--border); border-radius:999px; padding: 2px 8px; color:var(--muted); }
.btnGroup{ display:flex; gap: 8px; flex-wrap:wrap; }
.btnMini{ padding: 8px 10px; border-radius: 10px; background:white; color:#111827; }
.btnMini.active{ background:#111827; color:white; }
.item{ padding:10px; border:1px dashed var(--border); border-radius: 12px; }
.pageNav {
  margin-bottom: 12px;
}

.backLink {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.backLink:hover {
  text-decoration: underline;
}
.assignmentsHeader {
  margin-bottom: 14px; /* creates space from the list */
}

.iconBtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iconBtn:hover {
  background: #f3f4f6;
}

.iconBtn:active {
  transform: scale(0.96);
}

/* ---------- Modal (Cameras) ---------- */
.modal{ position:fixed; inset:0; display:none; z-index:2000; }
.modal.open{ display:block; }
.modalOverlay{ position:absolute; inset:0; background:rgba(0,0,0,0.35); }
.modalCard{
  position:relative;
  width:min(1100px, calc(100vw - 24px));
  height:min(80vh, 720px);
  margin: 8vh auto 0;
  background: var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modalHead{ padding:14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.modalBody{ height: calc(100% - 58px); }
.modalOpen{ overflow:hidden; }

.cameraLayout{ display:grid; grid-template-columns: 240px 1fr; height:100%; }
.cameraList{ border-right:1px solid var(--border); padding:10px; overflow:auto; background:#fafafa; }
.cameraBtn{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,0.10);
  background:white;
  cursor:pointer;
  font-weight:700;
  margin-bottom:10px;
}
.cameraBtn.active{ background:#111827; color:white; }
.cameraView{ padding:12px; height:100%; }
.cameraFrame{ height:100%; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:white; display:flex; align-items:center; justify-content:center; padding:10px; }
.cameraFrame iframe{ width:100%; height:100%; border:0; border-radius:12px; display:block; }

.iconBtn{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.iconBtn:hover { background: #f3f4f6; }
.iconBtn:active { transform: scale(0.96); }

@media (max-width: 720px){
  .modalCard{ height: 86vh; margin-top: 6vh; }
  .cameraLayout{ grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cameraList{ border-right:0; border-bottom:1px solid var(--border); display:flex; gap:10px; overflow:auto; }
  .cameraBtn{ white-space:nowrap; margin-bottom:0; }
}
