/* ===================================
   GLOBAL RESET
=================================== */
html, body {
  height: 100%;
  margin: 0;
  background-color: #0e0e0e;
  color: #ddd;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  overflow-x: hidden;
}

/* ===================================
   SIDEBAR
=================================== */
.sidebar {
  width: 240px;
  background: #141414;
  border-right: 1px solid #222;
  color: #fff;
  position: fixed;
  top: 0; left: 0;
  bottom: 0;
  padding: 15px;
  overflow-y: visible !important;
  z-index: 999;
}

.sidebar img.logo {
  width: 100%;
  margin-bottom: 10px;
}

.sidebar .nav-link {
  color: #ccc;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #1f1f1f;
  color: #fff;
}

.sidebar .dropdown-menu {
  background: #1f1f1f;
  border: 1px solid #333;
  z-index: 2000 !important;
}

.sidebar hr {
  border-color: #333;
}

/* ===================================
   MAIN CONTENT
=================================== */
.main-content {
  margin-left: 240px;
  padding: 25px;
  min-height: 100vh;
  background: #0e0e0e;
  transition: 0.3s ease;
}

/* ===================================
   OVERLAY (Mobile)
=================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  z-index: 998;
}

/* ===================================
   TOGGLE BUTTON (Mobile)
=================================== */
.toggle-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  background: #1f1f1f;
  border: none;
  padding: 8px 12px;
  font-size: 26px;
  color: #fff;
  border-radius: 6px;
}

/* ===================================
   CARDS & GENERAL UI
=================================== */
.card {
  background: #1a1a1a !important;
  border: none;
  border-radius: 10px;
  color: #eee;
}

.bg-secondary {
  background: #242424 !important;
}

.btn-success {
  background: #4fa065 !important;
  border: none;
}
.btn-success:hover {
  background: #58b273 !important;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 768px) {

  .toggle-btn { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: 0.3s ease;
  }
  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}
