/* Responsive UI + top-right auth */
:root{
  --bg:#0b1020;
  --panel:#101a33;
  --panel2:#0f1730;
  --text:#e9eefc;
  --muted:#b9c6ea;
  --border:rgba(255,255,255,.12);
  --accent:#6ea8fe;
  --accent2:#8bd3ff;
  --danger:#ff6b6b;
  --ok:#58d68d;
  --warn:#ffd166;
  --shadow:0 8px 30px rgba(0,0,0,.35);
  --radius:14px;
}
*{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(1200px 600px at 20% 0%, #182556 0%, var(--bg) 55%);
  color:var(--text);
}
a{color:inherit}
.wrap{max-width:1100px; margin:0 auto; padding:14px}
.topbar{
  position:sticky; top:0; z-index:10;
  background: linear-gradient(180deg, rgba(11,16,32,.92), rgba(11,16,32,.70));
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(8px);
}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; gap:10px}
.brand{display:flex; align-items:center; gap:12px; min-width:0}
.logo{
  width:44px; height:44px; border-radius:12px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#071025; font-weight:800;
  box-shadow: var(--shadow);
  flex:0 0 auto;
}
.brand-text{min-width:0}
.brand-title{font-weight:800; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.brand-sub{color:var(--muted); font-size:.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.auth{display:flex; align-items:center; gap:8px; flex:0 0 auto}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 9px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size:.85rem;
  max-width:42vw;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.card{
  background: linear-gradient(180deg, rgba(16,26,51,.92), rgba(15,23,48,.92));
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
}
.card h1,.card h2,.card h3{margin:.2rem 0 .6rem 0}
.muted{color:var(--muted)}
.small{font-size:.92rem}
.k{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}
.grid{display:grid; grid-template-columns:1fr; gap:12px}
@media (min-width:720px){ .grid{grid-template-columns:1fr 1fr;} }
@media (min-width:980px){ .grid{grid-template-columns:1fr 1fr 1fr;} }
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:end}
.field{display:flex; flex-direction:column; gap:6px; flex:1; min-width:220px}
.field label{font-size:.92rem; color:var(--muted)}
input,select,textarea{
  width:100%;
  background: rgba(255,255,255,.06);
  color: var(--text);
  border:1px solid var(--border);
  border-radius: 12px;
  padding:10px 12px;
  outline:none;
}
textarea{min-height:110px; resize:vertical}
input:focus,select:focus,textarea:focus{border-color: rgba(110,168,254,.6)}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  text-decoration:none;
  padding:10px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(110,168,254,.95), rgba(139,211,255,.85));
  color:#071025;
  border-color: rgba(0,0,0,.08);
  font-weight:700;
}
.btn.danger{background: rgba(255,107,107,.15); border-color: rgba(255,107,107,.35)}
.btn:active{transform: translateY(1px)}
.sep{border:0; border-top:1px solid var(--border); margin:12px 0}
.notice{padding:10px 12px; border-radius:12px; border:1px solid var(--border); background: rgba(255,255,255,.04)}
.table{width:100%; border-collapse:collapse; overflow:hidden; border-radius:12px; border:1px solid var(--border)}
.table th,.table td{padding:10px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.table th{font-size:.92rem; color:var(--muted); background: rgba(255,255,255,.04)}
.table tr:last-child td{border-bottom:none}
.status{
  display:inline-flex; align-items:center; gap:8px;
  padding:5px 10px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-size:.86rem;
}
.status.ok{border-color: rgba(88,214,141,.45); background: rgba(88,214,141,.12)}
.status.warn{border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.12)}
.status.danger{border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.12)}
.footer{padding:18px 14px; opacity:.9}
