/* ===========================
   Root Variables & Base Styles
   =========================== */
:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --primary-light: #6ea8fe;
  --success: #198754;
  --info: #0dcaf0;
  --warning: #ffc107;
  --danger: #dc3545;
  --purple: #6f42c1;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #212529;
  background-color: #f8f9fa;
  line-height: 1.6;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.brand-text {
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 80%;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
  padding: 5rem 0;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
  animation: fadeInUp 0.8s ease;
}

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

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-image-wrapper {
  position: relative;
  animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image-card {
  transform: rotate(-5deg);
  transition: transform 0.3s ease;
}

.hero-image-card:hover {
  transform: rotate(0deg);
}

.avatar-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.list-preview {
  margin-top: 1rem;
}

.list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item.completed {
  opacity: 0.6;
}

.list-item.completed span {
  text-decoration: line-through;
}

/* ===========================
   Features Section
   =========================== */
.features-section {
  padding: 5rem 0;
  background-color: white;
}

.feature-card {
  padding: 2rem;
  border-radius: 15px;
  background: white;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Soft background colors */
.bg-primary-soft { background-color: rgba(13, 110, 253, 0.1); }
.bg-success-soft { background-color: rgba(25, 135, 84, 0.1); }
.bg-info-soft { background-color: rgba(13, 202, 240, 0.1); }
.bg-warning-soft { background-color: rgba(255, 193, 7, 0.1); }
.bg-danger-soft { background-color: rgba(220, 53, 69, 0.1); }
.bg-purple-soft { background-color: rgba(111, 66, 193, 0.1); }

.text-purple { color: var(--purple); }

/* ===========================
   Stats Section
   =========================== */
.stats-section {
  padding: 4rem 0;
}

.stat-card {
  padding: 2rem 1rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-card {
  background: white;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* ===========================
   Buttons
   =========================== */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: none;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-outline-secondary {
  border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
  transform: translateY(-2px);
  background-color: #6c757d;
  border-color: #6c757d;
}

/* ===========================
   Footer
   =========================== */
.footer {
  margin-top: 5rem;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.social-links a {
  transition: all 0.2s ease;
}

.social-links a:hover {
  color: white !important;
  transform: translateY(-2px);
}

/* ===========================
   Badges
   =========================== */
.badge {
  font-weight: 600;
  border-radius: 8px;
}

/* ===========================
   Cards
   =========================== */
.card {
  border-radius: 15px;
  transition: all 0.3s ease;
}

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

/* ===========================
   Utilities
   =========================== */
.min-vh-75 {
  min-height: 75vh;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

.bg-white-50 {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 3rem 0;
    min-height: auto;
  }
  
  .display-3 {
    font-size: 2.5rem;
  }
  
  .hero-image-card {
    transform: rotate(0deg);
  }
}

@media (max-width: 767.98px) {
  .display-3 {
    font-size: 2rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .cta-card {
    padding: 2rem;
  }
}

/* ===========================
   Dashboard Styles (for future use)
   =========================== */
.dashboard-sidebar {
  background: white;
  box-shadow: var(--shadow);
  border-radius: 15px;
  padding: 1.5rem;
}

.dashboard-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

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

.dashboard-card.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* Log Level Badges */
.log-level-info { background-color: #0dcaf0; }
.log-level-warning { background-color: #ffc107; color: #000; }
.log-level-error { background-color: #dc3545; }
.log-level-fatal { background-color: #721c24; }
.log-level-debug { background-color: #6c757d; }

/* Table Styles for Admin */
.table-admin {
  font-size: 0.9rem;
}

.table-admin th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #6c757d;
}

/* Status Indicators */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.online { background-color: #198754; }
.status-dot.offline { background-color: #6c757d; }
.status-dot.warning { background-color: #ffc107; }
.status-dot.error { background-color: #dc3545; }

/* Metric Cards */
.metric-card {
  text-align: center;
  padding: 1.5rem;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-change {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.metric-change.positive { color: #198754; }
.metric-change.negative { color: #dc3545; }

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Admin Navigation Pills */
.nav-pills-admin .nav-link {
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s ease;
}

.nav-pills-admin .nav-link:hover {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--primary);
}

.nav-pills-admin .nav-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

/* User Avatar Sizes */
.avatar-sm { width: 32px; height: 32px; font-size: 0.875rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.25rem; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

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

/* Pagination Styles */
.pagination .page-link {
  border-radius: 8px;
  margin: 0 2px;
  border: none;
  color: var(--primary);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
}

/* Dropdown Menu Styles */
.dropdown-menu {
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,0.05);
}

.dropdown-item {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin: 2px 6px;
  width: calc(100% - 12px);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

.dropdown-item.text-danger:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* Form Styles for Admin */
.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: #495057;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.input-group-text {
  border-radius: 8px 0 0 8px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-right: none;
}

/* Alert Styles */
.alert {
  border-radius: 10px;
  border: none;
}

.alert-success {
  background-color: rgba(25, 135, 84, 0.1);
  color: #0f5132;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #842029;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.15);
  color: #664d03;
}

.alert-info {
  background-color: rgba(13, 202, 240, 0.1);
  color: #055160;
}

/* ===========================
   Focus States
   =========================== */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}