/* ============================================================
   Bhoomi Reality - Main Stylesheet
   Theme: Deep Emerald Green & Dark Navy with Amber Accents
   ============================================================ */

:root {
  --primary-color: #0f5132;
  --primary-hover: #0b3d26;
  --secondary-color: #0a192f;
  --dark-navy: #0f172a;
  --accent-gold: #d97706;
  --bg-light: #f8fafc;
  --card-border: #e2e8f0;
  
  --priority-critical: #dc3545;
  --priority-high: #fd7e14;
  --priority-medium: #ffc107;
  --priority-low: #198754;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-light);
  color: #1e293b;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Layout */
#wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  min-width: 260px;
  max-width: 260px;
  background-color: var(--dark-navy);
  color: #ffffff;
  transition: all 0.3s ease;
  z-index: 1000;
  flex-shrink: 0;
}

#sidebar .sidebar-header {
  padding: 18px 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebar .sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

#sidebar .sidebar-brand i {
  color: var(--accent-gold);
}

#sidebar ul.components {
  padding: 15px 0;
}

#sidebar ul li a {
  padding: 12px 20px;
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  color: #cbd5e1;
  text-decoration: none;
  transition: 0.2s ease-in-out;
  border-left: 4px solid transparent;
}

#sidebar ul li a i {
  width: 24px;
  font-size: 1.1rem;
  margin-right: 10px;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent-gold);
}

#sidebar ul.submenu {
  list-style: none;
  padding-left: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

#sidebar ul.submenu li a {
  padding-left: 48px;
  font-size: 0.875rem;
}

/* Main Content Area */
#content {
  width: 100%;
  min-width: 0;
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-bar {
  max-width: 380px;
  width: 100%;
}

.search-bar .form-control {
  border-radius: 20px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding-left: 38px;
}

.search-bar i {
  position: absolute;
  left: 14px;
  top: 10px;
  color: #94a3b8;
}

/* Header Action Controls */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-emerald {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
}
.btn-emerald:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

/* KPI Cards */
.kpi-card {
  background-color: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 5px;
  margin-bottom: 2px;
  color: #0f172a;
}

.kpi-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  line-height: 1.2;
}

/* Priority Customer Cards */
.priority-card {
  border-left: 5px solid #cbd5e1;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 15px;
  transition: all 0.2s ease;
}

.priority-card.critical {
  border-left-color: var(--priority-critical);
  background-color: #fff5f5;
}

.priority-card.high {
  border-left-color: var(--priority-high);
  background-color: #fffaf0;
}

.priority-card.medium {
  border-left-color: var(--priority-medium);
}

.priority-card.low {
  border-left-color: var(--priority-low);
}

.priority-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Badges */
.badge-priority-critical {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.badge-priority-high {
  background-color: #ffe5d0;
  color: #b24100;
  border: 1px solid #fecba1;
}

.badge-priority-medium {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
}

.badge-priority-low {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

/* Mobile Quick Actions Bar & Floating Button (FAB) */
.mobile-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.mobile-fab:hover {
  transform: scale(1.1);
  color: #ffffff;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 600;
}
.btn-whatsapp:hover {
  background-color: #1eb855;
  color: #ffffff;
}

/* Mobile Responsive Optimization */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -260px;
    position: fixed;
    height: 100vh;
  }
  #sidebar.active {
    margin-left: 0;
  }
  .top-navbar {
    padding: 10px 15px;
  }
  .nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
  }
  .table-responsive {
    border: 0;
  }
}

/* Printable Sheet Adjustments */
@media print {
  #sidebar, .top-navbar, .no-print, .mobile-fab {
    display: none !important;
  }
  #content {
    margin: 0 !important;
    padding: 0 !important;
  }
}
