/* Đảm bảo toàn bộ trang từ html, body, root phủ kín 100% viewport */
html, body {
  background-color: #071326 !important;
  min-height: 100vh !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

[data-theme="ocean"] html,
[data-theme="ocean"] body {
  background-color: #071326 !important;
  background: #071326 linear-gradient(135deg, #071326 0%, #0c2340 50%, #133966 100%) fixed !important;
}

[data-theme="midnight"] html,
[data-theme="midnight"] body {
  background-color: #0d1117 !important;
  background: #0d1117 fixed !important;
}

[data-theme="forest"] html,
[data-theme="forest"] body {
  background-color: #051a11 !important;
  background: #051a11 linear-gradient(135deg, #051a11 0%, #0a2e1f 50%, #114b33 100%) fixed !important;
}

[data-theme="sunset"] html,
[data-theme="sunset"] body {
  background-color: #180828 !important;
  background: #180828 linear-gradient(135deg, #180828 0%, #381235 35%, #5c1d30 65%, #7c2d12 100%) fixed !important;
}

[data-theme="nordic"] html,
[data-theme="nordic"] body {
  background-color: #f8fafc !important;
  background: #f8fafc fixed !important;
}

html, body, #root, #app {
  min-height: 100vh !important;
  background-attachment: fixed !important;
}

/* Biến vùng chứa bảng Kanban mở rộng phủ kín toàn bộ phần dưới của màn hình */
[class*="_wrapper_amg4a_"],
[class*="_wrapper_11uup_"] {
  min-height: calc(100vh - 174px) !important;
  background: transparent !important;
}

/* Kính mờ đồng nhất (Glassmorphism) cho Header và các thanh phụ để nền xuyên suốt 100% */
._wrapper_jdrq3_89 {
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[class*="_wrapper_rbzeo_"] {
  background: rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

[class*="_wrapper_1gfxr_"] {
  background: rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Ẩn hoàn toàn scrollbar vật lý để giao diện tràn viền phẳng mịn 100% không tì vết */
*::-webkit-scrollbar,
::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

*::-webkit-scrollbar-track,
::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner,
::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
}

html, body, #root, [class*="_wrapper_amg4a_"], [class*="_wrapper_11uup_"] {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
._proMenuItem_13awa_23,
._proMenuItemIcon_13awa_27,
._wrapper_1u45e_5 {
  display: none !important;
}

/* 2. Tinh chỉnh giao diện thẻ việc bo góc hiện đại */
.ui.card, .ui.cards > .card {
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* 3. Đếm thẻ trên đầu cột nổi bật */
._counter_1p407_1, .card-counter {
  font-weight: 600 !important;
  color: #1973ff !important;
}

/* Nhóm nút chức năng trên Header (Báo cáo KPI & Giao diện)
   Thu nhỏ còn 80% (chiều rộng 104px, chiều cao 27px, font 11.5px), khoảng cách 8px nhỏ gọn tinh tế */
/* Native Header Menu Item Tooltip & Colors */
.ui.menu .right.menu .item i.icon {
  color: inherit !important;
  transition: all 0.2s ease !important;
}

[data-theme="nordic"] .ui.menu .right.menu .item i.icon,
[data-theme="nordic"] .ui.menu .right.menu .item {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.ui.menu .right.menu .item:hover i.icon {
  transform: scale(1.15) !important;
  color: #38bdf8 !important;
}

/* Default Button Styles (Mặc định) */
.kpi-btn, .cal-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}
.kpi-btn:hover, .cal-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

.theme-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Nút đồng bộ theo từng Theme cụ thể */
/* 1. Midnight: Tông xám than chì & xanh neon Linear/GitHub */
[data-theme="midnight"] .kpi-btn,
[data-theme="midnight"] .cal-btn {
  background: #238636 !important;
  border: 1px solid #2ea043 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(46, 160, 67, 0.3) !important;
}
[data-theme="midnight"] .kpi-btn:hover,
[data-theme="midnight"] .cal-btn:hover {
  background: #2ea043 !important;
}
[data-theme="midnight"] .theme-btn {
  background: #21262d !important;
  border: 1px solid #30363d !important;
  color: #c9d1d9 !important;
}
[data-theme="midnight"] .theme-btn:hover {
  background: #30363d !important;
  border-color: #58a6ff !important;
  color: #ffffff !important;
}

/* 2. Ocean Blue: Kính mờ xanh băng & xanh đại dương AGU */
[data-theme="ocean"] .kpi-btn,
[data-theme="ocean"] .cal-btn {
  background: #0284c7 !important;
  border: 1px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4) !important;
}
[data-theme="ocean"] .kpi-btn:hover,
[data-theme="ocean"] .cal-btn:hover {
  background: #0369a1 !important;
}
[data-theme="ocean"] .theme-btn {
  background: rgba(12, 35, 64, 0.8) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #bae6fd !important;
}
[data-theme="ocean"] .theme-btn:hover {
  background: rgba(19, 57, 102, 0.9) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

/* 3. Forest Emerald: Xanh ngọc lục bảo tươi mát */
[data-theme="forest"] .kpi-btn,
[data-theme="forest"] .cal-btn {
  background: #059669 !important;
  border: 1px solid #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4) !important;
}
[data-theme="forest"] .kpi-btn:hover,
[data-theme="forest"] .cal-btn:hover {
  background: #047857 !important;
}
[data-theme="forest"] .theme-btn {
  background: rgba(10, 46, 31, 0.8) !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #a7f3d0 !important;
}
[data-theme="forest"] .theme-btn:hover {
  background: rgba(17, 75, 51, 0.9) !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
}

/* 4. Sunset Warm: Hoàng hôn cam cháy & mận chín ấm áp */
[data-theme="sunset"] .kpi-btn,
[data-theme="sunset"] .cal-btn {
  background: #ea580c !important;
  border: 1px solid #f97316 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4) !important;
}
[data-theme="sunset"] .kpi-btn:hover,
[data-theme="sunset"] .cal-btn:hover {
  background: #c2410c !important;
}
[data-theme="sunset"] .theme-btn {
  background: rgba(46, 16, 101, 0.8) !important;
  border: 1px solid rgba(249, 115, 22, 0.4) !important;
  color: #fed7aa !important;
}
[data-theme="sunset"] .theme-btn:hover {
  background: rgba(70, 24, 117, 0.9) !important;
  border-color: #fb923c !important;
  color: #ffffff !important;
}

/* 5. Nordic Minimalist: Tối giản Bắc Âu thanh lịch */
[data-theme="nordic"] .kpi-btn,
[data-theme="nordic"] .cal-btn,
[data-theme="nordic"] .theme-btn {
  background-color: #3b82a6 !important;
  border: 1px solid #2d6888 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
}
[data-theme="nordic"] .kpi-btn:hover,
[data-theme="nordic"] .cal-btn:hover,
[data-theme="nordic"] .theme-btn:hover {
  background-color: #0369a1 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}
[data-theme="nordic"] .kpi-btn *,
[data-theme="nordic"] .cal-btn *,
[data-theme="nordic"] .theme-btn * {
  color: #ffffff !important;
}

.theme-dropdown-wrapper {
  position: relative !important;
  display: inline-block !important;
}

.theme-dropdown-menu {
  display: none;
  position: absolute;
  top: 38px;
  right: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  padding: 6px 0;
  min-width: 190px;
  border: 1px solid #e2e8f0;
  z-index: 1000000;
}
.theme-dropdown-menu.show {
  display: block;
}

.theme-option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.15s;
}
.theme-option-item:hover {
  background: #f1f5f9;
}
.theme-option-item.active {
  font-weight: 700;
  color: #1973ff;
  background: #eff6ff;
}

.theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.15);
}

/* 5. Nút Đăng nhập Google AGU */
.google-login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px 0;
  color: #6b778c;
  font-size: 11px;
  font-weight: 700;
}
.google-login-divider::before, .google-login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #dfe1e6;
}
.google-login-divider span {
  padding: 0 10px;
}
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: white;
  border: 1px solid #c1c7d0;
  border-radius: 6px;
  color: #172b4d;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s;
  cursor: pointer;
}
.google-btn:hover {
  background: #f4f5f7;
  border-color: #a5adba;
}

/* ==========================================================================
   THEME STYLES (Đổi màu toàn diện bảng Kanban)
   ========================================================================== */

/* Tiêu đề tên cột cho toàn bộ theme */
[data-theme="midnight"] [class*="_headerName_"] { color: #f0f6fc !important; font-weight: 700 !important; }
[data-theme="ocean"] [class*="_headerName_"] { color: #e0f2fe !important; font-weight: 700 !important; text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important; }
[data-theme="forest"] [class*="_headerName_"] { color: #a7f3d0 !important; font-weight: 700 !important; text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important; }
[data-theme="sunset"] [class*="_headerName_"] { color: #ffedd5 !important; font-weight: 700 !important; text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important; }
[data-theme="nordic"] [class*="_headerName_"] { color: #0f172a !important; font-weight: 700 !important; }

/* --- THEME 1: MIDNIGHT CYBERPUNK (Deep Dark Charcoal) --- */
[data-theme="midnight"],
[data-theme="midnight"] body,
[data-theme="midnight"] #app,
[data-theme="midnight"] #root {
  background: #0d1117 !important;
  background-attachment: fixed !important;
  color: #f0f6fc !important;
}
[data-theme="midnight"] [class*="_header_"] {
  background-color: #161b22 !important;
  border-color: #30363d !important;
  color: #f0f6fc !important;
}
/* Cột Kanban xám than tách bạch */
[data-theme="midnight"] [class*="_outerWrapper_1plbe_"] {
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
/* Tiêu đề cột trắng sáng rõ ràng */
[data-theme="midnight"] [class*="_listHeader_"],
[data-theme="midnight"] [class*="_listTitle_"],
[data-theme="midnight"] [class*="_headerTitle_"],
[data-theme="midnight"] [class*="_header_1plbe_"],
[data-theme="midnight"] h3,
[data-theme="midnight"] [class*="_title_"] {
  background-color: #161b22 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}
/* Thẻ việc xám than nổi bật */
[data-theme="midnight"] [class*="_card_"],
[data-theme="midnight"] [class*="_wrapper_f6hge_"],
[data-theme="midnight"] [class*="_wrapper_36a26_"],
[data-theme="midnight"] .card,
[data-theme="midnight"] .ui.card {
  background-color: #21262d !important;
  background: #21262d !important;
  border: 1px solid #30363d !important;
  color: #f0f6fc !important;
}
[data-theme="midnight"] [class*="_card_"]:hover,
[data-theme="midnight"] [class*="_wrapper_f6hge_"]:hover {
  background-color: #30363d !important;
  border-color: #58a6ff !important;
}
[data-theme="midnight"] [class*="_card_"] *,
[data-theme="midnight"] [class*="_wrapper_f6hge_"] *,
[data-theme="midnight"] [class*="_wrapper_36a26_"] *,
[data-theme="midnight"] .card * {
  color: #f0f6fc !important;
  background-color: transparent !important;
}
[data-theme="midnight"] [class*="_creatorIndicator_"] {
  background-color: #21262d !important;
  color: #8b949e !important;
}
[data-theme="midnight"] [class*="_addCardButton_"] {
  background-color: rgba(33, 38, 45, 0.7) !important;
  border: 1px dashed #484f58 !important;
  color: #c9d1d9 !important;
}

/* --- THEME 2: OCEAN BLUE (Đại Học An Giang) --- */
[data-theme="ocean"],
[data-theme="ocean"] body,
[data-theme="ocean"] #app,
[data-theme="ocean"] #root {
  background: linear-gradient(135deg, #071326 0%, #0c2340 50%, #133966 100%) !important;
  background-attachment: fixed !important;
  color: #f1f5f9 !important;
}
[data-theme="ocean"] [class*="_header_"] {
  background-color: #071326 !important;
  border-color: #133966 !important;
  color: #38bdf8 !important;
}
[data-theme="ocean"] [class*="_outerWrapper_1plbe_"] {
  background-color: rgba(12, 35, 64, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid #0284c7 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
[data-theme="ocean"] [class*="_listHeader_"],
[data-theme="ocean"] [class*="_listTitle_"],
[data-theme="ocean"] [class*="_headerTitle_"],
[data-theme="ocean"] [class*="_header_1plbe_"] {
  background-color: rgba(12, 35, 64, 0.95) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}
/* Thẻ công việc màu xanh đậm viền dạ quang */
[data-theme="ocean"] [class*="_card_"],
[data-theme="ocean"] [class*="_wrapper_f6hge_"],
[data-theme="ocean"] [class*="_wrapper_36a26_"],
[data-theme="ocean"] .card,
[data-theme="ocean"] .ui.card {
  background-color: #0c2340 !important;
  background: #0c2340 !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #f8fafc !important;
}
[data-theme="ocean"] [class*="_card_"]:hover,
[data-theme="ocean"] [class*="_wrapper_f6hge_"]:hover,
[data-theme="ocean"] [class*="_wrapper_36a26_"]:hover,
[data-theme="ocean"] .card:hover {
  background-color: #133966 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35) !important;
}
[data-theme="ocean"] [class*="_card_"] *,
[data-theme="ocean"] [class*="_wrapper_f6hge_"] *,
[data-theme="ocean"] [class*="_wrapper_36a26_"] *,
[data-theme="ocean"] .card * {
  color: #f8fafc !important;
  background-color: transparent !important;
}
[data-theme="ocean"] [class*="_creatorIndicator_"] {
  background-color: #0c2340 !important;
  color: #94a3b8 !important;
}
[data-theme="ocean"] [class*="_addCardButton_"] {
  background-color: rgba(7, 19, 38, 0.6) !important;
  border: 1px dashed rgba(56, 189, 248, 0.5) !important;
  color: #7dd3fc !important;
}

/* --- THEME 3: FOREST EMERALD (Ngọc Lục Bảo) --- */
[data-theme="forest"],
[data-theme="forest"] body,
[data-theme="forest"] #app,
[data-theme="forest"] #root {
  background: linear-gradient(135deg, #051a11 0%, #0a2e1f 50%, #114b33 100%) !important;
  background-attachment: fixed !important;
  color: #ecfdf5 !important;
}
[data-theme="forest"] [class*="_header_"] {
  background-color: #051a11 !important;
  border-color: #114b33 !important;
  color: #34d399 !important;
}
[data-theme="forest"] [class*="_outerWrapper_1plbe_"] {
  background-color: rgba(10, 46, 31, 0.95) !important;
  border: 1px solid #059669 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}
/* Tiêu đề cột sáng rõ */
[data-theme="forest"] [class*="_listHeader_"],
[data-theme="forest"] [class*="_listTitle_"],
[data-theme="forest"] [class*="_headerTitle_"],
[data-theme="forest"] [class*="_header_"],
[data-theme="forest"] h3,
[data-theme="forest"] [class*="_title_"] {
  background-color: rgba(10, 46, 31, 0.95) !important;
  color: #a7f3d0 !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}
[data-theme="forest"] [class*="_card_"],
[data-theme="forest"] [class*="_wrapper_f6hge_"],
[data-theme="forest"] [class*="_wrapper_36a26_"],
[data-theme="forest"] .card,
[data-theme="forest"] .ui.card {
  background-color: #064e3b !important;
  background: #064e3b !important;
  border: 1px solid rgba(52, 211, 153, 0.4) !important;
  color: #ecfdf5 !important;
}
[data-theme="forest"] [class*="_card_"] *,
[data-theme="forest"] [class*="_wrapper_f6hge_"] *,
[data-theme="forest"] [class*="_wrapper_36a26_"] *,
[data-theme="forest"] .card * {
  color: #ecfdf5 !important;
  background-color: transparent !important;
}
[data-theme="forest"] [class*="_addCardButton_"] {
  background-color: rgba(5, 26, 17, 0.6) !important;
  border: 1px dashed rgba(52, 211, 153, 0.5) !important;
  color: #6ee7b7 !important;
}

/* --- THEME 4: SUNSET WARM (Hoàng Hôn Tím Cam Tuyệt Đẹp Mịn Màng) --- */
[data-theme="sunset"],
[data-theme="sunset"] body,
[data-theme="sunset"] #app,
[data-theme="sunset"] #root {
  background: linear-gradient(135deg, #180828 0%, #381235 35%, #5c1d30 65%, #7c2d12 100%) !important;
  background-attachment: fixed !important;
  color: #fff7ed !important;
}
[data-theme="sunset"] [class*="_header_"] {
  background-color: rgba(26, 9, 43, 0.95) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  color: #fb923c !important;
}
/* Cột Kanban kính mờ hoàng hôn */
[data-theme="sunset"] [class*="_outerWrapper_1plbe_"] {
  background-color: rgba(46, 16, 101, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(249, 115, 22, 0.5) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(249, 115, 22, 0.15) !important;
}
/* Tiêu đề cột vàng cam nổi bật */
[data-theme="sunset"] [class*="_headerName_"],
[data-theme="sunset"] [class*="_listHeader_"],
[data-theme="sunset"] [class*="_listTitle_"],
[data-theme="sunset"] [class*="_headerTitle_"],
[data-theme="sunset"] [class*="_header_"],
[data-theme="sunset"] h3,
[data-theme="sunset"] [class*="_title_"] {
  background-color: transparent !important;
  color: #fed7aa !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(249, 115, 22, 0.4) !important;
}
/* Thẻ việc nổi khối ánh hoàng hôn */
[data-theme="sunset"] [class*="_card_"],
[data-theme="sunset"] [class*="_wrapper_f6hge_"],
[data-theme="sunset"] [class*="_wrapper_36a26_"],
[data-theme="sunset"] .card,
[data-theme="sunset"] .ui.card {
  background-color: rgba(30, 10, 60, 0.85) !important;
  background: rgba(30, 10, 60, 0.85) !important;
  border: 1px solid rgba(251, 146, 60, 0.35) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="sunset"] [class*="_card_"]:hover,
[data-theme="sunset"] [class*="_wrapper_f6hge_"]:hover {
  background-color: rgba(50, 15, 90, 0.95) !important;
  border-color: #f97316 !important;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.35) !important;
}
[data-theme="sunset"] [class*="_card_"] *,
[data-theme="sunset"] [class*="_wrapper_f6hge_"] *,
[data-theme="sunset"] [class*="_wrapper_36a26_"] *,
[data-theme="sunset"] .card * {
  color: #ffffff !important;
  background-color: transparent !important;
}
[data-theme="sunset"] [class*="_addCardButton_"] {
  background-color: rgba(46, 16, 101, 0.5) !important;
  border: 1px dashed rgba(249, 115, 22, 0.45) !important;
  color: #fdba74 !important;
}

/* --- THEME 5: NORDIC MINIMALIST (Bắc Âu Tinh Tế - Sáng rõ nét) --- */
[data-theme="nordic"],
[data-theme="nordic"] body,
[data-theme="nordic"] #app,
[data-theme="nordic"] #root {
  background: #f8fafc !important;
  background-attachment: fixed !important;
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_header_"] {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_header_"] [class*="_item_"],
[data-theme="nordic"] [class*="_header_"] [class*="_title_"],
[data-theme="nordic"] [class*="_header_"] a,
[data-theme="nordic"] [class*="_header_"] span,
[data-theme="nordic"] [class*="_header_"] i.icon,
[data-theme="nordic"] [class*="_userName_"] {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

[data-theme="nordic"] [class*="_header_"] {
  background: rgba(15, 23, 42, 0.5) !important;
  backdrop-filter: blur(8px) !important;
}
[data-theme="nordic"] .kpi-btn,
[data-theme="nordic"] .cal-btn,
[data-theme="nordic"] .theme-btn {
  background-color: #3b82a6 !important;
  border: 1px solid #2d6888 !important;
  color: #ffffff !important;
}
[data-theme="nordic"] .kpi-btn *,
[data-theme="nordic"] .cal-btn *,
[data-theme="nordic"] .theme-btn * {
  color: #ffffff !important;
}
[data-theme="nordic"] [class*="_toolbar_"],
[data-theme="nordic"] [class*="_filter_"],
[data-theme="nordic"] [class*="_filterTitle_"],
[data-theme="nordic"] [class*="_filters_"],
[data-theme="nordic"] [class*="_filterTitle_"] *,
[data-theme="nordic"] span,
[data-theme="nordic"] div {
  color: #0f172a;
}
[data-theme="nordic"] [class*="_filterTitle_"] {
  color: #334155 !important;
  font-weight: 700 !important;
}
/* Cột Kanban xám tuyết hiện đại */
[data-theme="nordic"] [class*="_outerWrapper_1plbe_"] {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06) !important;
}

/* SỬA LỖI NỀN XÁM CHỮ TRẮNG CHO THEME NORDIC */
/* 1. Header trên cùng: Chữ và icon mũi tên quay lại màu xám đen rõ nét */
[data-theme="nordic"] [class*="_header_"] [class*="_item_"],
[data-theme="nordic"] [class*="_header_"] [class*="_title_"],
[data-theme="nordic"] [class*="_item_jdrq3_"],
[data-theme="nordic"] [class*="_title_jdrq3_"],
[data-theme="nordic"] .ui.menu .item,
[data-theme="nordic"] [class*="_header_"] h1,
[data-theme="nordic"] [class*="_header_"] h2,
[data-theme="nordic"] [class*="_header_"] i.icon,
[data-theme="nordic"] [class*="_header_"] a,
[data-theme="nordic"] [class*="_header_"] span,
[data-theme="nordic"] [class*="_header_"] div {
  color: #0f172a !important;
}

/* 2. Cụm nút thành viên (+7, nút thêm thành viên 👤+) */
[data-theme="nordic"] ._othersButton_1gfxr_9,
[data-theme="nordic"] [class*="_othersButton_"] {
  background-color: #cbd5e1 !important;
  border: 1px solid #94a3b8 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}
[data-theme="nordic"] [class*="_othersButton_"]:hover,
[data-theme="nordic"] [class*="_addButton_"]:hover {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_othersButton_"] *,
[data-theme="nordic"] [class*="_addButton_"] * {
  color: #334155 !important;
}

/* 3. Các nút lọc (Tất cả, Không có thành viên, icon mục tiêu ◎) */
[data-theme="nordic"] ._filterLabel_uc4mw_27,
[data-theme="nordic"] [class*="_filterLabel_"],
[data-theme="nordic"] [class*="_filterButton_"],
[data-theme="nordic"] button[class*="_filter_"] {
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  font-weight: 600 !important;
}
[data-theme="nordic"] [class*="_filterLabel_"]:hover,
[data-theme="nordic"] [class*="_filterButton_"]:hover {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_filterLabel_"] *,
[data-theme="nordic"] [class*="_filterButton_"] * {
  color: #1e293b !important;
}

/* 4. Các nút công cụ bên phải toolbar (Bookmark, view switcher, v.v.) */
[data-theme="nordic"] [class*="_button_1cyxy_"] {
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}
[data-theme="nordic"] [class*="_button_1cyxy_"]:hover {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_button_1cyxy_"] * {
  color: #475569 !important;
}

/* 5. Cải thiện độ tương phản chữ tiêu đề trên thẻ dự án có ảnh bìa */

/* Nút Lọc Nhanh 'Việc Của Tôi' */
.my-tasks-btn-pill {
  padding: 4px 10px !important;
  border-radius: 6px !important;
  border: 1px solid #0284c7 !important;
  background: rgba(2, 132, 199, 0.25) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.2s ease !important;
}
.my-tasks-btn-pill:hover {
  background: rgba(2, 132, 199, 0.45) !important;
  border-color: #38bdf8 !important;
}
.my-tasks-btn-pill .my-tasks-text {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}
.my-tasks-btn-pill i {
  color: #38bdf8 !important;
}
[data-theme="nordic"] .my-tasks-btn-pill {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
}
[data-theme="nordic"] .my-tasks-btn-pill .my-tasks-text {
  color: #0369a1 !important;
}
[data-theme="nordic"] .my-tasks-btn-pill i {
  color: #0284c7 !important;
}

/* HUY HIỆU HẠN CHÓT THÔNG MINH (SMART DUE BADGES) */
.smart-due-badge {
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

/* Quá hạn: Đỏ cảnh báo nổi bật */
.smart-due-badge.due-overdue,
.smart-due-badge.due-overdue *,
[data-theme="nordic"] .smart-due-badge.due-overdue,
[data-theme="nordic"] .smart-due-badge.due-overdue * {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5) !important;
  animation: pulse-due 2s infinite ease-in-out !important;
}

/* Cận hạn: Vàng hổ phách cảnh báo */
.smart-due-badge.due-impending,
.smart-due-badge.due-impending *,
[data-theme="nordic"] .smart-due-badge.due-impending,
[data-theme="nordic"] .smart-due-badge.due-impending * {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4) !important;
}

/* Đã hoàn thành trong cột Đã làm: Xanh lá cây */
.smart-due-badge.due-completed,
.smart-due-badge.due-completed *,
[data-theme="nordic"] .smart-due-badge.due-completed,
[data-theme="nordic"] .smart-due-badge.due-completed * {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

@keyframes pulse-due {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}
/* ==========================================================================
   TINH CHỈNH THẺ PROJECT CARD (TRÁNH ĐÈ CHỮ VÀ LỆCH KHUNG)
   ========================================================================== */
[class*="_wrapper_vr1u9_"] [class*="_information_vr1u9_"] {
  height: 100% !important;
  width: 100% !important;
  margin-right: 0 !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
}

/* Lớp phủ gradient chân thẻ trên toàn bộ bề mặt để chữ luôn đọc rõ */
[class*="_wrapper_vr1u9_"] [class*="_cover_vr1u9_"]::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.2) 100%) !important;
  border-radius: 4px !important;
}

/* Tiêu đề Project: Luôn nằm ở ĐÁY thẻ */
[class*="_wrapper_vr1u9_"] [class*="_title_vr1u9_"] {
  position: absolute !important;
  bottom: 14px !important;
  left: 16px !important;
  right: 46px !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  z-index: 3 !important;
}

/* Mô tả Project (Description): Hiển thị khi hover chuột vào thẻ, nằm gọn ở nửa trên thẻ, không đè lên Title ở đáy */
[class*="_wrapper_vr1u9_"] [class*="_description_vr1u9_"] {
  position: absolute !important;
  top: 14px !important;
  left: 16px !important;
  right: 46px !important;
  max-height: 70px !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: #cbd5e1 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
  z-index: 3 !important;
  border-left: 2px solid #38bdf8 !important;
  padding-left: 8px !important;
  opacity: 0 !important;
  transform: translateY(-8px) !important;
  transition: all 0.25s ease !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

[class*="_wrapper_vr1u9_"]:hover [class*="_description_vr1u9_"] {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Icon nhóm người ở góc dưới bên phải */
[class*="_wrapper_vr1u9_"] [class*="_typeIndicator_vr1u9_"] {
  z-index: 4 !important;
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
}
[class*="_wrapper_vr1u9_"] [class*="_title_vr1u9_"],
[data-theme="nordic"] [class*="_wrapper_vr1u9_"] [class*="_title_vr1u9_"] {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
}
[class*="_wrapper_vr1u9_"] [class*="_description_vr1u9_"],
[data-theme="nordic"] [class*="_wrapper_vr1u9_"] [class*="_description_vr1u9_"] {
  color: #f1f5f9 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}
[data-theme="nordic"] [class*="_icon_1gfxr_"],
[data-theme="nordic"] i.star.icon {
  color: #f59e0b !important;
}
[data-theme="nordic"] [class*="_wrapper_1gfxr_"] {
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
}
[data-theme="nordic"] [class*="_search_"] input,
[data-theme="nordic"] [class*="_search_"] i.search.icon {
  color: #334155 !important;
}
[data-theme="nordic"] [class*="_search_"] input::placeholder {
  color: #64748b !important;
}
[data-theme="nordic"] [class*="_search_"] {
  background-color: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
}
[data-theme="nordic"] [class*="_headerName_"],
[data-theme="nordic"] [class*="_listHeader_"],
[data-theme="nordic"] [class*="_listTitle_"],
[data-theme="nordic"] [class*="_headerTitle_"],
[data-theme="nordic"] [class*="_header_1plbe_"] {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}
/* Thẻ việc màu trắng tinh, chữ đen đậm tương phản tuyệt đối */
[data-theme="nordic"] [class*="_card_"],
[data-theme="nordic"] [class*="_wrapper_f6hge_"],
[data-theme="nordic"] [class*="_wrapper_36a26_"],
[data-theme="nordic"] .card,
[data-theme="nordic"] .ui.card {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
}
[data-theme="nordic"] [class*="_card_"]:hover,
[data-theme="nordic"] [class*="_wrapper_f6hge_"]:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15) !important;
}
[data-theme="nordic"] [class*="_name_"],
[data-theme="nordic"] [class*="_card_"] *,
[data-theme="nordic"] [class*="_wrapper_f6hge_"] *,
[data-theme="nordic"] [class*="_wrapper_36a26_"] *,
[data-theme="nordic"] .card * {
  color: #0f172a !important;
}
[data-theme="nordic"] [class*="_attachmentContent_"],
[data-theme="nordic"] time {
  color: #475569 !important;
}
[data-theme="nordic"] [class*="_addCardButton_"] {
  background-color: #ffffff !important;
  border: 1px dashed #94a3b8 !important;
  color: #0284c7 !important;
  font-weight: 600 !important;
}
[data-theme="nordic"] [class*="_addCardButton_"]:hover {
  background-color: #e0f2fe !important;
  border-color: #0284c7 !important;
}
