/* Theme Override & Custom Styles */
:root {
    /* Colors */
    --primary-color: #e42f22;
    --primary-rgb: 228, 47, 34;
    --primary-hover: #c92519;
    --bg-body: #f4f5f7;
    --bg-white: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;

    /* Sidebar */
    --sidebar-width: 80px;
    --header-height: 70px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;

    /* Shadows - Ultra Soft */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Animations */
    --transition: all 0.2s ease-in-out;

    /* Bootstrap Variable Overrides */
    --bs-primary: #e42f22;
    --bs-primary-rgb: 228, 47, 34;
    --bs-link-color: #e42f22;
    --bs-link-hover-color: #c92519;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    font-size: 0.95rem;
    /* Slightly larger base size for readability */
    overflow-x: hidden;
}

/* Bootstrap Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: rgba(var(--primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:focus {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25) !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color);
    color: #fff;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(228, 47, 34, 0.2);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    /* Prevents flex item from overflowing */
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .submenu-drawer {
        left: 0;
        z-index: 1001;
    }
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(228, 47, 34, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    margin-bottom: var(--spacing-xl);
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-item {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    padding: 0;
}

.nav-link i {
    font-size: 1.5rem;
    /* Slightly bigger for Duotone */
    margin-bottom: 2px;
}

.nav-link span {
    font-size: 0.6rem;
    font-weight: 500;
    text-align: center;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(228, 47, 34, 0.05);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -15px;
    /* Adjust based on parent padding/layout */
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

/* Submenu Drawer */
.submenu-drawer {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: 240px;
    height: 100vh;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    z-index: 999;
    padding: var(--spacing-lg);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
}

.submenu-drawer.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.submenu-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.close-submenu {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.25rem;
}

.close-submenu:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    transform: rotate(90deg);
    /* Playful rotation on hover */
}

.submenu-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.submenu-link {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submenu-list .active {
    color: var(--primary-color);
    background-color: rgba(228, 47, 34, 0.05);
}

.submenu-link:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
    text-decoration: none;
}

/* Collapsible Submenu */
.submenu-collapse {
    display: none;
    overflow: hidden;
}

.submenu-collapse.show {
    display: block;
}

.submenu-toggle .toggle-arrow {
    transition: transform 0.2s ease;
}

.submenu-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

/* Header Styles */
.top-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.7);
    /* Semi-transparent for glassy effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* border-bottom: 1px solid var(--border-color); Removed border for cleaner look */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: var(--shadow-sm);
    /* Using shadow instead of border */
}

.header-search {
    width: 25rem;
    position: relative;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--bg-body);
    border: 1px solid transparent;
    border-radius: 99px;
    /* Capsule shape */
    padding: 0.6rem 1.2rem;
    transition: var(--transition);
    width: 100%;
}

.search-wrapper:focus-within {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    border-color: rgba(228, 47, 34, 0.2);
    /* Subtle primary color tint */
}

.search-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.search-wrapper:focus-within .search-icon {
    color: var(--primary-color);
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
    font-size: 0.95rem;
    padding: 0;
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-badge {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.notification-btn {
    position: relative;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    /* Touch target */
}

.notification-btn:hover {
    color: var(--primary-color);
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background-color: #dc3545;
    /* Red */
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 99px;
    border: 2px solid #fff;
    padding: 0 4px;
}

.status-dot {
    display: inline-block;
    border-radius: 50%;
    /* Width and height set inline or via utility */
}

/* Profile Pill Shape */
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    background-color: var(--bg-body);
    padding: 4px 12px 4px 4px;
    /* Left padding small for avatar */
    border-radius: 99px;
    transition: var(--transition);
}

.user-profile:hover {
    background-color: #e2e8f0;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--primary-color);
    /* Corporate Red */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    margin-left: 4px;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
    color: var(--text-main);
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Content Padding */
.page-content {
    padding: var(--spacing-lg);
}

/* Dropdown Customization */
.dropdown-menu {
    border-radius: 16px;
    margin-top: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: none;
    min-width: 300px;
    /* Wider notification menu */
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-action-link {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Notification Item Styling */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    /* Compact padding */
    border-bottom: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    background-color: #fff;
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.notification-icon {
    width: 32px;
    /* Smaller icon container */
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    /* Monochrome gray */
    background: transparent;
    font-size: 1.25rem;
    /* Smaller icon */
    margin-right: 0.75rem;
    /* Reduced margin */
    flex-shrink: 0;
}

.notification-content h6 {
    font-weight: 600;
    /* Slightly lighter weight for elegance */
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-main);
    line-height: 1.3;
}

.notification-content p {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.3;
}

.notification-time {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 2px;
    display: block;
}

.dropdown-footer {
    padding: 0.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.dropdown-footer a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Dropdown Customization */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: var(--text-main);
    transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-body);
    color: var(--primary-color);
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.05);
    /* Soft red bg */
    color: #dc3545 !important;
}

/* Typography Utilities */
.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-xxs {
    font-size: 0.65rem;
}

.fw-medium {
    font-weight: 500;
}

.fw-semibold {
    font-weight: 600;
}

.list-group-item {
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: var(--bg-body);
}

/* Remove default dropdown toggle arrow */
.user-profile::after {
    display: none;
}

/* Mobile Profile Fixes */
@media (max-width: 576px) {
    .user-profile {
        padding: 0;
        background-color: transparent;
    }

    .user-profile:hover {
        background-color: transparent;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Mobile Toggle Button */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
    color: var(--text-main);
}

.mobile-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text-main);
    font-size: 1.5rem;
    transition: var(--transition);
}

.mobile-toggle:hover,
.mobile-toggle:active {
    background-color: rgba(0, 0, 0, 0.05);
    /* Soft gray hover */
    color: var(--primary-color);
}

/* Custom Button Styles */
.btn-soft-primary {
    background-color: rgba(228, 47, 34, 0.05);
    color: var(--primary-color);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.btn-soft-primary:hover {
    background-color: rgba(228, 47, 34, 0.1);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(228, 47, 34, 0.15);
    transform: translateY(-1px);
}

.btn-minimal {
    background-color: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-minimal:hover {
    background-color: #fff;
    color: var(--primary-color);
    border-color: rgba(228, 47, 34, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.btn-minimal i {
    transition: transform 0.3s ease;
}

.btn-minimal:hover i {
    transform: translateX(3px);
}

/* Custom Tabs for Personnel Page */
.custom-tab-nav {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    /* Enable horizontal scroll */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */

    /* Scroll Hint Mask (Fade Effect on Right) */
    mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%);

    /* Peeking padding */
    padding-right: 2rem;
}

/* Custom Scrollbar for Tabs */
.custom-tab-nav::-webkit-scrollbar {
    height: 4px;
}

.custom-tab-nav::-webkit-scrollbar-track {
    background: transparent;
}

.custom-tab-nav::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}




.custom-tab-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid transparent;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    white-space: nowrap;
    /* Prevent wrapping */
    flex-shrink: 0;
    /* Prevent shrinking on mobile */
}

.custom-tab-link:hover {
    color: var(--primary-color);
    background-color: rgba(228, 47, 34, 0.02);
}

.custom-tab-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--text-main);
}

.tab-count {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    color: var(--text-main);
}

.custom-tab-link.active .tab-count {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-info {
    display: flex;
    flex-direction: column;
}

.tab-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.tab-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-ghost-secondary {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-ghost-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.btn-ghost-danger {
    color: #dc3545;
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-ghost-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Mobile Responsive Table Card View */
@media (max-width: 768px) {
    .table-responsive .table thead {
        display: none;
    }

    .table-responsive .table,
    .table-responsive .table tbody,
    .table-responsive .table tr,
    .table-responsive .table td {
        display: block;
        width: 100%;
    }

    .table-responsive .table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background-color: #fff;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        transition: none;
        /* Disable transition on mobile */
    }

    .table-responsive .table tr:hover {
        background-color: #fff !important;
        transform: none !important;
        box-shadow: var(--shadow-sm) !important;
    }

    /* Reset Bootstrap specific hover variables strongly */
    .table-responsive .table tr:hover>* {
        --bs-table-accent-bg: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }

    .table-responsive .table td {
        padding: 0.5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }


    .table-responsive .table td:first-child {
        /* Personnel Info Cell */
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
        justify-content: flex-start;
        text-align: left;
    }

    /* Responsive labels driven by data attributes */
    .table-responsive .table td[data-label] {
        justify-content: space-between;
    }

    .table-responsive .table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--text-muted);
        margin-right: 1rem;
    }

    /* Exceptions for specifically styled cells if needed, but data-label presence rules */
    .table-responsive .table td:last-child {
        /* Default actions cell style, can be overridden if it has data-label */
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
        margin-top: 0.5rem;
        justify-content: flex-end;
    }

    /* If the last child HAS a data-label (like Status), treat it as a data row, not an action footer */
    .table-responsive .table td:last-child[data-label] {
        justify-content: space-between;
        /* Keep border top for separation if desired, or remove it: */
        /* border-top: none; padding-top: 0.5rem; margin-top: 0; */
    }
}

/* Profile Detail Page Styles */
.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.profile-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
}

.profile-nav-link.active {
    background-color: rgba(228, 47, 34, 0.08);
    /* Primary opacity */
    color: var(--primary-color);
}

.profile-nav-link i {
    font-size: 1.25rem;
}

/* Custom Nav Tabs inside Cards */
.card-header-tabs .nav-link {
    border-bottom: 2px solid transparent !important;
    border-radius: 0;
}

.card-header-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
}

.card-header-tabs .nav-link:hover:not(.active) {
    color: var(--text-main);
}

/* Mobile Responsive Adjustments for Profile Page */
@media (max-width: 991.98px) {

    /* Disable sticky sidebar on mobile */
    .profile-card.sticky-top {
        position: static !important;
        z-index: 1;
    }

    /* Scrollable Card Tabs on Mobile */
    .card-header-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        /* Scroll hint mask */
        mask-image: linear-gradient(90deg, #000 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent 100%);
    }

    .card-header-tabs .nav-link {
        white-space: nowrap;
    }
}

.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.icon-box i {
    font-size: 1.5rem;
    /* Adjust if needed */
}

/* Flatpickr Shortcut Buttons Theme */
.shortcut-buttons-flatpickr-button {
    background-color: #fff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    /* Pill shape */
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin: 4px;
}

.shortcut-buttons-flatpickr-button:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.shortcut-buttons-flatpickr-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Flatpickr Theme Overrides */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.flatpickr-day.today {
    border-color: var(--primary-color) !important;
}

.flatpickr-day.today:hover {
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
}

.flatpickr-day.inRange {
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    background: rgba(228, 47, 34, 0.1) !important;
    border-color: transparent !important;
}

/* Upload Zone Styling */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background-color: #fff;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.02);
}

.upload-icon-box {
    width: 64px;
    height: 64px;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* Flatpickr Custom Overrides */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.flatpickr-wrapper {
    position: unset !important;
    width: 100% !important;
    display: block !important;
}

/* Radio Button Card Selection */
.btn-check:checked+.card {
    border-color: var(--primary-color) !important;
    background-color: rgba(var(--primary-rgb), 0.05) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.btn-check:checked+.card i {
    transform: scale(1.1);
    transition: var(--transition);
}

/* Collapse Chevron Rotation */
[data-bs-toggle="collapse"] .ph-caret-down {
    transition: transform 0.2s;
}

[data-bs-toggle="collapse"]:not(.collapsed) .ph-caret-down {
    transform: rotate(180deg);
}

/* Upload Zone Hover Effect */
.upload-zone {
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color) !important;
    background-color: rgba(67, 97, 238, 0.03) !important;
}

.upload-zone:hover .upload-icon-box {
    transform: scale(1.1);
    background-color: var(--primary-color) !important;
    color: white !important;
    transition: all 0.3s ease;
}

.upload-zone input[type="file"] {
    cursor: pointer !important;
}

/* Global Table Hover Override */
.table-hover>tbody>tr:hover>* {
    --bs-table-bg-state: rgb(182 182 182 / 8%);
}

/* Ensure Flatpickr is above Offcanvas */
.flatpickr-calendar {
    z-index: 1060 !important;
}

/* =========================================
   Fix for Input Groups with Icons Focus
   ========================================= */
/* 1. Target the input-group when any child has focus */
.input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(228, 47, 34, 0.2);
    /* Same as --primary-color opacity */
    border-color: var(--primary-color);
    z-index: 5;
    /* Bring to front */
    border-radius: var(--bs-border-radius);
    /* Fallback */
}

/* 2. Remove default focus ring from the input itself */
.input-group :is(.form-control, .form-select):focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

/* 3. Handle rounded corners if customized (e.g. rounded-pill) */
/* If the parent has rounded-pill, ensure the focus ring follows it */
.input-group.rounded-pill:focus-within {
    border-radius: 50rem !important;
}




/* Support for border-0 inputs in input-group */
.input-group :is(.input-group-text, .form-control, .form-select) {
    border-color: transparent;
}

/* When focused, make sure the background matches if needed, but keeping it light is fine */
/* Custom Pill Tabs (Profile Page) */
.nav-pills-custom .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 50rem;
    transition: var(--transition);
}

.nav-pills-custom .nav-link:hover {
    color: var(--primary-color);
}

.nav-pills-custom .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-pills-custom .nav-link:hover:not(.active) {
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Organization Tree Styles */
.tree {
    white-space: nowrap;
    min-width: 800px;
    padding: 2rem;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
    margin: 0;
    padding-left: 0;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: all 0.5s;
}

/* Connectors */
.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid #ccc;
    border-radius: 0 5px 0 0;
}

.tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
}

/* Tree Node (Card) */
.tree-node {
    display: inline-block;
    background: #ffffff;
    /* Explicit white background */
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: #666;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #cbd5e1;
    /* Stronger border (Slate-300) */
    transition: all 0.3s;
    position: relative;
    min-width: 180px;
    max-width: 200px;
    z-index: 2;
}

.tree-node:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
    border-color: var(--primary-color);
    border-width: 1px;
    /* Ensure width stays same or make it 2px if preferred, but 1px color change is subtle and nice */
}

.tree-node img.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid #f8f9fa;
}

.tree-node .name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 2px;
    display: block;
}

.tree-node .title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.tree-node .badge-dept {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(228, 47, 34, 0.08);
    /* Primary opacity*/
    color: var(--primary-color);
    margin-top: 8px;
    display: inline-block;
}

/* Pan & Zoom Container */
.tree-wrapper {
    overflow: hidden !important;
    /* Hide scrollbars for pan/zoom */
    cursor: grab;
    position: relative;
    height: calc(100vh - 140px);
    /* Fill remaining screen height (Header + Padding approx 140px) */
    background-color: var(--bg-body);
}

.tree-wrapper:active {
    cursor: grabbing;
}

.pan-zoom-content {
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
    /* Smooth movement */
    width: 100%;
    height: 100%;
    display: flex;
    /* Center initial content */
    justify-content: center;
    padding: 50px;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: var(--bg-body);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Background Pattern: Graph Paper */
.bg-graph-paper {
    background-color: #f1f5f9;
    /* Darker off-white/slate for contrast */
    background-image:
        linear-gradient(rgba(203, 213, 225, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.6) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
    border: 1px solid #e42f22a5;
    border-radius: 15px;
}

/* Corporate Info Alert (Clean) */
.alert-info-premium {
    background-color: #f1f5f9;
    /* Slate-100 */
    border: 1px solid #e2e8f0;
    /* Slate-200 */
    border-left: 4px solid #64748b;
    /* Slate-500 (Neutral/Corporate) */
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    color: var(--text-main);
}

.alert-info-premium i {
    color: #64748b;
    /* Slate-500 */
    font-size: 1.25rem;
}

/* Authentication Pages - Premium Redesign */
.auth-body {
    background-color: #f8fafc;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.h-100vh {
    height: 100vh;
}

/* Premium Background */
.bg-auth-premium {
    background-color: #0f172a;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    position: relative;
    z-index: 0;
}

.bg-auth-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=2301&auto=format&fit=crop');
    /* Modern Office/Abstract */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: -1;
    mix-blend-mode: overlay;
}

/* Particle/Gradient Animation (Subtle) */
@keyframes niceGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.premium-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(125deg, rgba(228, 47, 34, 0.05), rgba(15, 23, 42, 0.8));
    z-index: 0;
}

/* Center Card Container */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 15px -10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.brand-icon-large {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), #b91c1c);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(228, 47, 34, 0.5);
}

/* Form Styling */
.form-floating-custom>.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    height: 56px;
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-floating-custom>.form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(228, 47, 34, 0.1);
}

.form-floating-custom>label {
    padding: 1rem 0.75rem;
    color: var(--text-muted);
}

.form-floating-custom>.form-control:focus~label,
.form-floating-custom>.form-control:not(:placeholder-shown)~label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--primary-color);
    font-weight: 600;
}

/* Button Premium */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c53030 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px -1px rgba(228, 47, 34, 0.3), 0 2px 4px -1px rgba(228, 47, 34, 0.15);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(228, 47, 34, 0.4), 0 4px 6px -2px rgba(228, 47, 34, 0.2);
    color: white;
}

.btn-premium:active {
    transform: translateY(0);
}

/* Links */
.auth-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--primary-color);
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 1.5rem 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider-text::before {
    margin-right: .5em;
}

.divider-text::after {
    margin-left: .5em;
}

/* Footer Links in Auth */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-footer-link {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.auth-footer-link:hover {
    color: white;
}

/* Password Toggle - Fix */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    z-index: 20;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
}

.password-toggle:hover {
    color: var(--primary-color);
    background-color: rgba(228, 47, 34, 0.05);
}

/* Add padding to password input so text doesn't overlap icon */
#passwordInput {
    padding-right: 50px;
}

/* Auth Form Transitions */
.auth-form-slide {
    width: 100%;
    /* Override animate.css duration forcefully */
    --animate-duration: 0.4s !important;
    animation-duration: 0.4s !important;
}

.auth-form-container {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    /* Prevent height jumping */
}

/* TomSelect Customization */
.ts-control,
.ts-wrapper.single .ts-control {
    border-color: var(--border-color);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(228, 47, 34, 0.2) !important;
}

.ts-dropdown .active {
    background-color: rgba(228, 47, 34, 0.05) !important;
    color: var(--primary-color) !important;
}

.plugin-dropdown_input.focus .ts-dropdown .dropdown-input {
    border-color: #d0d0d0 !important;
    box-shadow: unset !important;
}

.ts-dropdown [data-selectable] .highlight {
    background: rgb(255 115 115 / 40%) !important;
}

/* ========================================
   SweetAlert2 — CRM Premium Theme
   ======================================== */

/* --- Toast Bildirimleri --- */
.crm-toast {
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    border: none !important;
    padding: 14px 18px !important;
    font-family: inherit !important;
    backdrop-filter: blur(10px) !important;
    min-width: 320px !important;
}

.crm-toast-success {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
}

.crm-toast-error {
    border-left: 4px solid #e42f22 !important;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%) !important;
}

.crm-toast-warning {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%) !important;
}

.crm-toast-info {
    border-left: 4px solid #3b82f6 !important;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%) !important;
}

.crm-toast-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.crm-toast-text {
    font-size: 0.82rem !important;
    color: #64748b !important;
    margin-top: 2px !important;
}

.crm-toast-progress {
    background: rgba(0, 0, 0, 0.08) !important;
    height: 3px !important;
    border-radius: 0 0 14px 14px !important;
}

.crm-toast .swal2-close {
    color: #94a3b8 !important;
    font-size: 1.2rem !important;
    top: 6px !important;
    right: 6px !important;
    transition: color 0.2s !important;
}

.crm-toast .swal2-close:hover {
    color: #475569 !important;
}

/* Toast icon smaller */
.crm-toast .swal2-icon {
    width: 28px !important;
    height: 28px !important;
    margin: 0 12px 0 0 !important;
    border-width: 2px !important;
    font-size: 0.8rem !important;
}

.crm-toast .swal2-icon .swal2-icon-content {
    font-size: 0.85rem !important;
}

/* Toast slide animation */
.crm-toast.swal2-show {
    animation: crmToastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) !important;
}

@keyframes crmToastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* --- Modal / Onay Diyalogları --- */
.crm-modal-popup {
    border-radius: 20px !important;
    padding: 25px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    font-family: inherit !important;
    max-width: 380px !important;
    position: relative !important;
    /* Progress bar için gerekli */
    overflow: hidden !important;
    /* Köşeleri kesmek için */
}

.swal2-html-container {
    padding: 0 !important;
}

/* ... (aradaki kodlar aynı kalacak) ... */

/* --- Bildirim Progress Bar --- */
.crm-notify-progress {
    height: 6px !important;
    border-radius: 0 !important;
    /* Parent overflow keseceği için buna gerek yok */
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: absolute !important;
    width: 100% !important;
    opacity: 1 !important;
    z-index: 10 !important;
    margin: 0 !important;
}

.crm-modal-popup .swal2-icon {
    margin-bottom: 12px !important;
    margin-top: 0 !important;
}

.crm-modal-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    padding: 0 !important;
}

.crm-modal-text {
    font-size: 0.875rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 4px 8px 0 !important;
}

.crm-modal-actions {
    gap: 10px !important;
    margin-top: 8px !important;
}

/* Silme popup (icon sadece html ile çiziliyor) */
.crm-delete-popup .swal2-icon {
    display: none !important;
}

/* --- CRM Butonları --- */
.crm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    font-family: inherit;
    gap: 4px;
}

.crm-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.crm-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(228, 47, 34, 0.3);
    transform: translateY(-1px);
}

.crm-btn-danger {
    background: #e42f22;
    color: #fff;
}

.crm-btn-danger:hover {
    background: #c92519;
    box-shadow: 0 4px 14px rgba(228, 47, 34, 0.3);
    transform: translateY(-1px);
}

.crm-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.crm-btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

/* SweetAlert2 Backdrop */
.swal2-container.swal2-center.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.3) !important;
    backdrop-filter: blur(4px) !important;
}

/* Modal popup animation */
.crm-modal-popup.swal2-show {
    animation: crmModalPopIn 0.3s cubic-bezier(0.21, 1.02, 0.73, 1) !important;
}

@keyframes crmModalPopIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Bildirim Progress Bar --- */
.crm-modal-popup .swal2-timer-progress-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 4px !important;
    background: transparent !important;
    opacity: 1 !important;
    z-index: 100 !important;
    margin: 0 !important;
    border-radius: 0 0 20px 20px !important;
    /* Glow köşelere uysun */
    /* Width JS tarafından kontrol ediliyor, buraya ekleme */
}

/* Renk varyasyonları - JS tarafından eklenen classlar */
.crm-modal-popup .crm-notify-progress-success {
    background: #10b981 !important;
    box-shadow: 0 0 15px 2px rgba(16, 185, 129, 0.6) !important;
}

.crm-modal-popup .crm-notify-progress-error {
    background: #e42f22 !important;
    box-shadow: 0 0 15px 2px rgba(228, 47, 34, 0.6) !important;
}

.crm-modal-popup .crm-notify-progress-warning {
    background: #f59e0b !important;
    box-shadow: 0 0 15px 2px rgba(245, 158, 11, 0.6) !important;
}

/* --- Global Offcanvas Responsive Width --- */
.crm-offcanvas {
    width: 500px !important;
}

@media (max-width: 575.98px) {
    .crm-offcanvas {
        width: 100% !important;
    }
}

.crm-modal-popup .crm-notify-progress-info {
    background: #3b82f6 !important;
    box-shadow: 0 0 15px 2px rgba(59, 130, 246, 0.6) !important;
}

/* =============================================
   Global Offcanvas Tabs — Underline Style
   Usage: <ul class="nav offcanvas-tabs ...">
   ============================================= */
.offcanvas-tabs {
    border-bottom: 2px solid #f1f1f4;
    gap: 0;
    padding: 0;
}

.offcanvas-tabs .nav-link {
    position: relative;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #8492a6;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.85rem 1.1rem;
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.offcanvas-tabs .nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: transparent;
    border-radius: 2px 2px 0 0;
    transition: background-color 0.2s ease;
}

.offcanvas-tabs .nav-link:hover {
    color: #2d3748;
    background: transparent;
}

.offcanvas-tabs .nav-link.active {
    color: var(--primary-color, #e42f22) !important;
    background: transparent !important;
}

.offcanvas-tabs .nav-link.active::before {
    background-color: var(--primary-color, #e42f22);
    display: block !important;
}

.offcanvas-tabs .nav-link i {
    font-size: 1rem;
    vertical-align: -1px;
}