/* Dashboard Styles - Professional & Clean Design */

/* Container */
.container {
  max-width: 100%;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #24292e;
  letter-spacing: -0.01em;
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: #afb8c1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #d0d7de;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #24292e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Filter Form */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr auto;
  gap: 1rem;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  color: #24292e;
  font-size: 0.875rem;
}

.form-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #24292e;
  background: #ffffff;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}

.form-select:hover {
  border-color: #afb8c1;
}

.form-select:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.btn-primary {
  padding: 0.5rem 1rem;
  background: #24292e;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  max-width: 110px;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #1b1f23;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.metric-card::before {
  display: none;
}

.metric-card:hover {
  border-color: #afb8c1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f8fa;
  color: #57606a;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: #24292e;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Remove gradient colors */
.metric-card:nth-child(1),
.metric-card:nth-child(2),
.metric-card:nth-child(3),
.metric-card:nth-child(4),
.metric-card:nth-child(5),
.metric-card:nth-child(6) {
  --accent-color: #24292e;
  --icon-bg: #f6f8fa;
}

.metric-card:nth-child(1) .metric-value,
.metric-card:nth-child(2) .metric-value,
.metric-card:nth-child(3) .metric-value,
.metric-card:nth-child(4) .metric-value,
.metric-card:nth-child(5) .metric-value,
.metric-card:nth-child(6) .metric-value { 
  color: #24292e; 
}

/* Chart */
.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
  padding: 1rem 0;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  margin-top: 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

thead {
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: #57606a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

th:not(:first-child) {
  text-align: right;
}

tbody tr {
  border-bottom: 1px solid #d0d7de;
  transition: background-color 0.15s ease;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: #f6f8fa;
}

td {
  padding: 0.875rem 1rem;
  color: #24292e;
  vertical-align: middle;
}

.table-cell-primary {
  font-weight: 600;
  color: #24292e;
}

.table-cell-number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.table-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #57606a;
  font-size: 0.875rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  line-height: 1;
}

.badge-success {
  background: #dafbe1;
  color: #1a7f37;
}
.badge-warning {
  background: #fff8c5;
  color: #7d4e00;
}
.badge-info {
  background: #ddf4ff;
  color: #0969da;
}

/* Responsive */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    max-width: 100%;
    width: 100%;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .metric-card {
    padding: 1rem;
  }

  .metric-value {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .chart-container {
    height: 280px;
  }

  th, td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8125rem;
  }

  th {
    font-size: 0.7rem;
  }

  table {
    min-width: 500px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .metric-value {
    font-size: 1.375rem;
  }

  table {
    min-width: 450px;
    font-size: 0.8125rem;
  }

  th, td {
    padding: 0.5rem 0.375rem;
  }

  th {
    font-size: 0.65rem;
  }
}
