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

/* Prevent Alpine.js flash of uninitialized content */
[x-cloak] { display: none !important; }
/* TailAdmin CSS Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

/* Custom CSS Variables */
:root {
  --font-outfit: 'Outfit', sans-serif;
}

/* Base Styles */
body {
  font-family: var(--font-outfit);
}

/* Sidebar Styles */
.sidebar {
  transition: all 0.3s ease;
}

.sidebar-header {
  border-bottom: 1px solid #e5e7eb;
}

/* Menu Styles */
.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.menu-item i {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.menu-item-active {
  background-color: #ecf3ff !important;
  color: #465fff !important;
}

.menu-item-inactive {
  color: #374151;
}

.menu-item-inactive:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.menu-item-icon-active {
  color: #465fff !important;
}

.menu-item-icon-inactive {
  color: #6b7280;
}

.menu-item:hover .menu-item-icon-inactive {
  color: #374151;
}

.menu-item-text {
  transition: all 0.2s ease-in-out;
  font-weight: 500;
}

.menu-item-arrow {
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item-arrow-active {
  transform: rotate(180deg);
  stroke: #3b4bcc;
}

.menu-item-arrow-inactive {
  stroke: #6b7280;
}

/* Hide dropdown arrows when sidebar is collapsed */
@media (min-width: 1024px) {
  .sidebar[class*="lg:w-[90px]"] .menu-item-arrow {
    display: none !important;
  }
}

.menu-dropdown {
  transition: all 0.2s ease-in-out;
}

.menu-dropdown-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.menu-dropdown-item-active {
  background-color: #ecf3ff;
  color: #465fff;
}

.menu-dropdown-item-inactive {
  color: #6b7280;
}

.menu-dropdown-item-inactive:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* Menu Group Styles */
.menu-group-title {
  transition: all 0.2s ease-in-out;
}

.menu-group-icon {
  transition: all 0.2s ease-in-out;
}

/* Scrollbar Styles */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af;
}

/* Dark mode scrollbar - Removed */

/* Shadow Styles */
.shadow-theme-xs {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-theme-sm {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-theme-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-theme-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-theme-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Text Sizes */
.text-theme-xs {
  font-size: 12px;
  line-height: 18px;
}

.text-theme-sm {
  font-size: 14px;
  line-height: 20px;
}

.text-theme-xl {
  font-size: 20px;
  line-height: 30px;
}

/* Brand Colors */
.bg-brand-25 { background-color: #f2f7ff; }
.bg-brand-50 { background-color: #ecf3ff; }
.bg-brand-100 { background-color: #dde9ff; }
.bg-brand-200 { background-color: #c2d6ff; }
.bg-brand-300 { background-color: #9cb9ff; }
.bg-brand-400 { background-color: #7592ff; }
.bg-brand-500 { background-color: #465fff; }
.bg-brand-600 { background-color: #3b4bcc; }
.bg-brand-700 { background-color: #2f3a99; }
.bg-brand-800 { background-color: #232866; }
.bg-brand-900 { background-color: #171b33; }
.bg-brand-950 { background-color: #0b0d1a; }

.text-brand-400 { color: #7592ff; }
.text-brand-500 { color: #465fff; }
.text-brand-600 { color: #3b4bcc; }

.border-brand-300 { border-color: #9cb9ff; }
.border-brand-500 { border-color: #465fff; }
.border-brand-800 { border-color: #232866; }

.ring-brand-500\/10 { --tw-ring-color: rgba(70, 95, 255, 0.1); }

/* Success Colors */
.bg-success-50 { background-color: #ecfdf5; }
.bg-success-500 { background-color: #10b981; }
.text-success-700 { color: #047857; }

/* Error Colors */
.bg-error-50 { background-color: #fef2f2; }
.bg-error-500 { background-color: #ef4444; }
.text-error-700 { color: #b91c1c; }

/* Dark Mode: Navbar, Sidebar and Dashboard */
html.dark body.dashboard-page,
html.dark .app-navbar,
html.dark .sidebar {
  color-scheme: dark;
}

html.dark .app-navbar,
html.dark .sidebar {
  border-color: #414e61 !important;
  background-color: #242d3c !important;
  color: #d5dbe5;
}

html.dark .sidebar-header {
  border-color: #414e61;
}

html.dark .app-navbar [class~="bg-white"],
html.dark .sidebar [class~="bg-white"],
html.dark body.dashboard-page [class~="bg-white"] {
  background-color: #242d3c !important;
}

html.dark .app-navbar [class~="bg-gray-50"],
html.dark .sidebar [class~="bg-gray-50"],
html.dark body.dashboard-page [class~="bg-gray-50"] {
  background-color: #202938 !important;
}

html.dark .app-navbar [class~="bg-gray-100"],
html.dark .sidebar [class~="bg-gray-100"],
html.dark body.dashboard-page [class~="bg-gray-100"] {
  background-color: #2b3545 !important;
}

html.dark .app-navbar [class~="bg-gray-200"],
html.dark .sidebar [class~="bg-gray-200"],
html.dark body.dashboard-page [class~="bg-gray-200"] {
  background-color: #364254 !important;
}

html.dark .app-navbar [class~="border-gray-50"],
html.dark .app-navbar [class~="border-gray-100"],
html.dark .app-navbar [class~="border-gray-200"],
html.dark .app-navbar [class~="border-gray-300"],
html.dark .sidebar [class~="border-gray-50"],
html.dark .sidebar [class~="border-gray-100"],
html.dark .sidebar [class~="border-gray-200"],
html.dark .sidebar [class~="border-gray-300"],
html.dark body.dashboard-page [class~="border-gray-50"],
html.dark body.dashboard-page [class~="border-gray-100"],
html.dark body.dashboard-page [class~="border-gray-200"],
html.dark body.dashboard-page [class~="border-gray-300"] {
  border-color: #414e61 !important;
}

html.dark .app-navbar [class~="text-gray-900"],
html.dark .sidebar [class~="text-gray-900"],
html.dark body.dashboard-page [class~="text-gray-900"] {
  color: #e4e8ef !important;
}

html.dark .app-navbar [class~="text-gray-800"],
html.dark .sidebar [class~="text-gray-800"],
html.dark body.dashboard-page [class~="text-gray-800"] {
  color: #d5dbe5 !important;
}

html.dark .app-navbar [class~="text-gray-700"],
html.dark .sidebar [class~="text-gray-700"],
html.dark body.dashboard-page [class~="text-gray-700"] {
  color: #c0c8d4 !important;
}

html.dark .app-navbar [class~="text-gray-600"],
html.dark .sidebar [class~="text-gray-600"],
html.dark body.dashboard-page [class~="text-gray-600"],
html.dark .app-navbar [class~="text-gray-500"],
html.dark .sidebar [class~="text-gray-500"],
html.dark body.dashboard-page [class~="text-gray-500"] {
  color: #9aa6b6 !important;
}

html.dark .app-navbar [class~="text-gray-400"],
html.dark .sidebar [class~="text-gray-400"],
html.dark body.dashboard-page [class~="text-gray-400"] {
  color: #7f8b9b !important;
}

html.dark .app-navbar input,
html.dark .app-navbar select,
html.dark .app-navbar textarea,
html.dark .sidebar input,
html.dark .sidebar select,
html.dark .sidebar textarea,
html.dark body.dashboard-page input,
html.dark body.dashboard-page select,
html.dark body.dashboard-page textarea {
  border-color: #4a586c;
  background-color: #273142;
  color: #d5dbe5;
}

html.dark .app-navbar input::placeholder,
html.dark .sidebar input::placeholder,
html.dark body.dashboard-page input::placeholder,
html.dark body.dashboard-page textarea::placeholder {
  color: #7f8b9b;
}

html.dark .app-navbar option,
html.dark .sidebar option,
html.dark body.dashboard-page option {
  background-color: #273142;
  color: #d5dbe5;
}

html.dark .app-navbar [class~="hover:bg-gray-50"]:hover,
html.dark .app-navbar [class~="hover:bg-gray-100"]:hover,
html.dark .sidebar [class~="hover:bg-gray-50"]:hover,
html.dark .sidebar [class~="hover:bg-gray-100"]:hover,
html.dark body.dashboard-page [class~="hover:bg-gray-50"]:hover,
html.dark body.dashboard-page [class~="hover:bg-gray-100"]:hover,
html.dark body.dashboard-page [class~="hover:bg-gray-50/80"]:hover {
  background-color: #303b4d !important;
}

html.dark body.dashboard-page [class~="divide-gray-100"] > :not([hidden]) ~ :not([hidden]),
html.dark body.dashboard-page [class~="divide-gray-200"] > :not([hidden]) ~ :not([hidden]) {
  border-color: #414e61 !important;
}

html.dark body.dashboard-page [class~="bg-blue-50"],
html.dark body.dashboard-page [class~="bg-blue-100"],
html.dark body.dashboard-page [class~="bg-blue-200"],
html.dark body.dashboard-page [class~="bg-indigo-50"],
html.dark body.dashboard-page [class~="bg-indigo-100"] {
  background-color: rgba(96, 142, 205, 0.17) !important;
}

html.dark body.dashboard-page [class~="bg-purple-50"],
html.dark body.dashboard-page [class~="bg-purple-100"],
html.dark body.dashboard-page [class~="bg-purple-200"],
html.dark body.dashboard-page [class~="bg-violet-50"] {
  background-color: rgba(151, 112, 184, 0.17) !important;
}

html.dark body.dashboard-page [class~="bg-green-50"],
html.dark body.dashboard-page [class~="bg-green-100"],
html.dark body.dashboard-page [class~="bg-green-200"],
html.dark body.dashboard-page [class~="bg-emerald-50"] {
  background-color: rgba(74, 151, 116, 0.17) !important;
}

html.dark body.dashboard-page [class~="bg-orange-50"],
html.dark body.dashboard-page [class~="bg-orange-100"],
html.dark body.dashboard-page [class~="bg-amber-50"],
html.dark body.dashboard-page [class~="bg-amber-100"],
html.dark body.dashboard-page [class~="bg-yellow-50"],
html.dark body.dashboard-page [class~="bg-yellow-100"],
html.dark body.dashboard-page [class~="bg-yellow-200"] {
  background-color: rgba(186, 137, 68, 0.17) !important;
}

html.dark body.dashboard-page [class~="bg-red-50"],
html.dark body.dashboard-page [class~="bg-red-100"] {
  background-color: rgba(183, 83, 89, 0.17) !important;
}

html.dark body.dashboard-page [class~="bg-cyan-50"],
html.dark body.dashboard-page [class~="bg-cyan-100"],
html.dark body.dashboard-page [class~="bg-sky-50"],
html.dark body.dashboard-page [class~="bg-sky-100"] {
  background-color: rgba(71, 151, 170, 0.17) !important;
}

html.dark body.dashboard-page [class~="border-blue-100"],
html.dark body.dashboard-page [class~="border-blue-200"],
html.dark body.dashboard-page [class~="border-blue-300"],
html.dark body.dashboard-page [class~="border-indigo-100"],
html.dark body.dashboard-page [class~="border-indigo-200"],
html.dark body.dashboard-page [class~="border-purple-100"],
html.dark body.dashboard-page [class~="border-purple-200"] {
  border-color: rgba(126, 157, 203, 0.4) !important;
}

html.dark body.dashboard-page [class~="border-green-50"],
html.dark body.dashboard-page [class~="border-green-100"],
html.dark body.dashboard-page [class~="border-green-200"],
html.dark body.dashboard-page [class~="border-green-300"],
html.dark body.dashboard-page [class~="border-emerald-100"] {
  border-color: rgba(101, 170, 137, 0.4) !important;
}

html.dark body.dashboard-page [class~="border-orange-100"],
html.dark body.dashboard-page [class~="border-orange-200"],
html.dark body.dashboard-page [class~="border-amber-50"],
html.dark body.dashboard-page [class~="border-amber-200"],
html.dark body.dashboard-page [class~="border-amber-300"],
html.dark body.dashboard-page [class~="border-yellow-200"],
html.dark body.dashboard-page [class~="border-yellow-300"] {
  border-color: rgba(196, 155, 95, 0.42) !important;
}

html.dark body.dashboard-page [class~="border-red-200"],
html.dark body.dashboard-page [class~="border-red-300"] {
  border-color: rgba(196, 105, 110, 0.42) !important;
}

html.dark body.dashboard-page [class~="border-cyan-100"],
html.dark body.dashboard-page [class~="border-cyan-200"],
html.dark body.dashboard-page [class~="border-sky-100"],
html.dark body.dashboard-page [class~="border-sky-300"] {
  border-color: rgba(93, 165, 182, 0.42) !important;
}

html.dark body.dashboard-page [class~="text-blue-600"],
html.dark body.dashboard-page [class~="text-blue-700"],
html.dark body.dashboard-page [class~="text-blue-800"],
html.dark body.dashboard-page [class~="text-blue-900"],
html.dark body.dashboard-page [class~="text-indigo-600"] {
  color: #9bbde8 !important;
}

html.dark body.dashboard-page [class~="text-purple-600"],
html.dark body.dashboard-page [class~="text-purple-700"],
html.dark body.dashboard-page [class~="text-purple-800"],
html.dark body.dashboard-page [class~="text-purple-900"],
html.dark body.dashboard-page [class~="text-violet-600"] {
  color: #c9a9df !important;
}

html.dark body.dashboard-page [class~="text-green-600"],
html.dark body.dashboard-page [class~="text-green-700"],
html.dark body.dashboard-page [class~="text-green-800"],
html.dark body.dashboard-page [class~="text-green-900"],
html.dark body.dashboard-page [class~="text-emerald-600"],
html.dark body.dashboard-page [class~="text-emerald-700"],
html.dark body.dashboard-page [class~="text-emerald-900"] {
  color: #91c9ab !important;
}

html.dark body.dashboard-page [class~="text-orange-600"],
html.dark body.dashboard-page [class~="text-orange-700"],
html.dark body.dashboard-page [class~="text-orange-900"],
html.dark body.dashboard-page [class~="text-amber-600"],
html.dark body.dashboard-page [class~="text-amber-700"],
html.dark body.dashboard-page [class~="text-amber-800"],
html.dark body.dashboard-page [class~="text-amber-900"],
html.dark body.dashboard-page [class~="text-yellow-600"],
html.dark body.dashboard-page [class~="text-yellow-700"],
html.dark body.dashboard-page [class~="text-yellow-800"] {
  color: #d7b27b !important;
}

html.dark body.dashboard-page [class~="text-red-600"],
html.dark body.dashboard-page [class~="text-red-700"],
html.dark body.dashboard-page [class~="text-red-800"] {
  color: #dca0a4 !important;
}

html.dark body.dashboard-page [class~="text-cyan-600"],
html.dark body.dashboard-page [class~="text-cyan-700"],
html.dark body.dashboard-page [class~="text-sky-600"],
html.dark body.dashboard-page [class~="text-sky-700"],
html.dark body.dashboard-page [class~="text-sky-900"] {
  color: #8fc4d1 !important;
}

html.dark body.dashboard-page [class~="hover:bg-blue-200"]:hover {
  background-color: rgba(96, 142, 205, 0.28) !important;
}

html.dark body.dashboard-page [class~="hover:bg-purple-200"]:hover {
  background-color: rgba(151, 112, 184, 0.28) !important;
}

html.dark body.dashboard-page [class~="hover:bg-green-50"]:hover,
html.dark body.dashboard-page [class~="hover:bg-green-200"]:hover {
  background-color: rgba(74, 151, 116, 0.28) !important;
}

html.dark body.dashboard-page [class~="hover:bg-amber-50"]:hover,
html.dark body.dashboard-page [class~="hover:bg-yellow-100"]:hover,
html.dark body.dashboard-page [class~="hover:bg-yellow-200"]:hover {
  background-color: rgba(186, 137, 68, 0.28) !important;
}

html.dark body.dashboard-page [class~="hover:bg-red-50"]:hover,
html.dark body.dashboard-page [class~="hover:bg-red-100"]:hover {
  background-color: rgba(183, 83, 89, 0.28) !important;
}

html.dark .menu-item-active,
html.dark .menu-dropdown-item-active {
  background-color: rgba(70, 95, 255, 0.16) !important;
  color: #9cb9ff !important;
}

html.dark .menu-item-inactive,
html.dark .menu-dropdown-item-inactive {
  color: #cbd5e1;
}

html.dark .menu-item-inactive:hover,
html.dark .menu-dropdown-item-inactive:hover {
  background-color: #303b4d;
  color: #e4e8ef;
}

html.dark .menu-item-icon-inactive,
html.dark .menu-item-arrow-inactive {
  color: #9aa6b6;
  stroke: #9aa6b6;
}

html.dark .theme-switch {
  color: #c0c8d4 !important;
  background: transparent !important;
}

html.dark .theme-switch:hover {
  color: #e4e8ef !important;
}

html.dark body.dashboard-page {
  background-color: #1c2432 !important;
  color: #d5dbe5;
}

html.dark body.dashboard-page table {
  color: #c0c8d4;
}

html.dark body.dashboard-page thead {
  background-color: #202938;
}

html.dark body.dashboard-page tbody tr {
  border-color: #414e61;
}

html.dark body.dashboard-page tbody tr.bg-purple-100 {
  background-color: rgba(106, 76, 147, 0.22) !important;
}

html.dark body.dashboard-page tbody tr.bg-blue-100 {
  background-color: rgba(65, 105, 160, 0.22) !important;
}

html.dark body.dashboard-page tbody tr:hover {
  background-color: rgba(48, 59, 77, 0.78);
}

html.dark body.dashboard-page tbody tr.bg-purple-100:hover {
  background-color: rgba(116, 86, 157, 0.3) !important;
}

html.dark body.dashboard-page tbody tr.bg-blue-100:hover {
  background-color: rgba(76, 116, 171, 0.3) !important;
}

html.dark body.dashboard-page .custom-scrollbar {
  scrollbar-color: #526075 transparent;
}

html.dark body.dashboard-page .custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #526075;
}

html.dark body.dashboard-page .shadow-theme-xs,
html.dark body.dashboard-page .shadow-theme-sm,
html.dark body.dashboard-page .shadow-theme-md,
html.dark body.dashboard-page .shadow-theme-lg,
html.dark .app-navbar .shadow-theme-xs,
html.dark .app-navbar .shadow-theme-lg {
  box-shadow: 0 8px 20px rgba(13, 18, 27, 0.22);
}

/* Focus Styles */
.focus\:outline-hidden:focus {
  outline: none;
}

/* Z-Index Utilities */
.z-9999 { z-index: 9999; }
.z-99999 { z-index: 99999; }

/* Animation Classes */
.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Modal Styles */
.modal {
  display: flex;
}

.modal.hidden {
  display: none;
}

.modal-dialog {
  max-width: 900px;
}

.modal-dialog-wide {
  max-width: 95vw;
  max-width: 1400px;
}

.modal-dialog-scrollable {
  max-height: calc(100vh - 1rem);
}

.modal-content {
  flex: 1;
}

.modal-header {
  margin-bottom: 0;
}

.modal-title {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.modal-body {
  padding: 0;
}

.modal-footer {
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.modal-close-btn {
  cursor: pointer;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  background-color: #465fff;
  color: white;
  border: none;
}

.btn-primary:hover {
  background-color: #3b4bcc;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
  border: none;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.bg-danger-subtle {
  background-color: #fef2f2;
}

.text-danger {
  color: #ef4444;
}

/* Responsive Utilities */
@media (min-width: 1024px) {
  .lg\:hidden {
    display: none !important;
  }
  
  .lg\:block {
    display: block !important;
  }
  
  .lg\:flex {
    display: flex !important;
  }
  
  .lg\:static {
    position: static !important;
  }
  
  .lg\:translate-x-0 {
    transform: translateX(0) !important;
  }
  
  .lg\:w-\[90px\] {
    width: 90px !important;
  }
  
  .lg\:border {
    border-width: 1px !important;
  }
  
  .lg\:border-b {
    border-bottom-width: 1px !important;
  }
  
  .lg\:border-b-0 {
    border-bottom-width: 0 !important;
  }
  
  .lg\:px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .lg\:py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  .lg\:shadow-none {
    box-shadow: none !important;
  }
  
  .lg\:justify-normal {
    justify-content: normal !important;
  }
  
  .lg\:justify-end {
    justify-content: flex-end !important;
  }
  
  .lg\:flex-row {
    flex-direction: row !important;
  }
  
  .lg\:right-0 {
    right: 0 !important;
  }
}
