:root{
  --bg:#0b0d10;
  --panel:#0f141b;
  --panel2:#0c1118;
  --line:#223047;
  --text:#e8eef7;
  --muted:#a9b4c2;
  --ok:#3ddc84;
  --warn:#ffd166;
  --bad:#ff5c5c;
  --info:#66b3ff;
}

*{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 30% -10%, #172033, transparent 60%),
              radial-gradient(900px 500px at 90% 0%, #111a2b, transparent 55%),
              var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.wrap{
  width:min(560px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

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

.logo{
  width:42px;height:42px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(102,179,255,0.35), rgba(61,220,132,0.22));
  border:1px solid rgba(102,179,255,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing:0.5px;
  user-select:none;
}

h1{
  font-size:18px;
  margin:0;
  line-height:1.1;
}

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

.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(15,20,27,0.65);
  color:var(--muted);
  white-space:nowrap;
}

.pill.ok{ color: var(--ok); border-color: rgba(61,220,132,0.35); }
.pill.warn{ color: var(--warn); border-color: rgba(255,209,102,0.35); }
.pill.bad{ color: var(--bad); border-color: rgba(255,92,92,0.35); }

.panel{
  background: rgba(15,20,27,0.55);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
}

.row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.btn{
  border:1px solid var(--line);
  background: rgba(12,17,24,0.8);
  color:var(--text);
  padding:12px 14px;
  border-radius:14px;
  font-size:15px;
  cursor:pointer;
  transition: transform .05s ease, border-color .15s ease, background .15s ease;
  user-select:none;
}

.btn:active{ transform: translateY(1px); }
.btn.primary{ border-color: rgba(102,179,255,0.4); }
.btn.good{ border-color: rgba(61,220,132,0.4); }
.btn.bad{ border-color: rgba(255,92,92,0.4); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }

.btn.task{
  width:100%;
  text-align:left;
}

.btn.task.active{
  background: rgba(61,220,132,0.18);
  border-color: rgba(61,220,132,0.65);
  color: var(--ok);
}

.hint{
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

.log{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  color:#cfe3ff;
  background: rgba(0,0,0,0.25);
  border:1px dashed rgba(102,179,255,0.25);
  border-radius:12px;
  padding:10px;
  white-space:pre-wrap;
  word-break:break-word;
  min-height:70px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:10px;
}

label{
  font-size:12px;
  color:var(--muted);
}

input,
select,
textarea{
  border:1px solid var(--line);
  background: rgba(12,17,24,0.8);
  color: var(--text);
  padding:12px 12px;
  border-radius:14px;
  font-size:15px;
  outline:none;
  width:100%;
}

textarea{
  min-height:110px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  border-color: rgba(102,179,255,0.55);
}

.small{
  font-size:11px;
  color:var(--muted);
  margin-top:10px;
  text-align:center;
}

.dbgbox{
  margin-top:10px;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,209,102,0.35);
  background: rgba(255,209,102,0.08);
  color: var(--warn);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  white-space:pre-wrap;
  word-break:break-word;
}

.hidden{
  display:none !important;
}
