/* Custom styling to make Filament v3 more modern and compact */

:root {
  --sidebar-width: 240px; /* Compact sidebar width */
}

/* Compact Header */
.fi-header {
  margin-bottom: 1rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* Compact Content Wrapper Padding */
.fi-main {
  padding: 1.25rem !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: 100% !important;
}

/* Compact Forms (reduce spacing between form fields) */
.fi-fo-field-wrp {
  margin-bottom: 1rem !important;
}

/* Compact Tables */
.fi-ta-header {
  padding: 0.75rem 1rem !important;
}
.fi-ta-record-checkbox-column,
.fi-ta-col {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.fi-ta-actions {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

/* Modern Card Shadows & Borders */
.fi-section, 
.fi-ta-ctn, 
.fi-ta-empty-state {
  border-radius: 8px !important;
  border: 1px solid rgba(229, 231, 235, 0.7) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 1px 2px -1px rgba(0, 0, 0, 0.03) !important;
}
.dark .fi-section, 
.dark .fi-ta-ctn {
  border-color: rgba(63, 63, 70, 0.4) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Compact inputs styling */
.fi-fo-field-wrp input, 
.fi-fo-field-wrp select, 
.fi-fo-field-wrp textarea {
  font-size: 0.875rem !important;
  border-radius: 6px !important;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

/* Sidebar Styling matching admin.html slate-900 & red accent */
.fi-sidebar {
  background-color: #0f172a !important; /* slate-900 */
  border-right: 1px solid #1e293b !important; /* slate-800 */
}

/* Sidebar Brand Logo Wrapper */
.fi-sidebar-header {
  border-bottom: 1px solid #1e293b !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* Sidebar navigation item links and buttons - Ensures perfect flex alignment */
.fi-sidebar-item-button,
.fi-sidebar-item a,
.fi-sidebar-item button {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  margin-top: 0.125rem !important;
  margin-bottom: 0.125rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  border-radius: 8px !important;
  transition: all 0.15s ease-in-out !important;
  width: 100% !important;
}

/* Inactive Sidebar navigation items */
.fi-sidebar-item a,
.fi-sidebar-item button {
  color: #cbd5e1 !important; /* High contrast Slate-300 */
}
.fi-sidebar-item-icon,
.fi-sidebar-item a svg,
.fi-sidebar-item button svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  color: #94a3b8 !important; /* Slate-400 */
  transition: color 0.15s ease-in-out !important;
}

/* Hover state styling */
.fi-sidebar-item a:hover,
.fi-sidebar-item button:hover {
  background-color: #1e293b !important; /* slate-800 */
  color: #ffffff !important; /* Pure White */
}
.fi-sidebar-item a:hover svg,
.fi-sidebar-item button:hover svg,
.fi-sidebar-item:hover .fi-sidebar-item-icon {
  color: #f1a3b5 !important; /* rose-300 */
}

/* Active navigation item styling */
.fi-sidebar-item-active a,
.fi-sidebar-item-active button,
.fi-sidebar-item-active .fi-sidebar-item-button {
  background-color: #1e293b !important; /* slate-800 */
  color: #ffffff !important;
  font-weight: 600 !important;
}
.fi-sidebar-item-active a svg,
.fi-sidebar-item-active button svg,
.fi-sidebar-item-active .fi-sidebar-item-icon {
  color: #e56d8a !important; /* rose-400 */
}

/* Sidebar Group headers */
.fi-sidebar-group-label,
.fi-sidebar-group-header {
  color: #475569 !important; /* slate-600 */
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-size: 0.75rem !important;
  padding-left: 1rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
}

/* Ensure text inside sidebar links inherits high contrast colors correctly */
.fi-sidebar-item a span, 
.fi-sidebar-item button span,
.fi-sidebar-group-label span,
.fi-sidebar-item-label {
  color: inherit !important;
  font-weight: inherit !important;
}

/* Table layout styling matching admin.html */
.fi-ta-ctn {
  border-radius: 12px !important;
  overflow: hidden !important;
}
.fi-ta-header-cell {
  background-color: #f8fafc !important; /* gray-50 */
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748b !important; /* gray-500 */
}

/* Topbar & Header Dark Theme Sync */
.fi-topbar,
.fi-topbar-header,
.fi-sidebar-header,
.fi-topbar-brand-wrapper,
.fi-topbar-brand,
.fi-topbar-nav,
[role="banner"] {
  background-color: #0f172a !important; /* slate-900 */
  border-bottom-color: #1e293b !important; /* slate-800 */
  border-color: #1e293b !important;
}

/* Breadcrumbs text color on dark topbar */
.fi-breadcrumbs-item-label,
.fi-breadcrumbs span,
.fi-breadcrumbs a,
.fi-breadcrumbs ol li,
.fi-breadcrumbs-item-label > span {
  color: #cbd5e1 !important; /* slate-300 */
}
.fi-breadcrumbs-item-label:hover,
.fi-breadcrumbs a:hover {
  color: #ffffff !important;
}

/* Global search input on dark topbar */
.fi-global-search-field input {
  background-color: #1e293b !important; /* slate-800 */
  border: 1px solid #334155 !important; /* slate-700 */
  color: #ffffff !important;
}
.fi-global-search-field input::placeholder {
  color: #64748b !important;
}

/* User menu and topbar action buttons/icons */
.fi-topbar-header button,
.fi-topbar-header a,
.fi-user-menu button,
.fi-user-menu button span,
.fi-theme-toggle button {
  color: #cbd5e1 !important;
}
.fi-topbar-header button:hover,
.fi-topbar-header a:hover,
.fi-user-menu button:hover,
.fi-theme-toggle button:hover {
  color: #ffffff !important;
}
.fi-topbar-header svg,
.fi-topbar-header button svg,
.fi-user-menu svg,
.fi-theme-toggle svg {
  color: #94a3b8 !important; /* slate-400 */
}
.fi-topbar-header button:hover svg,
.fi-user-menu button:hover svg,
.fi-theme-toggle button:hover svg {
  color: #ffffff !important;
}

/* Custom Stats Grid for scientific horizontal alignment on all devices */
.custom-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  .custom-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  .custom-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}


