@import 'tailwindcss';

@source '../../../../vendor/filament/**/*.blade.php';
@source '../../../../app/Filament/**/*.php';
@source '../../../../app/Livewire/**/*.php';
@source '../../../views/filament/**/*.blade.php';
@source '../../../views/livewire/**/*.blade.php';

/* Login page background image */
.fi-simple-layout {
    background-image: url('/img/bridgewater.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

/* Add overlay for better readability */
.fi-simple-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

/* Ensure content is above overlay */
.fi-simple-layout > * {
    position: relative;
    z-index: 1;
}

/* Hide the heading text on login page, keep only logo */
.fi-simple-header-heading {
    display: none !important;
}

/* Style the login card */
.fi-simple-main {
    background: #ffffff !important;
    backdrop-filter: blur(10px);
    border-radius: 1rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Dark mode fixes for login page - force dark text on white card */
.dark .fi-simple-main,
.fi-simple-main {
    --tw-text-opacity: 1;
}

/* Force dark text for labels in login form */
.dark .fi-simple-main label,
.dark .fi-simple-main .fi-fo-field-wrp-label {
    color: rgb(17 24 39) !important;
}

/* Force dark text for input fields */
.dark .fi-simple-main input {
    color: rgb(17 24 39) !important;
    background-color: rgb(255 255 255) !important;
    border-color: rgb(209 213 219) !important;
}

.dark .fi-simple-main input::placeholder {
    color: rgb(156 163 175) !important;
}

/* Force dark text for links */
.dark .fi-simple-main a:not(.fi-btn) {
    color: rgb(22 163 74) !important;
}

/* Force dark text for checkbox labels */
.dark .fi-simple-main .fi-checkbox-label {
    color: rgb(55 65 81) !important;
}

/* Input wrapper styling in dark mode */
.dark .fi-simple-main .fi-input-wrp {
    background-color: rgb(255 255 255) !important;
    border-color: rgb(209 213 219) !important;
}

/* Ensure the password toggle icon is visible */
.dark .fi-simple-main .fi-input-wrp button {
    color: rgb(107 114 128) !important;
}

/* Logo sizing - login page (override to be larger) */
.fi-simple-layout .fi-logo img,
.fi-simple-layout .fi-brand img,
.fi-simple-layout img[src*="bridgewater"] {
    max-height: 120px !important;
    height: 120px !important;
    width: auto !important;
}

/* Also target the header container on login */
.fi-simple-header .fi-logo,
.fi-simple-header .fi-brand {
    height: auto !important;
    max-height: none !important;
}

/* Force dark green buttons with white text - global */
.fi-btn-color-primary,
.fi-ac-btn-action,
[class*="fi-btn"][class*="primary"],
button[type="submit"].fi-btn,
.fi-simple-main button[type="submit"],
.fi-simple-main .fi-btn,
.fi-form-actions button {
    --c-400: 74, 222, 128 !important;
    --c-500: 22, 163, 74 !important;
    --c-600: 20, 83, 45 !important;
    background-color: rgb(20, 83, 45) !important;
    color: rgb(255, 255, 255) !important;
    border-color: rgb(20, 83, 45) !important;
}

.fi-btn-color-primary:hover,
.fi-ac-btn-action:hover,
button[type="submit"].fi-btn:hover,
.fi-simple-main button[type="submit"]:hover,
.fi-simple-main .fi-btn:hover,
.fi-form-actions button:hover {
    background-color: rgb(22, 101, 52) !important;
    border-color: rgb(22, 101, 52) !important;
}

/* Ensure button text and icons are white */
.fi-btn-color-primary *,
.fi-ac-btn-action *,
button[type="submit"].fi-btn *,
.fi-simple-main button[type="submit"] *,
.fi-simple-main .fi-btn *,
.fi-form-actions button * {
    color: rgb(255, 255, 255) !important;
}

/* Match chart widget heights */
.fi-wi-chart {
    height: 100%;
}

.fi-wi-chart canvas {
    max-height: 280px !important;
}

/* Ensure widget cards have equal height in row */
.fi-page-dashboard .grid > div {
    display: flex;
}

.fi-page-dashboard .grid > div > section {
    width: 100%;
}

/* Left-align table search bar */
.fi-ta-header-toolbar {
    justify-content: flex-start !important;
}

.fi-ta-search-field {
    margin-right: auto !important;
}
