/* ============================================
   ENLITE PRIME - Main Styles
   Pixel-perfect match to original Enlite Prime
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--ep-font-family);
  font-size: 14px;
  color: var(--ep-text-primary);
  background: var(--ep-content-bg);
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--ep-primary);
  text-decoration: none;
}

a:hover {
  color: var(--ep-primary-dark);
}

/* ============================================
   MINI SIDEBAR (left icon strip)
   Original: ~80px, white, user avatar on top
   ============================================ */
.ep-mini-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--ep-sidebar-width-mini);
  height: 100vh;
  background: var(--ep-sidebar-bg);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform var(--ep-transition-speed) ease;
  border-right: 1px solid var(--ep-sidebar-border);
}

.ep-mini-sidebar .brand {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 8px;
}

/* User avatar style like original (round photo placeholder) */
.ep-mini-sidebar .brand-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Green online status dot */
.ep-mini-sidebar .brand-logo::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #4CAF50;
  border-radius: 50%;
  border: 2px solid var(--ep-sidebar-bg);
}

.ep-mini-sidebar .nav-icons {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  scrollbar-width: none;
}

.ep-mini-sidebar .nav-icons::-webkit-scrollbar {
  display: none;
}

.ep-mini-sidebar .nav-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  cursor: pointer;
  color: var(--ep-sidebar-text);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
  min-height: 60px;
}

.ep-mini-sidebar .nav-icon-item:hover {
  background: var(--ep-sidebar-hover-bg);
  color: var(--ep-sidebar-active);
}

.ep-mini-sidebar .nav-icon-item.active {
  color: var(--ep-sidebar-active);
  background: var(--ep-primary-lighter);
  border-left-color: var(--ep-primary);
}

.ep-mini-sidebar .nav-icon-item .material-icons {
  font-size: 22px;
}

.ep-mini-sidebar .nav-icon-item .nav-label {
  font-size: 9px;
  margin-top: 4px;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ============================================
   SUB MENU PANEL
   Original: all sections visible, category headers
   ============================================ */
.ep-submenu-panel {
  position: fixed;
  top: 0;
  left: var(--ep-sidebar-width-mini);
  width: var(--ep-sidebar-width-sub);
  height: 100vh;
  background: var(--ep-sidebar-bg);
  border-right: 1px solid var(--ep-sidebar-border);
  z-index: 1035;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform var(--ep-transition-speed) ease;
}

.ep-submenu-panel.collapsed {
  transform: translateX(calc(-1 * var(--ep-sidebar-width-sub)));
}

/* Hide default header (replaced by per-section headers) */
.ep-submenu-panel .submenu-header {
  height: var(--ep-header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--ep-sidebar-border);
}

.ep-submenu-panel .submenu-header h6 {
  display: none;
}

.ep-submenu-panel .submenu-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Submenu sections - controlled by app.js */
.ep-submenu-panel .submenu-section {
  padding-bottom: 4px;
}

/* Section headers are set by app.js in .submenu-header h6 */

.ep-submenu-item-link {
  display: flex;
  align-items: center;
  padding: 8px 16px 8px 20px;
  color: var(--ep-sidebar-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  text-decoration: none;
  border-radius: 0 20px 20px 0;
  margin-right: 12px;
  line-height: 1.4;
}

.ep-submenu-item-link:hover {
  background: var(--ep-sidebar-hover-bg);
  color: var(--ep-sidebar-active);
}

.ep-submenu-item-link.active {
  color: var(--ep-sidebar-active);
  background: var(--ep-primary-lighter);
  font-weight: 500;
}

.ep-submenu-item-link .material-icons {
  font-size: 18px;
  margin-right: 10px;
  opacity: 0.6;
}

.ep-submenu-item-link.active .material-icons {
  opacity: 1;
  color: var(--ep-sidebar-active);
}

/* Legacy submenu-item styles */
.ep-submenu-panel .submenu-item {
  display: flex;
  align-items: center;
  padding: 8px 16px 8px 20px;
  color: var(--ep-sidebar-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.ep-submenu-panel .submenu-item:hover {
  background: var(--ep-sidebar-hover-bg);
  color: var(--ep-sidebar-active);
}

.ep-submenu-panel .submenu-item.active {
  color: var(--ep-sidebar-active);
  background: var(--ep-primary-lighter);
}

.ep-submenu-panel .submenu-item .material-icons {
  font-size: 18px;
  margin-right: 10px;
  opacity: 0.6;
}

/* ============================================
   HEADER - White, with branding
   ============================================ */
.ep-header {
  position: fixed;
  top: 0;
  left: calc(var(--ep-sidebar-width-mini) + var(--ep-sidebar-width-sub));
  right: 0;
  height: var(--ep-header-height);
  background: var(--ep-header-bg);
  color: var(--ep-header-text);
  z-index: 1030;
  display: flex;
  align-items: center;
  padding: 0 20px;
  transition: left var(--ep-transition-speed) ease;
  border-bottom: 1px solid var(--ep-divider);
}

.ep-header.submenu-collapsed {
  left: var(--ep-sidebar-width-mini);
}

.ep-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ep-header .menu-toggle {
  background: none;
  border: none;
  color: var(--ep-header-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.ep-header .menu-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ep-header .search-box {
  position: relative;
  margin-left: 4px;
}

.ep-header .search-box input {
  background: var(--ep-content-bg);
  border: 1px solid var(--ep-divider);
  border-radius: 20px;
  padding: 7px 14px 7px 36px;
  color: var(--ep-text-primary);
  font-size: 13px;
  width: 200px;
  transition: width 0.3s ease, border-color 0.3s ease;
}

.ep-header .search-box input::placeholder {
  color: #999;
}

.ep-header .search-box input:focus {
  outline: none;
  border-color: var(--ep-primary);
  width: 280px;
}

.ep-header .search-box .material-icons {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #999;
}

.ep-header .header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ep-header .header-btn {
  background: none;
  border: none;
  color: var(--ep-header-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  position: relative;
  transition: background 0.2s;
}

.ep-header .header-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ep-header .header-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--ep-secondary);
  border-radius: 50%;
  border: 2px solid var(--ep-header-bg);
}

.ep-header .user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.ep-header .user-menu:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ep-header .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ep-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
  color: #fff;
}

.ep-header .user-name {
  font-size: 14px;
  font-weight: 400;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.ep-content {
  margin-left: calc(var(--ep-sidebar-width-mini) + var(--ep-sidebar-width-sub));
  margin-top: var(--ep-header-height);
  padding: 24px;
  min-height: calc(100vh - var(--ep-header-height));
  width: calc(100% - var(--ep-sidebar-width-mini) - var(--ep-sidebar-width-sub));
  transition: margin-left var(--ep-transition-speed) ease, width var(--ep-transition-speed) ease;
  background: var(--ep-content-bg);
}

.ep-content.submenu-collapsed {
  margin-left: var(--ep-sidebar-width-mini);
  width: calc(100% - var(--ep-sidebar-width-mini));
}

/* ============================================
   BREADCRUMB
   ============================================ */
.ep-breadcrumb {
  background: transparent;
  padding: 0 0 16px;
  margin-bottom: 20px;
  border-bottom: none;
}

.ep-breadcrumb .page-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ep-text-primary);
  display: inline;
}

.ep-breadcrumb .breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
  display: inline-flex;
  margin-left: 8px;
  vertical-align: baseline;
}

.ep-breadcrumb .breadcrumb-item a {
  color: var(--ep-text-secondary);
}

.ep-breadcrumb .breadcrumb-item.active {
  color: var(--ep-text-secondary);
}

/* ============================================
   CARDS - Paper style like original
   ============================================ */
.ep-card {
  background: var(--ep-card-bg);
  border: none;
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-card-shadow);
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

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

.ep-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--ep-divider);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ep-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Section icon dot before card header text (like original) */
.ep-card .card-header::before {
  content: 'radio_button_checked';
  font-family: 'Material Icons';
  font-size: 16px;
  color: var(--ep-primary);
  flex-shrink: 0;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
}

.ep-card .card-body {
  padding: 20px;
}

.ep-card .card-footer {
  background: transparent;
  border-top: 1px solid var(--ep-divider);
  padding: 12px 20px;
}

/* ============================================
   FOOTER
   ============================================ */
.ep-footer {
  padding: 20px 0;
  text-align: center;
  color: var(--ep-text-secondary);
  font-size: 12px;
  border-top: 1px solid var(--ep-divider);
  margin-top: 40px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary-custom { color: var(--ep-primary) !important; }
.text-secondary-custom { color: var(--ep-secondary) !important; }
.bg-primary-custom { background: var(--ep-primary) !important; }
.bg-secondary-custom { background: var(--ep-secondary) !important; }

.ep-gradient-primary {
  background: linear-gradient(135deg, var(--ep-primary), var(--ep-primary-light));
}

.ep-gradient-secondary {
  background: linear-gradient(135deg, var(--ep-secondary), var(--ep-secondary-light));
}

.ep-gradient-success {
  background: linear-gradient(135deg, #4caf50, #81c784);
}

.ep-gradient-warning {
  background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.ep-gradient-danger {
  background: linear-gradient(135deg, #f44336, #e57373);
}

.ep-gradient-info {
  background: linear-gradient(135deg, #00bcd4, #4dd0e1);
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.ep-dropdown-menu {
  background: var(--ep-card-bg);
  border: none;
  border-radius: var(--ep-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 280px;
  padding: 0;
}

.ep-dropdown-menu .dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ep-divider);
  font-weight: 500;
  font-size: 13px;
  color: var(--ep-text-primary);
}

.ep-dropdown-menu .dropdown-item {
  padding: 10px 16px;
  color: var(--ep-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.ep-dropdown-menu .dropdown-item:hover {
  background: var(--ep-primary-lighter);
}

.ep-dropdown-menu .dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--ep-divider);
  text-align: center;
  font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 991.98px) {
  .ep-submenu-panel {
    transform: translateX(calc(-1 * var(--ep-sidebar-width-sub)));
  }

  .ep-submenu-panel.mobile-open {
    transform: translateX(0);
  }

  .ep-header {
    left: var(--ep-sidebar-width-mini);
  }

  .ep-content {
    margin-left: var(--ep-sidebar-width-mini);
    width: calc(100% - var(--ep-sidebar-width-mini));
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .ep-mini-sidebar {
    transform: translateX(-100%);
  }

  .ep-mini-sidebar.mobile-open {
    transform: translateX(0);
  }

  .ep-submenu-panel {
    transform: translateX(calc(-1 * var(--ep-sidebar-width-mini) - var(--ep-sidebar-width-sub)));
  }

  .ep-submenu-panel.mobile-open {
    transform: translateX(0);
  }

  .ep-header {
    left: 0;
  }

  .ep-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  .ep-header .search-box input {
    width: 140px;
  }

  .ep-header .search-box input:focus {
    width: 180px;
  }

  .ep-header .user-name {
    display: none;
  }
}

/* Mobile overlay */
.ep-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1033;
}

.ep-sidebar-overlay.active {
  display: block;
}

/* ============================================
   STAT CARDS (Dashboard) - White style like original
   ============================================ */
.stat-card {
  border-radius: var(--ep-radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.2;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-change {
  font-size: 11px;
  margin-top: 8px;
  opacity: 0.85;
}

/* Section headers like original */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ep-text-primary);
}

.section-header .material-icons {
  font-size: 20px;
  color: var(--ep-primary);
}
