/* Custom Premium Theme for SARU TV Filament Admin Panel */

/* 1. Custom Font & Global Smoothness */
body {
    font-family: 'DM Sans', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* 2. Login Screen Enhancements */
.filament-login-page {
    background: radial-gradient(circle at 10% 20%, rgb(4, 15, 24) 0%, rgb(20, 24, 44) 90%) !important;
}

.filament-login-page main {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 4px solid rgb(79, 70, 229) !important; /* Beautiful Indigo accent border instead of default orange */
    border-radius: 16px !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}

.filament-login-page input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border-radius: 8px !important;
}

.filament-login-page input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.filament-login-page label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.filament-login-page h2 {
    color: white !important;
    font-weight: 700 !important;
}

/* Primary Button overrides */
.filament-button-color-primary,
.filament-login-page button[type="submit"],
.filament-login-page .filament-button {
    background-color: rgb(79, 70, 229) !important;
    border-color: rgb(79, 70, 229) !important;
    color: white !important;
}

.filament-button-color-primary:hover,
.filament-login-page button[type="submit"]:hover,
.filament-login-page .filament-button:hover {
    background-color: rgb(67, 56, 202) !important;
    border-color: rgb(67, 56, 202) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4) !important;
}

/* Checkbox customization */
.filament-login-page input[type="checkbox"] {
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.filament-login-page input[type="checkbox"]:checked {
    background-color: rgb(79, 70, 229) !important;
    border-color: rgb(79, 70, 229) !important;
}

.filament-login-page input[type="checkbox"]:focus {
    --tw-ring-color: rgb(79, 70, 229) !important;
}

/* Focus outline for inputs */
.filament-login-page input:focus {
    border-color: rgb(79, 70, 229) !important;
    --tw-ring-color: rgb(79, 70, 229) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3) !important;
}

/* Link/Anchor colors */
.filament-login-page a {
    color: rgb(129, 140, 248) !important;
    transition: color 0.2s ease !important;
}

.filament-login-page a:hover {
    color: rgb(165, 180, 252) !important;
    text-decoration: underline !important;
}

/* 3. Color Theme Overrides: Primary Brand Colors (Vibrant Purple/Indigo Theme) */
.filament-body, :root {
    --primary-50: 243, 244, 246;
    --primary-100: 224, 231, 255;
    --primary-200: 199, 210, 254;
    --primary-300: 165, 180, 252;
    --primary-400: 129, 140, 248;
    --primary-500: 79, 70, 229; /* Indigo-600 */
    --primary-600: 67, 56, 202;
    --primary-700: 55, 48, 163;
    --primary-800: 49, 46, 129;
    --primary-900: 30, 27, 75;
}

/* 4. Sidebar Styles */
.filament-sidebar {
    background-color: #0f172a !important; /* Dark Slate slate-900 */
    border-right: 1px solid #1e293b !important;
}

.filament-sidebar-header {
    border-bottom: 1px solid #1e293b !important;
    background-color: #0f172a !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Inactive Sidebar Links */
.filament-sidebar-item > a,
.filament-sidebar-item > button {
    color: rgb(203, 213, 225) !important; /* Light slate grey for high contrast */
    transition: all 0.2s ease-in-out !important;
}

.filament-sidebar-item > a:hover,
.filament-sidebar-item > button:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

/* Inactive Sidebar Icons */
.filament-sidebar-item svg {
    color: rgb(148, 163, 184) !important; /* Slate-400 */
    transition: color 0.2s ease !important;
}

.filament-sidebar-item:hover svg {
    color: white !important;
}

/* Active Sidebar Item overrides */
.filament-sidebar-item-active > a,
.filament-sidebar-item-active > button,
.filament-sidebar-nav-link-active,
a[class*="sidebar-item-active"] {
    background: linear-gradient(90deg, #4f46e5 0%, #3b82f6 100%) !important;
    background-color: rgb(79, 70, 229) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
    border-radius: 8px !important;
}

.filament-sidebar-item-active > a *,
.filament-sidebar-item-active > button *,
.filament-sidebar-item-active svg {
    color: white !important;
}

/* Section Header Titles (e.g. MEDIA MANAGEMENT) */
.filament-sidebar-group-header button span,
.filament-sidebar-group-header div span,
.filament-sidebar-group-header p {
    color: rgb(100, 116, 139) !important; /* Slate-500 */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.05em !important;
}

/* Stats Card Color Enhancements */
.filament-stats-card .text-amber-600,
.filament-stats-card .text-primary-600 {
    color: rgb(79, 70, 229) !important;
}

.filament-stats-card .bg-amber-500,
.filament-stats-card .bg-primary-500 {
    background-color: rgb(79, 70, 229) !important;
}

.filament-sidebar-brand,
.filament-sidebar-brand a,
.filament-sidebar-header a,
.filament-brand,
.filament-brand a {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    background: linear-gradient(to right, #ffffff, #cbd5e1) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: white !important;
}

/* 5. Header Styling */
header.filament-main-topbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dark header.filament-main-topbar {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid #1e293b !important;
}

/* 6. Card & Table Styling */
.filament-card, .filament-tables-container {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03) !important;
}

.dark .filament-card, .dark .filament-tables-container {
    border: 1px solid #1e293b !important;
    background-color: #1e293b !important;
}

/* 7. Rounded Form Inputs */
.filament-forms-component input, 
.filament-forms-component select, 
.filament-forms-component textarea {
    border-radius: 8px !important;
    border-color: #cbd5e1 !important;
    transition: all 0.2s ease-in-out !important;
}

.filament-forms-component input:focus, 
.filament-forms-component select:focus, 
.filament-forms-component textarea:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}

/* 8. Modernize Buttons */
.filament-button {
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.filament-button:hover {
    transform: translateY(-1px) !important;
}

/* 9. Limit Filepond Upload Preview Heights */
.filepond--image-preview-wrapper,
.filepond--file-poster,
.filepond--item,
.filepond--item-panel,
.filepond--image-preview {
    max-height: 220px !important;
}

.filepond--image-preview img,
.filepond--file-poster img,
.filepond--file-poster video,
.filepond--item video {
    object-fit: contain !important;
    max-height: 200px !important;
    margin: 0 auto !important;
}

/* 10. Premium Dashboard Cards & Charts Styling */
.filament-stats-overview-widget-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.filament-stats-overview-widget-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2), 0 10px 10px -5px rgba(99, 102, 241, 0.15) !important;
}

/* Individual card accents matching their categories */
.filament-stats-overview-widget-card:nth-child(1) {
    border-left: 4px solid #10b981 !important; /* Emerald green for Users */
}
.filament-stats-overview-widget-card:nth-child(2) {
    border-left: 4px solid #3b82f6 !important; /* Royal Blue for Watch Time */
}
.filament-stats-overview-widget-card:nth-child(3) {
    border-left: 4px solid #f59e0b !important; /* Amber Gold for Revenue */
}
.filament-stats-overview-widget-card:nth-child(4) {
    border-left: 4px solid #ef4444 !important; /* Coral Red for Active Subscriptions */
}

/* Card titles */
.filament-stats-overview-widget-card div > span:first-child,
.filament-stats-overview-widget-card .text-sm {
    color: #94a3b8 !important; /* Slate-400 */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-size: 0.75rem !important;
}

/* Card values (numbers) */
.filament-stats-overview-widget-card .text-3xl {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #f8fafc !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    line-height: 1.2 !important;
}

/* Dynamic color glows on card metrics */
.filament-stats-overview-widget-card:nth-child(1) .text-3xl {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
}
.filament-stats-overview-widget-card:nth-child(2) .text-3xl {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4) !important;
    color: #60a5fa !important;
}
.filament-stats-overview-widget-card:nth-child(3) .text-3xl {
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
}
.filament-stats-overview-widget-card:nth-child(4) .text-3xl {
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

/* Description texts */
.filament-stats-overview-widget-card .text-xs,
.filament-stats-overview-widget-card div[class*="text-"] {
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
}

/* Stat Widget Card Icons */
.filament-stats-overview-widget-card svg {
    transform: scale(1.1) !important;
    opacity: 0.9 !important;
}

/* Dashboard Grid spacing & Chart widgets containers */
.filament-widgets-container {
    gap: 1.5rem !important;
}

.filament-widgets-container .filament-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4) !important;
    padding: 24px !important;
    transition: border-color 0.3s ease !important;
}

.filament-widgets-container .filament-card:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Chart Title Heading */
.filament-widgets-container .filament-card h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    letter-spacing: -0.01em !important;
    border-left: 3px solid #6366f1 !important;
    padding-left: 10px !important;
}
