/* ============================================
   DASHBOARD - Vertical Tabs Modern Design
   Adapts to light/dark theme via CSS variables
   ============================================ */

.dashboard-vertical {
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  background: var(--bg-secondary);
}

.dashboard-card {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 600px;
  background: var(--bg-primary);
  border: var(--border-light);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Sidebar */
.dv-sidebar {
  border-right: var(--border-light);
  background: var(--bg-secondary);
  padding: 1.5rem;
}

.dv-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: var(--border-light);
}

.dv-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dv-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.dv-user-email {
  font-size: 0.75rem;
  color: var(--neutral-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.dv-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dv-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--neutral-600);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.dv-tab:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.dv-tab.active {
  background: var(--primary-light);
  color: var(--primary);
}

.dv-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.dv-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dv-tab-icon svg {
  width: 18px;
  height: 18px;
  transition: all 0.2s;
}

.dv-tab-label {
  position: relative;
  z-index: 1;
}

.dv-tab-badge {
  margin-left: auto;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
}

.dv-tab.active .dv-tab-badge {
  background: var(--primary);
  color: #fff;
}

/* Main Content */
.dv-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(100vh - 8rem);
}

.dv-panel {
  display: none;
  animation: dv-fade-in 0.25s ease-out;
}

.dv-panel.active {
  display: block;
}

@keyframes dv-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dv-panel-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.dv-panel-subtitle {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-bottom: 2rem;
}

/* Stats Grid */
.dv-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dv-stat {
  background: var(--bg-secondary);
  border: var(--border-light);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s;
}

.dv-stat:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.dv-stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--primary-light);
  margin-bottom: 0.75rem;
}

.dv-stat-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--primary);
}

.dv-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
}

.dv-stat-label {
  font-size: 0.75rem;
  color: var(--neutral-500);
  font-weight: 500;
}

/* Recent Orders */
.dv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dv-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.dv-section-link {
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  font-weight: 500;
}

.dv-section-link:hover {
  color: var(--primary-hover);
}

.dv-orders {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dv-order-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: var(--border-light);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.dv-order-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
}

.dv-order-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  background: var(--primary-light);
  font-size: 0.85rem;
}

.dv-order-info {
  flex: 1;
  min-width: 0;
}

.dv-order-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neutral-800);
}

.dv-order-amount {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.dv-order-time {
  font-size: 0.7rem;
  color: var(--neutral-500);
}

.dv-order-status {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.dv-order-status.placed {
  background: var(--info-light);
  color: var(--info);
}

.dv-order-status.confirmed {
  background: var(--success-light);
  color: var(--success);
}

.dv-order-status.delivered {
  background: var(--success-light);
  color: var(--success);
}

.dv-order-status.cancelled {
  background: var(--danger-light);
  color: var(--danger);
}

/* Wishlist Grid */
.dv-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* Profile Form */
.dv-profile {
  max-width: 500px;
}

.dv-form-group {
  margin-bottom: 1.25rem;
}

.dv-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neutral-600);
  margin-bottom: 0.5rem;
}

.dv-form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: var(--border-medium);
  background: var(--bg-secondary);
  color: var(--neutral-900);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.dv-form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dv-form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.dv-btn-primary {
  background: var(--primary);
  color: #fff;
}

.dv-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 70, 190, 0.3);
}

.dv-btn-outline {
  background: transparent;
  color: var(--neutral-600);
  border: var(--border-medium);
}

.dv-btn-outline:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-light);
}

/* Empty State */
.dv-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.dv-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.dv-empty h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 0.5rem;
}

.dv-empty p {
  font-size: 0.875rem;
  color: var(--neutral-500);
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-card {
    grid-template-columns: 1fr;
  }

  .dv-sidebar {
    border-right: none;
    border-bottom: var(--border-light);
    padding: 1rem;
  }

  .dv-tabs {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
  }

  .dv-tab {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }

  .dv-tab.active::before {
    left: 50%;
    top: auto;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    border-radius: 2px 2px 0 0;
  }

  .dv-user-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .dv-content {
    padding: 1.25rem;
    max-height: none;
  }

  .dv-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dv-wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .dv-wishlist-grid {
    grid-template-columns: 1fr;
  }
}
