/* =====================================================
   Sidebar Stylesheet — sidebar.css
   ===================================================== */

.app-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-dark);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .3s ease;
}
.app-sidebar.sidebar-light { background: var(--sidebar-light); }

/* Sidebar scrollbar */
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ----- Sidebar Brand ----- */
.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand .logo-icon-wrap {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.sidebar-brand .brand-text .brand-main {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.sidebar-brand .brand-text .brand-main .hospital-part { color: #EF4444; }
.sidebar-brand .brand-text .brand-sub {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ----- Sidebar User Block ----- */
.sidebar-user {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-user .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
}
.sidebar-user .avatar .online-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--green);
  border: 2px solid var(--sidebar-dark);
  border-radius: 50%;
}
.sidebar-user .user-meta { flex: 1; min-width: 0; }
.sidebar-user .user-meta .name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user .user-meta .role {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-tint);
  background: rgba(22, 163, 74, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
}

/* ----- Sidebar Nav ----- */
.sidebar-nav { padding: 14px 12px; flex: 1; }
.sidebar-nav .nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  padding: 12px 12px 6px;
  font-weight: 600;
}
.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all .15s ease;
  position: relative;
}
.sidebar-nav .nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}
.sidebar-nav .nav-item:hover {
  background: rgba(22, 163, 74, 0.15);
  color: #fff;
}
.sidebar-nav .nav-item:hover i { color: var(--green); }
.sidebar-nav .nav-item.active {
  background: var(--red);
  color: #fff;
}
.sidebar-nav .nav-item.active i { color: #fff; }
.sidebar-nav .nav-item .badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.sidebar-nav .nav-item.active .badge { background: rgba(255,255,255,0.25); }

/* ----- Sidebar Footer / Premium Card ----- */
.sidebar-footer { padding: 14px; margin-top: auto; }
.premium-card {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  border-radius: 10px;
  padding: 14px;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
}
.premium-card .crown-icon {
  font-size: 22px;
  margin-bottom: 6px;
}
.premium-card .premium-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.premium-card .premium-desc { font-size: 11px; opacity: 0.9; margin-bottom: 10px; }
.premium-card .premium-btn {
  display: inline-block;
  background: #fff;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 14px;
  text-decoration: none;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}
.system-status .status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* ----- Mobile sidebar overlay ----- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0;
  transition: opacity .25s;
}
.sidebar-overlay.show { opacity: 1; }

/* Hamburger toggle on mobile */
.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-primary);
  margin-right: 12px;
  cursor: pointer;
}
