/* ==========================================================================
   2000s CLASSIC RETRO DASHBOARD & TABLES STYLESHEET (ASP.NET STYLE)
   ========================================================================== */

/* STATS GRID & CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card-flat {
  background: #f7fafc;
  border: 1px solid #a6c0d7;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 2px;
}

.stat-label-flat {
  font-size: 0.72rem;
  font-weight: bold;
  color: #555555;
  text-transform: uppercase;
}

.stat-value-flat {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--gov-blue-title);
  margin-top: 2px;
}

.stat-icon-flat {
  font-size: 1.4rem;
  color: var(--gov-teal-dark);
  opacity: 0.85;
}

/* TOOLBAR & SEARCH ROWS */
.toolbar-container-flat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-primary-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input-wrapper i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

.search-input-wrapper input {
  padding-left: 30px;
  width: 100%;
}

.filter-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #f0f4f8;
  padding: 8px 12px;
  border: 1px solid #bcd0e0;
  border-radius: 2px;
}

.filter-group-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: bold;
}

/* TABLES (RETRO GOV TABLE STYLE) */
.table-card-flat {
  border: 1px solid #a6c0d7;
  background: #ffffff;
  overflow-x: auto;
}

.custom-table-flat {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.custom-table-flat th {
  background: #e4ecf3;
  color: var(--gov-blue-title);
  font-weight: bold;
  padding: 8px 10px;
  border: 1px solid #a6c0d7;
  text-align: left;
}

.custom-table-flat td {
  padding: 6px 10px;
  border: 1px solid #c9d7e3;
  vertical-align: middle;
}

/* ACCORDION HOUSEHOLD ROWS (CLEAN RETRO STYLE) */
.household-accordion-row {
  background: #ffffff;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border-bottom: 1px solid #cbd5e1;
}

.household-accordion-row:hover {
  background: #eef6ff !important;
}

.household-accordion-row td {
  padding: 8px 10px;
}

.chevron-icon {
  transition: transform 0.2s ease-in-out;
  color: var(--gov-teal-dark, #0b4550);
  font-size: 0.85rem;
}

.chevron-icon.open {
  transform: rotate(90deg);
}

.household-members-row {
  display: none;
}

.household-members-row.open {
  display: table-row;
}

.members-subtable-wrapper {
  background: #f1f5f9;
  padding: 10px 14px 14px 14px;
  border-top: 2px solid var(--gov-teal-dark, #0b4550);
  border-bottom: 2px solid #cbd5e1;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}

.subtable-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--gov-blue-title, #004080);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #cbd5e1;
}

.members-subtable {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.members-subtable th {
  background: #1a365d;
  color: #ffffff;
  font-size: 0.78rem;
  padding: 6px 8px;
  border: 1px solid #0f2942;
  text-align: left;
}

.members-subtable td {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  background: #ffffff;
}

.members-subtable tr:nth-child(even) td {
  background: #f8fafc;
}

.members-subtable tr:hover td {
  background: #eef6ff;
}

.house-number-badge {
  font-weight: bold;
  color: var(--gov-blue-title);
  background: #eef4f8;
  padding: 2px 6px;
  border: 1px solid #b8cee0;
  border-radius: 2px;
  font-size: 0.8rem;
}

.badge-gov {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 2px;
}

.badge-thuongtru { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-tamtru { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-tamvang { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.badge-chuyendi { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* HOUSEHOLD GRID BOOK */
.household-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.household-card-flat {
  background: #ffffff;
  border: 1px solid #b4c8dc;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(11, 77, 117, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.household-card-flat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 77, 117, 0.15);
}

.household-card-flat-header {
  background: linear-gradient(180deg, #eef5fb 0%, #e0ecf7 100%);
  padding: 8px 12px;
  border-bottom: 1px solid #b4c8dc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.household-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.members-preview-list-flat {
  background: #f7fafc;
  border: 1px solid #d8e3ed;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-pill-flat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  border-bottom: 1px dashed #d0dce5;
  padding: 4px 0;
}

.member-pill-flat:last-child {
  border-bottom: none;
}

/* CHARTS GRID */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.chart-card-flat {
  background: #ffffff;
  border: 1px solid #a6c0d7;
  padding: 12px;
  border-radius: 2px;
}

.chart-title-flat {
  font-size: 0.82rem;
  font-weight: bold;
  color: var(--gov-blue-title);
  margin-bottom: 8px;
  text-align: center;
}

.chart-canvas-container {
  height: 220px;
  position: relative;
}

.empty-data-banner {
  text-align: center;
  padding: 30px;
  background: #ffffff;
  color: #666;
}

.empty-data-banner i {
  font-size: 2.2rem;
  color: #a6c0d7;
  margin-bottom: 10px;
}
