:root {
  --bg: #0b0f14; --card: #151c26; --text: #f1f5f9; --muted: #94a3b8;
  --accent: #3b82f6; --accent-soft: rgba(59,130,246,.12);
  --border: #243044; --pass: #10b981; --fail: #ef4444;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; }
.main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.page-title { margin: 0 0 .35rem; font-size: 1.65rem; font-weight: 700; }
.page-sub { margin: 0 0 1.5rem; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 .75rem; font-size: 1rem; }
.field-label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.field-hint { font-size: .82rem; color: var(--muted); margin: .35rem 0 0; }
.field-err { color: var(--fail); font-size: .85rem; }
input, select, textarea {
  width: 100%; padding: .6rem .75rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--input-bg, #0f1419); color: var(--text); font: inherit;
}
button {
  border: none; border-radius: 8px; padding: .55rem .9rem; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; cursor: pointer;
}
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--fail); }
button.small { padding: .35rem .6rem; font-size: .78rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
.input-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.input-row input { flex: 1; min-width: 180px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.hidden { display: none !important; }
.badge { display: inline-block; font-size: .72rem; padding: .15rem .45rem; border-radius: 999px; border: 1px solid var(--border); }
.badge.on { color: var(--pass); border-color: rgba(16,185,129,.4); }
.badge.off { color: var(--muted); }
table.responsive { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.responsive th, table.responsive td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.responsive th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
a { color: var(--link-accent, #60a5fa); }
.toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: .65rem .85rem; font-size: .85rem; animation: slideIn .2s ease; }
.toast.err { border-color: rgba(239,68,68,.4); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: grid; place-items: center; padding: 1rem; }
.modal { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  table.responsive thead { display: none; }
  table.responsive tr { display: block; margin-bottom: .75rem; border: 1px solid var(--border); border-radius: 8px; padding: .5rem; }
  table.responsive td { display: block; border: none; padding: .25rem 0; }
  table.responsive td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .7rem; text-transform: uppercase; display: block; }
}
