/* ===============================
   BASE
================================ */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

.hidden {
  display: none;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
}

/* ===============================
   LOGIN (Compact Top Card)
================================ */

#login-container {
  max-width: 380px;
  margin: 80px auto;
  padding: 30px;
  background: #1e293b;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  text-align: center;
}

#login-container input {
  width: 100%;
  padding: 10px;
  margin-top: 12px;
  border-radius: 6px;
  border: none;
  background: #0f172a;
  color: white;
}

#login-container button {
  width: 100%;
  margin-top: 15px;
}

.error {
  color: #f87171;
  font-size: 14px;
  margin-top: 10px;
}

/* ===============================
   DASHBOARD LAYOUT
================================ */

#dashboard {
  padding: 20px 30px 30px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="date"],
select {
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  background: #1e293b;
  color: white;
}

button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s ease;
}

button:hover {
  background: #1d4ed8;
}

/* ===============================
   CARDS (Compact Grid)
================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  background: #1e293b;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
}

.card p {
  font-size: 20px;
  margin: 6px 0;
  font-weight: 600;
}

.card span {
  font-size: 12px;
  color: #94a3b8;
}

/* ===============================
   CHARTS (Smaller + Side by Side)
================================ */

.charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

canvas {
  background: #1e293b;
  border-radius: 10px;
  padding: 10px;
  height: 240px !important;
}

/* ===============================
   TABLE (Compact)
================================ */

table {
  width: 100%;
  border-collapse: collapse;
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}

th, td {
  padding: 8px 10px;
  text-align: left;
}

thead {
  background: #0f172a;
}

tr:not(:last-child) {
  border-bottom: 1px solid #334155;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1100px) {

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts {
    grid-template-columns: 1fr;
  }

}