/**
 * BookMyGPS Command PRO - Clean Professional Enterprise Light Theme
 */
:root {
  --bmg-primary: #0066cc;
  --bmg-primary-rgb: 0, 102, 204;
  --bmg-success: #10b981;
  --bmg-warning: #f59e0b;
  --bmg-danger: #ef4444;
  --bmg-info: #06b6d4;
  --bmg-purple: #8b5cf6;
  --bmg-card-radius: 12px;
  --bmg-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Permanent Crisp Light Palette */
  --tblr-body-bg: #f8fafc;
  --tblr-bg-surface: #ffffff;
  --tblr-bg-surface-secondary: #f1f5f9;
  --tblr-border-color: #e2e8f0;
  --tblr-body-color: #1e293b;
  --tblr-muted: #64748b;

  --tblr-navbar-vertical-width: 260px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  background-color: var(--tblr-body-bg);
  color: var(--tblr-body-color);
}

/* Ensure Page Layout & Sidebar Separation (No Merging / No Overlap) */
@media (min-width: 992px) {
  .navbar-vertical.navbar-expand-lg {
    width: 260px !important;
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    overflow: hidden !important;
  }

  .navbar-vertical.navbar-expand-lg ~ .page-wrapper,
  .page-wrapper {
    margin-left: 260px !important;
    min-width: 0 !important;
    width: calc(100% - 260px) !important;
  }
}

/* Eliminate Dual Scrollbars on Sidebar */
#proSidebar {
  overflow: hidden !important;
}

#proSidebar .container-fluid {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#sidebar-menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

#sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

#sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glass & Card enhancements */
.card-pro {
  background-color: var(--tblr-bg-surface);
  border-radius: var(--bmg-card-radius);
  border: 1px solid var(--tblr-border-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  transition: var(--bmg-transition);
}

.card-pro:hover {
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.06);
  border-color: rgba(var(--bmg-primary-rgb), 0.25);
}

/* Metric KPI card */
.kpi-card {
  position: relative;
  overflow: hidden;
  background-color: #ffffff !important;
  border-radius: var(--bmg-card-radius);
  border: 1px solid var(--tblr-border-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  transition: var(--bmg-transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  border-color: rgba(var(--bmg-primary-rgb), 0.3);
}

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

/* Pulsing Status Dot */
.status-indicator-pro {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
}

.status-indicator-pro.pulse-online {
  background-color: var(--bmg-success);
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse-green 2s infinite;
}

.status-indicator-pro.pulse-warning {
  background-color: var(--bmg-warning);
}

.status-indicator-pro.pulse-offline {
  background-color: var(--bmg-danger);
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Sidebar styling */
.navbar-vertical.navbar-pro {
  background-color: #ffffff !important;
  border-right: 1px solid var(--tblr-border-color);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.02);
}

.navbar-pro .nav-link {
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin: 0.15rem 0.5rem;
  font-weight: 500;
  color: #334155;
  transition: var(--bmg-transition);
}

.navbar-pro .nav-link .icon {
  color: #64748b;
  font-size: 1.25rem;
}

.navbar-pro .nav-link:hover {
  background: #f1f5f9;
  color: var(--bmg-primary);
}

.navbar-pro .nav-link:hover .icon {
  color: var(--bmg-primary);
}

.navbar-pro .nav-link.active {
  background: var(--bmg-primary);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(var(--bmg-primary-rgb), 0.3);
}

.navbar-pro .nav-link.active .icon {
  color: #ffffff !important;
}

.sidebar-category-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 1rem 1.25rem 0.35rem;
}

/* Gateway Monitor Bar */
.gateway-bar {
  background: #ffffff;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--bmg-card-radius);
  padding: 0.65rem 1rem;
}

.gateway-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

/* Table styling */
.table-pro th {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748b;
  background-color: #f8fafc !important;
  border-top: none;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}

.table-pro td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   Super-Admin Cockpit & Compact Density Utility Styles
   ========================================================================== */
.cockpit-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
}

.cockpit-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease-in-out;
}

.cockpit-kpi:hover {
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.08);
  transform: translateY(-1px);
}

.cockpit-kpi .kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cockpit-kpi .kpi-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
}

.cockpit-kpi .kpi-sub {
  font-size: 0.73rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.table-compact th, .table-compact td {
  padding: 0.55rem 0.85rem !important;
  font-size: 0.82rem;
}

.card-compact {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
}

.card-compact .card-header {
  padding: 0.75rem 1.1rem !important;
  min-height: auto;
  background-color: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.card-compact .card-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-xs {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.25;
  border-radius: 5px;
}
