:root{
  --bg:#f4f6fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#667085;
  --border:#e5e7eb;
  --accent:#1d4ed8;
  --accent2:#0b3bb3;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

*{ box-sizing:border-box; }
body{ margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color:var(--text); background:var(--bg); }

.page{ min-height:100vh; display:flex; flex-direction:column; }

.topbar{
  background:#fff;
  border-bottom:1px solid var(--border);
}
.topbar__inner{
  max-width: 1000px;
  margin:0 auto;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand__logo{
  width:36px; height:36px; border-radius:10px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
}
.brand__title{ font-weight:700; }
.brand__subtitle{ font-size:12px; color:var(--muted); }

.topbar__right{ display:flex; align-items:center; gap:10px; }
.chip{
  font-size:12px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  background:#fff;
}
.link{ color:var(--accent); text-decoration:none; }
.link:hover{ text-decoration:underline; }

.content{
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width:100%;
}

.center{
  min-height: calc(100vh - 66px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px 0;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card--auth{ width: 420px; max-width: 100%; }

.card__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.actions{ display:flex; gap:8px; flex-wrap:wrap; }

.h1{ margin:0 0 8px; font-size:24px; }
.h2{ margin:0 0 10px; font-size:18px; }
.h3{ margin:16px 0 8px; font-size:16px; }
.muted{ color:var(--muted); }

.form{ margin-top: 14px; display:flex; flex-direction:column; gap:10px; }
.label{ font-size:13px; font-weight:600; margin-top: 4px; }
input[type="text"], input[type="password"]{
  width:100%;
  padding: 12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  outline:none;
}
input[type="text"]:focus, input[type="password"]:focus{
  border-color: rgba(29,78,216,0.45);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.08);
}

.logout-form { display: inline; margin: 0; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}
.linklike:hover { text-decoration: underline; }

.textarea{
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  padding: 12px 12px;
  outline:none;
  resize: vertical;
}
.textarea:focus{
  border-color: rgba(29,78,216,0.45);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.08);
}

.btn{
  background: var(--accent);
  color:#fff;
  border:0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ background: var(--accent2); }
.btn:disabled{ opacity:0.65; cursor:not-allowed; }

.btn--secondary{
  background:#eef2ff;
  color: var(--accent);
  border:1px solid #dbeafe;
}
.btn--secondary:hover{ background:#e0e7ff; }

.btn--ghost{
  background:#fff;
  color: var(--accent);
  border:1px solid var(--border);
  padding: 10px 12px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}
.btn--ghost:hover{ border-color:#cbd5e1; }

.row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:12px; }
.status{ font-size:13px; }

.layout{ display:flex; flex-direction:column; gap:14px; }

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top: 10px;
}
@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
}

.kv{
  border:1px solid var(--border);
  border-radius:12px;
  padding: 12px;
  background:#fafafa;
}
.k{ font-size:12px; color:var(--muted); margin-bottom:6px; }
.v{ font-size:15px; }

.pre{
  border:1px solid var(--border);
  border-radius:12px;
  padding: 12px;
  background:#fafafa;
  white-space: pre-wrap;
  overflow:auto;
  min-height: 44px;
}

.details summary{ cursor:pointer; color:var(--muted); }