/* Daily Ecom Tracker - Global Styles & Visual Enhancements */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #1e4620; /* Deep Forest Green */
  --primary-hover: #153216;
  --secondary-color: #2ecc71; /* Emerald Green Accent */
  --secondary-hover: #27ae60;
  --bg-light: #f4f7f6; /* Sage-tinted light background */
  --sidebar-bg: #143016; /* Dark green sidebar */
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #e2e8f0;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== LANDING HOMEPAGE STYLING ==================== */
.landing-hero {
  background: linear-gradient(135deg, #102611 0%, #1a3c1c 100%);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 0;
}

.landing-hero::before {
  content: "";
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(46, 204, 113, 0.15);
  top: -80px;
  left: -80px;
  filter: blur(80px);
}

.landing-hero::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(30, 70, 32, 0.35);
  bottom: -200px;
  right: -100px;
  filter: blur(100px);
}

.landing-content {
  position: relative;
  z-index: 10;
}

.landing-tagline {
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
}

.landing-title {
  font-weight: 800;
  font-size: 2.75rem;
  line-height: 1.2;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--secondary-color);
  margin-right: 16px;
  flex-shrink: 0;
}

.feature-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Landing Page Login/Register Card */
.landing-auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  color: var(--text-dark);
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.landing-auth-header {
  background: var(--primary-color);
  color: var(--white);
  padding: 2rem;
  text-align: center;
}

.landing-auth-header h4 {
  font-weight: 700;
  margin: 0;
  font-size: 1.35rem;
}

.landing-auth-body {
  padding: 2rem;
}

/* ==================== MODERN SIDEBAR LAYOUT ==================== */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  min-height: 100vh;
}

#sidebar {
  min-width: 260px;
  max-width: 260px;
  background: var(--sidebar-bg);
  color: var(--white);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

#sidebar.active {
  margin-left: -260px;
}

#sidebar .sidebar-header {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar .sidebar-header h4 {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  color: var(--white);
}

#sidebar ul.components {
  padding: 1.5rem 0;
  flex-grow: 1;
}

#sidebar ul li {
  margin: 0.25rem 1rem;
}

#sidebar ul li a {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

#sidebar ul li a i {
  margin-right: 12px;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

#sidebar ul li a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

#sidebar ul li.active > a {
  color: var(--white);
  background: var(--primary-color);
  font-weight: 600;
}

#sidebar .sidebar-footer {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Content Area */
#content {
  width: 100%;
  padding: 0;
  min-height: 100vh;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  padding: 1rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.content-body {
  padding: 2rem 1.5rem;
  flex-grow: 1;
}

/* ==================== MODERN KPI CARDS ==================== */
.card-kpi-modern {
  border-radius: 16px;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}

.card-kpi-modern:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-kpi-modern .card-body {
  padding: 1.75rem;
}

.kpi-value-modern {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.kpi-icon-modern {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.bg-white-10 {
  background-color: rgba(255, 255, 255, 0.15);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #1e4620 0%, #2ecc71 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #0b4556 0%, #2980b9 100%);
}

.bg-gradient-accent {
  background: linear-gradient(135deg, #133a1e 0%, #27ae60 100%);
}

.bg-success-light {
  background-color: rgba(46, 204, 113, 0.08);
}

/* Platform Badges & Colors */
.badge-meesho {
  background-color: #f73859;
  color: white;
}
.badge-amazon {
  background-color: #ff9900;
  color: #111;
  font-weight: 600;
}
.badge-flipkart {
  background-color: #2874f0;
  color: white;
}

.text-meesho { color: #f73859 !important; }
.text-amazon { color: #ff9900 !important; }
.text-flipkart { color: #2874f0 !important; }

/* Custom Tables */
.table-responsive {
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.custom-table {
  margin-bottom: 0;
}

.custom-table th {
  background-color: #f8fafc;
  color: var(--text-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background-color: rgba(244, 247, 246, 0.5);
}

/* Form Styles */
.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(30, 70, 32, 0.15);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

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

.btn-success:hover, .btn-success:focus {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
}

/* Legacy Card-KPI mapping for backwards compatibility */
.card-kpi {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  overflow: hidden;
  height: 100%;
}
.card-kpi:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-kpi .card-body {
  padding: 1.5rem;
}
.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.kpi-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.bg-primary-light {
  background-color: rgba(30, 70, 32, 0.08);
  color: var(--primary-color);
}
.bg-accent-light {
  background-color: rgba(46, 204, 113, 0.08);
  color: var(--secondary-color);
}
.bg-info-light {
  background-color: rgba(52, 152, 219, 0.08);
  color: #3498db;
}

/* Filters & Search Header */
.filter-bar {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* Modal Customization */
.modal {
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(4px);
}

.modal-backdrop {
  display: none !important;
}

.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  background-color: #f8fafc;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 600;
  color: var(--primary-color);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Footer Styling */
.app-footer {
  background: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Font Size Helper */
.fs-7 {
  font-size: 0.8rem;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -260px;
  }
  #sidebar.active {
    margin-left: 0;
  }
  #sidebarCollapse span {
    display: none;
  }
  .content-body {
    padding: 1rem;
  }
  .kpi-value {
    font-size: 1.5rem;
  }
  .landing-hero {
    text-align: center;
    padding: 2rem 0;
  }
  .feature-item {
    text-align: left;
  }
  .landing-title {
    font-size: 2.25rem;
  }
}

/* ==================== PREMIUM VISUAL EFFECTS & ANIMATIONS ==================== */

/* Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: rgba(30, 70, 32, 0.25);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Page Fade-In Transition */
@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-body {
  animation: fadeInPage 0.4s ease-out forwards;
}

/* Interactive elements hover effect */
.card-kpi-modern, .card-kpi, .filter-bar, .table-responsive {
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Premium Card Overrides */
.card-kpi-modern:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15), 0 4px 12px -5px rgba(0, 0, 0, 0.1);
}

/* Button micro-animations */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover, .btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

/* Sidebar navigation links enhancement */
#sidebar ul li a {
  position: relative;
  overflow: hidden;
}

#sidebar ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

#sidebar ul li a:hover::after {
  width: 80%;
}

/* Compact KPI Cards for Multiple Platforms */
.card-kpi-compact {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  overflow: hidden;
  height: 100%;
}
.card-kpi-compact:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-kpi-compact .card-body {
  padding: 1rem;
}
.card-kpi-compact .kpi-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-kpi-compact .kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.card-kpi-compact .kpi-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}


