/*================================================================================
	Item Name: Stack Admin - Custom Styles for Maax Marine (Kaabar ERP)
================================================================================*/

/* Perfect Horizontal & Vertical Centering for Brand Logo in Header */
.header-navbar.navbar-brand-center .navbar-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .header-navbar.navbar-brand-center .navbar-header {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1000 !important;
        pointer-events: auto !important;
    }

    .header-navbar.navbar-brand-center .navbar-header .navbar-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar.navbar-brand-center .navbar-header .navbar-nav .nav-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header-navbar.navbar-brand-center .navbar-header .navbar-brand {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    .header-navbar.navbar-brand-center .navbar-header .navbar-brand .brand-logo {
        display: block !important;
        margin: 0 auto !important;
        max-height: 38px !important;
        width: auto !important;
        vertical-align: middle !important;
    }
}

@media (max-width: 767.98px) {
    .header-navbar.navbar-brand-center .navbar-header .navbar-brand {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .header-navbar.navbar-brand-center .navbar-header .navbar-brand .brand-logo {
        max-height: 32px !important;
        width: auto !important;
    }
}

/* User avatar initial circle */
.avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
}

/*================================================================================
	Login Page Styling - High-End Marine Theme (Wider Layout)
================================================================================*/

body.auth-marine-bg {
    min-height: 100vh;
    background: url('/app-assets/images/backgrounds/marine_bg_login.jpg') no-repeat center center fixed !important;
    background-size: cover !important;
    position: relative;
    overflow-x: hidden;
}

body.auth-marine-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78) 0%, rgba(17, 34, 64, 0.72) 50%, rgba(10, 25, 47, 0.88) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}

body.auth-marine-bg .app-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 520px; /* Wider card layout as requested */
    margin: 0 auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 18px !important;
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) inset !important;
    overflow: hidden;
    padding: 2.75rem 2.5rem !important;
}

.auth-brand-logo {
    max-height: 48px;
    max-width: 260px;
    width: auto;
    object-fit: contain;
}

.auth-card .brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .brand-header .marine-login-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Stack Admin Theme Select2 Styling (Vertical Centering & #00B5B8 Theme)
   ========================================================================== */
.select2-container {
    width: 100% !important;
    display: block !important;
}

/* Base Selection Box */
.select2-container--default .select2-selection--single,
.select2-container--classic .select2-selection--single,
.select2-container .select2-selection--single {
    height: 40px !important;
    min-height: 40px !important;
    line-height: 38px !important;
    padding: 0 !important;
    border: 1px solid #ccd6e6 !important;
    border-radius: 0.25rem !important;
    background-color: #ffffff !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Remove default browser focus rings completely */
.select2-selection--single:focus,
.select2-selection--single:focus-visible,
.select2-container:focus,
.select2-container *:focus {
    outline: none !important;
}

/* Rendered Text Inside Selection Box */
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--classic .select2-selection--single .select2-selection__rendered,
.select2-container .select2-selection--single .select2-selection__rendered {
    color: #404e67 !important;
    line-height: 38px !important;
    height: 38px !important;
    padding-left: 12px !important;
    padding-right: 50px !important; /* Space for clear button & arrow */
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
    margin: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container .select2-selection--single .select2-selection__placeholder {
    color: #8c98a9 !important;
    line-height: 38px !important;
    font-size: 0.95rem !important;
}

/* Arrow Positioning & Styling */
.select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--classic .select2-selection--single .select2-selection__arrow,
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    width: 24px !important;
    position: absolute !important;
    top: 0 !important;
    right: 8px !important;
    bottom: 0 !important;
    margin: auto 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b,
.select2-container .select2-selection--single .select2-selection__arrow b {
    border-color: #6c757d transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    margin: 0 !important;
    position: static !important;
    height: 0 !important;
    width: 0 !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b,
.select2-container.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #00b5b8 !important;
    border-width: 0 4px 5px 4px !important;
}

/* Clear Icon Positioning */
.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-container .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: #8c98a9 !important;
    cursor: pointer !important;
    padding: 2px !important;
    z-index: 3 !important;
    font-weight: bold !important;
    float: none !important;
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover,
.select2-container .select2-selection--single .select2-selection__clear:hover {
    color: #ff4961 !important;
}

/* Theme Focus & Open State (#00B5B8) - Replaces blue browser outline */
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single:active,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container .select2-selection--single:focus,
.select2-container .select2-selection--single:active,
.select2-container.select2-container--focus .select2-selection--single,
.select2-container.select2-container--open .select2-selection--single {
    border-color: #00b5b8 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 181, 184, 0.25) !important;
    outline: none !important;
}

/* Dropdown Popup */
.select2-dropdown {
    border: 1px solid #00b5b8 !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 8px 24px rgba(0, 181, 184, 0.15) !important;
    z-index: 1055 !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ccd6e6 !important;
    border-radius: 0.2rem !important;
    padding: 6px 10px !important;
    font-size: 0.9rem !important;
    outline: none !important;
    height: 36px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #00b5b8 !important;
    box-shadow: 0 0 0 0.15rem rgba(0, 181, 184, 0.25) !important;
}

.select2-container--default .select2-results__option {
    padding: 8px 12px !important;
    font-size: 0.92rem !important;
    transition: background-color 0.1s ease;
}

/* Theme Option Highlighted State */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #00b5b8 !important;
    color: #ffffff !important;
}

/* Theme Option Selected State */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #e0f7f7 !important;
    color: #008f92 !important;
    font-weight: 600;
}

.select2-container--default .select2-results__option.loading-results {
    text-align: center;
    color: #00b5b8 !important;
    font-weight: 600;
    padding: 10px !important;
}

.auth-card .brand-header .auth-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.auth-card .brand-header .auth-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Form Controls with Inside Left Icons */
.auth-card .position-relative.has-icon-left .form-control {
    height: 48px !important;
    font-size: 0.95rem !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding-left: 2.85rem !important;
    padding-right: 2.85rem !important;
    transition: all 0.2s ease;
}

.auth-card .position-relative.has-icon-left .form-control:focus {
    background-color: #ffffff !important;
    border-color: #00b5b8 !important;
    box-shadow: 0 0 0 3.5px rgba(0, 181, 184, 0.15) !important;
}

.auth-card .has-icon-left .form-control-position {
    position: absolute;
    top: 0;
    left: 0;
    width: 2.85rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 5;
}

.auth-card .has-icon-left .form-control-position i {
    font-size: 1.15rem;
}

.auth-card .password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card .password-toggle-btn:hover {
    color: #00b5b8;
}

.auth-card .password-toggle-btn i {
    font-size: 1.15rem;
}

/* Sign In Button */
.auth-card .btn-login {
    height: 48px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #00b5b8 0%, #16d39a 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px -2px rgba(0, 181, 184, 0.45) !important;
    transition: all 0.25s ease !important;
    margin-top: 0.5rem;
}

.auth-card .btn-login:hover {
    box-shadow: 0 10px 25px -2px rgba(0, 181, 184, 0.6) !important;
    transform: translateY(-1px);
}

.auth-card .btn-login:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(0, 181, 184, 0.3) !important;
}

.auth-footer-badge {
    text-align: center;
    margin-top: 1.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
}

/*================================================================================
	Stack Admin Theme - Table Checkboxes & Bulk Selection Toolbar
================================================================================*/

/* Centered Table Checkbox Wrapper */
.table-checkbox-wrapper {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    line-height: 1;
}

.table-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.table-checkbox-wrapper .checkbox-custom-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border: 1.5px solid #babfc7;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.table-checkbox-wrapper input[type="checkbox"]:hover ~ .checkbox-custom-indicator {
    border-color: #00b5b8;
    box-shadow: 0 0 0 2px rgba(0, 181, 184, 0.15);
}

.table-checkbox-wrapper input[type="checkbox"]:focus ~ .checkbox-custom-indicator {
    border-color: #00b5b8;
    box-shadow: 0 0 0 3px rgba(0, 181, 184, 0.25);
}

.table-checkbox-wrapper input[type="checkbox"]:checked ~ .checkbox-custom-indicator {
    background-color: #00b5b8;
    border-color: #00b5b8;
    box-shadow: 0 2px 4px rgba(0, 181, 184, 0.3);
}

.table-checkbox-wrapper input[type="checkbox"]:checked ~ .checkbox-custom-indicator::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.table-checkbox-wrapper input[type="checkbox"]:indeterminate ~ .checkbox-custom-indicator {
    background-color: #00b5b8;
    border-color: #00b5b8;
}

.table-checkbox-wrapper input[type="checkbox"]:indeterminate ~ .checkbox-custom-indicator::after {
    content: '';
    display: block;
    width: 8px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
}

/* Row selection state with Stack Admin teal tint */
.table tbody tr.row-selected,
.table tbody tr.row-selected > td {
    background-color: rgba(0, 181, 184, 0.08) !important;
}

/* Bulk Selection Action Toolbar - Stack Admin Theme */
.bulk-selection-toolbar {
    background-color: #f8fafd;
    border-left: 4px solid #00b5b8;
    border-top: 1px solid #e3e8ee;
    border-bottom: 1px solid #e3e8ee;
    padding: 0.65rem 1.25rem;
    transition: all 0.25s ease;
}

