/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  font-size: 15px; /* Added base font size */
}

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px; /* Increased from 240px */
  min-height: 100vh;
  background: #1e293b;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand .logo-text {
  font-size: 18px; /* Increased from 16px */
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: #0A66C2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.sidebar-brand .tagline {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}
.sidebar-section-label {
  font-size: 12px; /* Increased from 10px */
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  padding: 16px 12px 8px;
  font-weight: 700;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 15px; /* Increased from 14px */
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 4px;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.sidebar-nav a.active {
  background: rgba(10, 102, 194, 0.2);
  color: #60a5fa;
  border-left: 4px solid #0A66C2;
}
.sidebar-nav a .nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #f87171;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar-footer a:hover { background: rgba(239,68,68,0.1); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: 260px; /* Matched sidebar width */
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 22px; font-weight: 700; color: #f8fafc; } /* Increased from 18px */
.topbar-sub { font-size: 14px; color: #94a3b8; margin-top: 4px; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #cbd5e1;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #64748b; }
.status-dot.running { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,0.2); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.container { padding: 32px; }

/* ===== CARDS ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px;
}
.card-label { color: #94a3b8; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.card-value { font-size: 32px; font-weight: 700; margin-top: 12px; color: #60a5fa; }
.card-value.small { font-size: 20px; }

/* ===== PANELS ===== */
.panel {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #f8fafc; }
.panel h4 { font-size: 14px; color: #94a3b8; margin-bottom: 8px; }
.muted { color: #94a3b8; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }

/* ===== FORM ELEMENTS ===== */
input[type="number"], input[type="email"], input[type="password"], input[type="text"], select {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 14px;
  transition: border-color 0.15s;
}
input:focus, select:focus { outline: none; border-color: #0A66C2; }
label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
small.muted { font-size: 11px; display: block; margin-top: 4px; margin-bottom: 0; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-warn, .btn-mini, .btn-danger {
  border: none; padding: 9px 18px; border-radius: 8px; font-size: 13px;
  cursor: pointer; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-primary { background: #0A66C2; color: #fff; }
.btn-primary:hover { background: #0958a8; }
.btn-primary:disabled { background: #334155; color: #64748b; cursor: not-allowed; }
.btn-warn { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.btn-warn:hover { background: rgba(245,158,11,0.25); }
.btn-mini { background: rgba(255,255,255,0.06); color: #cbd5e1; border: 1px solid rgba(255,255,255,0.08); }
.btn-mini:hover { background: rgba(255,255,255,0.1); }
.btn-danger, .btn-mini.danger { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ===== BADGES ===== */
.badge { background: rgba(255,255,255,0.08); color: #94a3b8; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge.warn { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge.danger { background: rgba(239,68,68,0.15); color: #f87171; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: rgba(255,255,255,0.03); text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #cbd5e1; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ===== MISC ===== */
.run-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters label { font-size: 13px; color: #64748b; text-transform: none; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; font-size: 13px; color: #64748b; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 20px 0; }

/* ===== ALERTS ===== */
.alert { padding: 10px 16px; border-radius: 8px; margin: 8px 0; font-size: 13px; }
.alert.success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.alert.error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ===== REGION BOXES ===== */
.region-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.region-box { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 16px; background: rgba(255,255,255,0.02); }
.region-box h3 { color: #60a5fa; margin-bottom: 8px; font-size: 15px; }
.country-list { list-style: none; margin-top: 12px; }
.country-list li { padding: 5px 0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #94a3b8; }

/* ===== LOGIN ===== */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a, #1e293b); }
.login-card { background: #1e293b; border: 1px solid rgba(255,255,255,0.08); padding: 40px; border-radius: 16px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-card h1 { color: #60a5fa; font-size: 22px; margin-bottom: 4px; }
.subtitle { color: #64748b; margin-bottom: 24px; font-size: 13px; }
.login-card label { display: block; font-size: 12px; color: #94a3b8; margin: 14px 0 4px; text-transform: uppercase; }
.login-card input { width: 100%; }
.login-card button { width: 100%; margin-top: 20px; justify-content: center; padding: 12px; font-size: 15px; }

/* ===== FORM GROUPS ===== */
.form-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-row { display: flex; gap: 8px; align-items: center; }
.form-separator { width: 100%; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; margin-top: 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { width: 0; overflow: hidden; }
  .main-content { margin-left: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
}
