/* /portal/portal.css */

:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;
  --accent:#0b5cff;
  --accent2:#0848c9;
  --radius:14px;
  --shadow: 0 10px 30px rgba(15,23,42,.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--bg);
  color:var(--text);
}

/* Topbar */
.topbar{
  position:sticky; top:0;
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  z-index:10;
}
.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.logo{ height:34px; width:auto; }
.t1{ font-weight:900; line-height:1.1; }
.t2{ font-size:12px; color:var(--muted); }
.right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* Layout */
.wrap{
  max-width:1100px;
  margin:18px auto;
  padding:0 16px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}

h1{ margin:0 0 6px; font-size:20px; letter-spacing:-.2px; }
h2{ margin:0 0 10px; font-size:16px; letter-spacing:-.2px; }

.muted{
  margin:0 0 12px;
  color:var(--muted);
  font-size:13px;
}

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:860px){ .grid2{ grid-template-columns:1fr; } }

input, select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  outline:none;
}
input:focus, select:focus{
  border-color: rgba(11,92,255,.45);
  box-shadow: 0 0 0 4px rgba(11,92,255,.08);
}

.actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

.btn{
  border:1px solid var(--line);
  padding:10px 14px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
  background:#fff;
  color:var(--text);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn.primary:hover{ background:var(--accent2); border-color:var(--accent2); }
.btn.ghost:hover{ transform:translateY(-1px); }

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:12px;
  color:var(--muted);
  background:#fff;
}
.pill strong{ color:var(--text); }

.msg{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
  white-space:pre-line;
}

/* List + items */
.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.assItem{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.assItem.clickable{ cursor:pointer; }
.assItem.clickable:hover{ transform:translateY(-1px); }

.assTitle{
  font-weight:900;
  font-size:14px;
  line-height:1.2;
  margin:0 0 6px;
}
.assMeta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  font-size:12px;
  color:var(--muted);
}
.kv b{ color:var(--text); font-weight:900; }

/* Badges */
.badge{
  font-size:11px;
  border:1px solid var(--line);
  color:var(--muted);
  padding:2px 8px;
  border-radius:999px;
  white-space:nowrap;
  background:#fff;
}
.badge.strong{ border-color: rgba(16,185,129,.35); color:#065f46; background: rgba(16,185,129,.08); }
.badge.medium{ border-color: rgba(245,158,11,.35); color:#92400e; background: rgba(245,158,11,.08); }
.badge.weak{ border-color: rgba(239,68,68,.35); color:#7f1d1d; background: rgba(239,68,68,.08); }

/* Skeleton */
.skeleton{
  height:12px;
  border-radius:999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f6f8fb 50%, #eef2f7 100%);
  background-size:200% 100%;
  animation: sk 1.2s infinite linear;
}
@keyframes sk { 0%{background-position:0% 0} 100%{background-position:200% 0} }

/* Detail page */
.sectionTitle{
  font-weight:900;
  font-size:14px;
  margin:0 0 8px;
}

.answersBox{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.answerRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.answerLeft{ min-width:0; flex:1; }
.answerKey{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
.answerKey code{
  background:#f1f5f9;
  padding:2px 6px;
  border-radius:8px;
  border:1px solid #e2e8f0;
  color:#0f172a;
}
.answerText{
  font-size:13px;
  color:var(--text);
  font-weight:800;
  line-height:1.35;
}
.answerRight{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  flex-shrink:0;
}
.valuePill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:900;
  font-size:12px;
  color:var(--text);
}

/* Tasks list cards */
.taskCard{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.taskTitle{
  font-weight:900;
  font-size:13px;
  margin:0 0 6px;
}
.taskMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  font-size:12px;
  color:var(--muted);
}
