/* ============================================
   ENLITE PRIME - Dashboard Styles
   Pixel-perfect match to original
   ============================================ */

/* ---- White Counter Cards (original style) ---- */
.counter-card {
  background: var(--ep-card-bg);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-card-shadow);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.counter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.counter-card .counter-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ep-text-primary);
  line-height: 1.1;
}

.counter-card .counter-label {
  font-size: 12px;
  color: var(--ep-text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.counter-card .counter-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  flex-shrink: 0;
}

/* Gradient stat cards (legacy) */
.stat-card {
  border-radius: var(--ep-radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.2;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-change {
  font-size: 11px;
  margin-top: 8px;
  opacity: 0.85;
}

/* ---- Chart Container ---- */
.chart-container {
  position: relative;
  width: 100%;
  padding: 16px 0;
}

.chart-container canvas {
  max-width: 100%;
}

/* ---- Section Header (icon + title) ---- */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ep-text-primary);
}

.section-header .material-icons {
  font-size: 20px;
  color: var(--ep-primary);
}

/* ---- Mini Stat Badges ---- */
.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-right: 8px;
  margin-bottom: 8px;
}

.stat-badge .badge-value {
  font-size: 16px;
  font-weight: 700;
}

.stat-badge .badge-label {
  font-size: 11px;
  opacity: 0.9;
}

/* ---- Achievement/Progress Items ---- */
.achievement-item {
  margin-bottom: 16px;
}

.achievement-item .achievement-label {
  font-size: 13px;
  color: var(--ep-text-primary);
  margin-bottom: 6px;
}

.achievement-item .progress {
  height: 8px;
  border-radius: 4px;
}

/* ---- Activity Timeline ---- */
.activity-timeline {
  position: relative;
  padding-left: 28px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--ep-divider);
}

.activity-item {
  position: relative;
  padding-bottom: 20px;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-item .activity-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ep-card-bg);
  z-index: 1;
}

.activity-item .activity-content {
  font-size: 13px;
  color: var(--ep-text-primary);
  line-height: 1.5;
}

.activity-item .activity-time {
  font-size: 11px;
  color: var(--ep-text-secondary);
  margin-top: 2px;
}

/* ---- Weather Widget ---- */
.weather-widget {
  background: linear-gradient(135deg, #5C6BC0, #7E57C2);
  border-radius: var(--ep-radius);
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.weather-widget .weather-temp {
  font-size: 48px;
  font-weight: 300;
}

.weather-widget .weather-city {
  font-size: 16px;
  font-weight: 500;
  margin-top: 4px;
}

.weather-widget .weather-desc {
  font-size: 13px;
  opacity: 0.8;
}

.weather-widget .weather-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 64px;
  opacity: 0.3;
}

/* ---- Calendar Widget ---- */
.calendar-widget {
  background: var(--ep-card-bg);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-card-shadow);
  overflow: hidden;
}

.calendar-header {
  background: var(--ep-primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 14px;
}

.calendar-header button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
}

.calendar-header button:hover {
  background: rgba(255,255,255,0.2);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 8px;
}

.calendar-grid .day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ep-text-secondary);
  padding: 4px;
  text-transform: uppercase;
}

.calendar-grid .day-cell {
  text-align: center;
  padding: 6px 4px;
  font-size: 13px;
  color: var(--ep-text-primary);
  border-radius: 50%;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto;
}

.calendar-grid .day-cell:hover {
  background: var(--ep-primary-lighter);
}

.calendar-grid .day-cell.today {
  background: var(--ep-primary);
  color: #fff;
  font-weight: 600;
}

.calendar-grid .day-cell.other-month {
  color: var(--ep-text-disabled);
}

/* ---- Contact List ---- */
.contact-list-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--ep-divider);
}

.contact-list-item:last-child {
  border-bottom: none;
}

.contact-list-item .contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

.contact-list-item .contact-info {
  flex: 1;
  min-width: 0;
}

.contact-list-item .contact-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--ep-text-primary);
}

.contact-list-item .contact-role {
  font-size: 11px;
  color: var(--ep-text-secondary);
}

.contact-list-item .contact-actions {
  display: flex;
  gap: 4px;
}

.contact-list-item .contact-actions button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* ---- Task Widget ---- */
.task-banner {
  background: linear-gradient(135deg, #5C6BC0, #3F51B5);
  border-radius: var(--ep-radius) var(--ep-radius) 0 0;
  padding: 20px 24px;
  color: #fff;
}

.task-banner h5 {
  margin: 0 0 4px;
  font-weight: 600;
}

.task-banner p {
  margin: 0;
  font-size: 12px;
  opacity: 0.8;
}

.task-list .task-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ep-divider);
  gap: 10px;
}

.task-list .task-item:last-child {
  border-bottom: none;
}

.task-list .task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--ep-text-secondary);
}

.task-list .task-text {
  font-size: 13px;
  color: var(--ep-text-primary);
}

.task-list .task-desc {
  font-size: 11px;
  color: var(--ep-text-secondary);
}

/* ---- Storage Widget ---- */
.storage-widget {
  text-align: center;
  padding: 20px;
}

.storage-widget .storage-icon {
  font-size: 64px;
  color: var(--ep-primary);
  margin-bottom: 12px;
}

.storage-widget .storage-values {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 12px 0;
}

.storage-widget .storage-used {
  font-size: 24px;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.storage-widget .storage-total {
  font-size: 24px;
  font-weight: 300;
  color: var(--ep-text-secondary);
}

.storage-widget .storage-label {
  font-size: 11px;
  color: var(--ep-text-secondary);
}

/* ---- Photo Grid ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.photo-grid .photo-item {
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
}

/* ---- Coin Price Cards (Crypto) ---- */
.coin-price-card {
  background: var(--ep-card-bg);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-card-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.coin-price-card .coin-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 8px;
}

.coin-price-card .coin-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.coin-price-card .coin-name {
  font-size: 13px;
  color: var(--ep-text-secondary);
}

.coin-price-card .coin-price-value {
  padding: 4px 20px 8px;
  font-size: 28px;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.coin-price-card .coin-change {
  padding: 0 20px 8px;
  font-size: 12px;
}

.coin-price-card .coin-chart {
  height: 80px;
  position: relative;
}

.coin-change.up { color: var(--ep-success); }
.coin-change.down { color: var(--ep-danger); }

/* ---- Totals Sidebar (Crypto) ---- */
.total-stat {
  background: var(--ep-card-bg);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-card-shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.total-stat .total-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ep-success);
}

.total-stat .total-label {
  font-size: 12px;
  color: var(--ep-text-secondary);
}

.total-stat .total-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--ep-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}

/* ---- Market Table (Crypto) ---- */
.market-table .table {
  color: var(--ep-text-primary);
  margin: 0;
}

.market-table .table th {
  border-bottom: 2px solid var(--ep-divider);
  font-weight: 600;
  font-size: 12px;
  color: var(--ep-text-secondary);
  padding: 10px 16px;
  text-transform: uppercase;
}

.market-table .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-divider);
  vertical-align: middle;
  font-size: 13px;
}

/* ---- Trading Form ---- */
.trade-form .form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ep-text-secondary);
  text-transform: uppercase;
}

/* ---- Sales Table (Marketing) ---- */
.sales-table .table td {
  vertical-align: middle;
}

.sales-table .product-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--ep-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sales-table .buyer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sales-table .buyer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}

/* ---- Product Stat Badges (Marketing) ---- */
.product-stat-badge {
  text-align: center;
  padding: 12px;
}

.product-stat-badge .badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  color: #fff;
  font-size: 18px;
}

.product-stat-badge .badge-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ep-text-primary);
}

.product-stat-badge .badge-label {
  font-size: 11px;
  color: var(--ep-text-secondary);
}

/* ---- Chart Indicator Legend ---- */
.chart-indicator .indicator-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--ep-text-secondary);
}

.chart-indicator .indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Legacy support ---- */
.counter-cards .stat-card {
  border-radius: var(--ep-radius-lg);
  transition: transform 0.3s ease;
}

.counter-cards .stat-card:hover {
  transform: translateY(-2px);
}

.recent-orders .table {
  color: var(--ep-text-primary);
  margin: 0;
}

.recent-orders .table th {
  border-bottom: 2px solid var(--ep-divider);
  font-weight: 500;
  font-size: 13px;
  color: var(--ep-text-secondary);
  padding: 12px 16px;
}

.recent-orders .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-divider);
  vertical-align: middle;
  font-size: 13px;
}

/* Progress Circle (SVG) */
.progress-circle {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle .progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 600;
  color: var(--ep-text-primary);
}
