@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --info: #4895ef;
  --warning: #f72585;
  --danger: #e63946;
  --light: #f8f9fa;
  --dark: #212529;
  --bg-color: #f0f2f5;
  --card-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --text-main: #2b2d42;
  --text-muted: #6c757d;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
  --radius-md: 12px;
  --radius-lg: 20px;
}

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 100% 0%, rgba(67, 97, 238, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 0% 100%, rgba(247, 37, 133, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
}

/* Glassmorphism Cards */
.card, .glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  background: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Auth Layout Styling */
.auth-bg {
  background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 3rem;
  width: 100%;
  max-width: 450px;
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

/* Form Controls */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
  background-color: #fff;
}

/* Dashboard Sidebar */
.wrapper {
  display: flex;
  min-height: 100vh;
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, #1e2130 0%, #151821 100%);
  min-height: 100vh;
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  transition: transform 0.25s ease-in-out;
}

.sidebar.show {
  transform: translateX(0);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 10;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1.25rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-nav {
  padding: 1rem 0 1.25rem;
  flex: 1 1 auto;
}

.sidebar .nav-link {
  color: rgba(255,255,255,0.75);
  border-radius: 0.75rem;
  margin: 0.25rem 0.75rem;
  padding: 0.85rem 1rem;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
  transform: translateX(6px);
}

.sidebar-footer {
  padding: 1rem 1.25rem 1.5rem;
}

.main {
  flex: 1 1 auto;
  margin-left: 260px;
  min-height: 100vh;
  width: calc(100% - 260px);
  padding: 1.5rem 2rem;
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  display: block;
}

.navbar-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 15;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    width: 260px;
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding: 1rem 1rem 1.5rem;
  }

  .navbar-mobile {
    display: flex;
  }
}

.text-gray-800 {
  color: #1f2937 !important;
}

/* Status Badges */
.status-badge {
  padding: 0.35em 0.8em;
  border-radius: 50px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.status-new { background-color: #e0f2fe; color: #0284c7; }
.status-contacted { background-color: #fef08a; color: #ca8a04; }
.status-interested { background-color: #ddd6fe; color: #7c3aed; }
.status-demo-scheduled { background-color: #fed7aa; color: #ea580c; }
.status-follow-up { background-color: #bfdbfe; color: #2563eb; }
.status-converted { background-color: #bbf7d0; color: #16a34a; }
.status-lost { background-color: #fecaca; color: #dc2626; }
.status-completed { background-color: #dcfce7; color: #166534; }
.status-pending { background-color: #fef9c3; color: #854d0e; }

/* Tables */
.table {
  vertical-align: middle;
}

.table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom-width: 1px;
  border-color: rgba(0,0,0,0.05);
  letter-spacing: 0.5px;
}

.table td {
  border-color: rgba(0,0,0,0.05);
  color: var(--text-main);
  font-weight: 500;
}

/* Topbar */
.topbar {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  margin-bottom: 2rem;
  border-radius: 0 0 20px 20px;
}

/* Page wrapper for padding */
.page-wrapper {
  padding: 1.5rem;
}

/* Micro-animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Timeline for Audit Logs */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: rgba(0,0,0,0.05);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.timeline-content {
  background: rgba(255,255,255,0.6);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid rgba(0,0,0,0.03);
}
