/* Poseidon Dashboard Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #ECF2FC;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  
  --text-main: #1E293B;
  --text-muted: #8A99AD;
  
  /* Primary HSL components */
  --primary-h: 217;
  --primary-s: 91%;
  --primary-l: 60%;
  
  --accent-blue: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
  --text-active-menu: hsl(var(--primary-h), var(--primary-s), 45%);
  --bg-active-menu: hsl(var(--primary-h), var(--primary-s), 95%);
  
  --accent-orange: #F97316;
  --accent-yellow: #EAB308;
  --accent-green: #10B981;
  --accent-green-bg: #EFFDF5;
  
  --border-color: #E2E8F0;
  
  --font-sans: 'Outfit', sans-serif;
}

.dark-theme {
  --bg-main: #0B0F19;
  --bg-sidebar: #111827;
  --bg-card: #111827;
  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --border-color: #1F2937;
  --bg-active-menu: hsl(var(--primary-h), var(--primary-s), 15%);
  --text-active-menu: hsl(var(--primary-h), var(--primary-s), 65%);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Scrollbar styling for sidebar */
.sidebar-scroll::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Page Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid transparent;
}

.sidebar-brand-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1E2B4A;
}

.sidebar-brand-logo svg {
  width: 24px;
  height: 24px;
  fill: #1E2B4A;
}

.sidebar-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.75rem 1.5rem 0.5rem;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin: 0.125rem 0.75rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  color: #5E6E82;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.sidebar-nav-link:hover {
  background-color: #F8FAFC;
  color: var(--text-main);
}

.sidebar-nav-link.active {
  background-color: var(--bg-active-menu);
  color: var(--text-active-menu);
  font-weight: 500;
}

.sidebar-nav-link-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-nav-link i {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.sidebar-nav-link.active i {
  color: var(--text-active-menu);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Prevent flex items from overflowing */
  padding: 1.5rem 2rem;
}

/* Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.back-btn {
  background: none;
  border: none;
  color: #64748B;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.back-btn:hover {
  color: var(--text-main);
}

.header-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icon-btn {
  background: none;
  border: none;
  color: #64748B;
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.header-icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

.header-icon-btn.active-settings {
  border: 1.5px solid #3B82F6;
  border-radius: 8px;
  color: #3B82F6;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  background-color: #EF4444;
  border-radius: 50%;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

/* Dashboard Cards */
.dashboard-card {
  background-color: var(--bg-card);
  border: none;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.01);
  margin-bottom: 1.75rem;
  height: 100%;
}

.dashboard-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 1.5rem;
}

/* Card metrics styling */
.metric-summary-container {
  display: flex;
  gap: 3rem;
  margin-bottom: 2rem;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1E293B;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Card 1: Sales Performance Vertical Bar Chart */
.sales-chart-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 200px;
  margin-top: 1.5rem;
}

.bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  height: 100%;
}

.bar-track {
  width: 14px;
  height: 165px;
  background-color: #F1F5F9;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.bar-fill {
  width: 100%;
  background-color: #3B82F6;
  border-radius: 20px;
  position: absolute;
  bottom: 0;
  left: 0;
  transition: height 0.5s ease-out;
}

.bar-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Card 2: Inventory Management */
.inventory-metric-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.inventory-metric-item {
  display: flex;
  flex-direction: column;
  padding-left: 0.85rem;
  position: relative;
  flex: 1 1 0px;
  min-width: 100px;
}

.inventory-metric-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
}

.inventory-metric-item.accent-blue::before {
  background-color: var(--accent-blue);
}

.inventory-metric-item.accent-orange::before {
  background-color: var(--accent-orange);
}

.inventory-metric-item.accent-yellow::before {
  background-color: var(--accent-yellow);
}

/* Horizontal Segmented Bar Chart */
.inventory-chart-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.inventory-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.inventory-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  width: 25px;
  text-align: right;
  flex-shrink: 0;
}

.inventory-progress-track {
  flex-grow: 1;
  height: 12px;
  background-color: #E2E8F0;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
}

.segment-blue {
  background-color: var(--accent-blue);
  height: 100%;
}

.segment-orange {
  background-color: var(--accent-orange);
  height: 100%;
}

.segment-yellow {
  background-color: var(--accent-yellow);
  height: 100%;
}

.segment-gray {
  background-color: #E2E8F0;
  height: 100%;
}

/* Card 3: Promotion & Campaign Performance Grid (Heatmap) */
.heatmap-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.heatmap-y-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  width: 28px;
  text-align: left;
  flex-shrink: 0;
}

.heatmap-cells-wrapper {
  display: flex;
  gap: 0.5rem;
  flex-grow: 1;
  justify-content: space-between;
}

.heatmap-cell {
  flex-grow: 1;
  height: 24px;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.heatmap-cell:hover {
  transform: scale(1.1);
  z-index: 10;
}

/* Shade levels for heatmap cells */
.shade-0 { background-color: hsl(var(--primary-h), var(--primary-s), 93%); } /* Very light */
.shade-1 { background-color: hsl(var(--primary-h), var(--primary-s), 85%); }
.shade-2 { background-color: hsl(var(--primary-h), var(--primary-s), 75%); }
.shade-3 { background-color: hsl(var(--primary-h), var(--primary-s), 65%); }
.shade-4 { background-color: hsl(var(--primary-h), var(--primary-s), 55%); }
.shade-5 { background-color: hsl(var(--primary-h), var(--primary-s), 45%); }
.shade-6 { background-color: hsl(var(--primary-h), var(--primary-s), 35%); } /* Darkest */

.dark-theme .shade-0 { background-color: hsl(var(--primary-h), var(--primary-s), 15%); }
.dark-theme .shade-1 { background-color: hsl(var(--primary-h), var(--primary-s), 22%); }
.dark-theme .shade-2 { background-color: hsl(var(--primary-h), var(--primary-s), 32%); }
.dark-theme .shade-3 { background-color: hsl(var(--primary-h), var(--primary-s), 42%); }
.dark-theme .shade-4 { background-color: hsl(var(--primary-h), var(--primary-s), 52%); }
.dark-theme .shade-5 { background-color: hsl(var(--primary-h), var(--primary-s), 62%); }
.dark-theme .shade-6 { background-color: hsl(var(--primary-h), var(--primary-s), 72%); }

.heatmap-x-labels {
  display: flex;
  margin-top: 0.75rem;
  padding-left: 28px; /* Offset to align with y labels */
}

.heatmap-x-labels-wrapper {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 0.25rem;
}

.heatmap-x-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}

/* Card 4: Email Data Area Chart */
.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chart-legends {
  display: flex;
  gap: 0.75rem;
}

.legend-badge {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.725rem;
  font-weight: 500;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.legend-badge:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-dot.orange { background-color: var(--accent-orange); }
.legend-dot.blue { background-color: var(--accent-blue); }

.email-chart-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  margin-top: 1.5rem;
}

/* Responsive adjustments & Mobile Drawer */
@media (max-width: 1199.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* Hidden off-screen by default */
    width: 260px;
    height: 100vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    transition: left 0.3s ease;
  }
  
  .sidebar.show-sidebar {
    left: 0;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1050;
    backdrop-filter: blur(2px);
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .main-content {
    padding: 1.25rem 1rem;
  }
  
  .metric-summary-container {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  
  .inventory-metric-container {
    gap: 1rem;
    flex-wrap: wrap;
  }
}

/* ==========================================================================
   SETTINGS DRAWER & CUSTOMIZATION ENGINE
   ========================================================================== */

/* Settings Drawer Overlay */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(3px);
  z-index: 1999;
  display: none;
  transition: opacity 0.3s ease;
}
.settings-overlay.show {
  display: block;
}

/* Settings Drawer Container */
.settings-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.settings-drawer.show {
  right: 0;
}

.settings-drawer-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-drawer-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #4F6385;
  margin: 0;
}
.settings-close-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.settings-close-btn:hover {
  color: var(--text-main);
}

.settings-drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
  scrollbar-width: thin;
}

.settings-section {
  margin-bottom: 1.15rem;
}
.settings-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

/* Colors Grid */
.settings-colors-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.active {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.15);
}
.color-swatch i {
  color: #FFFFFF;
  font-size: 0.65rem;
  display: none;
}
.color-swatch.active i {
  display: block;
}

/* Preset & Theme Pill Groups */
.settings-pill-group {
  display: flex;
  background-color: #F1F5F9;
  border-radius: 6px;
  padding: 0.15rem;
}
.dark-theme .settings-pill-group {
  background-color: #1F2937;
}

.settings-pill-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.25rem 0;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.dark-theme .settings-pill-btn {
  color: #9CA3AF;
}
.settings-pill-btn.active {
  background-color: #FFFFFF;
  color: #1E293B;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.dark-theme .settings-pill-btn.active {
  background-color: #374151;
  color: #F9FAFB;
}

/* Radio buttons list */
.settings-menu-types .form-check {
  margin-bottom: 0.25rem !important;
}
.settings-menu-types .form-check-label {
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
}
.settings-menu-types .form-check-input {
  cursor: pointer;
  width: 0.95em;
  height: 0.95em;
  margin-top: 0.225em;
}
.settings-menu-types .form-check-input:checked {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* ==========================================================================
   DESIGN PRESETS MODIFIERS (Aura, Lara, Nora)
   ========================================================================== */

/* 1. Aura Preset (Default) - Sleek shadows, rounded corners */
.theme-aura .dashboard-card {
  border-radius: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.01);
  border: none;
}
.theme-aura .sidebar-nav-link {
  border-radius: 0.5rem;
}

/* 2. Lara Preset - Flat, thin borders, small rounded corners */
.theme-lara .dashboard-card {
  border-radius: 0.375rem;
  box-shadow: none;
  border: 1px solid var(--border-color) !important;
}
.theme-lara .sidebar {
  border-right: 1px solid var(--border-color) !important;
}
.theme-lara .sidebar-nav-link {
  border-radius: 0.25rem;
}

/* 3. Nora Preset - Minimalist, squarish corners, borderless */
.theme-nora .dashboard-card {
  border-radius: 0px;
  box-shadow: none;
  border: none !important;
}
.theme-nora .sidebar {
  border-right: none !important;
}
.theme-nora .sidebar-nav-link {
  border-radius: 0px;
}


/* ==========================================================================
   MENU LAYOUT MODIFIERS (Slim, Horizontal, Compact, Reveal, Drawer, Overlay)
   ========================================================================== */

/* default setup */
body {
  transition: background-color 0.2s ease, color 0.2s ease;
}
.main-content {
  transition: padding-left 0.3s ease;
}

/* Menu Slim Layout (70px sidebar, icons only) */
body.menu-slim .sidebar {
  width: 70px !important;
}
body.menu-slim .sidebar-brand-text,
body.menu-slim .sidebar-section-title,
body.menu-slim .sidebar-nav-link-content span,
body.menu-slim .sidebar-nav-link i.bi-chevron-down {
  display: none !important;
}
body.menu-slim .sidebar-brand {
  justify-content: center;
  padding: 1.5rem 0.5rem;
}
body.menu-slim .sidebar-nav-link-content {
  justify-content: center;
  gap: 0;
  width: 100%;
}
body.menu-slim .sidebar-nav-link {
  padding: 0.75rem 0;
  text-align: center;
}
body.menu-slim .sidebar-nav-item {
  margin: 0.125rem 0.35rem;
}

/* Menu Compact Layout (90px sidebar, vertical labels below icons) */
body.menu-compact .sidebar {
  width: 90px !important;
}
body.menu-compact .sidebar-brand-text,
body.menu-compact .sidebar-section-title,
body.menu-compact .sidebar-nav-link i.bi-chevron-down {
  display: none !important;
}
body.menu-compact .sidebar-brand {
  justify-content: center;
  padding: 1.25rem 0.5rem;
}
body.menu-compact .sidebar-nav-link-content {
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
  text-align: center;
  width: 100%;
  align-items: center;
}
body.menu-compact .sidebar-nav-link {
  padding: 0.6rem 0.25rem;
}
body.menu-compact .sidebar-nav-item {
  margin: 0.125rem 0.25rem;
}

/* Menu Reveal Layout (Starts narrow, expands on hover) */
body.menu-reveal .sidebar {
  width: 70px !important;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.menu-reveal .sidebar-brand-text,
body.menu-reveal .sidebar-section-title,
body.menu-reveal .sidebar-nav-link-content span,
body.menu-reveal .sidebar-nav-link i.bi-chevron-down {
  display: none !important;
}
body.menu-reveal .sidebar-brand {
  justify-content: center;
  padding: 1.5rem 0.5rem;
}
body.menu-reveal .sidebar-nav-link-content {
  justify-content: center;
  gap: 0;
}
body.menu-reveal .sidebar-nav-link {
  padding: 0.75rem 0;
}
body.menu-reveal .sidebar-nav-item {
  margin: 0.125rem 0.35rem;
}

/* Reveal Hover Expanded State */
body.menu-reveal .sidebar:hover {
  width: 250px !important;
}
body.menu-reveal .sidebar:hover .sidebar-brand-text {
  display: inline-block !important;
}
body.menu-reveal .sidebar:hover .sidebar-section-title {
  display: block !important;
}
body.menu-reveal .sidebar:hover .sidebar-nav-link-content span {
  display: inline-block !important;
}
body.menu-reveal .sidebar:hover .sidebar-nav-link i.bi-chevron-down {
  display: inline-block !important;
}
body.menu-reveal .sidebar:hover .sidebar-brand {
  justify-content: flex-start;
  padding: 1.5rem;
}
body.menu-reveal .sidebar:hover .sidebar-nav-link-content {
  justify-content: flex-start;
  gap: 0.75rem;
}
body.menu-reveal .sidebar:hover .sidebar-nav-link {
  padding: 0.625rem 1rem;
}
body.menu-reveal .sidebar:hover .sidebar-nav-item {
  margin: 0.125rem 0.75rem;
}

/* Menu Horizontal Layout (Sidebar is a top navigation bar below header) */
body.menu-horizontal .dashboard-wrapper {
  flex-direction: column;
}
body.menu-horizontal .sidebar {
  width: 100% !important;
  height: auto !important;
  position: relative !important;
  flex-direction: row !important;
  align-items: center;
  border-right: none !important;
  border-bottom: 1px solid var(--border-color);
  padding: 0.25rem 1rem;
}
body.menu-horizontal .sidebar-brand {
  display: none !important; /* Brand is already in main header */
}
body.menu-horizontal .sidebar-scroll {
  display: flex;
  align-items: center;
  overflow-y: visible !important;
  overflow-x: auto !important;
  padding: 0.25rem 0;
  width: 100%;
}
body.menu-horizontal .sidebar-section-title {
  display: none !important;
}
body.menu-horizontal .sidebar-nav {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}
body.menu-horizontal .sidebar-nav-item {
  margin: 0 !important;
}
body.menu-horizontal .sidebar-nav-link {
  padding: 0.5rem 0.85rem !important;
  white-space: nowrap;
}

/* Menu Overlay & Drawer Layouts */
body.menu-overlay .sidebar,
body.menu-drawer .sidebar {
  position: fixed !important;
  top: 0;
  left: -250px !important;
  height: 100vh;
  z-index: 1060;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.08);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.menu-overlay.sidebar-open .sidebar,
body.menu-drawer.sidebar-open .sidebar {
  left: 0 !important;
}

/* Show Hamburger Menu Toggle Button on Desktop for Overlay/Drawer layouts */
body.menu-overlay #hamburgerMenu,
body.menu-drawer #hamburgerMenu {
  display: flex !important;
}

/* ==========================================================================
   DESKTOP SIDEBAR COLLAPSE & MOBILE LAYOUT ADJUSTMENTS
   ========================================================================== */

/* Sidebar Collapse on Desktop (Static/Slim modes) */
@media (min-width: 1200px) {
  body.sidebar-collapsed .sidebar {
    width: 70px !important;
  }
  body.sidebar-collapsed .sidebar-brand-text,
  body.sidebar-collapsed .sidebar-section-title,
  body.sidebar-collapsed .sidebar-nav-link-content span,
  body.sidebar-collapsed .sidebar-nav-link i.bi-chevron-down {
    display: none !important;
  }
  body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 1.5rem 0.5rem;
  }
  body.sidebar-collapsed .sidebar-nav-link-content {
    justify-content: center;
    gap: 0;
    width: 100%;
  }
  body.sidebar-collapsed .sidebar-nav-link {
    padding: 0.75rem 0;
    text-align: center;
  }
  body.sidebar-collapsed .sidebar-nav-item {
    margin: 0.125rem 0.35rem;
  }
}

/* Mobile Responsiveness Improvements */
@media (max-width: 575.98px) {
  .chart-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .chart-legends {
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-card {
    padding: 1.25rem 1rem !important;
  }
  .dashboard-header {
    margin-bottom: 1.25rem !important;
  }
  .header-title {
    font-size: 1.15rem !important;
  }
  .metric-value {
    font-size: 1.25rem !important;
  }
}

/* ==========================================================================
   SYNAPS PRODUCT POLISH
   ========================================================================== */

:root {
  --bg-main: #F5F7FB;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-main: #162033;
  --text-muted: #667085;
  --primary-h: 210;
  --primary-s: 82%;
  --primary-l: 48%;
  --accent-blue: #2563EB;
  --accent-teal: #0F9F9A;
  --accent-orange: #EA7A22;
  --accent-yellow: #D4A017;
  --accent-green: #0E9F6E;
  --accent-green-bg: #EAF8F1;
  --border-color: #DCE3EE;
  --surface-soft: #F8FAFD;
  --surface-muted: #EEF3F8;
  --shadow-soft: 0 10px 24px rgba(22, 32, 51, 0.06);
  --shadow-subtle: 0 1px 2px rgba(22, 32, 51, 0.05);
  --radius-ui: 8px;
}

.dark-theme {
  --bg-main: #0D1320;
  --bg-sidebar: #111A2B;
  --bg-card: #121C2E;
  --text-main: #F5F7FB;
  --text-muted: #A7B0C0;
  --border-color: #223047;
  --surface-soft: #172236;
  --surface-muted: #1D2A40;
  --accent-green-bg: rgba(14, 159, 110, 0.14);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.22);
}

body {
  background:
    radial-gradient(circle at top left, rgba(15, 159, 154, 0.08), transparent 34rem),
    linear-gradient(180deg, #F7FAFD 0%, var(--bg-main) 18rem);
  color: var(--text-main);
  line-height: 1.5;
}

.dark-theme body,
body.dark-theme {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
    linear-gradient(180deg, #0F1728 0%, var(--bg-main) 18rem);
}

.main-content {
  padding: 1.75rem 2.25rem;
}

.sidebar {
  border-right: 1px solid var(--border-color);
  box-shadow: 4px 0 24px rgba(22, 32, 51, 0.03);
}

.sidebar-brand {
  padding: 1.35rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-ui);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 159, 154, 0.16));
}

.sidebar-brand-text,
.header-title,
.dashboard-card-title,
.metric-value {
  color: var(--text-main);
}

.sidebar-nav-link {
  border-radius: var(--radius-ui);
  color: #516073;
  font-weight: 500;
  min-height: 42px;
}

.sidebar-nav-link:hover {
  background-color: var(--surface-soft);
  color: var(--text-main);
}

.sidebar-nav-link.active {
  background-color: #EAF3FF;
  color: #1D5BBA;
  box-shadow: inset 3px 0 0 #2563EB;
}

.dark-theme .sidebar-nav-link.active {
  background-color: rgba(37, 99, 235, 0.18);
  color: #8DB8FF;
}

.dashboard-header {
  min-height: 44px;
  margin-bottom: 1.5rem;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.header-icon-btn,
.back-btn {
  border-radius: var(--radius-ui);
}

.header-icon-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
}

.header-icon-btn:hover,
.back-btn:hover {
  background-color: var(--surface-soft);
}

.header-icon-btn.active-settings {
  border-color: rgba(37, 99, 235, 0.35);
  background-color: #EDF5FF;
}

.dashboard-card,
.filter-card,
.slot-alert,
.login-card,
.modal-content {
  border-radius: var(--radius-ui) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-soft);
}

.dashboard-card {
  padding: 1.45rem;
  margin-bottom: 1.35rem;
  height: auto;
}

.dashboard-card.h-100 {
  height: 100% !important;
}

.dashboard-card-title {
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.kpi-card {
  border-top: 3px solid rgba(37, 99, 235, 0.18) !important;
}

.kpi-card:nth-child(2),
.row > [class*="col-"]:nth-child(2) .kpi-card {
  border-top-color: rgba(15, 159, 154, 0.32) !important;
}

.kpi-card:nth-child(3),
.row > [class*="col-"]:nth-child(3) .kpi-card {
  border-top-color: rgba(234, 122, 34, 0.32) !important;
}

.kpi-icon {
  opacity: 0.09 !important;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--surface-soft);
  color: var(--text-main);
  margin-bottom: 0;
}

.table thead tr,
.table-light {
  background-color: var(--surface-soft) !important;
}

.table thead th,
.table th {
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-muted) !important;
  font-size: 0.76rem !important;
  text-transform: uppercase;
}

.table td {
  border-color: var(--border-color);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  vertical-align: middle;
}

.table-responsive {
  border-radius: var(--radius-ui);
}

.form-control,
.form-select,
.input-group-text {
  border-color: var(--border-color);
  border-radius: var(--radius-ui);
  color: var(--text-main);
}

.input-group > .form-control,
.input-group > .form-select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.form-label {
  color: #455468;
}

.dark-theme .form-label {
  color: #CBD5E1;
}

.btn {
  border-radius: var(--radius-ui);
  font-weight: 600;
}

.btn-primary {
  background-color: #2563EB;
  border-color: #2563EB;
}

.btn-primary:hover {
  background-color: #1D4ED8;
  border-color: #1D4ED8;
}

.btn-success {
  background-color: var(--accent-green);
  border-color: var(--accent-green);
}

.btn-outline-secondary {
  border-color: var(--border-color);
  color: #516073;
}

.btn-outline-secondary:hover {
  background-color: var(--surface-muted);
  border-color: var(--border-color);
  color: var(--text-main);
}

.badge {
  border-radius: 999px !important;
  font-weight: 600;
}

.bg-light {
  background-color: var(--surface-soft) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.progress {
  background-color: var(--surface-muted) !important;
  border-radius: var(--radius-ui) !important;
}

.progress-bar {
  border-radius: var(--radius-ui) !important;
}

.alert {
  border-radius: var(--radius-ui);
  border-width: 1px;
}

.nav-pills {
  border-radius: var(--radius-ui) !important;
  background-color: var(--surface-soft) !important;
}

.nav-pills .nav-link {
  border-radius: 6px;
  color: #516073;
  font-weight: 600;
}

.nav-pills .nav-link.active {
  background-color: #FFFFFF;
  color: #1D5BBA;
  box-shadow: var(--shadow-subtle);
}

.login-wrapper {
  background:
    radial-gradient(circle at top left, rgba(15, 159, 154, 0.12), transparent 30rem),
    linear-gradient(180deg, #F8FBFD 0%, #EFF4FA 100%) !important;
}

.login-card {
  max-width: 430px;
}

.logo-container {
  border-radius: var(--radius-ui) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 159, 154, 0.16)) !important;
}

.login-title {
  color: var(--text-main);
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-muted);
}

.font-monospace:not(code) {
  font-family: var(--font-sans) !important;
}

code,
pre,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 1199.98px) {
  .main-content {
    padding: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .dashboard-header {
    gap: 0.75rem;
  }

  .header-left {
    gap: 0.75rem;
    min-width: 0;
  }

  .header-title {
    max-width: 12rem;
    line-height: 1.15;
  }

  .dashboard-card {
    padding: 1rem !important;
  }

  .header-right {
    gap: 0.5rem;
    margin-left: auto;
  }

  .header-right > .badge,
  .header-right .header-icon-btn[aria-label="Pesquisar"],
  .header-right .header-icon-btn[aria-label="Notificações"] {
    display: none !important;
  }

  .header-icon-btn {
    width: 36px;
    height: 36px;
  }

  .table td,
  .table th {
    white-space: nowrap;
  }
}
