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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e1e4e8;
  min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 20px; }

h1 { font-size: 1.5rem; margin-bottom: 24px; color: #fff; }
h2 { font-size: 1.2rem; margin-bottom: 16px; color: #fff; }

/* Login */
#login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #1c1f26; padding: 32px; border-radius: 12px; width: 360px; }
.login-box h1 { text-align: center; margin-bottom: 24px; }

/* Forms */
input, select {
  width: 100%;
  padding: 10px 12px;
  background: #282c34;
  border: 1px solid #3e4451;
  border-radius: 8px;
  color: #e1e4e8;
  font-size: 14px;
  margin-bottom: 12px;
}
input:focus, select:focus { outline: none; border-color: #58a6ff; }

label { display: block; font-size: 13px; color: #8b949e; margin-bottom: 4px; }

button {
  padding: 10px 20px;
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
button:hover { background: #2ea043; }
button.secondary { background: #30363d; }
button.secondary:hover { background: #3e4451; }
button.danger { background: #da3633; }
button.danger:hover { background: #f85149; }
button.small { padding: 6px 12px; font-size: 12px; }

/* Cards */
.card {
  background: #1c1f26;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-header h3 { font-size: 1rem; color: #fff; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge.active { background: #238636; color: #fff; }
.badge.inactive { background: #da3633; color: #fff; }

.stats { display: flex; gap: 16px; margin-top: 8px; }
.stat { font-size: 13px; color: #8b949e; }
.stat strong { color: #e1e4e8; }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #30363d; font-size: 13px; }
th { color: #8b949e; font-weight: 500; }

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #30363d;
  margin-bottom: 24px;
}
nav .brand { font-weight: 700; font-size: 1.1rem; color: #fff; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal { background: #1c1f26; padding: 24px; border-radius: 12px; width: 420px; }
.modal h2 { margin-bottom: 16px; }

.actions { display: flex; gap: 8px; margin-top: 16px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: #30363d; border-radius: 22px; transition: 0.2s;
}
.toggle .slider:before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: #e1e4e8; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .slider { background: #238636; }
.toggle input:checked + .slider:before { transform: translateX(18px); }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 640px) {
  .container { padding: 12px; }
  .stats { flex-direction: column; gap: 4px; }
}
