/* public/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
  --primary: #4a90e2;
  --primary-dark: #357abd;
  --bg-light: #f9f9fb;
  --text-dark: #333;
  --card-bg: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #eef2f7 0%, #dfe7ef 100%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em;
}

/* Card Container */
.container {
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 2em;
  max-width: 400px;
  width: 100%;
}

/* Login Page */
.login-container {
  text-align: center;
}
.login-container h2 {
  margin-bottom: 1em;
  font-weight: 600;
  color: var(--primary);
}
.login-container .error {
  margin-bottom: 1em;
  color: crimson;
  font-size: 0.9em;
}
.login-container form input {
  width: 100%;
  padding: 0.75em 1em;
  margin-bottom: 1em;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-size: 1em;
  transition: border-color 0.2s;
}
.login-container form input:focus {
  outline: none;
  border-color: var(--primary);
}
.login-container form button {
  width: 100%;
  padding: 0.75em;
  font-size: 1em;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.login-container form button:hover {
  background: var(--primary-dark);
}
.login-container form button:active {
  transform: translateY(1px);
}

/* Stats Page */
.stats-container {
  width: 90%;
  max-width: 1200px;
  margin: 2em auto;
}
.stats-container h2 {
  text-align: center;
  margin-bottom: 1em;
  color: var(--primary);
  font-weight: 600;
}
.dataTables_wrapper {
  background: var(--card-bg);
  padding: 1em;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
}
table.dataTable thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 0.75em;
  border: none;
}
table.dataTable tbody tr {
  border-bottom: 1px solid #eee;
}
table.dataTable tbody tr:nth-child(even) {
  background: var(--bg-light);
}
table.dataTable tbody td {
  padding: 0.75em;
  vertical-align: middle;
}

/* Không wrap cho bất kỳ ô nào gắn class này */
table.dataTable td.dt-body-nowrap {
  white-space: nowrap;
}

/* Canh phải cột Money */
table.dataTable td.dt-body-right {
  text-align: right;
}

/* Canh giữa và làm mờ cột STT */
table.dataTable td.stt-cell {
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
}

tr.group-header td {
  background: #eceff5;
  font-weight: 600;
  text-align: left;
  padding: 0.5em;
  border-top: 2px solid var(--primary);
}

/* Responsive */
@media (max-width: 600px) {
  .container,
  .stats-container {
    padding: 1em;
  }
  table.dataTable thead {
    display: none;
  }
  table.dataTable tbody td {
    display: block;
    width: 100%;
  }
  table.dataTable tbody td:before {
    content: attr(data-label);
    display: inline-block;
    font-weight: 600;
    width: 6em;
  }
}
/* Canh phải và in đậm cột Money */
table.dataTable td.money-cell {
  text-align: right;
  font-weight: 600;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
