/* ================= GLOBAL ================= */

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #e2e8f0;
}

.container {
  padding: 40px;
  max-width: 1300px;
  margin: auto;
}

/* ================= NAVBAR ================= */

.topbar {
  background: linear-gradient(145deg, #0b1220, #0f172a);
  padding: 16px 40px;
  border-bottom: 1px solid #1e293b;
}

.topbar-inner {
  max-width: 1300px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 20px;
}

.logo h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.logo small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-pill {
  background: rgba(255,255,255,0.05);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: #cbd5e1;
}

.logout-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: 0.2s ease;
}

.logout-btn:hover {
  background: #1e293b;
}

/* ================= STATS GRID ================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: #1e293b;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card h4 {
  margin: 0;
  color: #94a3b8;
  font-weight: 500;
}

.card h2 {
  margin: 12px 0;
  font-size: 28px;
}

.card.danger h2 { color: #ef4444; }
.card.warning h2 { color: #f59e0b; }
.card.success h2 { color: #22c55e; }

.positive {
  color: #22c55e;
  font-size: 14px;
}

/* ================= SEARCH PANEL ================= */

.glass-panel {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid rgba(255,255,255,0.05);
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.search-bar input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: white;
  font-size: 14px;
}

.search-bar input:focus {
  outline: 2px solid #14b8a6;
}

.search-bar button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s ease;
}

.search-bar button:hover {
  transform: translateY(-2px);
}

/* ================= RESULTS ================= */

.results-section {
  margin-top: 20px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.download-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  border: none;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
}

/* ================= TABLE ================= */

.table-container {
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #0f172a;
  color: #94a3b8;
  text-align: left;
  padding: 16px;
  font-weight: 500;
}

td {
  padding: 16px;
  border-bottom: 1px solid #334155;
}

tr:hover {
  background: rgba(255,255,255,0.03);
}

/* ================= BADGES ================= */

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.gray {
  background: #334155;
  color: #cbd5e1;
}

.badge.green {
  background: #064e3b;
  color: #34d399;
}

.badge.red {
  background: #7f1d1d;
  color: #fca5a5;
}

/* ================= LOGIN PAGE ================= */

.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-45deg, #0f172a, #1e293b, #0f172a, #0b1220);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 50px 40px;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  text-align: center;
}

.login-card input {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #fff;
}

.login-card input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20,184,166,0.15);
}

.primary-btn {
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(14,165,233,0.35);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1000px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 20px;
  }
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.search-bar input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: white;
  font-size: 14px;
}

.search-bar button {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}