/* =====================================================
   ONE PIECE INDIA - Shared Sidebar Styles
   Used by: index.html, pricelist.html, tasks.html, users.php
   ===================================================== */

/* Sidebar */
.sidebar {
  position: fixed;
  left: -280px;
  top: 0;
  width: 280px;
  height: 100vh;
  background: #2c3e50;
  transition: left 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}
.sidebar.open { left: 0; }

.sidebar-header {
  padding: 20px;
  background: #34495e;
  color: white;
  border-bottom: 1px solid #1a252f;
}
.sidebar-header h3 { font-size: 18px; margin-bottom: 5px; }
.sidebar-header p  { font-size: 12px; color: #bdc3c7; }

.sidebar-menu { flex: 1; overflow-y: auto; padding: 10px 0; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: #34495e;
  border-left-color: #3498db;
}
.sidebar-menu a i { margin-right: 12px; font-size: 18px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 15px 20px;
  background: #1a252f;
  border-top: 1px solid #34495e;
}

.user-info {
  color: #ecf0f1;
  font-size: 13px;
  margin-bottom: 10px;
  padding: 8px;
  background: #2c3e50;
  border-radius: 4px;
  text-align: center;
  display: none;
}
.user-info.show { display: block; }
.user-role { font-weight: bold; color: #3498db; font-size: 14px; }

.sidebar-footer .logout-btn,
.sidebar-footer .login-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}
.sidebar-footer .logout-btn { background: #e74c3c; color: white; display: none; }
.sidebar-footer .logout-btn.show { display: block; }
.sidebar-footer .logout-btn:hover { background: #c0392b; }
.sidebar-footer .login-btn { background: #3498db; color: white; }
.sidebar-footer .login-btn.hide { display: none; }
.sidebar-footer .login-btn:hover { background: #2980b9; }

/* Hamburger Toggle Button */
.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 45px;
  height: 45px;
  background: #2c3e50;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.menu-toggle:hover { background: #34495e; transform: scale(1.05); }
.menu-toggle span { width: 25px; height: 3px; background: white; border-radius: 2px; transition: all 0.3s; }
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Dark overlay when sidebar is open */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  display: none;
}
.overlay.show { display: block; }

/* Mobile */
@media(max-width:768px) {
  .menu-toggle { top: 10px; left: 10px; width: 40px; height: 40px; }
  .menu-toggle span { width: 22px; }
}
