/* 
   MSEduFlow Unified Design System (v7)
   "The Absolute Synchronization"
*/

:root {
    --primary-500: 245, 158, 11;
    /* Amber 500 */
    --emerald-500: 16, 185, 129;
    --slate-900: 15, 23, 42;
    --transition-ultra: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 1. Global Aurora v7 (Light/Dark Aware) */
@keyframes aurora-v7 {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Auth Layout (Dark Premium) */
.fi-simple-layout {
    background:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        linear-gradient(-45deg, #05070c, #0b111e, #020306, #05070c) !important;
    background-size: 400% 400% !important;
    animation: aurora-v7 30s ease infinite !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    position: relative !important;
    overflow: hidden !important;
}

@media (min-width: 1024px) {
    /* Stretch the layout vertically and align card to the right side on desktop */
    .fi-simple-layout {
        align-items: stretch !important;
        justify-content: flex-end !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Make the auth card a premium full-height right sidebar */
    .fi-simple-main-ctn {
        height: 100vh !important;
        min-height: 100vh !important;
        width: 500px !important;
        max-width: 100vw !important;
        border-radius: 4rem 0 0 4rem !important; /* Rounded only on the left side */
        margin: 0 !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: none !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        box-shadow: -30px 0 80px rgba(0, 0, 0, 0.8) !important;
    }
    
    /* Display a gorgeous full-screen layout with the educational image covering the entire background */
    .fi-simple-layout::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important; /* Full width coverage */
        height: 100% !important;
        background: 
            linear-gradient(to right, rgba(5, 7, 12, 0.05) 0%, rgba(5, 7, 12, 0.6) 45%, rgba(5, 7, 12, 0.95) 75%, #05070c 100%), /* Smooth gradient fade to the right edge */
            url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?w=1200") !important;
        background-size: cover !important;
        background-position: center !important;
        z-index: 1 !important;
        opacity: 0.85 !important;
    }
}

/* 2. God-Tier Auth Card (v7 - Glassmorphic Dark Overhaul) */
.fi-simple-main-ctn {
    background: rgba(11, 17, 30, 0.6) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 4rem !important;
    padding: 5rem !important;
    width: 600px !important;
    max-width: 95vw !important;
    box-shadow:
        0 100px 150px -50px rgba(0, 0, 0, 0.9),
        inset 0 0 40px rgba(255, 255, 255, 0.02) !important;
    z-index: 10 !important;
    transition: var(--transition-ultra) !important;
}

.fi-simple-main-ctn:hover {
    transform: translateY(-8px) scale(1.01) !important;
    background: rgba(11, 17, 30, 0.7) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    box-shadow: 
        0 100px 150px -50px rgba(0, 0, 0, 0.95),
        0 0 50px rgba(245, 158, 11, 0.1) !important;
}

/* Make Filament's inner main container transparent to blend with the card */
.fi-simple-main {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 3. Typography Unification (Auth) */
.fi-simple-header-heading {
    font-size: 5rem !important;
    font-weight: 950 !important;
    letter-spacing: -0.1em !important;
    line-height: 0.8 !important;
    text-transform: lowercase !important;
    font-style: italic !important;
    /* Hero Gradient from welcome.blade.php */
    background: linear-gradient(90deg, #ffffff, #f59e0b, #10b981) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    margin-bottom: 4rem !important;
    text-align: left !important;
    transform: skewX(-12deg);
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5)) !important;
}

.fi-simple-header-heading::after {
    content: ".";
    color: #f59e0b;
    -webkit-text-fill-color: #f59e0b;
}

/* Style Labels & Form text to be perfectly readable on dark glass */
.fi-simple-main-ctn label,
.fi-simple-main-ctn span,
.fi-simple-main-ctn .fi-fo-field-wrp-label,
.fi-simple-main-ctn .fi-simple-header-subheading,
.fi-simple-main-ctn .fi-simple-header-subheading a,
.fi-simple-main-ctn .text-sm {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Links inside the card */
.fi-simple-main-ctn a {
    color: #f59e0b !important;
    font-weight: 700 !important;
    transition: var(--transition-ultra) !important;
}
.fi-simple-main-ctn a:hover {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

/* Glassmorphic inputs for Auth */
.fi-simple-main-ctn .fi-input-wrp {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1.25rem !important;
    transition: var(--transition-ultra) !important;
}
.fi-simple-main-ctn .fi-input-wrp:focus-within {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
    transform: translateY(-1px) !important;
}
.fi-simple-main-ctn input {
    color: #ffffff !important;
}

/* Password eye icon readability */
.fi-simple-main-ctn .fi-input-wrp button,
.fi-simple-main-ctn .fi-input-wrp svg {
    color: rgba(255, 255, 255, 0.5) !important;
}
.fi-simple-main-ctn .fi-input-wrp button:hover svg {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Custom Checkbox Design */
.fi-simple-main-ctn input[type="checkbox"] {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.35rem !important;
    transition: var(--transition-ultra) !important;
}
.fi-simple-main-ctn input[type="checkbox"]:checked {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
}

/* 4. Action Buttons (Unified Glow Amber-Orange Gradient) */
.fi-simple-main-ctn .fi-btn {
    height: 6rem !important;
    background: linear-gradient(90deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border-radius: 3rem !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    transition: var(--transition-ultra) !important;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.25) !important;
    margin-top: 3rem !important;
    border: none !important;
    width: 100% !important;
}

.fi-simple-main-ctn .fi-btn:hover {
    background: linear-gradient(90deg, #fbbf24, #f59e0b) !important;
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(245, 158, 11, 0.45) !important;
}

/* 5. Internal Panel Polish & Sidebar Contrast (Unified Glassmorphism) */
.fi-sidebar {
    background: rgba(15, 23, 42, 0.95) !important; /* Solid Slate 900 with high opacity for premium contrast */
    backdrop-filter: blur(40px) saturate(180%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Sidebar Brand Header */
.fi-sidebar-header,
.fi-sidebar-header * {
    background-color: transparent !important;
}

.fi-sidebar-header span,
.fi-sidebar-header a,
.fi-sidebar-header div,
.fi-sidebar-header svg,
.fi-logo,
.fi-sidebar-header .fi-logo {
    color: #ffffff !important;
}

.fi-topbar .fi-logo {
    color: #0f172a !important;
}

.dark .fi-topbar .fi-logo {
    color: #ffffff !important;
}

/* Sidebar navigation groups */
.fi-sidebar-group-label {
    color: #64748b !important; /* Slate 500 */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-size: 0.75rem !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

/* Sidebar navigation items (Legibility overrides) */
.fi-sidebar-item-button {
    color: #94a3b8 !important; /* Always readable light gray on dark sidebar */
    transition: var(--transition-ultra) !important;
    border-radius: 0.75rem !important;
    margin: 0.125rem 0.5rem !important;
}

.fi-sidebar-item-button:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Active sidebar item */
.fi-sidebar-item-button-active,
.fi-sidebar-item-button[class*="-active"],
.fi-sidebar-item-button[aria-current="page"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05)) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
}

.fi-sidebar-item-button-active .fi-sidebar-item-icon,
.fi-sidebar-item-button[class*="-active"] .fi-sidebar-item-icon,
.fi-sidebar-item-button[aria-current="page"] .fi-sidebar-item-icon {
    color: #f59e0b !important;
}

.fi-sidebar-item-label {
    color: inherit !important;
    font-weight: 600 !important;
}

.fi-sidebar-item-icon {
    color: inherit !important;
}

/* Sidebar collapse/expand buttons */
.fi-sidebar-group-collapse-button {
    color: #64748b !important;
}
.fi-sidebar-group-collapse-button:hover {
    color: #ffffff !important;
}

/* Global / Panel Background Settings */
.fi-layout,
.fi-main,
.fi-main-ctn {
    background: #f8fafc !important; /* Beautiful soft slate gray for light mode */
    min-height: 100vh;
}

.dark .fi-layout,
.dark .fi-main,
.dark .fi-main-ctn {
    background: #090d16 !important; /* Premium deep dark space for dark mode */
}

.fi-section,
.fi-ta-ctn {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 5px 15px -5px rgba(0, 0, 0, 0.02) !important;
}

/* Allow overflow for forms, page containers, and sections containing searchable choices selects */
.fi-layout,
.fi-main,
.fi-main-ctn,
.fi-content,
.fi-page,
.fi-form,
.fi-fo,
.fi-fo-component-container,
.fi-fo-grid,
.grid,
.fi-section,
.fi-section-content,
.fi-section *,
.fi-fo-field-wrp,
.fi-fo-field-wrp-inner,
.fi-input-wrp {
    overflow: visible !important;
}

.fi-modal-window,
.fi-modal-window *,
.fi-modal-window form,
.fi-modal-window div[class*="fi-modal-content"],
.fi-modal-window div[class*="content"] {
    overflow: visible !important;
}

.fi-modal-window {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 5px 15px -5px rgba(0, 0, 0, 0.02) !important;
}

.dark .fi-section,
.dark .fi-ta-ctn {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5) !important;
}

.dark .fi-modal-window {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5) !important;
}

/* Text Inputs Internal (Light & Dark aware) */
.fi-input-wrp {
    background: #ffffff !important;
    border-radius: 1rem !important;
    border: 1px solid #cbd5e1 !important;
    transition: var(--transition-ultra) !important;
}

.dark .fi-input-wrp {
    background: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.fi-input-wrp:focus-within {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important;
    transform: translateY(-1px) !important;
}

/* Unified Scrollbar Design */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.4);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Noise & Texture Overlay (Universal) */
body::after {
    content: "" !important;
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E") !important;
    opacity: 0.03 !important;
    pointer-events: none !important;
    z-index: 9999;
}

/* Alpine x-cloak styling */
[x-cloak] {
    display: none !important;
}

/* 6. Chat Layout Fixes (Bulletproof plain CSS) */
.chat-container {
    height: calc(100vh - 170px) !important;
    min-height: 600px !important;
    display: flex !important;
    width: 100% !important;
    overflow: hidden !important;
}

.chat-sidebar {
    width: 380px !important;
    max-width: 380px !important;
    min-width: 320px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.chat-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    height: 100% !important;
}

/* 7. Chat General Overrides */
.chat-container {
    box-sizing: border-box !important;
}


/* Tenant/Center Selector Text Color Visibility */
.fi-sidebar .fi-tenant-menu-trigger,
.fi-sidebar .fi-tenant-menu-trigger span,
.fi-sidebar .fi-tenant-menu-trigger div,
.fi-sidebar .fi-tenant-menu-trigger svg,
.fi-sidebar button[class*="fi-tenant-menu"],
.fi-sidebar button[class*="fi-tenant-menu"] * {
    color: #ffffff !important;
}

/* Choices.js Dropdown Scrolling Force & Stacking Context */
.choices {
    z-index: auto !important;
}
.choices.is-open,
.choices.is-active {
    z-index: 50 !important;
}
.choices__list--dropdown {
    max-height: none !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}
.choices__list--dropdown .choices__list {
    max-height: 320px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Stacking Context fixes for form component panels and datepickers vs footer actions */
.fi-form > *:not(.fi-form-actions) {
    position: relative !important;
}

.fi-form-actions {
    position: relative !important;
    z-index: 1 !important;
}

/* Elevate the active field wrapper when focused/active to prevent other fields from stacking on top of its popover */
.fi-fo-field-wrp:focus-within {
    position: relative !important;
    z-index: 30 !important;
}

.fi-section:focus-within {
    position: relative !important;
    z-index: 40 !important;
}

/* Elevate active grid columns/cells and component containers when focused to prevent sibling fields from overlapping */
.grid > *:focus-within,
.fi-fo-grid > *:focus-within,
.fi-fo-component-container > *:focus-within {
    position: relative !important;
    z-index: 50 !important;
}

/* Force datepicker popovers and panels to be on top and opaque */
.fi-fo-date-time-picker-panel,
div[x-ref="panel"],
.absolute.z-50 {
    z-index: 9999 !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1) !important;
}

.dark .fi-fo-date-time-picker-panel,
.dark div[x-ref="panel"],
.dark .absolute.z-50 {
    background-color: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   MSEduFlow Ultra-Premium Calendar & Dashboard Modernization System
   ========================================================================== */

/* FullCalendar CSS Variable Overrides */
.filament-fullcalendar,
.fc {
    --fc-page-bg-color: transparent !important;
    --fc-neutral-bg-color: #f8fafc !important;
    --fc-border-color: #f1f5f9 !important;
    --fc-today-bg-color: rgba(99, 102, 241, 0.04) !important;
    --fc-now-indicator-color: #ef4444 !important;
    --fc-highlight-color: rgba(99, 102, 241, 0.08) !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.dark .filament-fullcalendar,
.dark .fc {
    --fc-neutral-bg-color: #1e293b !important;
    --fc-border-color: #1e293b !important;
    --fc-today-bg-color: rgba(99, 102, 241, 0.08) !important;
    --fc-highlight-color: rgba(99, 102, 241, 0.15) !important;
}

/* Calendar Card Container */
.filament-fullcalendar .fi-section,
.filament-fullcalendar > div {
    border-radius: 1.5rem !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
}

.dark .filament-fullcalendar .fi-section,
.dark .filament-fullcalendar > div {
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5) !important;
}

/* Header Action Buttons (Criar explicação, Reunião, Bloquear, Em Lote) */
.filament-fullcalendar .btn-cal-explicacao,
.fi-btn.btn-cal-explicacao {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-explicacao:hover,
.fi-btn.btn-cal-explicacao:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.42) !important;
    transform: translateY(-2px) !important;
}

.filament-fullcalendar .btn-cal-teste,
.fi-btn.btn-cal-teste {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-teste:hover,
.fi-btn.btn-cal-teste:hover {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.42) !important;
    transform: translateY(-2px) !important;
}

.filament-fullcalendar .btn-cal-reuniao,
.fi-btn.btn-cal-reuniao {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-reuniao:hover,
.fi-btn.btn-cal-reuniao:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.42) !important;
    transform: translateY(-2px) !important;
}

.filament-fullcalendar .btn-cal-bloqueio,
.fi-btn.btn-cal-bloqueio {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(71, 85, 105, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-bloqueio:hover,
.fi-btn.btn-cal-bloqueio:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
    box-shadow: 0 6px 20px rgba(71, 85, 105, 0.38) !important;
    transform: translateY(-2px) !important;
}

.filament-fullcalendar .btn-cal-lote,
.fi-btn.btn-cal-lote {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-lote:hover,
.fi-btn.btn-cal-lote:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.42) !important;
    transform: translateY(-2px) !important;
}

.filament-fullcalendar .btn-cal-acoes,
.fi-btn.btn-cal-acoes {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-acoes:hover,
.fi-btn.btn-cal-acoes:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45) !important;
    transform: translateY(-2px) !important;
}

.dark .filament-fullcalendar .btn-cal-acoes,
.dark .fi-btn.btn-cal-acoes {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%) !important;
}

.filament-fullcalendar .btn-cal-mais,
.fi-btn.btn-cal-mais {
    background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(51, 65, 85, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.filament-fullcalendar .btn-cal-mais:hover,
.fi-btn.btn-cal-mais:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.38) !important;
    transform: translateY(-2px) !important;
}

.dark .filament-fullcalendar .btn-cal-mais,
.dark .fi-btn.btn-cal-mais {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Responsividade móvel para botões de Ação do Cabeçalho do Calendário */
@media (max-width: 640px) {
    .filament-fullcalendar .btn-cal-acoes,
    .filament-fullcalendar .btn-cal-explicacao,
    .filament-fullcalendar .btn-cal-teste,
    .filament-fullcalendar .btn-cal-mais,
    .fi-btn.btn-cal-acoes,
    .fi-btn.btn-cal-explicacao,
    .fi-btn.btn-cal-teste,
    .fi-btn.btn-cal-mais {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.75rem !important;
        gap: 0.35rem !important;
        border-radius: 0.65rem !important;
    }

    .filament-fullcalendar .btn-cal-acoes svg,
    .filament-fullcalendar .btn-cal-explicacao svg,
    .filament-fullcalendar .btn-cal-teste svg,
    .filament-fullcalendar .btn-cal-mais svg,
    .fi-btn.btn-cal-acoes svg,
    .fi-btn.btn-cal-explicacao svg,
    .fi-btn.btn-cal-teste svg,
    .fi-btn.btn-cal-mais svg {
        width: 1rem !important;
        height: 1rem !important;
    }
}

/* FullCalendar Header Toolbar */
.fc .fc-toolbar {
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

.fc .fc-toolbar-title {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    text-transform: capitalize !important;
    font-family: 'Outfit', sans-serif !important;
}

.dark .fc .fc-toolbar-title {
    color: #f8fafc !important;
}

/* Prev, Next, Today Navigation Controls */
.fc .fc-prev-button,
.fc .fc-next-button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    border-radius: 0.625rem !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
}

.fc .fc-prev-button:hover,
.fc .fc-next-button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #4f46e5 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08) !important;
}

.dark .fc .fc-prev-button,
.dark .fc .fc-next-button {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
.dark .fc .fc-prev-button:hover,
.dark .fc .fc-next-button:hover {
    background: #334155 !important;
    color: #818cf8 !important;
}

/* Today Button */
.fc .fc-today-button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    border-radius: 0.625rem !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    padding: 0.35rem 0.85rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
    font-family: 'Outfit', sans-serif !important;
}

.fc .fc-today-button:hover:not(:disabled) {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #4f46e5 !important;
    transform: translateY(-1px) !important;
}

.fc .fc-today-button:disabled {
    opacity: 0.45 !important;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: default !important;
}

.dark .fc .fc-today-button {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
.dark .fc .fc-today-button:disabled {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #64748b !important;
}

/* View Switcher Controls (Mês, Semana, Dia) - Segmented Pill */
.fc .fc-toolbar-chunk:last-child .fc-button-group {
    background: #f1f5f9 !important;
    padding: 3px !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
    gap: 2px !important;
}

.dark .fc .fc-toolbar-chunk:last-child .fc-button-group {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.fc .fc-dayGridMonth-button,
.fc .fc-timeGridWeek-button,
.fc .fc-timeGridDay-button {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    border-radius: 0.5rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.9rem !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
    font-family: 'Outfit', sans-serif !important;
}

.fc .fc-dayGridMonth-button:hover,
.fc .fc-timeGridWeek-button:hover,
.fc .fc-timeGridDay-button:hover {
    color: #0f172a !important;
}

.dark .fc .fc-dayGridMonth-button,
.dark .fc .fc-timeGridWeek-button,
.dark .fc .fc-timeGridDay-button {
    color: #94a3b8 !important;
}

.dark .fc .fc-dayGridMonth-button:hover,
.dark .fc .fc-timeGridWeek-button:hover,
.dark .fc .fc-timeGridDay-button:hover {
    color: #ffffff !important;
}

.fc .fc-dayGridMonth-button.fc-button-active,
.fc .fc-timeGridWeek-button.fc-button-active,
.fc .fc-timeGridDay-button.fc-button-active {
    background: #ffffff !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.dark .fc .fc-dayGridMonth-button.fc-button-active,
.dark .fc .fc-timeGridWeek-button.fc-button-active,
.dark .fc .fc-timeGridDay-button.fc-button-active {
    background: #0f172a !important;
    color: #818cf8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* Calendar Grid & Border Enhancements */
.fc .fc-scrollgrid {
    border: 1px solid #e2e8f0 !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.dark .fc .fc-scrollgrid {
    border-color: #1e293b !important;
    background: #0b111e !important;
}

.fc .fc-theme-standard td,
.fc .fc-theme-standard th {
    border-color: #f1f5f9 !important;
}

.dark .fc .fc-theme-standard td,
.dark .fc .fc-theme-standard th {
    border-color: #1e293b !important;
}

/* Column Header Cells */
.fc .fc-col-header-cell {
    background: #f8fafc !important;
    padding: 0.65rem 0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.dark .fc .fc-col-header-cell {
    background: #1e293b !important;
    border-bottom-color: #334155 !important;
}

.fc .fc-col-header-cell-cushion {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dark .fc .fc-col-header-cell-cushion {
    color: #cbd5e1 !important;
}

/* Today Column Header */
.fc .fc-day-today.fc-col-header-cell {
    background: rgba(99, 102, 241, 0.08) !important;
    border-bottom: 2px solid #4f46e5 !important;
}

.fc .fc-day-today.fc-col-header-cell .fc-col-header-cell-cushion {
    color: #4f46e5 !important;
    font-weight: 700 !important;
}

.dark .fc .fc-day-today.fc-col-header-cell {
    background: rgba(99, 102, 241, 0.15) !important;
    border-bottom: 2px solid #818cf8 !important;
}
.dark .fc .fc-day-today.fc-col-header-cell .fc-col-header-cell-cushion {
    color: #818cf8 !important;
}

/* Today Column Grid Background (Clean soft tint) */
.fc .fc-day-today {
    background-color: rgba(99, 102, 241, 0.035) !important;
}

.dark .fc .fc-day-today {
    background-color: rgba(99, 102, 241, 0.06) !important;
}

/* Time Slot Labels (Hours column) */
.fc .fc-timegrid-slot-label {
    font-family: 'Outfit', monospace, sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    padding-right: 0.75rem !important;
    vertical-align: middle !important;
}

.dark .fc .fc-timegrid-slot-label {
    color: #64748b !important;
}

.fc .fc-timegrid-slot {
    height: 2.25rem !important;
}

.fc .fc-timegrid-slot-lane:hover {
    background-color: rgba(99, 102, 241, 0.02) !important;
}

/* Current Time Indicator */
.fc .fc-timegrid-now-indicator-line {
    border-color: #ef4444 !important;
    border-width: 2px !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
    z-index: 30 !important;
}

.fc .fc-timegrid-now-indicator-arrow {
    border-color: #ef4444 !important;
    border-width: 5px 0 5px 6px !important;
    margin-top: -4px !important;
}

/* Calendar Event Cards */
.fc .fc-event,
.fc .fc-timegrid-event,
.fc .fc-daygrid-event {
    border-radius: 0.625rem !important;
    padding: 0.25rem 0.5rem !important;
    border: none !important;
    border-left: 4px solid rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

.fc .fc-event:hover,
.fc .fc-timegrid-event:hover,
.fc .fc-daygrid-event:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 8px 20px -2px rgba(0, 0, 0, 0.16) !important;
    z-index: 40 !important;
}

.fc .fc-event-time {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    opacity: 0.95 !important;
    margin-bottom: 1px !important;
    letter-spacing: 0.01em !important;
}

.fc .fc-event-title {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Filament Tabs in Dashboard */
.fi-tabs {
    border-radius: 1rem !important;
    background: #f8fafc !important;
    padding: 4px !important;
    border: 1px solid #e2e8f0 !important;
    display: inline-flex !important;
}

.dark .fi-tabs {
    background: #0f172a !important;
    border-color: #1e293b !important;
}

.fi-tabs-item {
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.fi-tabs-item[aria-selected="true"],
.fi-tabs-item.fi-active {
    background: #ffffff !important;
    color: #4f46e5 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

.dark .fi-tabs-item[aria-selected="true"],
.dark .fi-tabs-item.fi-active {
    background: #1e293b !important;
    color: #818cf8 !important;
}

/* Mobile Responsive Header Actions & Action Groups for Filament Pages */
@media (max-width: 768px) {
    .fi-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .fi-header > div:last-child {
        width: 100% !important;
    }

    /* Container for header action buttons */
    .fi-header .fi-ac {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }

    .fi-header .fi-ac > * {
        width: 100% !important;
    }

    .fi-header .fi-ac .fi-btn {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0.55rem 0.75rem !important;
        font-size: 0.8125rem !important;
        border-radius: 0.75rem !important;
        white-space: nowrap !important;
    }

    /* Horizontal smooth scrolling for Filament tabs on mobile */
    .fi-tabs {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
    }
    .fi-tabs::-webkit-scrollbar {
        display: none !important;
    }
}


