/* Happy Toilet — พื้นหลังนุ่ม สดใส */
body.ht-app {
  background-color: #f0f9ff;
  font-size: 18px;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(254, 243, 199, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(186, 230, 253, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 45% at 0% 80%, rgba(207, 250, 254, 0.5), transparent 45%);
}

/* โหมดมืด — โทน slate + ไฮไลต์ cyan/sky นุ่ม อ่านสบาย */
html.dark {
  color-scheme: dark;
}
.dark body.ht-app {
  background-color: #0b1120;
  background-image:
    radial-gradient(ellipse 110% 70% at 50% -25%, rgba(56, 189, 248, 0.14), transparent 52%),
    radial-gradient(ellipse 85% 55% at 100% 0%, rgba(34, 211, 238, 0.08), transparent 48%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(99, 102, 241, 0.07), transparent 50%),
    linear-gradient(180deg, #0f172a 0%, #0c1222 40%, #0a0f1a 100%);
}

.dark body.ht-app ::selection {
  background-color: rgba(56, 189, 248, 0.28);
  color: #f8fafc;
}

/* การ์ด / เงาในโหมดมืด — ขอบฟ้าอ่อน ลึกนุ่ม */
.dark .shadow-card,
.dark .shadow-happy {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(56, 189, 248, 0.08),
    0 16px 48px -12px rgba(0, 0, 0, 0.45);
}

/* แถบนำทาง — สีหลัก #63c8f4 (โหมดสว่าง) */
nav.ht-nav {
  background-color: #63c8f4 !important;
  border-bottom: 1px solid rgba(8, 105, 138, 0.28) !important;
  box-shadow: 0 4px 20px -8px rgba(8, 105, 138, 0.35);
}

/* โหมดมืด — โทนเดียวกับแบรนด์ แต่เข้มลงให้เข้ากับพื้นหลังมืด */
.dark nav.ht-nav {
  background: linear-gradient(180deg, #287fa3 0%, #1a5f7a 45%, #124a61 100%) !important;
  border-bottom: 1px solid rgba(0, 25, 38, 0.55) !important;
  box-shadow:
    0 4px 28px -6px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 0 rgba(99, 200, 244, 0.22) !important;
}

/* ข้อความและลิงก์ในแถบนำทาง — โหมดมืด (เฉพาะเมนู text-sm ไม่แตะลิงก์โลโก้ text-lg) */
html.dark nav.ht-nav a.text-sm,
html.dark nav.ht-nav summary {
  color: rgba(241, 245, 249, 0.94) !important;
}

html.dark nav.ht-nav a.text-sm:hover,
html.dark nav.ht-nav a.text-sm:focus-visible,
html.dark nav.ht-nav summary:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark nav.ht-nav a.text-sm.shadow-sm {
  color: #ecfeff !important;
  background-color: rgba(56, 189, 248, 0.22) !important;
}

html.dark nav.ht-nav a.text-amber-700 {
  color: rgba(253, 224, 71, 0.95) !important;
}

html.dark nav.ht-nav a.text-amber-700:hover {
  color: #fef9c3 !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark nav.ht-nav #ht-theme-toggle {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background-color: rgba(15, 23, 42, 0.35) !important;
  color: rgba(254, 243, 199, 0.95) !important;
}

html.dark nav.ht-nav #ht-theme-toggle:hover {
  background-color: rgba(15, 23, 42, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* แถบผู้รายงาน */
.dark .ht-reporter-bar {
  border-color: rgba(56, 189, 248, 0.12);
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(22, 78, 99, 0.22) 50%,
    rgba(15, 23, 42, 0.95) 100%
  );
}

/* ฟุตเตอร์ไซต์ */
.dark footer[role='contentinfo'].ht-site-footer,
.dark .ht-site-footer {
  border-color: rgba(56, 189, 248, 0.12);
}

/* เมนูแบบเลื่อนลง (แอดมิน) */
.dark nav.ht-nav details.admin-nav-dd > div.absolute {
  box-shadow:
    0 20px 50px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.1);
}

/* หัวเรื่องหลัก — Kanit (โหลดใน tailwind_setup) */
body.ht-app h1,
body.ht-app h2:not(.sr-only) {
  font-family: 'Kanit', 'Sarabun', system-ui, sans-serif;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* เสริมจาก Tailwind — SweetAlert ให้เข้ากับธีม Happy Toilet */
.swal2-popup {
  font-family: 'Sarabun', system-ui, sans-serif !important;
  border-radius: 1rem !important;
  border: 1px solid rgba(14, 165, 233, 0.22) !important;
}
.swal2-title {
  font-family: 'Kanit', 'Sarabun', system-ui, sans-serif !important;
}
.swal2-confirm {
  background: linear-gradient(to bottom, #0ea5e9, #0284c7) !important;
  border-radius: 0.5rem !important;
}
.swal2-cancel {
  border-radius: 0.5rem !important;
}
/* SweetAlert โหมดมืด — การ์ดโทน slate ขอบ cyan */
.dark .swal2-popup {
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(56, 189, 248, 0.18) !important;
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.06) !important;
}
.dark .swal2-html-container,
.dark .swal2-title {
  color: #f1f5f9 !important;
}
.dark .swal2-timer-progress-bar {
  background: rgba(56, 189, 248, 0.25) !important;
}
.dark .swal2-confirm {
  background: linear-gradient(to bottom, #0ea5e9, #0369a1) !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35) !important;
}
