/* Sidebar Container */
.fi-sidebar {
    background-color: #0d9488 !important;
    border-right-color: #0f766e !important;
    z-index: 50 !important;
    min-height: 100vh !important;
    /* Sticky allows it to be part of the flow (responsive) but pinned */
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    /* Remove Fixed positioning props to restore flex layout */
}

/* Remove manual padding - let Filament handle the sidebar spacing responsive */
/* @media (min-width: 1024px) { ... } REMOVED */

.fi-sidebar-nav {
    background-color: #0d9488 !important;
}

.fi-sidebar-header {
    background-color: #0f766e !important;
    border-bottom-color: #115e59 !important;
}

.fi-sidebar-header a {
    color: #ffffff !important;
}

.fi-sidebar-item-label,
.fi-sidebar-item-icon {
    color: #ffffff !important;
    opacity: 0.9;
}

.fi-sidebar-group {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.fi-sidebar-group-label {
    color: #ccfbf1 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.1rem !important;
}

.fi-sidebar-group-items,
.fi-sidebar-nav>ul {
    gap: 0 !important;
    row-gap: 0 !important;
}

.fi-sidebar-item {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
}

.fi-sidebar-item>a,
.fi-sidebar-item>button {
    gap: 0.5rem !important;
    /* Keep icon/text comfortable */
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.fi-sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.fi-sidebar-item-active {
    background-color: transparent !important;
}

.fi-sidebar-item-active .fi-sidebar-item-label,
.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #fbbf24 !important;
    font-weight: 800 !important;
}

.fi-sidebar-item-active>a {
    background-color: transparent !important;
}

/* --- LOGIN PAGE STYLING (Aggressive Selectors) --- */

/* The entire page background */
.fi-simple-layout {
    background: #f8fafc !important;
}

/* The Login Card container */
.fi-simple-main-card,
.fi-simple-main-card>.fi-section,
.fi-simple-main-card .fi-section-content {
    background-color: #16a34a !important;
    /* Hijau Terang */
    border-radius: 1rem !important;
    border: none !important;
}

/* Fix for the white background inside internal sections if any */
.fi-simple-main-card main,
.fi-simple-main-card form {
    background-color: transparent !important;
}

/* Header Titles */
h1.fi-simple-header-heading {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

p.fi-simple-header-subheading {
    color: #dcfce7 !important;
    opacity: 1 !important;
}

/* Input labels */
.fi-simple-main-card label,
.fi-simple-main-card .fi-fo-field-wrp-label {
    color: #ffffff !important;
}

/* The Sign In Button */
.fi-simple-main-card button[type="submit"],
.fi-simple-main-card .fi-btn-color-primary {
    background-color: #ffffff !important;
    color: #16a34a !important;
    font-weight: bold !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.fi-simple-main-card button[type="submit"]:hover {
    background-color: #f0fdf4 !important;
    transform: translateY(-1px);
}

/* Input Fields - White Background */
.fi-simple-main-card input {
    background-color: #ffffff !important;
    color: #1a202c !important;
}

/* Links (Forgot Password) */
.fi-simple-main-card a {
    color: #dcfce7 !important;
}

.fi-simple-main-card a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* --- NOTIFIKASI / FEEDBACK --- */
/* Target specifically the notification CARDS */
.fi-no-notification,
.fi-notification {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    max-width: 24rem !important;
    /* Standard size */
    margin-bottom: 0.5rem !important;
    overflow: hidden !important;
}

/* SUCCESS - Background Color for the whole card */
.fi-no-notification:has([class*="success"]),
.fi-notification:has([class*="success"]),
.fi-no-notification[class*="success"],
.fi-notification[class*="success"] {
    background-color: #d1fae5 !important;
}

/* WARNING - Background Color for the whole card */
.fi-no-notification:has([class*="warning"]),
.fi-notification:has([class*="warning"]),
.fi-no-notification[class*="warning"],
.fi-notification[class*="warning"] {
    background-color: #fef3c7 !important;
}

/* DANGER - Background Color for the whole card */
.fi-no-notification:has([class*="danger"]),
.fi-notification:has([class*="danger"]),
.fi-no-notification[class*="danger"],
.fi-notification[class*="danger"] {
    background-color: #fee2e2 !important;
}

/* INFO - Background Color for the whole card */
.fi-no-notification:has([class*="info"]),
.fi-notification:has([class*="info"]),
.fi-no-notification[class*="info"],
.fi-notification[class*="info"] {
    background-color: #dbeafe !important;
}

/* FORCE ALL INNER BLOBS TO BE TRANSPARENT so parent color shines through */
.fi-no-notification *,
.fi-notification * {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* TEXT & ICON CONTRAST - Max Visibility */
[class*="success"] h3,
[class*="success"] p,
[class*="success"] span,
[class*="success"] svg {
    color: #064e3b !important;
    font-weight: 800 !important;
}

[class*="warning"] h3,
[class*="warning"] p,
[class*="warning"] span,
[class*="warning"] svg {
    color: #78350f !important;
    font-weight: 800 !important;
}

[class*="danger"] h3,
[class*="danger"] p,
[class*="danger"] span,
[class*="danger"] svg {
    color: #7f1d1d !important;
    font-weight: 800 !important;
}

[class*="info"] h3,
[class*="info"] p,
[class*="info"] span,
[class*="info"] svg {
    color: #1e3a8a !important;
    font-weight: 800 !important;
}


/* --- GLOBAL CLEANUP --- */
/* Kill all white borders/rings in the application */
.fi-card,
.fi-section,
.fi-section-content,
.fi-ta-content,
.fi-ta-header-ctn,
.fi-main-ctn,
.fi-topbar {
    border: none !important;
    box-shadow: none !important;
}

/* Special target for Filament's ring effect which looks like a white border */
[class*="ring-"],
[class*="ring-gray"],
[class*="ring-white"] {
    --tw-ring-width: 0px !important;
    --tw-ring-offset-width: 0px !important;
    box-shadow: none !important;
}

/* --- BUTTON CUSTOMIZATION --- */

/* GREEN BUTTONS: Buat, Simpan, Excel, Primary, Success */
.custom-btn-green,
.fi-btn-color-primary:not(.fi-simple-main-card .fi-btn),
.fi-btn-color-success {
    background-color: #0d9488 !important;
    color: #ffffff !important;
    border: none !important;
}

/* RED BUTTONS: Batal, PDF, Unduh, Danger */
.custom-btn-red,
.fi-btn-color-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border: none !important;
}

/* Force white text and icons inside these custom buttons */
/* Force white text and icons inside these custom buttons */
.custom-btn-green *,
.custom-btn-red *,
.fi-btn-color-primary:not(.fi-simple-main-card .fi-btn) *,
.fi-btn-color-success *,
.fi-btn-color-danger * {
    color: #ffffff !important;
    --tw-text-opacity: 1 !important;
}

/* Specific reinforcement for labels and icons */
.fi-btn-color-danger .fi-btn-label,
.fi-btn-color-danger .fi-btn-icon,
.fi-btn-color-success .fi-btn-label,
.fi-btn-color-success .fi-btn-icon,
.fi-btn-color-primary:not(.fi-simple-main-card .fi-btn) .fi-btn-label,
.fi-btn-color-primary:not(.fi-simple-main-card .fi-btn) .fi-btn-icon {
    color: #ffffff !important;
}

/* Special Case: Maintain Login Button (White with Green Text) */
.fi-simple-main-card .fi-btn-color-primary,
.fi-simple-main-card .fi-btn-color-primary * {
    background-color: #ffffff !important;
    color: #0d9488 !important;
}

/* Hover effects */
.custom-btn-green:hover,
.fi-btn-color-primary:not(.fi-simple-main-card .fi-btn):hover,
.fi-btn-color-success:hover {
    background-color: #0f766e !important;
}

.custom-btn-red:hover,
.fi-btn-color-danger:hover {
    background-color: #b91c1c !important;
}

/* --- CHECKBOX & RADIO VISIBILITY --- */
/* Target standard checkboxes and Filament checkbox components */
input[type="checkbox"],
.fi-fo-checkbox-list-option-label input,
.fi-checkbox input {
    border: 2px solid #cbd5e1 !important;
    /* Slate-300 border for visibility */
    background-color: #ffffff !important;
    border-radius: 4px !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    transition: all 0.2s !important;
}

/* Hover state */
input[type="checkbox"]:hover {
    border-color: #0d9488 !important;
    /* Teal on hover */
}

/* Checked state */
input[type="checkbox"]:checked {
    background-color: #0d9488 !important;
    border-color: #0d9488 !important;
}

/* Label text accompanying checkboxes */
.fi-fo-checkbox-list-option-label span,
.fi-fo-checkbox-label {
    font-weight: 500 !important;
    color: #1e293b !important;
    margin-left: 0.5rem !important;
}

/* Additional specific target for Filament UI components */
.fi-fo-checkbox-list-option,
.fi-checkbox-input-wrp {
    border: 1px solid #e2e8f0 !important;
    padding: 2px !important;
    border-radius: 6px !important;
    background: white !important;
}