/* ==========================================================================
   HUYVPS GLOBAL STYLES & TRANSITIONS
   ========================================================================== */

/* Sleek custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Focus & Outline Reset: Ngăn viền chuột xanh/trắng thô khi click nhưng giữ nguyên trợ năng khi nhấn phím Tab */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none !important;
}

:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.5) !important;
  outline-offset: 2px !important;
}

/* Glass navigation bar */
.glass-nav {
  background: rgba(18, 18, 21, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Glass cards */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Chỉ đổi màu viền khi hover nếu card không có viền màu chủ đề */
.glass-card:not([class*="border-amber"]):not([class*="border-rose"]):not([class*="border-emerald"]):not([class*="border-white/30"]):hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.apple-glow {
  box-shadow: 0 0 50px -10px rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   VPS PLAN CARDS & LINES - DARK MODE SYSTEM
   ========================================================================== */

/* Dark Mode: Thẻ gói thuê VPS */
html.dark .plan-card,
html.dark [id^="plan-card-"] {
  background: rgba(18, 18, 22, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

html.dark .plan-card:hover,
html.dark [id^="plan-card-"]:hover {
  border-color: rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(255, 255, 255, 0.05) !important;
}

/* Thẻ gói Nổi Bật (Featured) ở Dark Mode: Viền line sáng tinh tế, sang trọng */
html.dark .plan-card.apple-glow,
html.dark [id^="plan-card-"].apple-glow,
html.dark [id^="plan-card-"]:has(.animate-ping) {
  border: 1.5px solid rgba(255, 255, 255, 0.32) !important;
  background: linear-gradient(180deg, rgba(35, 35, 42, 0.75) 0%, rgba(18, 18, 22, 0.9) 100%) !important;
  box-shadow: 0 0 50px -10px rgba(255, 255, 255, 0.12), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
}

html.dark .plan-card.apple-glow:hover,
html.dark [id^="plan-card-"].apple-glow:hover,
html.dark [id^="plan-card-"]:has(.animate-ping):hover {
  border-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 0 60px -5px rgba(255, 255, 255, 0.22), inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
}

/* Thẻ gói Bị Ẩn (Hidden) ở Dark Mode */
html.dark .plan-card[class*="border-amber"],
html.dark [id^="plan-card-"][class*="border-amber"] {
  border: 1.5px dashed rgba(245, 158, 11, 0.5) !important;
  background: rgba(24, 20, 10, 0.7) !important;
}

html.dark .plan-card[class*="border-amber"]:hover,
html.dark [id^="plan-card-"][class*="border-amber"]:hover {
  border-color: rgba(245, 158, 11, 0.8) !important;
}

/* Đường line phân cách cấu hình (divider line) ở Dark Mode */
html.dark .plan-divider-line,
html.dark [id^="plan-card-"] .border-t {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Nút bấm gói thuê thường ở Dark Mode */
html.dark [id^="plan-card-"] button.border-white\/20 {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
html.dark [id^="plan-card-"] button.border-white\/20:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* Nút bấm gói nổi bật ở Dark Mode */
html.dark [id^="plan-card-"] button.bg-white.text-black {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ffffff !important;
  font-weight: 700 !important;
}
html.dark [id^="plan-card-"] button.bg-white.text-black:hover {
  background-color: #e4e4e7 !important;
  border-color: #e4e4e7 !important;
}

/* Dark Mode Global Lines & Dividers Precision */
html.dark .border-white\/10,
html.dark .border-white\/15 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html.dark .border-white\/5 {
  border-color: rgba(255, 255, 255, 0.05) !important;
}
html.dark .border-white\/20 {
  border-color: rgba(255, 255, 255, 0.18) !important;
}
html.dark .border-white\/30 {
  border-color: rgba(255, 255, 255, 0.28) !important;
}

html.dark hr,
html.dark .border-t.border-white\/10,
html.dark .border-b.border-white\/10 {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Dark Mode Modal Boxes */
html.dark [id$="-modal-box"],
html.dark [id^="modal-"][id$="-box"] {
  background: rgba(14, 14, 18, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(255, 255, 255, 0.04) !important;
}

/* Terminal blinking cursor */
.cursor-blink {
  display: inline-block;
  width: 7px;
  height: 15px;
  background-color: #ffffff;
  vertical-align: middle;
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.scale-in {
  animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   REPOSITORY CARD (DARK MODE BASE)
   ========================================================================== */
.repo-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
}

.repo-card:not(.is-selected) {
  opacity: 0.85;
}

.repo-card:not(.is-selected):hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.35) !important;
  transform: translateY(-2px);
}

.repo-card.is-selected {
  opacity: 1 !important;
  border: 2px solid #10b981 !important;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.8) 0%, rgba(9, 9, 11, 0.95) 100%) !important;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.45), 0 0 10px rgba(16, 185, 129, 0.3), inset 0 0 20px rgba(16, 185, 129, 0.2) !important;
  transform: translateY(-3px) scale(1.02) !important;
  outline: 2px solid rgba(52, 211, 153, 0.75) !important;
  outline-offset: 1px !important;
  z-index: 10 !important;
}

.repo-card.is-selected .repo-card-title {
  color: #6ee7b7 !important;
  font-weight: 800 !important;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.5) !important;
}

/* ==========================================================================
   LIGHT MODE DESIGN SYSTEM (html:not(.dark))
   Dễ nhìn, bảo vệ mắt, độ tương phản chuẩn WCAG, không bị chói sáng hay đen kịt
   ========================================================================== */

/* 1. Body & Canvas */
html:not(.dark) body {
  background-color: #f8fafc !important; /* Soft Slate-50: chống chói mắt */
  color: #0f172a !important;            /* Slate-900: chữ đậm rõ ràng */
}

html:not(.dark) ::selection {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

html:not(.dark) ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16) !important;
}
html:not(.dark) ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.32) !important;
}

/* 2. Glass Navigation Bar & Floating Header */
html:not(.dark) .glass-nav {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) header a.group:hover .group-hover\:text-zinc-200 {
  color: #334155 !important;
}

html:not(.dark) .nav-item.bg-white\/10 {
  background-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}

html:not(.dark) .nav-item:hover {
  background-color: rgba(15, 23, 42, 0.04) !important;
  color: #0f172a !important;
}

html:not(.dark) #theme-toggle-btn,
html:not(.dark) #mobile-menu-trigger {
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #475569 !important;
}
html:not(.dark) #theme-toggle-btn:hover,
html:not(.dark) #mobile-menu-trigger:hover {
  background-color: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

/* 3. Glass Cards & Outer Card Containers */
html:not(.dark) .glass-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

html:not(.dark) .glass-card:hover {
  border-color: rgba(0, 0, 0, 0.16) !important;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .apple-glow {
  box-shadow: 0 0 35px -5px rgba(0, 0, 0, 0.08) !important;
  border-color: rgba(0, 0, 0, 0.16) !important;
}

/* 3.1 VPS Plan Cards in Light Mode (Gói thuê VPS chế độ Sáng) */
html:not(.dark) .plan-card,
html:not(.dark) [id^="plan-card-"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
}

html:not(.dark) .plan-card:hover,
html:not(.dark) [id^="plan-card-"]:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.1) !important;
}

/* Thẻ gói Nổi Bật (Featured) ở Light Mode: Nổi bật rõ rệt, cao cấp */
html:not(.dark) .plan-card.apple-glow,
html:not(.dark) [id^="plan-card-"].apple-glow,
html:not(.dark) [id^="plan-card-"]:has(.animate-ping) {
  background: #ffffff !important;
  border: 2px solid #0f172a !important;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
}

html:not(.dark) .plan-card.apple-glow:hover,
html:not(.dark) [id^="plan-card-"].apple-glow:hover,
html:not(.dark) [id^="plan-card-"]:has(.animate-ping):hover {
  border-color: #0f172a !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22) !important;
}

/* Thẻ gói Bị Ẩn (Hidden) ở Light Mode */
html:not(.dark) .plan-card[class*="border-amber"],
html:not(.dark) [id^="plan-card-"][class*="border-amber"] {
  background: #fffbeb !important;
  border: 1.5px dashed #f59e0b !important;
}

/* Đường line phân cách cấu hình (divider line) ở Light Mode */
html:not(.dark) .plan-divider-line,
html:not(.dark) [id^="plan-card-"] .border-t {
  border-top: 1px solid #e2e8f0 !important;
}

/* Nút bấm gói thuê thường ở Light Mode */
html:not(.dark) [id^="plan-card-"] button.border-white\/20 {
  background-color: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
}
html:not(.dark) [id^="plan-card-"] button.border-white\/20:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Nút bấm gói nổi bật ở Light Mode */
html:not(.dark) [id^="plan-card-"] button.bg-white.text-black {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #0f172a !important;
  font-weight: 700 !important;
}
html:not(.dark) [id^="plan-card-"] button.bg-white.text-black:hover {
  background-color: #1e293b !important;
  border-color: #1e293b !important;
}

/* 4. Hierarchy Typography in Light Mode */
/* Ngăn chặn ép màu đen lên nút có nền tối, code block, terminal */
html:not(.dark) .text-white:not(
  button.bg-white.text-black,
  button.bg-white.text-black *,
  a.bg-white.text-black,
  a.bg-white.text-black *,
  button.bg-rose-600,
  button.bg-rose-600 *,
  button.bg-rose-500,
  button.bg-rose-500 *,
  button.bg-emerald-600,
  button.bg-emerald-600 *,
  button.bg-emerald-500,
  button.bg-emerald-500 *,
  button.bg-black,
  button.bg-black *,
  button.bg-zinc-950,
  button.bg-zinc-950 *,
  .doc-tab-btn.bg-white,
  .doc-tab-btn.bg-white *,
  .doc-content-pane .bg-black\/90,
  .doc-content-pane .bg-black\/90 *,
  .preserve-white-text,
  .preserve-white-text *
) {
  color: #0f172a !important; /* Slate-900: Dễ nhìn, sắc nét */
}

html:not(.dark) .text-zinc-100 {
  color: #1e293b !important; /* Slate-800 */
}

html:not(.dark) .text-zinc-200 {
  color: #334155 !important; /* Slate-700: Khắc phục lỗi chữ bạc biến mất trên nền sáng */
}

html:not(.dark) .text-zinc-300 {
  color: #475569 !important; /* Slate-600 */
}

html:not(.dark) .text-zinc-400 {
  color: #64748b !important; /* Slate-500 */
}

html:not(.dark) .text-zinc-500 {
  color: #94a3b8 !important; /* Slate-400 */
}

html:not(.dark) .text-zinc-600 {
  color: #cbd5e1 !important; /* Slate-300 */
}

/* 5. Sub-box & Sub-container Backgrounds in Light Mode */
/* Chuyển các box nền đen/zinc tối thành nền sáng dịu mắt (#f1f5f9 hoặc #f8fafc) */
html:not(.dark) .bg-zinc-900,
html:not(.dark) .bg-zinc-900\/40,
html:not(.dark) .bg-zinc-900\/50,
html:not(.dark) .bg-zinc-900\/60,
html:not(.dark) .bg-zinc-900\/70,
html:not(.dark) .bg-zinc-900\/80,
html:not(.dark) .bg-zinc-900\/90,
html:not(.dark) .bg-zinc-950,
html:not(.dark) .bg-zinc-950\/95,
html:not(.dark) .bg-zinc-800,
html:not(.dark) .bg-zinc-800\/80,
html:not(.dark) .bg-black\/20,
html:not(.dark) .bg-black\/30,
html:not(.dark) .bg-black\/40,
html:not(.dark) .bg-black\/60,
html:not(.dark) .bg-black\/70,
html:not(.dark) .bg-black\/80 {
  background-color: #f1f5f9 !important; /* Slate-100 */
}

/* Khi web ở light mode, CMD deploy và logs modal cũng phải màu trắng */
html:not(.dark) #terminal-body,
html:not(.dark) #project-log-modal-body {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Riêng nền trong của file cấu hình env/appsettings */
html:not(.dark) #config-files-details .bg-zinc-900\/90 {
  background-color: #ffffff !important;
}

/* Nền mờ nhẹ nhàng */
html:not(.dark) .bg-white\/5,
html:not(.dark) .bg-white\/10,
html:not(.dark) .bg-white\/\[0\.02\],
html:not(.dark) .bg-white\/\[0\.03\],
html:not(.dark) .bg-white\/\[0\.04\],
html:not(.dark) .bg-white\/\[0\.05\] {
  background-color: rgba(15, 23, 42, 0.04) !important;
}

html:not(.dark) .bg-white\/15,
html:not(.dark) .bg-white\/20 {
  background-color: rgba(15, 23, 42, 0.07) !important;
}

/* 6. Subtle Borders & Divider Lines in Light Mode */
html:not(.dark) .border-white,
html:not(.dark) .border-white\/5,
html:not(.dark) .border-white\/10,
html:not(.dark) .border-white\/15,
html:not(.dark) .border-white\/20,
html:not(.dark) .border-white\/25,
html:not(.dark) .border-white\/30,
html:not(.dark) .border-white\/40,
html:not(.dark) .border-t.border-white\/10,
html:not(.dark) .border-t.border-white\/5,
html:not(.dark) .border-b.border-white\/10,
html:not(.dark) .border-b.border-white\/5,
html:not(.dark) hr {
  border-color: #e2e8f0 !important; /* Chuẩn Slate-200 tinh tế, rõ nét, không bị mờ nhạt */
}

html:not(.dark) .border-dashed {
  border-color: #cbd5e1 !important; /* Chuẩn Slate-300 */
}

/* 7. Form Controls (Input, Textarea, Select) in Light Mode */
/* Đảm bảo rõ viền, chữ đậm, không bị tàng hình viền focus */
html:not(.dark) input[type="text"],
html:not(.dark) input[type="email"],
html:not(.dark) input[type="password"],
html:not(.dark) input[type="number"],
html:not(.dark) textarea,
html:not(.dark) select {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important; /* Slate-300: Viền rõ ràng */
  color: #0f172a !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important; /* Slate-400 */
}

html:not(.dark) input:focus,
html:not(.dark) textarea:focus,
html:not(.dark) select:focus {
  border-color: #059669 !important; /* Emerald-600 */
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  outline: none !important;
}

/* Ngoại lệ cho input con nằm trong container group có viền riêng */
html:not(.dark) #subdomain-input-container .focus-within\:border-orange-400 input:focus,
html:not(.dark) #deploy-subdomain-input:focus {
  box-shadow: none !important;
  border-color: transparent !important;
}

html:not(.dark) #subdomain-input-container > div {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

/* 8. Buttons & Controls in Light Mode */
/* Nút chính (bg-white text-black ở dark mode) chuyển thành nút đen sang trọng có chữ trắng */
html:not(.dark) button.bg-white.text-black,
html:not(.dark) a.bg-white.text-black {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15) !important;
}

html:not(.dark) button.bg-white.text-black:hover,
html:not(.dark) a.bg-white.text-black:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

html:not(.dark) button.bg-white.text-black svg,
html:not(.dark) a.bg-white.text-black svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html:not(.dark) button.bg-white.text-black svg path,
html:not(.dark) a.bg-white.text-black svg path {
  fill: currentColor !important;
}

/* Nút phụ (Secondary buttons với nền zinc tối) */
html:not(.dark) button.bg-zinc-900\/60,
html:not(.dark) a.bg-zinc-900\/60,
html:not(.dark) button.hover\:bg-zinc-800:hover {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html:not(.dark) button.bg-zinc-900\/60:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* Nút nguy hiểm (Xóa dự án) */
html:not(.dark) button.bg-rose-600,
html:not(.dark) .bg-rose-600 {
  background-color: #e11d48 !important;
  color: #ffffff !important;
}
html:not(.dark) button.bg-rose-600:hover {
  background-color: #be123c !important;
  color: #ffffff !important;
}

/* Doc tab nút đang chọn */
html:not(.dark) .doc-tab-btn.bg-white {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

/* 9. Badges & Contrast Color Overrides (Khắc phục hoàn toàn "quá sáng" hoặc "quá tối") */

/* --- EMERALD (Xanh ngọc / Hoạt động / Success) --- */
html:not(.dark) .text-emerald-300,
html:not(.dark) .text-emerald-400 {
  color: #047857 !important; /* Emerald-700: Đậm rõ, không bị chói nhạt */
}
html:not(.dark) .text-emerald-200 {
  color: #065f46 !important; /* Emerald-800 */
}
html:not(.dark) .bg-emerald-500\/10,
html:not(.dark) .bg-emerald-500\/15,
html:not(.dark) .bg-emerald-500\/20,
html:not(.dark) .bg-emerald-500\/25 {
  background-color: #ecfdf5 !important; /* Emerald-50 */
}
html:not(.dark) .border-emerald-500\/20,
html:not(.dark) .border-emerald-500\/30,
html:not(.dark) .border-emerald-400\/50 {
  border-color: #a7f3d0 !important; /* Emerald-200 */
}
html:not(.dark) .bg-emerald-950\/60 {
  background-color: #f0fdf4 !important;
}

/* --- ORANGE (Cam / Cloudflare Tunnel / Ingress) --- */
html:not(.dark) .text-orange-300,
html:not(.dark) .text-orange-400 {
  color: #c2410c !important; /* Orange-700: Đậm đà, sắc nét trên nền sáng */
}
html:not(.dark) .bg-orange-500\/10,
html:not(.dark) .bg-orange-500\/15,
html:not(.dark) .bg-orange-500\/20 {
  background-color: #fff7ed !important; /* Orange-50 */
}
html:not(.dark) .border-orange-500\/20,
html:not(.dark) .border-orange-500\/25,
html:not(.dark) .border-orange-500\/30 {
  border-color: #fed7aa !important; /* Orange-200 */
}

/* --- SKY / BLUE (Xanh biển / Container Docker / Git) --- */
html:not(.dark) .text-sky-300,
html:not(.dark) .text-sky-400 {
  color: #0369a1 !important; /* Sky-700 */
}
html:not(.dark) .text-sky-200 {
  color: #075985 !important; /* Sky-800 */
}
html:not(.dark) .bg-sky-500\/10,
html:not(.dark) .bg-sky-500\/15,
html:not(.dark) .bg-sky-500\/20 {
  background-color: #f0f9ff !important; /* Sky-50 */
}
html:not(.dark) .border-sky-500\/20,
html:not(.dark) .border-sky-500\/30 {
  border-color: #bae6fd !important; /* Sky-200 */
}

/* --- AMBER / YELLOW (Vàng / Cảnh báo / Thận trọng) --- */
html:not(.dark) .text-amber-300,
html:not(.dark) .text-amber-400 {
  color: #b45309 !important; /* Amber-700 */
}
html:not(.dark) .bg-amber-500\/10,
html:not(.dark) .bg-amber-500\/20,
html:not(.dark) .bg-amber-500\/25,
html:not(.dark) .bg-amber-500\/30 {
  background-color: #fffbeb !important; /* Amber-50 */
}
html:not(.dark) .border-amber-500\/20,
html:not(.dark) .border-amber-500\/25,
html:not(.dark) .border-amber-500\/30 {
  border-color: #fde68a !important; /* Amber-200 */
}

/* --- ROSE / RED (Đỏ / Lỗi / Dừng / Xóa) --- */
html:not(.dark) .text-rose-300,
html:not(.dark) .text-rose-400 {
  color: #be123c !important; /* Rose-700 */
}
html:not(.dark) .bg-rose-500\/10,
html:not(.dark) .bg-rose-500\/15,
html:not(.dark) .bg-rose-500\/20 {
  background-color: #fff1f2 !important; /* Rose-50 */
}
html:not(.dark) .border-rose-500\/20,
html:not(.dark) .border-rose-500\/30,
html:not(.dark) .border-rose-500\/50 {
  border-color: #fecdd3 !important; /* Rose-200 */
}
html:not(.dark) .bg-rose-950\/20 {
  background-color: #ffe4e6 !important;
}

/* --- PURPLE (Tím / Metrics / Online Service) --- */
html:not(.dark) .text-purple-300,
html:not(.dark) .text-purple-400 {
  color: #7e22ce !important; /* Purple-700 */
}
html:not(.dark) .bg-purple-500\/10,
html:not(.dark) .bg-purple-500\/20 {
  background-color: #faf5ff !important; /* Purple-50 */
}
html:not(.dark) .border-purple-500\/20,
html:not(.dark) .border-purple-500\/30 {
  border-color: #e9d5ff !important; /* Purple-200 */
}

/* 10. Repository Card Selection in Light Mode */
html:not(.dark) .repo-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .repo-card:not(.is-selected):hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-2px);
}

html:not(.dark) .repo-card.is-selected {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%) !important;
  border: 2px solid #059669 !important;
  box-shadow: 0 8px 25px -4px rgba(16, 185, 129, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.2) !important;
  outline: 2px solid rgba(16, 185, 129, 0.35) !important;
  outline-offset: 1px !important;
}

html:not(.dark) .repo-card.is-selected .repo-card-title {
  color: #065f46 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

/* 11. Presets Selection Cards in Light Mode */
html:not(.dark) .preset-card {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .preset-card:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
}

html:not(.dark) .preset-card.border-white,
html:not(.dark) .preset-card.bg-white\/10 {
  background-color: #ecfdf5 !important;
  border: 2px solid #059669 !important;
  box-shadow: 0 4px 15px -2px rgba(16, 185, 129, 0.2) !important;
}

html:not(.dark) .preset-card.border-white #preset-native-title,
html:not(.dark) .preset-card.bg-white\/10 #preset-native-title,
html:not(.dark) .preset-card.border-white span.font-semibold,
html:not(.dark) .preset-card.bg-white\/10 span.font-semibold {
  color: #047857 !important;
}

/* 12. Terminal & Live Logs in Light Mode - Nền trắng và không dùng icon */
html:not(.dark) #deploy-inline-terminal-card,
html:not(.dark) #project-log-modal-box {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) #deploy-inline-terminal-card > div:first-child,
html:not(.dark) #project-log-modal-box > div:first-child {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

html:not(.dark) #terminal-body,
html:not(.dark) #project-log-modal-body {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

html:not(.dark) #deploy-inline-terminal-card > div:last-child,
html:not(.dark) #project-log-modal-box > div:last-child {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

/* Chữ trong Terminal & Log khi ở Light Mode (Nền trắng) */
html:not(.dark) #terminal-body .text-zinc-600,
html:not(.dark) #project-log-modal-body .text-zinc-600,
html:not(.dark) #terminal-body .text-zinc-500,
html:not(.dark) #project-log-modal-body .text-zinc-500 {
  color: #64748b !important;
}

html:not(.dark) #terminal-body .text-zinc-400,
html:not(.dark) #project-log-modal-body .text-zinc-400 {
  color: #475569 !important;
}

html:not(.dark) #terminal-body .text-zinc-300,
html:not(.dark) #project-log-modal-body .text-zinc-300,
html:not(.dark) #terminal-body .text-zinc-200,
html:not(.dark) #project-log-modal-body .text-zinc-200 {
  color: #0f172a !important;
}

html:not(.dark) #terminal-body .text-white,
html:not(.dark) #project-log-modal-body .text-white {
  color: #0f172a !important;
}

html:not(.dark) #terminal-body .text-emerald-400,
html:not(.dark) #project-log-modal-body .text-emerald-400,
html:not(.dark) #terminal-body .text-emerald-300,
html:not(.dark) #project-log-modal-body .text-emerald-300 {
  color: #059669 !important;
}

html:not(.dark) #terminal-body .text-amber-400,
html:not(.dark) #project-log-modal-body .text-amber-400,
html:not(.dark) #terminal-body .text-amber-300,
html:not(.dark) #project-log-modal-body .text-amber-300,
html:not(.dark) #terminal-body .text-amber-200,
html:not(.dark) #project-log-modal-body .text-amber-200 {
  color: #b45309 !important;
}

html:not(.dark) #terminal-body .text-sky-300,
html:not(.dark) #project-log-modal-body .text-sky-300,
html:not(.dark) #terminal-body .text-cyan-300,
html:not(.dark) #project-log-modal-body .text-cyan-300 {
  color: #0284c7 !important;
}

html:not(.dark) #terminal-body .text-rose-400,
html:not(.dark) #project-log-modal-body .text-rose-400,
html:not(.dark) #terminal-body .text-rose-300,
html:not(.dark) #project-log-modal-body .text-rose-300 {
  color: #dc2626 !important;
}

html:not(.dark) #terminal-body a,
html:not(.dark) #project-log-modal-body a {
  color: #2563eb !important;
}

/* Khung thông báo hoàn tất / lỗi trong terminal ở Light Mode */
html:not(.dark) #terminal-body .bg-zinc-900\/90,
html:not(.dark) #project-log-modal-body .bg-zinc-900\/90 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Không dùng icon cho CMD deploy và logs: ẩn triệt để mọi SVG và Lucide icon bên trong */
#deploy-inline-terminal-card svg,
#deploy-inline-terminal-card [data-lucide],
#project-log-modal-box svg,
#project-log-modal-box [data-lucide] {
  display: none !important;
}

/* Code blocks trong tài liệu hướng dẫn */
html:not(.dark) .doc-content-pane .bg-black\/90 {
  background-color: #18181b !important;
  color: #f4f4f5 !important;
  border-color: #27272a !important;
}
html:not(.dark) .doc-content-pane .bg-black\/90 .text-emerald-300,
html:not(.dark) .doc-content-pane .bg-black\/90 .text-emerald-400 {
  color: #34d399 !important;
}
html:not(.dark) .doc-content-pane .bg-black\/90 .text-zinc-400,
html:not(.dark) .doc-content-pane .bg-black\/90 .text-zinc-500 {
  color: #a1a1aa !important;
}
html:not(.dark) .doc-content-pane .bg-black\/90 code {
  color: #34d399 !important;
}

/* 13. All Modals & Backdrop in Light Mode */
html:not(.dark) #modal-auth,
html:not(.dark) #modal-checkout,
html:not(.dark) #modal-deploy-choice,
html:not(.dark) #modal-plan-editor,
html:not(.dark) #project-log-modal,
html:not(.dark) #delete-project-modal,
html:not(.dark) #delete-instance-modal,
html:not(.dark) #toggle-instance-modal,
html:not(.dark) #modal-free-plan-claimed,
html:not(.dark) #modal-free-plan-limit,
html:not(.dark) #modal-security-notice,
html:not(.dark) #modal-target-vps,
html:not(.dark) #user-account-modal,
html:not(.dark) #support-modal,
html:not(.dark) #mobile-menu-backdrop {
  background-color: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(8px) !important;
}

/* Khung modal dạng thẻ nổi màu trắng sang trọng cho TẤT CẢ các modal */
html:not(.dark) #modal-auth-box,
html:not(.dark) #modal-checkout-box,
html:not(.dark) #modal-deploy-choice-box,
html:not(.dark) #modal-plan-editor-box,
html:not(.dark) #delete-project-modal-box,
html:not(.dark) #delete-instance-modal-box,
html:not(.dark) #toggle-instance-modal-box,
html:not(.dark) #modal-free-plan-claimed-box,
html:not(.dark) #modal-free-plan-limit-box,
html:not(.dark) #modal-security-notice-box,
html:not(.dark) #modal-target-vps-box,
html:not(.dark) #user-account-modal-box,
html:not(.dark) #support-modal .glass-card {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22) !important;
  color: #0f172a !important;
}

/* Các box và thẻ con bên trong modal ở Light Mode */
html:not(.dark) [id$="-modal-box"] .bg-zinc-900,
html:not(.dark) [id$="-modal-box"] .bg-zinc-900\/80,
html:not(.dark) [id$="-modal-box"] .bg-zinc-950,
html:not(.dark) [id$="-modal-box"] .bg-zinc-950\/90,
html:not(.dark) [id$="-modal-box"] .bg-zinc-950\/95,
html:not(.dark) [id$="-modal-box"] .bg-black,
html:not(.dark) [id$="-modal-box"] .bg-white\/\[0\.03\],
html:not(.dark) [id$="-modal-box"] .bg-white\/\[0\.04\],
html:not(.dark) [id$="-modal-box"] .bg-white\/5,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-zinc-900,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-zinc-900\/80,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-zinc-950,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-zinc-950\/90,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-zinc-950\/95,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-black,
html:not(.dark) [id^="modal-"][id$="-box"] .bg-white\/\[0\.03\],
html:not(.dark) [id^="modal-"][id$="-box"] .bg-white\/\[0\.04\],
html:not(.dark) [id^="modal-"][id$="-box"] .bg-white\/5 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* CMD deploy và log modal màu trắng khi ở Light Mode */
html:not(.dark) #project-log-modal-box {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Nút đóng modal tròn cho TẤT CẢ các modal */
html:not(.dark) #modal-auth button[id*="close"],
html:not(.dark) #modal-checkout button[onclick*="close"],
html:not(.dark) #modal-deploy-choice button[onclick*="close"],
html:not(.dark) #modal-plan-editor button[onclick*="close"],
html:not(.dark) #project-log-modal button[onclick*="close"],
html:not(.dark) #delete-project-modal button[onclick*="close"],
html:not(.dark) #delete-instance-modal button[onclick*="close"],
html:not(.dark) #toggle-instance-modal button[onclick*="close"],
html:not(.dark) #modal-free-plan-claimed button[onclick*="close"],
html:not(.dark) #modal-free-plan-limit button[onclick*="close"],
html:not(.dark) #modal-security-notice button[onclick*="close"],
html:not(.dark) #modal-target-vps button[onclick*="close"],
html:not(.dark) #user-account-modal button[onclick*="close"],
html:not(.dark) #support-modal button[onclick*="close"],
html:not(.dark) button[aria-label="Đóng"] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
html:not(.dark) #modal-auth button[id*="close"]:hover,
html:not(.dark) #modal-checkout button[onclick*="close"]:hover,
html:not(.dark) #modal-deploy-choice button[onclick*="close"]:hover,
html:not(.dark) #modal-plan-editor button[onclick*="close"]:hover,
html:not(.dark) #project-log-modal button[onclick*="close"]:hover,
html:not(.dark) #delete-project-modal button[onclick*="close"]:hover,
html:not(.dark) #delete-instance-modal button[onclick*="close"]:hover,
html:not(.dark) #toggle-instance-modal button[onclick*="close"]:hover,
html:not(.dark) #modal-free-plan-claimed button[onclick*="close"]:hover,
html:not(.dark) #modal-free-plan-limit button[onclick*="close"]:hover,
html:not(.dark) #modal-security-notice button[onclick*="close"]:hover,
html:not(.dark) #modal-target-vps button[onclick*="close"]:hover,
html:not(.dark) #user-account-modal button[onclick*="close"]:hover,
html:not(.dark) #support-modal button[onclick*="close"]:hover,
html:not(.dark) button[aria-label="Đóng"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Loading overlay trong modal Auth */
html:not(.dark) #auth-loading-overlay {
  background-color: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
}
html:not(.dark) #auth-loading-overlay #auth-loading-title {
  color: #0f172a !important;
}
html:not(.dark) #auth-loading-overlay #auth-loading-desc {
  color: #475569 !important;
}
html:not(.dark) #auth-loading-overlay #auth-loading-status-tag,
html:not(.dark) #auth-loading-overlay #auth-loading-percentage {
  color: #64748b !important;
}
html:not(.dark) #auth-loading-overlay #auth-success-title {
  color: #047857 !important;
}
html:not(.dark) #auth-loading-overlay #auth-success-desc {
  color: #334155 !important;
}

/* Drawer menu trên Mobile */
html:not(.dark) #mobile-menu-drawer {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: -10px 0 30px -10px rgba(0, 0, 0, 0.1) !important;
}
html:not(.dark) #mobile-menu-drawer .nav-item {
  color: #334155 !important;
}
html:not(.dark) #mobile-menu-drawer .nav-item:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* 14. Toast Notification in Light Mode */
html:not(.dark) .fixed.bottom-6.glass-nav {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18) !important;
}

/* 15. Footer in Light Mode */
html:not(.dark) footer {
  border-top-color: #e2e8f0 !important;
  color: #64748b !important;
  background-color: #f8fafc !important;
}
html:not(.dark) footer a:hover {
  color: #0f172a !important;
}

/* 16. Tables & Admin Management in Light Mode */
html:not(.dark) table {
  color: #0f172a !important;
}

html:not(.dark) thead.bg-white\/5,
html:not(.dark) thead {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

html:not(.dark) tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
}

html:not(.dark) tbody tr:hover {
  background-color: #f8fafc !important;
}

html:not(.dark) #admin-dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18) !important;
}

html:not(.dark) #admin-dropdown-menu .border-b,
html:not(.dark) #admin-dropdown-menu .border-t {
  border-color: #e2e8f0 !important;
}

html:not(.dark) #admin-dropdown-menu button:hover {
  background-color: #f1f5f9 !important;
}

/* 17. VietQR PayOS Box in Light Mode */
html:not(.dark) #pay-qr-content {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
}

html:not(.dark) #pay-qr-content .border-b,
html:not(.dark) #pay-qr-content .border-t {
  border-color: #e2e8f0 !important;
}
