/* ========== RESET CƠ BẢN ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  text-decoration: none;
}

/* ========== THANH MENU CHUNG (TOPBAR) ========== */
/* HEADER: đứng yên khi cuộn + nav nằm giữa logo và nút đăng nhập */
.topbar {
  background: #464a5f;          /* nền tối */
  border-bottom: 1px solid #020617;
  position: sticky;             /* giữ header đứng yên */
  top: 0;
  z-index: 100;                 /* đè lên nội dung bên dưới */
}

.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* logo bên trái */
.topbar__logo {
  flex: 0 0 auto;
  color: #38bdf8;
  font-weight: 700;
  font-size: 18px;
}

.topbar__logo a {
  color: inherit;
}

/* NAV nằm giữa logo và bên phải, các mục cách đều nhau */
.topbar__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;      /* nằm giữa 2 bên */
  gap: 28px;                    /* khoảng cách giữa các mục */
  font-size: 14px;
}

.topbar__nav a {
  color: #e5e7eb;
  opacity: 0.85;
}

.topbar__nav a:hover {
  opacity: 1;
}

/* Khối bên phải (Đăng nhập hoặc tên user) */
.topbar__auth,
.topbar__user-area {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Nút đăng nhập màu cam */
.topbar__login-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a45, #ff4d4f);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(248, 113, 113, 0.5);
  border: none;
  cursor: pointer;
}

.topbar__login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(248, 113, 113, 0.7);
}

/* ========== KHU USER + CHUÔNG KHI ĐÃ ĐĂNG NHẬP ========== */
.topbar__user-area {
  position: relative; /* để menu & notif định vị theo khu này */
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__user-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.topbar__user-name {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;   /* chữ trắng sáng trên nền tối */
}

.topbar__user-arrow {
  font-size: 10px;
  color: #e5e7eb;   /* mũi tên xám sáng hơn */
}

/* Chuông thông báo dạng tròn (dashboard cũ đang dùng) */
.topbar__bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.4);
  cursor: pointer;
}
/* từ đây yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy */
/* ================= THEME TOGGLE – DARK / LIGHT ================= */

/* Mặc định: nếu chưa set class thì xem như dark */
body {
  background-color: #7c7e86; /* nền tối hiện tại dashboard */
  color: #e5e7eb;
}

/* Giao diện tối */
body.theme-dark {
  background-color: #020617; /* màu nền tối như dashboard */
  color: #e5e7eb;
}

/* Header/menu khi tối */
body.theme-dark .site-header {
  background: #6d6d6e;       /* header tối như hiện tại */
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* Nền chung chế độ SÁNG – xanh nhạt + kem như hình 1 */
body.theme-light {
  color: #111827;
  background: linear-gradient(
    to bottom,
    #e0f2fe 0%,   /* xanh nhạt phía trên / hai bên */
    #f7f5e9 40%,  /* chuyển sang kem */
    #f7f5e9 100%
  );
}


/* Header/menu khi sáng – màu như hình 4 */
body.theme-light .site-header {
  background: #e8edf9;       /* nền xanh nhạt giống hình 4 */
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

/* Nếu bạn có container chính, chỉnh luôn */
body.theme-light .main-wrapper,
body.theme-light .dashboard-layout {
  background-color: #f7f5e9;
}

/* ================= STYLE CHO NÚT MẶT TRỜI / MẶT TRĂNG ================= */

.theme-toggle-btn {
  margin-left: 8px;
  width: 35px;
  height: 35px;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: rgba(148, 163, 184, 0.2);
  transform: translateY(-1px);
}

/* Ẩn/hiện icon theo theme */
.theme-icon-sun,
.theme-icon-moon {
  display: none;
}

/* Đang LIGHT -> hiện mặt trời (click để sang DARK) */
body.theme-light .theme-icon-sun {
  display: inline;
}

/* Đang DARK -> hiện mặt trăng (click để sang LIGHT) */
body.theme-dark .theme-icon-moon,
body:not(.theme-light):not(.theme-dark) .theme-icon-moon {
  display: inline;
}

/* Cho icon sáng dễ nhìn trên header tối */
body.theme-dark .theme-toggle-btn {
  color: #f9fafb;
}

/* Cho icon tối lại một chút khi header sáng */
body.theme-light .theme-toggle-btn {
  color: #eff1f5;
}
/* hiệu ứng sáng tối đến đây yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy */

.topbar__bell-icon {
  font-size: 16px;
  color: #111827;
}

.topbar__bell-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* ========== MINI USER PANEL (user-menu) ========== */
.user-menu {
  position: absolute;
  top: 110%;
  right: 0;
  width: 260px;
  background: #020617;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.6);
  display: none;              /* mặc định ẩn */
  z-index: 50;
}

.user-menu.is-open {
  display: block;            /* khi có class is-open thì hiện lên */
}

.user-menu__inner {
  background: radial-gradient(circle at top, #1f2937, #020617);
  border-radius: 14px;
  padding: 12px 10px 10px;
  color: #e5e7eb;
  font-size: 13px;
}

/* VIP box trên cùng */
.user-menu__vip {
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #4b5563, #111827);
  margin-bottom: 8px;
}

.user-menu__vip-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.user-menu__vip-sub {
  font-size: 12px;
  color: #d1d5db;
}

/* Nút điểm danh */
.user-menu__checkin {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 7px 10px;
  margin: 4px 0 10px;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Stats trong mini panel */
.user-menu__stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.user-menu__stat {
  flex: 1;
  text-align: center;
}

.user-menu__stat .label {
  display: block;
  font-size: 11px;
  color: #9ca3af;
}

.user-menu__stat .value {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.user-menu__stat .value--primary {
  color: #60a5fa;
}

.user-menu__stat .value--highlight {
  color: #fbbf24;
}

/* Nút đến dashboard & logout */
.user-menu__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.user-menu__action {
  flex: 1;
  text-align: center;
  border-radius: 999px;
  padding: 7px 6px;
  font-size: 12px;
  font-weight: 600;
}

.user-menu__action--primary {
  background: #0ea5e9;
  color: #0f172a;
}

.user-menu__action--danger {
  background: #ef4444;
  color: #f9fafb;
}

/* ========== RESPONSIVE CHUNG ========== */
@media (max-width: 768px) {
  .topbar__inner {
    flex-wrap: wrap;
  }
}

/* ========== CSS CHUÔNG THÔNG BÁO & DROPDOWN BẠN GỬI ========== */
.header-notif { 
  position: relative;
  margin-left: 16px;
}

.notif-bell-btn {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
}

.notif-bell-icon {
  font-size: 20px;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ff4b4b;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  margin-top: 8px;
  width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  padding: 8px 0;
  display: none;          /* mặc định ẩn */
  z-index: 999;
}

.notif-dropdown-header {
  font-weight: 600;
  padding: 8px 16px;
  border-bottom: 1px solid #eee;
}

.notif-empty {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #777;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.notif-item {
  padding: 8px 16px;
  border-bottom: 1px solid #f3f3f3;
}

.notif-title {
  font-size: 14px;
  color: #333;
}

.notif-time {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.notif-view-all {
  display: block;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  color: #1e88e5;
  text-decoration: none;
  border-top: 1px solid #eee;
}

.notif-view-all:hover {
  background: #f5f5f5;
}

.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px;
  border:0;
  outline:none;
  background:transparent;
  line-height:1;
}
