:root {
  --bg-color: #0f172a;
  --panel-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --border: #334155;
  --error: #ef4444;
  --success: #22c55e;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
}

.view { display: none; width: 100%; }
.view.active { display: flex; }

/* Login */
#login-view {
  align-items: center;
  justify-content: center;
}
.login-box {
  background: var(--panel-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-box p { color: var(--text-muted); margin-bottom: 2rem; }

/* Layout */
.sidebar {
  width: 250px;
  background: var(--panel-bg);
  border-right: 1px solid var(--border);
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
}
.sidebar h2 { margin-bottom: 2rem; padding-left: 1rem; font-size: 1.2rem; }
.sidebar ul { list-style: none; }
.sidebar a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.sidebar a:hover { background: var(--border); color: var(--text-main); }
.content { flex: 1; padding: 2rem; overflow-y: auto; }

/* Sections */
.section { display: none; }
.section.active { display: block; }
h1 { margin-bottom: 2rem; font-size: 1.5rem; font-weight: 600; }
h3 { margin-bottom: 1rem; margin-top: 1.5rem; color: var(--primary); font-size: 1.1rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Forms */
.card {
  background: var(--panel-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  max-width: 800px;
}
.input-group { margin-bottom: 1.5rem; text-align: left; }
.input-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.help-text { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }

input, select, textarea {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.select-wrapper { display: flex; gap: 1rem; }

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}
.btn.primary { background: var(--primary); color: white; width: 100%; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn.outline:hover { background: var(--border); color: var(--text-main); }
.btn.small { padding: 0.5rem 1rem; width: auto; white-space: nowrap; }
.mt-4 { margin-top: 1rem; }
.mt-auto { margin-top: auto; }

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
