/* Dark Sidebar Theme & Layout Override */
:root {
    --fi-sidebar-width: 260px !important;
    /* Increased to 280px */
}

/* Sidebar Container */
.fi-sidebar {
    width: var(--fi-sidebar-width) !important;
    background-color: #111827 !important;
    /* Dark Navy */
    border-right: 1px solid #1f2937 !important;
}

.fi-sidebar-nav {
    background-color: #111827 !important;
}

/* Header/Brand Area */
.fi-sidebar-header {
    background-color: #111827 !important;
    border-bottom: 1px solid #1f2937 !important;
    display: flex;
    justify-content: center !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* ============================================ */
/* FINAL FIX: Force Equal Widget Heights */
/* ============================================ */

/* Target ALL dashboard widgets at grid level */
.fi-wi-account,
.fi-wi-account-custom,
.asalny-welcome-widget {
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
}

/* Force section height */
.fi-wi-account>.fi-section,
.fi-wi-account-custom>.fi-section,
.asalny-welcome-widget>.fi-section {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Force content container height */
.fi-wi-account .fi-section-content-ctn,
.fi-wi-account-custom .fi-section-content-ctn,
.asalny-welcome-widget .fi-section-content-ctn {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: 100% !important;
}

/* Also target inner content */
.fi-wi-account .fi-section-content,
.fi-wi-account-custom .fi-section-content,
.asalny-welcome-widget .fi-section-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* NEW: Force all widgets in dashboard to same height */
.fi-section-content-ctn>div,
.fi-section-content>div {
    height: 100% !important;
}

/* Force grid items to be same height */
[x-data]>.grid>* {
    height: 120px !important;
}

.fi-section {
    height: 100% !important;
}

.fi-sidebar-header a {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.fi-sidebar-header .fi-logo {
    display: contents;
}

/* Sidebar Group Labels */
.fi-sidebar-group-label span {
    color: #9ca3af !important;
    font-weight: 600;
    font-size: 0.85rem;
    /* Adjusted for width */
}

/* Show collapse arrows */
.fi-sidebar-group-collapse-button {
    display: flex !important;
    color: #9ca3af !important;
}

/* TREE VIEW - LINES AND DOTS (RTL) */
.fi-sidebar-group-items>ul {
    position: relative;
    padding-right: 20px !important;
    /* Adjusted spacing */
    border-right: 2px solid #374151 !important;
    margin-right: 10px;
}

/* Connector Dot */
.fi-sidebar-item>.fi-sidebar-item-button::before {
    content: '';
    position: absolute;
    right: -26px;
    /* Position on line */
    top: 50%;
    width: 8px;
    /* Slightly smaller dot */
    height: 8px;
    background-color: #4b5563;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: 2px solid #111827;
}

/* Active State Styles */
.fi-sidebar-item.fi-active>.fi-sidebar-item-button {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-radius: 6px;
    padding-block: 8px;
}

/* Active Dot */
.fi-sidebar-item.fi-active>.fi-sidebar-item-button::before {
    background-color: #3b82f6 !important;
    border-color: #1e3a8a;
    width: 10px;
    height: 10px;
    right: -27px;
}

/* Item Text & Icons */
.fi-sidebar-item-label {
    color: #e5e7eb !important;
    font-size: 0.9rem;
}

.fi-sidebar-item-icon {
    color: #9ca3af !important;
    width: 1.25rem;
    height: 1.25rem;
}

/* Active Item Text & Icon */
.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}

/* Hover Effects */
.fi-sidebar-item:not(.fi-active)>.fi-sidebar-item-button:hover {
    background-color: #1f2937 !important;
}

/* ============================================ */
/* Account Widget Content Centering */
/* ============================================ */
.fi-wi-account-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1.5rem !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100px !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Make parent relative */
.fi-wi-account .fi-section-content,
.fi-section-content {
    position: relative !important;
    min-height: 100px !important;
}

.fi-wi-account-user {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.fi-wi-account-user-info {
    text-align: right !important;
}

.fi-wi-account-user-info h2 {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.fi-wi-account-user-info p {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

/* ============================================ */
/* LOGIN PAGE SPACING FIXES - FILAMENT 3       */
/* ============================================ */

/* Reduce form gaps */
.fi-simple-main form {
    gap: 0.5rem !important;
}

.fi-simple-main #form {
    gap: 0.5rem !important;
}

/* Reduce grid gaps */
.fi-simple-main .grid {
    gap: 0.5rem !important;
}

/* Tighter input fields */
.fi-simple-main .fi-input-wrp {
    padding-block: 10px !important;
}

/* Reduce label spacing */
.fi-simple-main .fi-fo-field-wrp-label {
    margin-bottom: 0.25rem !important;
}

/* AGGRESSIVE: Pull form actions UP with negative margin */
.fi-simple-main .fi-form-actions {
    margin-top: -5.2rem !important;
}

/* Checkbox - Remove all bottom margin */
.fi-simple-main .fi-fo-field-wrp:has(input[type="checkbox"]) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Reduce section padding */
.fi-simple-main .fi-section-content {
    padding: 1.5rem !important;
}

/* Header spacing */
.fi-simple-header {
    margin-bottom: 1rem !important;
}