/* ===================================================================
   Rebootly Recovery — Dark Theme CSS
   Palette : #0044CC → #40D4FF, bg #0d1117, typo Exo 2
=================================================================== */

:root {
  --bg:       #0d1117;
  --surface:  #161b22;
  --border:   #30363d;
  --accent1:  #0044CC;
  --accent2:  #40D4FF;
  --text:     #e6edf3;
  --muted:    #8b949e;
  --green:    #3fb950;
  --red:      #f85149;
  --yellow:   #d29922;
  --blue:     #58a6ff;
  --radius:   10px;
  --sidebar-w: 220px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Exo 2', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  font-size: 11px;
  color: var(--muted);
}

.nav-list {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.nav-item a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-item.active a {
  color: var(--accent2);
  background: rgba(0, 68, 204, 0.15);
  border-left-color: var(--accent2);
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 16px 0;
  border-top: 1px solid var(--border);
}

.sidebar-footer-text {
  font-size: 11px;
  color: var(--muted);
}

/* ── Main ─────────────────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
}

.topbar-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(210, 153, 34, 0.15);
  border: 1px solid rgba(210, 153, 34, 0.3);
  color: var(--yellow);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}

.card-body {
  padding: 20px;
}

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue   { background: rgba(0, 68, 204, 0.2);  color: var(--accent2); }
.stat-icon-green  { background: rgba(63, 185, 80, 0.2); color: var(--green); }
.stat-icon-red    { background: rgba(248, 81, 73, 0.2); color: var(--red); }
.stat-icon-yellow { background: rgba(210, 153, 34, 0.2);color: var(--yellow); }

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

/* ── Grid 2 colonnes ──────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Table ────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ── Info Table ────────────────────────────────────────────── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.info-table th {
  text-align: left;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 500;
  width: 40%;
}

.info-table td {
  padding: 6px 0;
  color: var(--text);
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green  { background: rgba(63,185,80,0.15);  color: var(--green);  border: 1px solid rgba(63,185,80,0.3); }
.badge-red    { background: rgba(248,81,73,0.15);  color: var(--red);    border: 1px solid rgba(248,81,73,0.3); }
.badge-yellow { background: rgba(210,153,34,0.15); color: var(--yellow); border: 1px solid rgba(210,153,34,0.3); }
.badge-blue   { background: rgba(0,68,204,0.15);   color: var(--accent2);border: 1px solid rgba(0,68,204,0.3); }
.badge-gray   { background: rgba(139,148,158,0.15);color: var(--muted);  border: 1px solid var(--border); }

/* ── Boutons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent2); color: var(--accent2); }

.btn-danger {
  background: rgba(248,81,73,0.15);
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--red);
}
.btn-danger:hover:not(:disabled) { background: rgba(248,81,73,0.25); }

.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-xs  { padding: 3px 8px;  font-size: 11px; border-radius: 6px; }

/* ── Formulaires ───────────────────────────────────────────── */
.form-group {
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus { border-color: var(--accent2); }
input::placeholder { color: var(--muted); }

.req { color: var(--red); margin-left: 2px; }

/* ── Alertes ───────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
}

.alert-info    { background: rgba(0,68,204,0.1);   border: 1px solid rgba(0,68,204,0.3);   color: var(--accent2); }
.alert-success { background: rgba(63,185,80,0.1);  border: 1px solid rgba(63,185,80,0.3);  color: var(--green); }
.alert-warning { background: rgba(210,153,34,0.1); border: 1px solid rgba(210,153,34,0.3); color: var(--yellow); }
.alert-error   { background: rgba(248,81,73,0.1);  border: 1px solid rgba(248,81,73,0.3);  color: var(--red); }

/* ── Utilitaires ───────────────────────────────────────────── */
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state h2 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state .btn {
  margin-top: 16px;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
