:root{
  --bg:#0b0f1a;
  --panel:#121a2b;
  --panel2:#0f1626;
  --text:#e9eefc;
  --muted:#a9b5d6;
  --accent:#4ea1ff;
  --border:rgba(255,255,255,.10);
  --ok:#39d98a;
  --warn:#ffcc66;
  --bad:#ff5c7a;
}
*{ box-sizing:border-box; }
html, body{
  height: 100%;
}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 600px at 20% 0%, rgba(78,161,255,.18), transparent 55%),
              radial-gradient(900px 600px at 100% 10%, rgba(57,217,138,.10), transparent 60%),
              var(--bg);
  color:var(--text);
  line-height:1.45;
  display:flex;
  flex-direction:column;
}
header{
  position:sticky;
  top:0;
  z-index:10;
  background: rgba(11,15,26,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px;
}
.header-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.header-logo{
  height:50px;
  width:auto;
  border-radius:8px;
  flex-shrink:0;
}
h1{
  font-size: 20px;
  margin:0 0 6px 0;
  letter-spacing:.2px;
}
.sub{
  color:var(--muted);
  font-size: 13px;
  margin:0;
}
.topbar{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
label{
  font-size: 12px;
  color: var(--muted);
  display:block;
  margin-bottom:6px;
}
input[type="text"], input[type="email"]{
  background: var(--panel);
  color: var(--text);
  border:1px solid var(--border);
  border-radius: 10px;
  padding:10px 12px;
  width: 180px;
  outline:none;
}
input[type="text"]:focus, input[type="email"]:focus{
  border-color: rgba(78,161,255,.55);
  box-shadow: 0 0 0 3px rgba(78,161,255,.12);
}
button{
  cursor:pointer;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(78,161,255,.22), rgba(78,161,255,.10));
  color:var(--text);
  padding:10px 12px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing:.2px;
}
button.secondary{ background: rgba(255,255,255,.06); }
button.danger{
  background: rgba(255,92,122,.12);
  border-color: rgba(255,92,122,.25);
}
button:active{ transform: translateY(1px); }
.pill{
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  white-space: nowrap;
}
.pill strong{ color: var(--text); }

main{
  flex:1;
  overflow:hidden;
}
main .wrap{
  height:100%;
  padding-top: 14px;
  padding-bottom: 14px;
}
.grid{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 14px;
  align-items:stretch;
  height:100%;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; height:auto; }
  main{ overflow:auto; }
  input[type="text"], input[type="email"]{ width: 100%; }
}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.cardhead{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display:flex;
  justify-content: space-between;
  gap: 10px;
  align-items:center;
  background: rgba(18,26,43,.55);
}
.cardhead h2{
  font-size: 14px;
  margin:0;
  letter-spacing:.2px;
}
.cardhead .hint{
  color: var(--muted);
  font-size: 12px;
}
.cardbody{
  padding: 14px;
  overflow-y:auto;
  flex:1;
  min-height:0;
}

.q{
  padding: 12px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: rgba(15,22,38,.65);
  margin-bottom: 12px;
}
.q:last-child{ margin-bottom: 0; }

.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(78,161,255,.15), rgba(57,217,138,.08));
  border-left:3px solid var(--accent);
  margin-bottom:6px;
}
.section-title{
  margin:0;
  font-size:15px;
  font-weight:800;
  letter-spacing:.3px;
  color:var(--text);
}

.qtop{
  display:flex;
  gap:10px;
  justify-content: space-between;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.qtitle{
  font-weight: 700;
  margin:0;
  font-size: 13px;
}
.qmeta{
  display:flex;
  gap:8px;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.badge{
  padding:4px 8px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  font-size:12px;
  transition: all .2s ease;
}
.rating-status{
  margin-top:8px;
}
.badge.rating-none{
  color:var(--muted);
  border-color:rgba(255,255,255,.12);
  border-style:dashed;
}
.badge.rating-low{
  color:var(--bad);
  border-color:rgba(255,92,122,.3);
  background:rgba(255,92,122,.1);
}
.badge.rating-mid{
  color:var(--warn);
  border-color:rgba(255,204,102,.3);
  background:rgba(255,204,102,.1);
}
.badge.rating-high{
  color:var(--ok);
  border-color:rgba(57,217,138,.3);
  background:rgba(57,217,138,.1);
}
.scale{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  margin: 10px 0 8px 0;
}
.scale .legend{
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}
.radios{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;
}
.radio{
  display:flex;
  align-items:center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}
.radio input{ accent-color: var(--accent); }
.radio span{
  font-size: 12px;
  color: var(--text);
}

textarea{
  width: 100%;
  min-height: 58px;
  resize: vertical;
  background: rgba(18,26,43,.75);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  outline: none;
  font-family: inherit;
  font-size: 13px;
}
textarea:focus{
  border-color: rgba(78,161,255,.55);
  box-shadow: 0 0 0 3px rgba(78,161,255,.12);
}

.req{
  color: var(--warn);
  font-weight: 700;
  margin-left: 6px;
  font-size: 12px;
}

.sidebox{
  overflow-y:auto;
}

.scoreline{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255,255,255,.12);
  font-size: 13px;
}
.scoreline:last-child{ border-bottom:none; }
.scoreline.clickable{ cursor:pointer; border-radius:10px; padding:10px 8px; margin:0 -8px; }
.scoreline.clickable:hover{ background:rgba(78,161,255,.08); }
.scoreline.clickable.section-complete{
  border-left:3px solid var(--ok);
  padding-left:9px;
}
.scoreline.clickable.active{
  background:rgba(78,161,255,.12);
  border-left:3px solid var(--accent);
  padding-left:9px;
}

.bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
  margin-top: 10px;
}
.bar > div{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(78,161,255,.9), rgba(57,217,138,.9));
  border-radius: 999px;
  transition: width .2s ease;
}

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

.error{
  border-color: rgba(255,92,122,.55) !important;
  box-shadow: 0 0 0 3px rgba(255,92,122,.10) !important;
}

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

.recommend{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(57,217,138,.22);
  background: rgba(57,217,138,.08);
  border-radius: 14px;
}
.recommend h3{
  margin:0 0 8px 0;
  font-size: 13px;
  letter-spacing:.2px;
}
.recommend ul{
  margin: 0;
  padding-left: 18px;
}
.recommend li{
  margin: 6px 0;
  color: var(--text);
  font-size: 13px;
}
.tag{
  display:inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
  vertical-align: middle;
}

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:200;
  background:rgba(0,0,0,.75);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.modal-overlay.hidden{ display:none; }
.modal{
  background: linear-gradient(180deg, var(--panel), var(--bg));
  border:1px solid var(--border);
  border-radius:20px;
  padding:36px 32px;
  max-width:520px;
  text-align:center;
  animation: modalIn .3s ease;
}
@keyframes modalIn{
  from{ opacity:0; transform:scale(.95) translateY(10px); }
  to{ opacity:1; transform:scale(1) translateY(0); }
}
.modal-logo{
  height:60px;
  border-radius:10px;
  margin-bottom:16px;
}
.modal h2{
  font-size:18px;
  margin:0 0 14px;
}
.modal p{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
  margin:0 0 12px;
}
.modal-buttons{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top:18px;
}
.modal button{
  padding:12px 32px;
  font-size:15px;
  border-radius:14px;
}