/* ======================
   RESET & BASE
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: #f1f5f9;
  color: #1e293b;
}

.hidden {
  display: none !important;
}

/* ======================
   LOGIN
====================== */
.login-page {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.login-card {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  text-align: center;
}

.login-card h2 {
  margin-bottom: 20px;
}

.login-card input {
  margin-bottom: 10px;
}

/* ======================
   FORM
====================== */
input, select, textarea {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

textarea {
  resize: none;
}

/* ======================
   BUTTONS
====================== */
button {
  cursor: pointer;
}

.btn, button {
  border: none;
  padding: 11px;
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary, button {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

/* ======================
   TOPBAR
====================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar h2 {
  font-size: 16px;
}

/* ======================
   SIDEBAR
====================== */
.sidebar {
  width: 240px;
  background: #0f172a;
  color: #fff;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
}

.sidebar h3 {
  margin-bottom: 15px;
}

.nav-link {
  background: transparent;
  color: #cbd5f5;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  text-align: left;
}

.nav-link:hover {
  background: #1e293b;
}

.nav-link.active {
  background: #2563eb;
  color: #fff;
}

/* ======================
   MAIN
====================== */
.main-content {
  margin-left: 240px;
  padding: 15px;
}

/* ======================
   CARDS
====================== */
.card {
  background: #fff;
  padding: 15px;
  border-radius: 14px;
  margin-bottom: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* ======================
   STATS
====================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat-card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-card h3 {
  font-size: 20px;
}

/* ======================
   TABLE
====================== */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f1f5f9;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

tr:hover {
  background: #f9fafb;
}

/* ======================
   GRID
====================== */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* ======================
   MOBILE
====================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
}

@media (max-width: 900px) {

  .sidebar {
    transform: translateX(-100%);
    z-index: 999;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    width: 95%;
  }

  button {
    padding: 14px;
  }
}