/* public/style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  color: #4a4a4a;
  background-color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, Inter, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  color: #fff;
  background: linear-gradient(135deg, #4a4a4a 0% 100%);
  border-radius: 8px;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 30px;
  padding: 16px 24px;
}

.dealer-select {
  color: #fff;
  cursor: pointer;
  background: #ffffff1a;
  border: 1px solid #fff3;
  border-radius: 6px;
  min-width: 260px;
  padding: 8px 12px;
  font-size: 14px;
}

.dealer-combobox {
  position: relative;
  width: 260px;
}

.dealer-search {
  color: #fff;
  background: #ffffff1a;
  border: 1px solid #fff3;
  border-radius: 6px;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
}

.dealer-search::placeholder {
  color: #ffffffb3;
}

.dealer-search:focus {
  outline: none;
  background: #ffffff26;
  border-color: #fff6;
}

.dealer-options {
  position: absolute;
  overflow-y: auto;
  list-style: none;
  display: none;
  z-index: 20;
  background: #4a4a4a;
  border: 1px solid #fff3;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 240px;
  top: 100%;
  left: 0;
  right: 0;
}

.dealer-options.show {
  display: block;
}

.dealer-options li {
  color: #fff;
  cursor: pointer;
  padding: 8px 12px;
}

.dealer-options li:hover, .dealer-options li.active {
  background: #ffffff26;
}

.dealer-select:focus {
  outline: none;
  background: #ffffff26;
  border-color: #fff6;
}

.dealer-select option {
  color: #fff;
  background: #4a4a4a;
}

.header-left {
  display: flex;
  flex-wrap: nowrap;
  align-items:  center;
  gap: 16px;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
}

.date-range-filter {
  display: flex;
  align-items:  center;
  gap: 8px;
}

.date-input {
  color: #fff;
  cursor: pointer;
  background: #ffffff1a;
  border: 1px solid #fff3;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}

.date-input:focus {
  outline: none;
  background: #ffffff26;
  border-color: #fff6;
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.date-separator {
  color: #fffc;
  font-size: 13px;
  font-weight: 500;
}

.period-badge {
  background: #ffffff26;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}

.mirage-logo {
  border-radius: 4px;
  width: auto;
  height: 48px;
}

.main-content {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px #0000001a;
}

.dashboard-title {
  color: #4a4a4a;
  text-align: center;
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 600;
}

.dashboard-subtitle {
  color: #fff;
  background: #a18f5f;
  border-radius: 6px;
  margin-bottom: 30px;
  padding: 16px;
  font-size: 14px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.metric-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all .2s;
  box-shadow: 0 2px 8px #00000014;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0000001f;
}

.metric-card.primary {
  color: #fff;
  background: linear-gradient(135deg, #4a4a4a 0% 100%);
  border: none;
}

.metric-header {
  margin-bottom: 16px;
}

.metric-title {
  color: #718096;
  font-size: 16px;
  font-weight: 500;
}

.metric-card.primary .metric-title {
  color: #e2e8f0;
}

.metric-content {
  margin-bottom: 16px;
}

.metric-value {
  color: #4a4a4a;
  margin-bottom: 8px;
  font-size: 36px;
  font-weight: 700;
}

.metric-card.primary .metric-value {
  color: #fff;
}

.metric-comparison {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.comparison-values {
  display: flex;
  align-items:  center;
  gap: 6px;
  font-size: 13px;
}

.current-value {
  color: #4a4a4a;
  font-weight: 600;
}

.metric-card.primary .current-value {
  color: #fff;
}

.vs-text {
  color: #718096;
  font-size: 12px;
}

.metric-card.primary .vs-text {
  color: #cbd5e0;
}

.previous-value {
  color: #718096;
  font-weight: 600;
}

.metric-card.primary .previous-value {
  color: #cbd5e0;
}

.comparison-percent {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 600;
}

.comparison-percent.positive {
  color: #38a169;
  background: #f0fff4;
}

.comparison-percent.negative {
  color: #e53e3e;
  background: #fff5f5;
}

.metric-card.primary .comparison-percent.positive {
  color: #68d391;
  background: #68d39126;
}

.metric-card.primary .comparison-percent.negative {
  color: #fc8181;
  background: #fc818126;
}

.metric-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (width <= 768px) {
  .container {
    padding: 16px;
  }

  .header {
    text-align: center;
    flex-direction: column;
    gap: 12px;
  }

  .header-left {
    width: 100%;
  }

  .dealer-select {
    width: 100%;
    min-width: auto;
  }

  .date-range-filter {
    justify-content: center;
    margin-top: 8px;
  }

  .date-input {
    padding: 5px 8px;
    font-size: 12px;
  }

  .main-content {
    padding: 20px;
  }

  .dashboard-title {
    font-size: 24px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-card {
    padding: 20px;
  }

  .metric-value {
    font-size: 32px;
  }
}

@media (width <= 480px) {
  .header {
    padding: 12px 16px;
  }

  .main-content {
    padding: 16px;
  }

  .dashboard-title {
    font-size: 20px;
  }

  .metric-card {
    padding: 16px;
  }

  .metric-value {
    font-size: 28px;
  }
}
