.dashboard-filter-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: end;
}

.dashboard-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.dashboard-filter-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.dashboard-filter-field input,
.dashboard-filter-field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  box-sizing: border-box;
  color: #0f172a;
  font-size: 13px;
}

.dash-dd {
  position: relative;
}

.dash-dd-toggle {
  min-height: 42px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-dd-toggle:hover,
.dash-dd-toggle:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dash-dd-toggle.dash-dd-open {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dash-dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
}

.dash-dd-label:not(:empty) {
  color: #0f172a;
}

.dash-dd-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #64748b;
}

.dash-dd-open .dash-dd-arrow {
  transform: rotate(180deg);
}

.dash-dd-content {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.dash-dd-search-wrapper {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.dash-dd-search {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dash-dd-search:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.dash-dd-search::placeholder {
  color: #94a3b8;
}

.dash-dd-checkboxes {
  max-height: 160px;
  overflow-y: auto;
  padding: 4px 0;
}

.dash-dd-content .dashboard-filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.1s;
}

.dash-dd-content .dashboard-filter-checkbox-item:hover {
  background: #f1f5f9;
}

.dash-dd-content .dashboard-filter-checkbox-item input[type="checkbox"] {
  accent-color: #2563eb;
  width: auto !important;
  min-height: auto !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-sizing: content-box;
}

.dashboard-filter-field input:focus,
.dashboard-filter-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dashboard-filter-actions {
  justify-content: flex-end;
}

.dashboard-filter-clear {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.dashboard-filter-clear:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  opacity: 0.9;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-kpi-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.dashboard-kpi-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-kpi-body {
  flex: 1;
  min-width: 0;
}

.dashboard-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.dashboard-kpi-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.dashboard-kpi-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #dbe3ef;
}

.dashboard-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
}

.dashboard-card-action {
  font-size: 0.75rem;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-card-action:hover {
  text-decoration: underline;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dashboard-chart-body-new {
  min-height: 240px;
}

.dashboard-donut {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-table-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.dashboard-table thead th {
  padding: 0.625rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.dashboard-table tbody td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
  font-size: 0.8125rem;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table tbody tr:hover {
  background: #f8fbff;
}

.dashboard-table-footer {
  padding: 0.625rem 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  color: #64748b;
}

.dashboard-table-scroll {
  overflow-x: auto;
}

.dashboard-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.8125rem;
}

@media (max-width: 1100px) {
  .dashboard-filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-table-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}
