/* ==============================================================================
   AICENTY BUTLER: FUTURISTIC LUXURY TECH THEME OVERLAY
   Deep Black (#05070B) & Electric Blue Glow (#00D2FF, #0070F3, #38BDF8)
   ============================================================================== */

:root,
html,
body,
.dark,
html.dark,
body.dark,
[data-theme="dark"] {
  --background: #05070B !important;
  --foreground: #F8FAFC !important;
  
  --card: #090D16 !important;
  --card-foreground: #F8FAFC !important;
  
  --popover: #090D16 !important;
  --popover-foreground: #F8FAFC !important;
  
  --primary: #00D2FF !important;
  --primary-foreground: #000000 !important;
  
  --secondary: #111827 !important;
  --secondary-foreground: #F8FAFC !important;
  
  --muted: #0F172A !important;
  --muted-foreground: #94A3B8 !important;
  
  --accent: #0070F3 !important;
  --accent-foreground: #FFFFFF !important;
  
  --destructive: #EF4444 !important;
  --destructive-foreground: #FFFFFF !important;
  
  --border: #1E293B !important;
  --input: #1E293B !important;
  --ring: #00D2FF !important;
  
  --chat-bubble-user: #0070F3 !important;
  --chat-bubble-user-foreground: #FFFFFF !important;
  
  --sidebar: #05070B !important;
  --sidebar-foreground: #F8FAFC !important;
  --sidebar-primary: #00D2FF !important;
  --sidebar-primary-foreground: #000000 !important;
  --sidebar-accent: #0E1626 !important;
  --sidebar-accent-foreground: #00D2FF !important;
  --sidebar-border: #1E293B !important;
  --sidebar-ring: #00D2FF !important;
  
  --chart-1: #00D2FF !important;
  --chart-2: #0070F3 !important;
  --chart-3: #38BDF8 !important;
  --chart-4: #10B981 !important;
  --chart-5: #6366F1 !important;
}

body {
  background-color: #05070B !important;
  color: #F8FAFC !important;
}

/* Triệt tiêu 100% tất cả màu cam và hổ phách (Tailwind orange/amber) */
.bg-orange-500, .bg-orange-600, .bg-orange-700,
.bg-amber-500, .bg-amber-600,
[class*="bg-orange-"], [class*="bg-amber-"],
.bg-primary {
  background-color: #00D2FF !important;
  color: #000000 !important;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.4) !important;
}

.text-orange-500, .text-orange-600, .text-orange-700,
.text-amber-500, .text-amber-600,
[class*="text-orange-"], [class*="text-amber-"],
.text-primary {
  color: #00D2FF !important;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.5) !important;
}

.border-orange-500, .border-orange-600,
.border-amber-500, .border-amber-600,
[class*="border-orange-"], [class*="border-amber-"],
.border-primary {
  border-color: #00D2FF !important;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3) !important;
}

.ring-primary, [class*="ring-orange-"], [class*="ring-amber-"] {
  --tw-ring-color: #00D2FF !important;
}

/* Nền thẻ Card & Khung kính mờ */
.bg-card, .bg-surface, .bg-background {
  background-color: #090D16 !important;
  border-color: #1E293B !important;
}

/* ==============================================================================
   1. DASHBOARD SIDEBAR: LOGO NHỎ LẠI CHO HÀI HÒA & CÂN ĐỐI
   ============================================================================== */

/* Ẩn text "Aicenty Butler" trong sidebar header */
aside .h-14 span,
aside .h-14 span.text-sidebar-primary,
aside .h-14 span.text-lg,
nav ~ div span.text-sidebar-primary,
div[class*="border-b"] span.text-sidebar-primary {
  display: none !important;
}

/* Logo Aicenty Butler trong Dashboard: Kích thước tinh gọn, cân đối, thoáng đãng */
aside .h-14 .flex.items-center img,
aside .h-14 img {
  content: url('/logo-banner.png') !important;
  width: 135px !important;
  max-width: 145px !important;
  height: 28px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  mix-blend-mode: screen !important;
  filter: drop-shadow(0 0 12px rgba(0, 210, 255, 0.5)) !important;
  margin: 0 !important;
  transition: all 0.2s ease !important;
}

/* Khi sidebar thu gọn (w-16): Hiển thị icon A kim loại */
aside.w-16 .h-14 img,
aside[class*="w-16"] .h-14 img {
  content: url('/favicon.png') !important;
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  margin: 0 auto !important;
}

/* ==============================================================================
   2. TRANG LOGIN: TINH CHỈNH HOÀN THIỆN
   - Ẩn text "Aicenty Butler" trên trang login
   - Cập nhật subtitle thành: "Quản Gia Thời Hiện Đại Cho Mọi Nhà"
   - Ẩn text: "Dùng "system" để có toàn quyền hệ thống"
   ============================================================================== */

/* Logo trên login card */
div[class*="max-w-sm"] .text-center img,
div[class*="max-w-sm"] img[src*="goclaw-icon"],
div[class*="max-w-sm"] img[src*="logo"] {
  content: url('/logo-banner.png') !important;
  width: 250px !important;
  max-width: 270px !important;
  height: 52px !important;
  max-height: 56px !important;
  margin: 0.5rem auto 1.25rem auto !important;
  mix-blend-mode: screen !important;
  background: transparent !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.6)) !important;
}

/* Ẩn tiêu đề h1 Aicenty Butler trên trang đăng nhập */
div[class*="max-w-sm"] .text-center h1,
div[class*="max-w-sm"] h1.text-3xl {
  display: none !important;
}

/* Biến đổi Subtitle thành "Quản Gia Thời Hiện Đại Cho Mọi Nhà" */
div[class*="max-w-sm"] .text-center p.text-muted-foreground {
  font-size: 0 !important;
  margin-bottom: 0.85rem !important;
  line-height: 1 !important;
}
div[class*="max-w-sm"] .text-center p.text-muted-foreground::after {
  content: "Quản Gia Thời Hiện Đại Cho Mọi Nhà" !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  color: #38BDF8 !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.45) !important;
  display: block !important;
  line-height: 1.5 !important;
}

/* ẨN HOÀN TOÀN text: "Dùng "system" để có toàn quyền hệ thống" */
div[class*="space-y-2"]:has(#userId) p,
form p.text-xs.text-muted-foreground,
form p:has(+ #token),
#userId ~ p {
  display: none !important;
}

/* ==============================================================================
   3. TRANG SETUP (/setup): ẨN HOÀN TOÀN LOGO
   ============================================================================== */

div[class*="max-w-2xl"] .text-center img,
div[class*="max-w-2xl"] img[src*="goclaw-icon"],
div[class*="max-w-2xl"] img[src*="logo"] {
  display: none !important;
}

/* Nút CTA / Kết nối sang trọng */
button.bg-primary, .btn-primary {
  background: linear-gradient(135deg, #00D2FF 0%, #0070F3 100%) !important;
  color: #000000 !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.45) !important;
  transition: all 0.25s ease !important;
}

button.bg-primary:hover, .btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.75) !important;
  transform: translateY(-1px) !important;
}
