/* =======================
   DASHBOARD CARDS
======================= */

.dashboard-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.dashboard-cards .card {
  flex: 1;
  min-width: 220px;
}

.dashboard-cards h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.dashboard-cards p {
  margin-top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
}

/* =======================
   DASHBOARD NAV BUTTONS
======================= */

.nav-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.nav-buttons a {
  display: block;
  padding: 14px;
  text-align: center;
  background: #0f172a;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
}

.nav-buttons a:hover {
  background: var(--primary);
}
/* ===============================
   COMMON PAGE LAYOUT
================================ */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f6f8;
  margin: 0;
}

header {
  background-color: #2f3640;
  color: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-header {
  width: 60px;
  height: 60px;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

.back-btn {
  margin-left: auto;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  background-color: #718093;
  padding: 8px 14px;
  border-radius: 6px;
}

.back-btn:hover {
  background-color: #636e72;
}

main {
  padding: 20px;
}

/* ===============================
   CARD / SECTION STYLES
================================ */
.form-section,
.table-section,
.card {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.form-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ===============================
   FORM ELEMENTS
================================ */
input,
select,
button {
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button {
  background-color: #2f3640;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background-color: #718093;
}

/* ===============================
   TABLE STYLES
================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th,
td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #2f3640;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #e1e5ea;
}

.balance {
  font-weight: bold;
  color: #e84118;
}

/* ===============================
   TOTAL SECTION
================================ */
.total-section {
  margin-top: 15px;
  text-align: right;
  font-size: 18px;
  font-weight: bold;
  color: #2f3640;
}

/* ===============================
   MOBILE RESPONSIVE TABLE
================================ */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
  }

  tbody td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 10px;
    font-weight: bold;
    text-align: left;
  }
}
.dashboard-cards .card {
  padding: 25px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.dashboard-cards h3 {
  color: #e0e7ff;
  font-size: 13px;
}

.dashboard-cards p {
  font-size: 32px;
  margin-top: 12px;
  color: white;
}
canvas {
  max-width: 100%;
}
