*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f14;
  --surface: #161a24;
  --border: #262c3d;
  --accent: #4f6ef7;
  --accent-hover: #6b84ff;
  --danger: #e05353;
  --success: #3ecf8e;
  --warn: #f5a623;
  --light-warn: #fde047;
  --text: #e2e8f0;
  --muted: #64748b;
  --radius: 10px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 24px;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

header h1 { font-size: 1.4rem; font-weight: 700; }
header span { font-size: 0.8rem; color: var(--muted); }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #1a2240;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card + .card { margin-top: 16px; }

.card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Accordion */
.accordion-header {
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.accordion-header:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.accordion-header:hover .card-title {
  color: var(--text);
  transition: color 0.15s;
}

.accordion-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.accordion-chevron.open { transform: rotate(180deg); }

/* Form elements */
label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 5px;
  margin-top: 12px;
}

label:first-of-type { margin-top: 0; }

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color 0.15s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  transition: background 0.15s, transform 0.1s;
}

button:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  margin-top: 16px;
}

.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  width: 100%;
  margin-top: 8px;
}

.btn-danger:hover { background: #f06464; }
.btn-danger:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

.btn-secondary {
  background: var(--border);
  color: var(--text);
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn-secondary:hover { background: #313a55; }

/* Status indicator */
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.dot.active { background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse 1.5s infinite; }
.dot.warn { background: var(--warn); }
.dot.error { background: var(--danger); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
