:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2e2e2e;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #c8f135;
  --accent-hover: #d4f94d;
  --accent-dim: #9db82a;
  --red: #ff5c5c;
  --blue: #5cb8ff;
  --amber: #f5a623;
  --radius: 14px;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
}
.brand span { color: var(--accent); }

.logout {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.card:hover { border-color: #3e3e3e; }

.card.danger { border-color: #4a2323; background: #1f1414; }
.card.danger:hover { border-color: var(--red); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h1 { font-size: 1.4rem; margin: 0 0 16px; }
h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; }
h3.domain {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 4px;
  color: var(--text-muted);
  font-family: var(--mono);
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

input[type=text],
input[type=password],
input[type=datetime-local],
textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color 0.15s;
}
input[type=text]:focus,
input[type=password]:focus,
input[type=datetime-local]:focus,
textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }

textarea { resize: vertical; font-family: var(--mono); }

.row {
  display: flex;
  gap: 14px;
}
.row label { flex: 1; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.btn.primary { background: var(--accent); color: #0f0f0f; font-weight: 700; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: #555; background: #2e2e2e; }
.btn.danger { background: var(--red); color: #1a0000; font-weight: 700; }
.btn.danger:hover { background: #ff7a7a; }
.btn.small { padding: 6px 12px; font-size: 0.78rem; }
.btn.full { width: 100%; }

.badge {
  font-size: 0.7rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-active { background: rgba(200, 241, 53, 0.12); color: var(--accent); border-color: var(--accent-dim); }

.status-list { margin: 0; padding-left: 18px; font-size: 0.9rem; font-family: var(--mono); }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.hint { color: var(--text-muted); font-size: 0.78rem; margin: 4px 0 10px; }
.error { color: var(--red); font-size: 0.9rem; }

.flash-container { margin-bottom: 16px; }
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.flash-success { background: rgba(200, 241, 53, 0.1); color: var(--accent); border-color: var(--accent-dim); }
.flash-error { background: rgba(255, 92, 92, 0.1); color: var(--red); border-color: #5c2b2b; }

.login-wrap {
  display: flex;
  justify-content: center;
  padding-top: 12vh;
}
.login-card { width: 100%; max-width: 340px; }

@media (max-width: 480px) {
  .row { flex-direction: column; gap: 0; }
  .container { padding: 12px 14px 50px; }
}
