/* ============================================
   LEVELUPHOST ADMIN - Filament v5 Dark Theme
   Minimale Overrides (v5 hat eigenes Dark Mode)
   ============================================ */

/* Globale Farbvariablen überschreiben - dunkles Grau statt reines Schwarz
   --gray-950: Body-Background
   --gray-900: Sections, Tabellen, Karten (heller als Body)
   --gray-800: Inputs, Hover-States
   --gray-700: Borders */
html.fi,
html.fi.dark,
:root {
    --gray-950: #1A1C23;
    --gray-900: #252a35;
    --gray-800: #2d3340;
    --gray-700: #3d4451;
    --color-gray-950: #1A1C23;
    --color-gray-900: #252a35;
    --color-gray-800: #2d3340;
    --color-gray-700: #3d4451;
}

/* Body-Hintergrund */
.fi-body:where(.dark, .dark *) {
    background-color: #1A1C23 !important;
}

/* Sidebar & Topbar bleiben dunkel */
.fi-sidebar:where(.dark, .dark *),
.fi-sidebar-header:where(.dark, .dark *),
.fi-sidebar-nav:where(.dark, .dark *) {
    background-color: #111827 !important;
}

.fi-topbar:where(.dark, .dark *) {
    background-color: #111827 !important;
}

/* Tabellen im Dark Mode - kein Weiß */
.dark table {
    background-color: transparent !important;
}

.dark table thead tr,
.dark table thead th {
    background-color: #1e2433 !important;
    color: #94a3b8 !important;
}

.dark table tbody tr {
    background-color: #252a35 !important;
}

.dark table tbody tr:hover {
    background-color: #2d3340 !important;
}

.dark table td {
    color: #e2e8f0;
}

/* Filament Tabellen (fi-ta = table) */
.fi-ta-row:where(.dark, .dark *) {
    background-color: #252a35 !important;
}

.fi-ta-row:where(.dark, .dark *):hover {
    background-color: #2d3340 !important;
}

.fi-ta-header-cell:where(.dark, .dark *) {
    background-color: #1e2433 !important;
}

/* Formular-Inputs im Dark Mode */
.fi-input-wrp:where(.dark, .dark *) {
    background-color: #2d3340 !important;
    border-color: #3d4451 !important;
}

.fi-input-wrp:where(.dark, .dark *) input,
.fi-input-wrp:where(.dark, .dark *) select,
.fi-input-wrp:where(.dark, .dark *) textarea {
    color: #e2e8f0 !important;
}

/* Select Dropdowns */
.fi-select-option:where(.dark, .dark *) {
    color: #e2e8f0 !important;
}

/* Formular-Labels */
.fi-fo-field-wrp-label:where(.dark, .dark *) label {
    color: #d1d5db !important;
}

/* Helper Text */
.fi-fo-field-wrp-hint:where(.dark, .dark *),
.fi-fo-field-wrp-helper-text:where(.dark, .dark *) {
    color: #9ca3af !important;
}

/* Filament Page Header */
.fi-page-header:where(.dark, .dark *) {
    color: #f1f5f9 !important;
}

/* Formulare: Top-Level Schema auf 1 Spalte = volle Breite für Sections.
   Filament setzt columns(2) auf EditRecord/CreateRecord Formulare.
   Nur das ERSTE Grid-Level wird auf 1 Spalte gezwungen. */
.fi-sc-form .fi-grid {
    grid-template-columns: 1fr !important;
}

/* bg-white Elemente im Dark Mode überschreiben */
.dark .bg-white,
.fi-body .bg-white {
    background-color: #252a35 !important;
}

/* Icon-Groessen (Filament v5 size utilities) */
svg.fi-icon,
.fi-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    flex-shrink: 0 !important;
}

svg.fi-icon.fi-size-xs,
.fi-icon.fi-size-xs {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

svg.fi-icon.fi-size-sm,
.fi-icon.fi-size-sm {
    width: 1rem !important;
    height: 1rem !important;
}

svg.fi-icon.fi-size-md,
.fi-icon.fi-size-md {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

svg.fi-icon.fi-size-lg,
.fi-icon.fi-size-lg {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

svg.fi-icon.fi-size-xl,
.fi-icon.fi-size-xl {
    width: 1.75rem !important;
    height: 1.75rem !important;
}

/* Alle SVGs innerhalb von Filament begrenzen */
[class^="fi-"] > svg:not(.fi-icon),
[class*=" fi-"] > svg:not(.fi-icon) {
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
}

/* Widget-spezifische SVGs */
.fi-wi-stats-overview-stat svg,
.fi-wi svg:not(.fi-icon) {
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
}

/* Filament Info Widget komplett verstecken */
.fi-filament-info-widget,
.fi-filament-info-widget-main,
.fi-filament-info-widget-logo {
    display: none !important;
}

/* Logo in Sidebar begrenzen */
.fi-logo svg,
.fi-sidebar-header svg {
    max-height: 2rem !important;
    width: auto !important;
}

/* Theme Switcher verstecken (Dark Mode ist erzwungen) */
.fi-theme-switcher,
[class*="theme-switcher"],
[class*="ThemeSwitcher"] {
    display: none !important;
}

/* Sidebar-Header (Logo) - gleiche Hoehe wie Topbar */
.fi-sidebar-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Avatar - weissen Ring entfernen */
.fi-avatar {
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    outline: none !important;
}

/* Mailbox Button Styles */
.mailbox-btn.mailbox-read {
    background-color: #1f2937 !important;
    border: 1px solid #374151 !important;
}

.mailbox-btn.mailbox-unread {
    background-color: rgba(14, 165, 233, 0.2) !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
}

.mailbox-btn:hover {
    background-color: #374151 !important;
}

/* User Menu Button */
.user-menu-btn {
    background-color: #1f2937 !important;
    border: 1px solid #374151 !important;
}

.user-menu-btn:hover {
    background-color: #374151 !important;
}

/* Sektionen & Tabs overflow visible (fuer Dropdowns) */
.fi-section,
.fi-ta-ctn {
    overflow: visible !important;
}

/* Input Wrapper overflow visible (fuer Select-Dropdowns) */
.fi-input-wrp {
    overflow: visible !important;
}

/* License Navigation Disabled */
.navigation-item-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(100%) !important;
}

.navigation-group-disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

.license-warning {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border-left: 4px solid #fca5a5;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

/* FilamentInfoWidget verstecken */
.fi-filament-info-widget {
    display: none !important;
}

/* Mobile */
@media (max-width: 768px) {
    .fi-breadcrumbs {
        display: none !important;
    }
}
