@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* ==========================================
     BRAND TOKENS — Change these to re-theme entire app
     ========================================== */

  /* Primary action (buttons, links, active states) */
  --brand: 99 102 241;          /* indigo-500 — xanh dương tím */
  --brand-hover: 129 140 248;   /* indigo-400 */
  --brand-text: 255 255 255;    /* white text on brand */

  /* Accent (highlights, badges, toggles — subtle pop) */
  --accent: 139 92 246;         /* violet-500 — tím */
  --accent-light: 167 139 250;  /* violet-400 */

  /* Surfaces */
  --surface: 24 24 27;          /* zinc-900 — cards */
  --surface-hover: 39 39 42;    /* zinc-800 */
  --border: 39 39 42;           /* zinc-800 */

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 60px;
  --header-height: 56px;
}

[x-cloak] { display: none !important; }

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Light mode overrides ── */
html:not(.dark) body {
  background-color: #fafafa;
  color: #18181b;
}

html:not(.dark) .bg-zinc-950 { background-color: #fafafa !important; }
html:not(.dark) .bg-zinc-900 { background-color: #ffffff !important; }
html:not(.dark) .bg-zinc-800 { background-color: #f4f4f5 !important; }
html:not(.dark) .bg-zinc-800\/50 { background-color: rgba(244,244,245,0.5) !important; }

html:not(.dark) .text-zinc-100 { color: #18181b !important; }
html:not(.dark) .text-zinc-200 { color: #27272a !important; }
html:not(.dark) .text-zinc-300 { color: #3f3f46 !important; }
html:not(.dark) .text-zinc-400 { color: #52525b !important; }
html:not(.dark) .text-zinc-500 { color: #71717a !important; }
html:not(.dark) .text-zinc-600 { color: #a1a1aa !important; }

html:not(.dark) .border-zinc-800 { border-color: #e4e4e7 !important; }
html:not(.dark) .border-zinc-700 { border-color: #d4d4d8 !important; }
html:not(.dark) .border-zinc-800\/50 { border-color: rgba(228,228,231,0.5) !important; }

html:not(.dark) .bg-zinc-950\/80 { background-color: rgba(250,250,250,0.8) !important; }
html:not(.dark) .bg-zinc-900\/50 { background-color: rgba(255,255,255,0.5) !important; }

html:not(.dark) .bg-black\/50 { background-color: rgba(0,0,0,0.15) !important; }

html:not(.dark) .hover\:bg-zinc-800:hover { background-color: #f4f4f5 !important; }
html:not(.dark) .hover\:bg-zinc-700:hover { background-color: #e4e4e7 !important; }
html:not(.dark) .hover\:bg-zinc-900\/50:hover { background-color: rgba(244,244,245,0.5) !important; }

html:not(.dark) .hover\:text-zinc-200:hover { color: #18181b !important; }
html:not(.dark) .hover\:text-zinc-300:hover { color: #27272a !important; }
html:not(.dark) .hover\:text-white:hover { color: #09090b !important; }
html:not(.dark) .hover\:text-zinc-100:hover { color: #18181b !important; }

html:not(.dark) input.bg-zinc-800,
html:not(.dark) textarea.bg-zinc-800,
html:not(.dark) select.bg-zinc-800 {
  background-color: #f4f4f5 !important;
  color: #18181b !important;
}

html:not(.dark) .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.08) !important; }
html:not(.dark) .shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.06) !important; }

/* Light mode scrollbar */
html:not(.dark) ::-webkit-scrollbar-thumb { background: #d4d4d8; }

/* Light mode shimmer */
html:not(.dark) .animate-shimmer {
  background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 50%, #f4f4f5 75%);
  background-size: 200% 100%;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 9999px;
}

::selection {
  background: rgba(161, 161, 170, 0.2);
}

/* ── Animations ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-spin {
  animation: spin 0.6s linear infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, #1a1a1a 25%, #262626 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.animate-fade-in {
  animation: fadeIn 0.15s ease;
}

.animate-slide-up {
  animation: slideUp 0.25s ease;
}

.animate-slide-right {
  animation: slideRight 0.25s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-slide-down {
  animation: slideDown 0.2s ease;
}

.hero-gradient {
  background: linear-gradient(135deg, rgb(var(--brand)), rgb(var(--accent)), rgb(var(--accent-light)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Theme toggle button ── */
.theme-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: rgba(161, 161, 170, 0.1);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease, opacity 0.2s;
}

/* ── Focus ring utility ── */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* ── Additional animations ── */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes bounce-in {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }
.animate-bounce-in { animation: bounce-in 0.3s ease; }
.animate-shake { animation: shake 0.4s ease; }

/* ── Toggle switch (for FormUI.toggle) ── */
.peer:checked ~ .peer-checked\:bg-zinc-300 { background-color: #d4d4d8; }
.peer:checked ~ .peer-checked\:translate-x-5 { transform: translateX(1.25rem); }

