/* Custom CSS for Filament Admin Panel */

/* 1. Login Page Styling */
body.fi-body:has(.fi-simple-layout),
.fi-simple-layout {
    background-color: #050811 !important;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(160, 128, 72, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(22, 33, 55, 0.4) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, #0c1220 0%, #050811 100%) !important;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Outfit', sans-serif !important;
    min-height: 100vh;
}

/* Glassmorphism for the login card */
.fi-simple-layout .fi-simple-main-ctn .fi-simple-main {
    background: rgba(11, 17, 30, 0.8) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(160, 128, 72, 0.2) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 50px rgba(160, 128, 72, 0.05) !important;
    border-radius: 20px !important;
    padding: 3rem 2.5rem !important;
}

/* Style headers & text on login page */
.fi-simple-layout .fi-simple-header {
    margin-bottom: 2rem !important;
}

.fi-simple-layout .fi-logo {
    height: auto !important;
    min-height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
}

.fi-simple-layout .fi-logo svg {
    height: 4.5rem !important;
    width: 4.5rem !important;
    filter: drop-shadow(0 0 15px rgba(160, 128, 72, 0.4)) !important;
}

.fi-simple-layout .fi-logo span {
    font-size: 1.5rem !important;
    letter-spacing: 0.15em !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-align: center !important;
}

.fi-simple-layout .fi-simple-header-heading {
    margin-top: 1rem !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
}

.fi-simple-layout .fi-simple-header-sub-title,
.fi-simple-layout .fi-simple-header-sub-title a {
    color: #94a3b8 !important;
}

.fi-simple-layout .fi-simple-header-sub-title a:hover {
    color: #c5a870 !important;
    text-decoration: underline;
}

/* Form elements styling */
.fi-simple-layout label {
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

/* Customize inputs and their wrappers */
.fi-simple-layout .fi-input-wrp {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(160, 128, 72, 0.25) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.fi-simple-layout .fi-input-wrp:focus-within {
    border-color: #A08048 !important;
    box-shadow: 0 0 0 3px rgba(160, 128, 72, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
}

.fi-simple-layout input.fi-input {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Eye button/suffix styling (removing white background boxes) */
.fi-simple-layout .fi-input-wrp-content-ctn + div,
.fi-simple-layout .fi-input-wrp button,
.fi-simple-layout .fi-input-wrp-content-ctn button {
    background-color: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
}

.fi-simple-layout .fi-input-wrp button:hover,
.fi-simple-layout .fi-input-wrp-content-ctn button:hover {
    color: #c5a870 !important;
}

/* Checkbox styling */
.fi-simple-layout input[type="checkbox"] {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(160, 128, 72, 0.3) !important;
    color: #A08048 !important;
    border-radius: 4px !important;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fi-simple-layout input[type="checkbox"]:checked {
    background-color: #A08048 !important;
    border-color: #A08048 !important;
}

.fi-simple-layout input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(160, 128, 72, 0.25) !important;
}

/* Submit button styling */
.fi-simple-layout button[type="submit"] {
    background: linear-gradient(135deg, #c5a870 0%, #A08048 100%) !important;
    color: #0b111e !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(160, 128, 72, 0.25) !important;
    cursor: pointer;
}

.fi-simple-layout button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(160, 128, 72, 0.4) !important;
    background: linear-gradient(135deg, #d3ba85 0%, #b89557 100%) !important;
}

.fi-simple-layout button[type="submit"]:active {
    transform: translateY(0);
}

/* Forgot password link */
.fi-simple-layout a.underline {
    color: #a08048 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.fi-simple-layout a.underline:hover {
    color: #c5a870 !important;
    text-decoration: underline !important;
}


/* 2. Main Admin Panel Customizations (Inside Dashboard) */
body.fi-body {
    font-family: 'Outfit', sans-serif !important;
}

/* Sidebar Logo override */
.fi-sidebar-header .fi-logo {
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.fi-sidebar-header .fi-logo svg {
    height: 2.25rem !important;
    width: 2.25rem !important;
}

.fi-sidebar-header .fi-logo span {
    font-size: 1.125rem !important;
    letter-spacing: 0.05em !important;
}

/* Enforce a cohesive midnight tech aesthetic across the entire admin panel in dark mode */
.dark .fi-body {
    background-color: #060a12 !important;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(160, 128, 72, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(22, 33, 55, 0.3) 0%, transparent 45%) !important;
    background-attachment: fixed;
}

.dark .fi-sidebar {
    background-color: #080d1a !important;
    border-right: 1px solid rgba(160, 128, 72, 0.15) !important;
}

.dark .fi-sidebar-header {
    border-bottom: 1px solid rgba(160, 128, 72, 0.15) !important;
}

/* Sidebar nav item states */
.dark .fi-sidebar-item-active a {
    background-color: rgba(160, 128, 72, 0.12) !important;
    color: #c5a870 !important;
    border-left: 3px solid #A08048 !important;
}

.dark .fi-sidebar-item-active svg {
    color: #c5a870 !important;
}

.dark .fi-sidebar-item:not(.fi-sidebar-item-active) a:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.dark .fi-topbar {
    background-color: rgba(8, 13, 26, 0.8) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(160, 128, 72, 0.15) !important;
}

.dark .fi-main {
    background-color: transparent !important;
}

/* Cards, Sections and Tables in Dark Mode */
.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-modal-window,
.dark .fi-fo-wizard {
    background-color: rgba(11, 17, 30, 0.8) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(160, 128, 72, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border-radius: 12px !important;
}

/* Gold accent badges & tabs */
.fi-badge-color-primary {
    background-color: rgba(160, 128, 72, 0.1) !important;
    color: #A08048 !important;
    border: 1px solid rgba(160, 128, 72, 0.2) !important;
}

.fi-tabs-item-active {
    color: #A08048 !important;
    border-bottom-color: #A08048 !important;
}

/* Buttons inside the dashboard */
.fi-btn-color-primary {
    background-color: #A08048 !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
}

.fi-btn-color-primary:hover {
    background-color: #856437 !important;
    box-shadow: 0 4px 12px rgba(160, 128, 72, 0.2) !important;
}


/* 3. Dashboard Widgets Styling (AccountWidget & StatsOverviewWidget) */

/* Stats Cards styling */
.fi-wi-stats-overview-stat {
    background: rgba(11, 17, 30, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(160, 128, 72, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 1.5rem !important;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(160, 128, 72, 0.45) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 20px rgba(160, 128, 72, 0.1) !important;
    background: rgba(11, 17, 30, 0.75) !important;
}

/* Label of stats */
.fi-wi-stats-overview-stat-label {
    font-size: 0.825rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

/* Stat value (number) */
.fi-wi-stats-overview-stat-value {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    background: linear-gradient(135deg, #ffffff 30%, #ceb582 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block !important;
}

/* Stat description (subtext under the number) */
.fi-wi-stats-overview-stat-description {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

/* Force colors based on status (danger, warning, success) */
.fi-wi-stats-overview-stat-description.fi-color-success {
    color: #34d399 !important; /* green accent */
}

.fi-wi-stats-overview-stat-description.fi-color-warning {
    color: #fbbf24 !important; /* gold/amber accent */
}

.fi-wi-stats-overview-stat-description.fi-color-danger {
    color: #f87171 !important; /* red accent */
}

.fi-wi-stats-overview-stat-description svg {
    width: 1.125rem !important;
    height: 1.125rem !important;
    color: currentColor !important;
}

/* Account Widget customization */
.fi-wi-widget.fi-account-widget > .fi-section,
.fi-account-widget .fi-section {
    background: rgba(11, 17, 30, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(160, 128, 72, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fi-wi-widget.fi-account-widget > .fi-section:hover,
.fi-account-widget .fi-section:hover {
    border-color: rgba(160, 128, 72, 0.3) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    background: rgba(11, 17, 30, 0.75) !important;
}

.fi-account-widget .fi-section-content {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
}

.fi-account-widget .fi-avatar {
    border: 2px solid rgba(160, 128, 72, 0.3) !important;
    box-shadow: 0 0 15px rgba(160, 128, 72, 0.15) !important;
    transition: all 0.3s ease !important;
}

.fi-account-widget .fi-avatar:hover {
    transform: scale(1.05) !important;
    border-color: rgba(160, 128, 72, 0.6) !important;
    box-shadow: 0 0 20px rgba(160, 128, 72, 0.3) !important;
}

.fi-account-widget-heading {
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

.fi-account-widget-user-name {
    color: #ffffff !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    margin-top: 0.25rem !important;
    background: linear-gradient(135deg, #ffffff 50%, #ceb582 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block !important;
}

/* Logout Buttons */
.fi-account-widget-logout-form button {
    background: rgba(160, 128, 72, 0.08) !important;
    border: 1px solid rgba(160, 128, 72, 0.25) !important;
    color: #ceb582 !important;
    border-radius: 8px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.fi-account-widget-logout-form button:hover {
    background: linear-gradient(135deg, #c5a870 0%, #A08048 100%) !important;
    color: #050811 !important;
    border-color: #A08048 !important;
    box-shadow: 0 4px 12px rgba(160, 128, 72, 0.3) !important;
}

/* Style the text button specifically */
.fi-account-widget-logout-form .fi-btn {
    padding: 0.5rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

/* Style the icon button specifically */
.fi-account-widget-logout-form .fi-icon-btn {
    padding: 0.5rem !important;
}

