/**
 * SmartFarm × Tabler Theme Overrides & Design Tokens
 * Comprehensive visual system alignment for modern, clean, and professional Tabler UI presentation.
 */

:root {
  --tblr-primary: #1a3c5e;
  --tblr-primary-rgb: 26, 60, 94;
  --tblr-success: #27ae60;
  --tblr-success-rgb: 39, 174, 96;
  --tblr-warning: #f39c12;
  --tblr-warning-rgb: 243, 156, 18;
  --tblr-danger: #dc3545;
  --tblr-danger-rgb: 220, 53, 69;
  --tblr-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --tblr-bg-surface: #ffffff;
  --tblr-body-bg: #f8fafc;
}

body {
  font-family: var(--tblr-font-sans-serif) !important;
  background-color: #f8fafc !important;
  color: #1e293b !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.form-label, label {
  color: #334155 !important;
  font-weight: 600 !important;
}

.form-control, .form-select {
  font-family: var(--tblr-font-sans-serif) !important;
  color: #0f172a !important;
}

/* ==========================================================================
   TABLER NATIVE SIDEBAR & OVERRIDES
   ========================================================================== */
#sidebar {
  min-width: 260px !important;
  max-width: 260px !important;
  background: #1e293b !important; /* Modern Tabler Slate dark */
  color: #94a3b8 !important;
  transition: all 0.3s ease !important;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08) !important;
  border-right: 1px solid #334155 !important;
}

.sidebar-header-wrapper {
  background: #0f172a !important;
  padding: 1.25rem 1rem !important;
  border-bottom: 1px solid #334155 !important;
}

.sidebar-header-wrapper .logo {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.sidebar-header-wrapper .logo-icon {
  height: 38px !important;
  width: auto !important;
  margin-top: 0 !important;
}

#sidebar ul.components {
  padding: 1rem 0 !important;
  margin-bottom: 0 !important;
}

#sidebar ul li a {
  padding: 0.65rem 1.25rem !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 8px !important;
  margin: 3px 12px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

#sidebar ul li a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(3px) !important;
}

#sidebar ul li.active > a {
  color: #ffffff !important;
  background: #1a3c5e !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  border-left: 3px solid #3b82f6 !important;
}

#sidebar ul.collapse {
  background: #0f172a !important;
  margin: 4px 12px !important;
  border-radius: 8px !important;
  padding: 0.5rem 0 !important;
}

#sidebar ul.collapse li a {
  margin: 2px 8px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
}

#sidebar ul.collapse li a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#sidebar .footer {
  padding: 1.25rem 1rem !important;
  background: #0f172a !important;
  border-top: 1px solid #334155 !important;
  color: #64748b !important;
  font-size: 0.78rem !important;
  text-align: center !important;
}

#sidebar .footer p {
  margin-bottom: 0 !important;
  color: #64748b !important;
}

/* ==========================================================================
   TABLER NATIVE TOP NAVBAR
   ========================================================================== */
.top-navbar {
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  margin-bottom: 1.75rem !important;
  padding: 0.75rem 1.25rem !important;
}

.sidebar_toggle_btn {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.4rem 0.75rem !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.sidebar_toggle_btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   HERO BANNERS & PAGE HEADERS (Tabler Cards)
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  border-radius: 16px !important;
  padding: 2rem 2.25rem !important;
  color: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
  margin-bottom: 2rem !important;
  position: relative !important;
  overflow: hidden !important;
}

.hero-section h2, .hero-section .display-6 {
  font-weight: 700 !important;
  letter-spacing: -0.5px !important;
}

.hero-section p {
  color: #cbd5e1 !important;
  font-size: 1.05rem !important;
}

/* ==========================================================================
   CARDS & STATS
   ========================================================================== */
.card, .feature-card, .settings-card, .activity-card, .profile-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03) !important;
  background: #ffffff !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.card:hover, .feature-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04) !important;
}

/* Lucide Icon Alignment Helpers */
.lucide-icon {
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2;
  vertical-align: -0.2em;
  display: inline-block;
}

/* Shell Distinct Top Border Accent Indicators */
body.shell-user .navbar-top-accent {
  border-top: 3px solid #1a3c5e !important;
}

body.shell-admin .navbar-top-accent {
  border-top: 3px solid #2ecc71 !important;
}

body.shell-superadmin .navbar-top-accent {
  border-top: 3px solid #f39c12 !important;
}

/* Status Badges */
.badge-status-active, .badge-success {
  background-color: rgba(39, 174, 96, 0.12) !important;
  color: #27ae60 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(39, 174, 96, 0.25) !important;
}

.badge-status-pending, .badge-warning {
  background-color: rgba(243, 156, 18, 0.12) !important;
  color: #d35400 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(243, 156, 18, 0.25) !important;
}

.badge-status-offline, .badge-danger {
  background-color: rgba(220, 53, 69, 0.12) !important;
  color: #dc3545 !important;
  font-weight: 600 !important;
  border: 1px solid rgba(220, 53, 69, 0.25) !important;
}

