/* Modern Dashboard Theme - S4 AdOps AI */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #7209b7;
  --success: #2ec4b6;
  --info: #4cc9f0;
  --warning: #ff9f1c;
  --danger: #e63946;
  --light: #f8f9fa;
  --dark: #212529;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --body-bg: #f5f7fa;
  --sidebar-bg: #ffffff;
  --sidebar-width: 260px;
  --header-height: 60px;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.1);
  --border-radius: 0.5rem;
  --transition: all 0.2s ease-in-out;
}

/* Base styles - Mobile first approach */
html, body {
  font-size: 14px;
  height: 100%;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  html, body {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--gray-800);
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Layout Structure */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  margin-top: var(--header-height);
}

.main-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  width: 100%;
}

@media (min-width: 768px) {
  .main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
  }
}

.main-content-full {
  padding: 1rem;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

@media (min-width: 768px) {
  .main-content-full {
    padding: 1.5rem;
  }
}

/* Header styling */
.navbar-dark {
  background: linear-gradient(to right, var(--primary), var(--secondary)) !important;
  box-shadow: var(--shadow);
  height: var(--header-height);
  padding: 0 0.75rem;
  transition: transform 0.3s ease;
  z-index: 1030;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .navbar-dark {
    padding: 0 1.5rem;
  }
}

.header-hidden {
  transform: translateY(-100%);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  height: var(--header-height);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  text-decoration: none;
}

@media (min-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
    padding: 0 1rem;
    max-width: none;
  }
}

.navbar-brand:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Fixed Navigation Toggler - Mobile Only */
.navbar-dark .navbar-toggler {
  border: none;
  padding: 0.375rem;
  margin-left: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-dark .navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.2);
}

.navbar-dark .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  outline: none;
}

/* Ensure toggler is hidden on desktop */
@media (min-width: 768px) {
  .navbar-toggler {
    display: none !important;
  }
}

/* Simple hamburger icon - SVG based for reliability */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  width: 1.5em;
  height: 1.5em;
  border: none;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.15);
}

/* Sidebar styles - Mobile first */
.sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  z-index: 1000;
  padding: 0;
  background-color: var(--sidebar-bg);
  box-shadow: var(--shadow-lg);
  width: 280px;
  max-width: 85vw;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  border-right: none;
}

.sidebar.show {
  transform: translateX(0);
  box-shadow: var(--shadow-lg);
}

.sidebar.collapsing {
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .sidebar {
    transform: translateX(0) !important;
    top: var(--header-height);
    padding-top: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    width: var(--sidebar-width);
    max-width: none;
    position: fixed;
    z-index: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .sidebar.show,
  .sidebar.collapse,
  .sidebar.collapsing {
    transform: translateX(0) !important;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

@media (min-width: 768px) {
  .sidebar-overlay {
    display: none !important;
  }
}

.sidebar-sticky {
  position: relative;
  top: 0;
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

.sidebar-sticky::-webkit-scrollbar {
  width: 3px;
}

.sidebar-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
  background-color: var(--gray-400);
  border-radius: 10px;
}

@media (min-width: 768px) {
  .sidebar-sticky {
    padding: 1.5rem 1rem;
    max-height: calc(100vh - var(--header-height));
  }
}

.sidebar .nav-link {
  font-weight: 500;
  color: var(--gray-700);
  padding: 0.875rem 1rem;
  margin-bottom: 0.125rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  font-size: 0.9rem;
  min-height: 44px; /* Better touch target */
  text-decoration: none;
}

.sidebar .nav-link:hover {
  color: var(--primary);
  background-color: rgba(67, 97, 238, 0.08);
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  color: var(--primary);
  background-color: rgba(67, 97, 238, 0.12);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

.sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 0 2px 2px 0;
}

.sidebar .nav-link i, 
.sidebar .nav-link .feather {
  margin-right: 12px;
  color: var(--gray-500);
  font-size: 1rem;
  width: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.sidebar .nav-link:hover i,
.sidebar .nav-link:hover .feather {
  color: var(--primary);
  transform: scale(1.1);
}

.sidebar .nav-link.active i,
.sidebar .nav-link.active .feather {
  color: var(--primary);
}

.sidebar-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 700;
  padding: 1.25rem 1rem 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--gray-200);
}

.sidebar-heading:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0.75rem;
}

@media (min-width: 768px) {
  .sidebar-heading {
    font-size: 0.75rem;
    padding: 1.5rem 1rem 0.75rem;
  }
}

/* Card and tables */
.card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow);
}

/* Card animations */
.card-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.card-animate {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .card-header {
    padding: 1.25rem 1.5rem;
  }
}

.card-body {
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .card-body {
    padding: 1.5rem;
  }
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
}

@media (min-width: 768px) {
  .card-footer {
    padding: 1.25rem 1.5rem;
  }
}

.table {
  width: 100%;
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
  border-top: none;
  border-bottom-width: 1px;
  padding: 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .table th {
    padding: 1rem;
    font-size: 0.875rem;
  }
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-color: var(--gray-200);
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .table td {
    padding: 1rem;
    font-size: 1rem;
  }
}

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

/* Responsive table for mobile */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .btn {
    padding: 0.5rem 1rem;
  }
}

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

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

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

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

/* Forms */
.form-control {
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}

@media (min-width: 768px) {
  .form-control {
    padding: 0.5rem 1rem;
  }
}

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

.form-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

/* Dashboard cards */
.stat-card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

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

.stat-card .icon-shape {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  width: 2.5rem;
  height: 2.5rem;
  color: white;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .stat-card .icon-shape {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
}

.stat-card .stat-amount {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .stat-card .stat-amount {
    font-size: 1.75rem;
  }
}

.stat-card .stat-label {
  color: var(--gray-600);
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .stat-card .stat-label {
    font-size: 0.875rem;
  }
}

/* Campaign status styles */
.campaign-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .campaign-status {
    flex-wrap: nowrap;
  }
}

.status-select {
  width: auto;
  display: inline-block;
}

/* Alerts */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 0.75rem 1rem;
}

@media (min-width: 768px) {
  .alert {
    padding: 1rem 1.5rem;
  }
}

.alert-dismissible .btn-close {
  padding: 1rem;
}

@media (min-width: 768px) {
  .alert-dismissible .btn-close {
    padding: 1.25rem;
  }
}

/* HTMX indicator styles */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
  opacity: 1
}
.htmx-request.htmx-indicator {
  opacity: 1
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Footer styles */
.footer {
  width: 100%;
  background-color: white;
  border-top: 1px solid var(--gray-200);
  padding: 1rem 0;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .footer {
    padding: 1.5rem 0;
    font-size: 0.875rem;
  }
}

/* Loading animation */
.loading-pulse {
  display: inline-block;
  position: relative;
  width: 1rem;
  height: 1rem;
}

.loading-pulse:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

/* Toast notifications */
.toast-container {
  z-index: 1050;
}

.toast {
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Dropdown menu styling */
.dropdown-menu {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  animation: fadeIn 0.2s ease;
}

.dropdown-item {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  transition: var(--transition);
}

.dropdown-item:hover, 
.dropdown-item:focus {
  background-color: rgba(67, 97, 238, 0.05);
  color: var(--primary);
}

.dropdown-header {
  color: var(--gray-600);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.25rem;
}

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

/* Progress bars */
.progress {
  height: 0.5rem;
  background-color: var(--gray-200);
  border-radius: 1rem;
  overflow: hidden;
}

.progress-bar {
  border-radius: 1rem;
  background-image: linear-gradient(to right, var(--primary), var(--secondary));
}

/* App table badges */
.badge {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 0.375rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.badge i {
  font-size: 0.7rem !important;
}

.badge.bg-success {
  background-color: var(--success) !important;
  color: white !important;
}

.badge.bg-info {
  background-color: var(--info) !important;
  color: white !important;
}

.badge.bg-warning {
  background-color: var(--warning) !important;
  color: var(--dark) !important;
}

.badge.bg-primary {
  background-color: var(--primary) !important;
  color: white !important;
}

.badge.bg-secondary {
  background-color: var(--gray-600) !important;
  color: white !important;
}

.badge.bg-danger {
  background-color: var(--danger) !important;
  color: white !important;
}

.text-dark {
  color: var(--dark) !important;
}

.text-white {
  color: white !important;
}

.d-block {
  display: block !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

/* Utility classes for spacing and layout */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* Mobile optimizations */
.mobile-hidden {
  display: none;
}

@media (min-width: 768px) {
  .mobile-hidden {
    display: block;
  }
}

/* Touch-friendly adjustments for mobile */
@media (max-width: 767px) {
  /* Improve touch targets */
  .btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .form-control {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .dropdown-item {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  /* Better spacing for mobile cards */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  /* Improve table responsiveness */
  .table {
    font-size: 0.9rem;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
  }
  
  /* Mobile-specific navigation improvements */
  .sidebar .nav-link {
    padding: 1rem;
    font-size: 1rem;
    min-height: 52px;
  }
  
  .sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 1rem;
  }
  
  .sidebar-heading {
    padding: 1rem;
    font-size: 0.8rem;
  }
  
  /* Prevent zoom on input focus for iOS */
  input[type="color"],
  input[type="date"],
  input[type="datetime"],
  input[type="datetime-local"],
  input[type="email"],
  input[type="month"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="text"],
  input[type="time"],
  input[type="url"],
  input[type="week"],
  select:focus,
  textarea {
    font-size: 1rem;
  }
  
  /* Better notification positioning on mobile */
  .toast-container {
    bottom: 20px !important;
    right: 20px !important;
    left: 20px !important;
    width: auto !important;
  }
  
  .toast {
    width: 100% !important;
    margin-bottom: 0.5rem;
  }
}

/* Smooth scrolling and scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus styles for better accessibility */
.sidebar .nav-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  background-color: rgba(67, 97, 238, 0.1);
}

.navbar-dark .navbar-toggler:focus {
  outline: none;
}

/* Loading states for better UX */
.nav-link.loading {
  pointer-events: none;
  opacity: 0.7;
}

.nav-link.loading i:first-child {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Improved dropdown positioning on mobile */
@media (max-width: 767px) {
  .dropdown-menu {
    width: 100%;
    border-radius: var(--border-radius);
    margin-top: 0.25rem;
  }
  
  .dropdown-menu-end {
    right: 0;
    left: auto;
  }
}

/* Enhanced focus indicators */
button:focus,
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .sidebar {
    transition: none;
  }
  
  .navbar-toggler-icon,
  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    transition: none;
  }
}

/* Date Range Picker */
.date-range-input {
  cursor: pointer;
  background-color: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  transition: var(--transition);
  width: 100%;
  font-size: 0.9rem;
}

.date-range-input:hover {
  border-color: var(--gray-400);
}

.date-range-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.daterangepicker {
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  margin-top: 10px;
}

.daterangepicker .calendar-table {
  border-radius: 6px;
  background-color: #fff;
}

.daterangepicker .drp-calendar {
  padding: 16px;
  max-width: none;
}

.daterangepicker .calendar-table th, 
.daterangepicker .calendar-table td {
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 36px;
  text-align: center;
  vertical-align: middle;
}

.daterangepicker td.active, 
.daterangepicker td.active:hover {
  background-color: var(--primary);
  border-color: transparent;
  color: #fff;
}

.daterangepicker td.in-range {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--gray-700);
  border-color: transparent;
}

.daterangepicker td.available:hover {
  background-color: var(--gray-200);
}

.daterangepicker .month {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.daterangepicker .ranges li {
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.daterangepicker .ranges li:hover {
  background-color: var(--gray-200);
}

.daterangepicker .ranges li.active {
  background-color: var(--primary);
  color: #fff;
}

.daterangepicker .drp-buttons {
  padding: 12px;
  border-top: 1px solid var(--gray-300);
}

.daterangepicker .drp-buttons .btn {
  margin-left: 8px;
  font-size: 0.9rem;
}

.daterangepicker .drp-buttons .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.daterangepicker .drp-buttons .btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.daterangepicker .drp-buttons .btn-default {
  background-color: #fff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.daterangepicker .drp-buttons .btn-default:hover {
  background-color: var(--gray-200);
}

.daterangepicker .drp-selected {
  font-size: 0.9rem;
  color: var(--gray-700);
}

/* Mobile friendly adjustments for date range picker */
@media (max-width: 767px) {
  .daterangepicker {
    width: 100%;
    left: 0 !important;
    right: 0 !important;
  }
  
  .daterangepicker .drp-calendar {
    max-width: 100%;
  }
  
  .daterangepicker .ranges {
    float: none;
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Container utilities */
.container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Ensure content takes proper space */
.main-content .container-fluid,
.main-content-full .container-fluid {
  padding: 0;
  width: 100%;
  max-width: none;
}

/* Real-time Progress Display Styles */
#progressDisplay {
  max-height: 400px;
  overflow-y: hidden;
}

#progressSteps {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) transparent;
}

#progressSteps::-webkit-scrollbar {
  width: 6px;
}

#progressSteps::-webkit-scrollbar-track {
  background: transparent;
}

#progressSteps::-webkit-scrollbar-thumb {
  background-color: var(--gray-400);
  border-radius: 3px;
}

#progressSteps::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray-600);
}

.progress-step {
  animation: fadeInLeft 0.3s ease-in-out;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#realTimeProgressBar {
  transition: width 0.6s ease-in-out;
}

.smaller {
  font-size: 0.75rem;
}

/* Progress step badges */
.badge.bg-info {
  background-color: var(--info) !important;
}

.badge.bg-success {
  background-color: var(--success) !important;
}

.badge.bg-warning {
  background-color: var(--warning) !important;
}

.badge.bg-danger {
  background-color: var(--danger) !important;
}

/* Modal enhancements for progress */
.modal-body #progressDisplay .card {
  border: none;
  box-shadow: var(--shadow-sm);
}

.modal-body #progressDisplay .card-header {
  background: linear-gradient(45deg, var(--info), var(--primary));
  border: none;
}

/* Responsive adjustments for progress display */
@media (max-width: 767px) {
  #progressDisplay {
    max-height: 350px;
  }
  
  #progressSteps {
    max-height: 200px;
  }
  
  .badge {
    font-size: 0.7rem;
  }
  
  .smaller {
    font-size: 0.7rem;
  }
}

/* App Mappings Page Styles */
#progressSteps {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) transparent;
}

#progressSteps::-webkit-scrollbar {
  width: 6px;
}

#progressSteps::-webkit-scrollbar-track {
  background: transparent;
}

#progressSteps::-webkit-scrollbar-thumb {
  background-color: var(--gray-400);
  border-radius: 3px;
}

#progressSteps::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray-600);
}

/* Conversion Search Results Styles */
#conversionSearchContainer .card {
  animation: slideInUp 0.3s ease-in-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#conversionSearchResults .card-header {
  border-bottom: 1px solid rgba(0,0,0,0.125);
}

#conversionSearchResults .bg-light {
  border: 1px solid var(--gray-300);
  transition: all 0.2s ease;
}

#conversionSearchResults .bg-light:hover {
  background-color: var(--gray-200) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Navigation button disabled state */
.btn.btn-secondary[disabled] {
  background-color: var(--gray-400) !important;
  border-color: var(--gray-400) !important;
  color: var(--gray-600) !important;
  cursor: not-allowed;
}

.btn.btn-secondary[disabled]:hover {
  background-color: var(--gray-400) !important;
  border-color: var(--gray-400) !important;
  color: var(--gray-600) !important;
  transform: none;
}

/* Success/Warning card animations */
.card.border-success {
  animation: successPulse 0.5s ease-in-out;
}

/* Commented out - causing AdMob card visibility issue
.card.border-warning {
  animation: warningShake 0.5s ease-in-out;
}
*/

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes warningShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Loading spinner in conversion search */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Responsive adjustments for conversion results */
@media (max-width: 767px) {
  #conversionSearchResults .row .col-md-6 {
    margin-bottom: 1rem;
  }
  
  #conversionSearchResults .card-body ol {
    font-size: 0.9rem;
  }
  
  #conversionSearchResults .alert {
    padding: 0.75rem;
  }
}

/* App Mappings Specific Styles */
.app-description-truncate {
  max-width: 200px;
  word-wrap: break-word;
}

.initial-progress-width {
  width: 25%;
}

.progress-zero-width {
  width: 0%;
}

.btn-hidden {
  display: none;
}

/* Media Assets Configuration Styles */
.bg-gradient-media {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.media-tabs-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.media-tab {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.media-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.media-tab.active {
    border-color: #007bff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,123,255,0.3);
}

.media-tab-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.media-tab.active .media-tab-icon {
    color: white;
    transform: scale(1.1);
}

.media-tab-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #343a40;
}

.media-tab.active .media-tab-title {
    color: white;
}

.media-tab-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.media-tab.active .media-tab-subtitle {
    color: rgba(255,255,255,0.9);
}

.media-tab-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-tab-status.available {
    background: #d4edda;
    color: #155724;
}

.media-tab.active .media-tab-status.available {
    background: rgba(255,255,255,0.2);
    color: white;
}

.media-tab-status.coming-soon {
    background: #fff3cd;
    color: #856404;
}

.media-tab.active .media-tab-status.coming-soon {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Media Panels */
.media-panel {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

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

.media-panel-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid #dee2e6;
}

.panel-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
    color: white;
}

.panel-icon.images {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.panel-icon.videos {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.panel-icon.html5 {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 5px;
}

.panel-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
}

.panel-toggle .form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
}

/* Configuration Cards */
.configuration-card, .features-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
    height: 100%;
}

.config-title, .features-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.generation-estimate {
    margin-top: 20px;
}

.estimate-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
}

.estimate-icon {
    font-size: 2rem;
    margin-right: 15px;
    opacity: 0.8;
}

.estimate-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

.estimate-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.feature-item i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 20px;
}

.feature-item span {
    font-weight: 600;
    color: #343a40;
}

/* Formats Info */
.formats-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.formats-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 12px;
}

.formats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
}

.format-badge i {
    margin-right: 8px;
    color: #6c757d;
}

/* Coming Soon Content */
.coming-soon-content {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.coming-soon-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
    opacity: 0.6;
}

.coming-soon-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 15px;
}

.coming-soon-description {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.feature-preview {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.feature-preview i {
    color: #6c757d;
    margin-right: 12px;
    font-size: 1.1rem;
}

.feature-preview span {
    color: #495057;
    font-weight: 500;
}

/* Generation Summary */
.generation-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.summary-card {
    background: white;
    margin: 3px;
    border-radius: 12px;
}

.summary-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
}

.summary-body {
    padding: 25px;
}

.summary-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
    color: white;
}

.summary-icon.images {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.summary-icon.videos {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.summary-icon.html5 {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

.summary-icon.disabled {
    background: #6c757d;
    opacity: 0.5;
}

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #343a40;
}

.summary-footer {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 0 0 12px 12px;
    margin: 0 -25px -25px;
}

.total-estimate .estimate-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

.total-estimate .estimate-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #343a40;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge.ready {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-tab {
        margin: 10px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .formats-list {
        gap: 6px;
    }
    
    .summary-item {
        padding: 15px;
    }
    
    .coming-soon-content {
        padding: 40px 15px;
    }
} 

/* Campaign Status Component Improvements */
.campaign-status-wrapper {
    display: inline-block;
    min-width: 200px;
}

.campaign-status-wrapper .status-select {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: all 0.15s ease-in-out;
}

.campaign-status-wrapper .status-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.campaign-status-wrapper .status-select:hover {
    border-color: #b3d7ff;
}

.campaign-status-wrapper .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    white-space: nowrap;
}

.campaign-status-wrapper .badge.bg-success {
    background-color: #198754 !important;
    color: white;
}

.campaign-status-wrapper .badge.bg-warning {
    background-color: #fd7e14 !important;
    color: white;
}

.campaign-status-wrapper .badge.bg-danger {
    background-color: #dc3545 !important;
    color: white;
}

.campaign-status-wrapper {
    transition: all 0.3s ease-in-out;
}

.campaign-status-wrapper:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.campaign-status-wrapper.htmx-request {
    opacity: 0.6;
    pointer-events: none;
}

@media (max-width: 768px) {
    .campaign-status-wrapper {
        min-width: auto;
        width: 100%;
    }
    
    .campaign-status-wrapper .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

