/* Custom styling for Retail Dashboard */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --dark-color: #2b2d42;
  --light-color: #f8f9fa;
  --text-muted: #6c757d;
}

body {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  background-color: #f4f7f6;
  color: #333;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1rem 2rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

.navbar-brand, .nav-link {
  color: #ffffff !important;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
  font-weight: 600;
}

/* Page Headers */
.page-header {
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: var(--dark-color);
  font-weight: 700;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.card-title {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-text.display-4 {
  font-weight: 700;
  color: var(--dark-color);
}

/* Dashboard Metric Cards */
.metric-card {
  min-height: 140px;
}

.metric-card .card-text.display-4 {
  font-size: 2rem !important;
  line-height: 1.2;
  word-wrap: break-word;
  word-break: break-all;
}

.metric-card .card-title {
  font-size: 0.875rem !important;
  margin-bottom: 0.5rem;
}

.metric-card .d-flex {
  height: 100%;
  align-items: center;
}

.metric-card .bg-light {
  min-width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Clickable Cards */
.clickable-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.clickable-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.clickable-card:active {
  transform: translateY(-2px);
}

.clickable-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.clickable-card:hover::after {
  opacity: 1;
}

/* Revenue Card - Full Width */
.revenue-card {
  min-height: 120px;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.revenue-amount {
  font-weight: 800;
  color: var(--dark-color);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  word-wrap: break-word;
  word-break: break-all;
}

.revenue-card .card-title {
  font-size: 1rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.revenue-card .bg-light {
  min-width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .revenue-amount {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .revenue-card .bg-light {
    min-width: 60px;
    height: 60px;
  }
  
  .revenue-card .fa-3x {
    font-size: 2rem !important;
  }
}

@media (max-width: 576px) {
  .revenue-card .d-flex {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .revenue-amount {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }
}

/* Tables */
.table-container {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  margin-bottom: 2rem;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: var(--dark-color);
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 1rem;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.table td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid #eef2f5;
}

/* Forms */
.form-control, .form-select {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 1px solid #ced4da;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.1s;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-success {
  background-color: var(--success-color);
  border: none;
}

.btn-success:hover {
  background-color: #3ab0d1;
}

/* Notification Toast / Alert */
#notification-area {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
}
