* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #0f1115;
  color: #e8e8ec;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Login (inchangé) --- */
.card {
  background: #171a21;
  border: 1px solid #2a2e38;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  margin: 60px auto;
}

.auth-card { text-align: center; }
h1 { margin: 0; font-size: 22px; }
.subtitle { color: #9aa0ac; margin: 0 0 20px; font-size: 14px; }

label {
  display: block;
  text-align: left;
  font-size: 13px;
  color: #9aa0ac;
  margin: 12px 0 4px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a2e38;
  background: #0f1115;
  color: #e8e8ec;
  font-size: 14px;
}

input:focus { outline: none; border-color: #4f7cff; }

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

button:disabled { opacity: 0.4; cursor: not-allowed; }

.auth-card button {
  width: 100%;
  margin-top: 18px;
  background: #4f7cff;
  color: white;
}

.btn-secondary { background: #2a2e38; color: #e8e8ec; }

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin: 0 auto 14px;
  max-width: 960px;
}
.alert-success { background: #17301f; color: #4ade80; }
.alert-error { background: #301717; color: #f87171; }

/* --- Dashboard --- */
.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-online { background: #17301f; color: #4ade80; }
.badge-offline { background: #301717; color: #f87171; }

.console-card {
  background: #13151a;
  border: 1px solid #23262f;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.console-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid #23262f;
}

.tab-btn {
  background: transparent;
  color: #8b8f9a;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  font-size: 13px;
}
.tab-btn.active { color: #e8e8ec; background: #1c1f27; }

.console-box {
  background: #0b0d11;
  padding: 14px;
  height: 560px;
  overflow-y: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c9d1d9;
  margin: 0;
}

.console-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #23262f;
}

.console-form input {
  flex: 1;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: #0b0d11;
}

.btn-send {
  background: #4f7cff;
  color: white;
  width: 44px;
  font-size: 16px;
}

.actions-row {
  display: flex;
  gap: 10px;
  padding: 4px 14px 16px;
}
.actions-row form { flex: 1; }
.actions-row button { width: 100%; letter-spacing: 0.03em; }

.btn-start { background: #16a34a; color: white; }
.btn-stop { background: #d97706; color: white; }
.btn-restart { background: #334155; color: #e2e8f0; }
.btn-kill { background: #dc2626; color: white; }

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
  .actions-row { flex-wrap: wrap; }
  .actions-row form { flex: 1 1 45%; }
}

.stat-card {
  background: #13151a;
  border: 1px solid #23262f;
  border-radius: 10px;
  padding: 16px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: #9aa0ac;
  margin-bottom: 10px;
}

.stat-value { font-size: 15px; font-weight: 600; color: #e8e8ec; }

.stat-chart { width: 100%; height: 90px; display: block; }

.reboot-card { max-width: none; margin: 0; padding: 20px; }

.section-title { font-size: 15px; margin: 0 0 14px; }

.reboot-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }

.reboot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f1115;
  border: 1px solid #23262f;
  border-radius: 8px;
  padding: 8px 12px;
}

.reboot-time {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  flex: 1;
}

.reboot-toggle-form, .reboot-item form { margin: 0; }

.switch-btn {
  font-size: 12px;
  padding: 6px 12px;
}
.switch-btn.on { background: #17301f; color: #4ade80; }
.switch-btn.off { background: #2a2e38; color: #9aa0ac; }

.btn-delete {
  background: #301717;
  color: #f87171;
  width: 32px;
  padding: 6px 0;
}

.reboot-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reboot-add-form input { width: auto; flex: 0 0 140px; }

.hint {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.log-tag { color: #7dd3fc; }
.log-default { color: #c9d1d9; }
.log-success { color: #4ade80; font-weight: 600; }
.log-warning { color: #facc15; }
.log-error { color: #f87171; font-weight: 600; }