.ck-editor__editable,
textarea:not(#notes) {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.version-number {
    color: #6c757d;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    white-space: nowrap;
}

/* Overrides for the primary color */
:root {
    --bs-primary: #2e5753;
    --bs-primary-rgb: 46, 87, 83;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover {
    background-color: darken(var(--bs-primary), 10%);
    border-color: darken(var(--bs-primary), 10%);
}

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

/* Primary backgrounds */
.bg-primary {
    background-color: var(--bs-primary) !important;
}

/* Links */
a {
    color: var(--bs-primary);
}
a:hover {
    color: darken(var(--bs-primary), 10%);
}

.btn-secondary {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}
.btn-secondary:hover {
    background-color: darken(var(--bs-secondary), 10%);
    border-color: darken(var(--bs-secondary), 10%);
}

/* secondary text */
.text-secondary {
    color: var(--bs-secondary) !important;
}

/* Secondary backgrounds */
.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

/* Links */
a {
    color: var(--bs-secondary);
}
a:hover {
    color: darken(var(--bs-secondary), 10%);
}

/* Overrides for the danger color */
:root {
    --bs-danger: #b64652;
    --bs-danger-rgb: 182, 70, 82;
}

.btn-danger {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
}
.btn-danger:hover {
    background-color: darken(var(--bs-danger), 10%);
    border-color: darken(var(--bs-danger), 10%);
}

/* danger text */
.text-danger {
    color: var(--bs-danger) !important;
}

/* danger backgrounds */
.bg-danger {
    background-color: var(--bs-danger) !important;
}

/* Links */
a {
    color: var(--bs-danger);
}
a:hover {
    color: darken(var(--bs-danger), 10%);
}

/* Overrides for the info color */
/* :root {
    --bs-info: #2e5753;
    --bs-info-rgb: 46, 87, 83;
} */

.btn-info {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
}
.btn-info:hover {
    background-color: darken(var(--bs-info), 10%);
    border-color: darken(var(--bs-info), 10%);
}

/* info text */
.text-info {
    color: var(--bs-info) !important;
}

/* info backgrounds */
.bg-info {
    background-color: var(--bs-info) !important;
}

/* Links */
a {
    color: var(--bs-info);
}
a:hover {
    color: darken(var(--bs-info), 10%);
}

/* Overrides for the warning color */
:root {
    --bs-warning: #b58762;
    --bs-warning-rgb: 181, 135, 98;
}

.btn-warning {
    background-color: var(--bs-warning);
    border-color: var(--bs-warning);
}
.btn-warning:hover {
    background-color: darken(var(--bs-warning), 10%);
    border-color: darken(var(--bs-warning), 10%);
}

/* warning text */
.text-warning {
    color: var(--bs-warning) !important;
}

/* warning backgrounds */
.bg-warning {
    background-color: var(--bs-warning) !important;
}

/* Links */
a {
    color: var(--bs-warning);
}
a:hover {
    color: darken(var(--bs-warning), 10%);
}

.cursor-pointer {
    cursor: pointer;
}

#service-detail-sidebar {
    transition: all 0.3s ease;
    border-left: 1px solid #dee2e6;
}

/* Ribbon css */
.app-body {
    margin-top: 0;
    padding-top: 0;
}

/* Note: .main margin-top and padding-top are set later to account for fixed header */
/* See lines 624-626 for the actual values */

.container-fluid {
    margin-top: 0;
    padding-top: 0;
}

/* Unified Header with Integrated Ribbon - Restore original background */
.unified-header {
    background: linear-gradient(90deg, var(--navbar-gradient-start) 0%, var(--navbar-gradient-end) 100%);
    color: var(--bs-dark);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: auto;
    min-height: 60px;
    border: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    min-height: 60px;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0 1rem;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
}

/* Page info styling */
.page-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.05);
}

.page-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Header actions styling */
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-actions .btn {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.header-actions .btn:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 92%, black) 0%, color-mix(in srgb, var(--bs-secondary) 92%, black) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-actions .btn-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, color-mix(in srgb, var(--bs-primary) 85%, black) 100%);
}

.header-actions .btn-success {
    background: linear-gradient(135deg, var(--bs-success) 0%, color-mix(in srgb, var(--bs-success) 85%, black) 100%);
}

.header-actions .btn-danger {
    background: linear-gradient(135deg, var(--bs-danger) 0%, color-mix(in srgb, var(--bs-danger) 85%, black) 100%);
}

/* Restore original navbar brand styling */
.navbar-brand {
    color: var(--bs-dark) !important;
}

.navbar-brand img {
    filter: none; /* Remove the white filter */
}

/* Restore original navigation links */
.unified-header .nav-link {
    color: var(--bs-dark) !important;
    transition: all 0.3s ease;
}

.unified-header .nav-link:hover {
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 4px;
}

/* Force right alignment for navigation */
.unified-header .navbar-nav {
    display: flex !important;
    align-items: center !important;
    margin-left: auto !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    position: relative !important;
    right: 0 !important;
}

.unified-header .navbar-nav .nav-item {
    display: flex !important;
    align-items: center !important;
    margin-left: 0.5rem !important;
    flex-shrink: 0 !important;
}

/* Force right alignment for the header-right container */
.header-right {
    flex-shrink: 0 !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-left: auto !important;
    position: relative !important;
    right: 0 !important;
}

/* Ensure the navigation stays on the right */
.header-right .navbar-nav {
    justify-content: flex-end !important;
    width: auto !important;
    margin-left: auto !important;
    position: relative !important;
    right: 0 !important;
}

/* Override any Bootstrap or CoreUI conflicting styles */
.unified-header .navbar-nav.ml-auto {
    margin-left: auto !important;
}

/* Force the header content to use full width */
.unified-header .header-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure proper spacing between sections */
.header-left {
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

.header-center {
    flex: 1 !important;
    min-width: 0 !important;
}

.header-right {
    flex: 0 0 auto !important;
    min-width: 0 !important;
}

/* Logo centering for desktop - applies to all screen widths >= 768px */
/* Using @media to avoid affecting mobile layouts */
@media (min-width: 768px) {
    .header-right {
        position: absolute !important;
        right: 1rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    .header-content {
        position: relative !important;
    }
    
    /* Center the logo within the left section on desktop (above sidebar) */
    /* Expanded sidebar - 200px width (default state) */
    .header-left {
        justify-content: center !important;
        align-items: center !important;
        min-width: 200px;
        width: 200px;
        position: relative;
    }
    
    /* Position sidebar toggler buttons absolutely so they don't affect centering */
    .header-left .sidebar-toggler {
        position: absolute;
        z-index: 1;
    }
    
    /* First toggler (mobile) - left side */
    .header-left .sidebar-toggler.d-lg-none {
        left: 0.5rem;
    }
    
    /* Second toggler (desktop) - right side */
    .header-left .sidebar-toggler.d-md-down-none {
        right: 0.5rem;
    }
    
    /* Center the navbar brand within the header-left container */
    .header-left .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 0;
        margin: 0;
    }
    
    /* When sidebar is minimized - CoreUI adds sidebar-minimized class to body */
    /* Sidebar width becomes ~56px - ensure icon is perfectly centered */
    body.sidebar-minimized .header-left {
        min-width: 56px !important;
        width: 56px !important;
    }
    
    body.sidebar-minimized .header-left .navbar-brand {
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
    }
    
    /* When sidebar is completely hidden (not just minimized) */
    /* Don't constrain width, let it be flexible so logo doesn't get pushed off screen */
    body:not(.sidebar-lg-show):not(.sidebar-show):not(.sidebar-minimized) .header-left {
        min-width: auto !important;
        width: auto !important;
        flex: 0 0 auto !important;
        max-width: none !important;
    }
    
    /* When sidebar is hidden, don't use absolute positioning for logo */
    body:not(.sidebar-lg-show):not(.sidebar-show):not(.sidebar-minimized) .header-left .navbar-brand {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        margin: 0 !important;
    }
    
    /* Ensure expanded state when sidebar-lg-show is present */
    body.sidebar-lg-show .header-left {
        min-width: 200px;
        width: 200px;
    }
}

/* Fix sidebar positioning and remove gaps */
body.app .sidebar {
    top: 60px; /* Match header height exactly */
    height: calc(100vh - 60px);
    margin-top: 0;
    padding-top: 0;
}

/* Ensure main content starts immediately below header */
body.app .main {
    margin-top: 60px; /* Account for fixed header height */
    padding-top: 20px; /* Add padding for extra spacing */
    overflow-x: hidden; /* Prevent horizontal overflow */
    max-width: 100%; /* Ensure content doesn't exceed viewport */
}

/* Ensure main content has proper left margin when sidebar is visible */
body.app.sidebar-lg-show .main {
    margin-left: 200px; /* Account for sidebar width */
}

body.app.sidebar-minimized .main {
    margin-left: 56px; /* Account for minimized sidebar width */
}

/* Remove any extra spacing from app-body */
body.app .app-body {
    margin-top: 0;
    padding-top: 0;
}

body.app .container-fluid {
    margin-top: 0;
    padding-top: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure no gaps in the layout */
.app {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix any potential CoreUI spacing issues */
.c-sidebar {
    top: 70px !important;
}

.c-main {
    margin-top: 70px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-header {
        min-height: 50px;
    }
    
    .header-content {
        flex-direction: row;
        padding: 0.25rem 0.5rem;
        min-height: 50px;
        align-items: center;
    }
    
    .header-left {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-start;
        min-width: 0;
    }
    
    .header-center {
        flex: 1;
        min-width: 0;
        margin: 0;
        padding: 0 0.5rem;
        order: 2;
    }
    
    .header-right {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
        margin-left: auto;
        order: 3;
    }
    
    .page-info {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }
    
    .page-title {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .btn-back {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .header-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .header-actions .btn i {
        margin-right: 0.25rem;
    }
    
    .header-actions .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    body.app .main {
        margin-top: 50px;
        padding-top: 10px;
    }
    
    body.app .sidebar {
        top: 50px;
        height: calc(100vh - 50px);
    }
    
    /* Compact navigation icons on mobile */
    .header-right .nav-link {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.875rem;
    }
    
    .header-right .nav-icon {
        font-size: 1rem;
    }
    
    .header-right .nav-item .nav-link {
        min-width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hide text labels in header actions on very small screens */
    @media (max-width: 576px) {
        .header-actions .btn {
            padding: 0.25rem 0.4rem;
        }
        
        .header-actions .btn span {
            display: none;
        }
        
        .page-title {
            max-width: 100px;
            font-size: 0.875rem;
        }
        
        .header-right .nav-link {
            padding: 0.25rem !important;
        }
        
        /* Hide user name text, keep icon only */
        .header-right .nav-item:last-child .nav-link {
            min-width: 32px;
            padding: 0.25rem !important;
            position: relative;
        }
        
        /* Hide text in user menu link using text-indent, keep icon visible */
        .header-right .nav-item:last-child .nav-link {
            text-indent: -9999px;
            overflow: hidden;
            white-space: nowrap;
        }
        
        /* Keep the icon visible and positioned */
        .header-right .nav-item:last-child .nav-link .nav-icon,
        .header-right .nav-item:last-child .nav-link i {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            text-indent: 0;
            font-size: 1rem !important;
        }
    }
}

/* Hide original ribbons */
/* Modal z-index fixes - Bootstrap default is 1050, backdrop is 1040 */
/* Select2 dropdowns appended to body need to respect modal stacking context */

/* When a modal is open, Select2 dropdowns appended to body should be below the modal */
/* Bootstrap modal z-index is 1050, so Select2 outside modals should be lower */
body.modal-open > .select2-container {
    z-index: 1030;
}

body.modal-open > .select2-dropdown {
    z-index: 1031;
}

/* Select2 dropdowns inside modals (when dropdownParent is set to modal) inherit modal's z-index */
/* They'll be within the modal's stacking context, so they'll appear correctly */

/* Fix Select2 in modal */
.modal .select2-container {
    width: 100% !important;
}

.modal .select2-selection {
    height: 38px !important;
    border: 1px solid #ced4da !important;
}

.modal .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
}

.modal .select2-selection__arrow {
    height: 36px !important;
}

/* Limit client dropdown height for classes - Override CDN Select2 */
.modal .select2-container--default .select2-selection--multiple,
#createAppointmentsModal .select2-container--default .select2-selection--multiple,
.modal #client_ids + .select2-container .select2-selection--multiple,
body .modal .select2-container--default .select2-selection--multiple,
body #createAppointmentsModal .select2-container--default .select2-selection--multiple,
body .modal #client_ids + .select2-container .select2-selection--multiple {
    min-height: 38px !important;
    max-height: 60px !important;
    overflow-y: auto !important;
}

.modal .select2-container--default .select2-selection--multiple .select2-selection__choice,
#createAppointmentsModal .select2-container--default .select2-selection--multiple .select2-selection__choice,
.modal #client_ids + .select2-container .select2-selection--multiple .select2-selection__choice,
body .modal .select2-container--default .select2-selection--multiple .select2-selection__choice,
body #createAppointmentsModal .select2-container--default .select2-selection--multiple .select2-selection__choice,
body .modal #client_ids + .select2-container .select2-selection--multiple .select2-selection__choice {
    margin: 2px 4px 2px 0 !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
}

.modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
#createAppointmentsModal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
.modal #client_ids + .select2-container .select2-selection--multiple .select2-selection__choice__remove,
body .modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
body #createAppointmentsModal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
body .modal #client_ids + .select2-container .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 4px !important;
    font-size: 14px !important;
}

.ribbon-container,
.bg-light.border-bottom {
    display: none !important;
}

/* Client Profile Card Styles */
.client-profile {
    border: none;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.client-profile .card-body {
    background: var(--bs-primary);
    color: white;
    padding: 2rem;
}

/* Onboarding Header Styles */
.client-profile .onboarding-header {
    border: none;
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 10;
}

.client-profile .onboarding-header h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Override Bootstrap Colors to Match Theme */
.client-profile .onboarding-header.bg-info {
    background-color: var(--bs-info);
}

.client-profile .onboarding-header.bg-warning {
    background-color: var(--bs-warning);
}

.client-profile .onboarding-header.bg-secondary {
    background-color: var(--bs-secondary);
}

.client-profile .onboarding-header.bg-success {
    background-color: var(--bs-success);
}

.client-profile .onboarding-header.bg-dark {
    background-color: var(--bs-dark);
}

.badge-dark {
    background-color: var(--bs-dark);
    color: white;
}

.client-profile .profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.client-profile .profile-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.client-profile .metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.client-profile .metric-label {
    font-size: 0.875rem;
    opacity: 0.8;
}


/* Stats Card Styles */
.stats-card {
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stats-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
}

.stats-card .card-title {
    font-weight: 600;
    color: var(--bs-dark);
    margin: 0;
}

.stats-card .list-group-item {
    padding: 0.75rem 1.5rem;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-card .list-group-item:last-child {
    border-bottom: none;
}

.stats-card .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Form Styling Updates */
.form-label {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 4px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Button Styling */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Consolidated Tab Styling - All nav-pills rules in one place */
.nav-pills .nav-link {
    border: none;
    border-radius: 8px;
    margin-right: 0.5rem;
    padding: 8px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--bs-dark);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-pills .nav-link:hover:not(.active) {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

/* Nav-tabs styling for modern tab appearance */
.nav-tabs .nav-link {
    border: 0px solid transparent;
    border-radius: 0;
    margin-right: 0.5rem;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--bs-dark);
    background: transparent;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: white;
    border-color: var(--bs-primary) var(--bs-primary) #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link:hover:not(.active) {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-color: transparent;
}

/* Special styling for client profile tabs */
.client-profile-tabs .nav-pills .nav-link {
    border-radius: 0;
    color: #6c757d;
    background: transparent;
}

.client-profile-tabs .nav-pills .nav-link.active {
    color: #4e73df;
    background-color: transparent;
    border-bottom: 2px solid #4e73df;
    box-shadow: none;
}

/* Ensure tab content is visible - Works with Bootstrap fade tabs */
.card .tab-content {
    position: relative;
    min-height: 200px; /* Ensure tab content has minimum height */
}

.card .tab-content .tab-pane {
    min-height: 200px; /* Ensure each tab pane has minimum height */
    width: 100%; /* Ensure full width */
}

.card .tab-content .tab-pane.active,
.card .tab-content .tab-pane.show.active {
    display: block !important;
    min-height: 200px; /* Ensure active tab has minimum height */
    width: 100%; /* Ensure full width */
}

/* Ensure Bootstrap's fade animation works properly */
.card .tab-content .tab-pane.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.card .tab-content .tab-pane.fade.active,
.card .tab-content .tab-pane.fade.show.active {
    opacity: 1;
}

/* Remove all custom tab overrides - let Bootstrap handle it natively */

/* Let Bootstrap handle tab functionality natively */

/* Simple tab container fix */
.tab-content {
    min-height: 400px; /* Set a reasonable minimum height */
}

/* Ensure proper tab visibility - prevent stacking */
.tab-pane {
    display: none !important;
}

.tab-pane.active {
    display: block !important;
}

.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.tab-pane.fade.active {
    opacity: 1;
}

/* Force only active tab to be visible */
.tab-pane:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.tab-pane.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Specific overrides for employee edit tabs to prevent calendar from staying visible */
#calendar:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

#personal:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

#services:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

#availability:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Ensure active tabs are visible */
#calendar.active,
#personal.active,
#services.active,
#availability.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

/* Divider line styling */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 1rem 0;
    border: none;
}

/* Employee Profile Card Styles - Matching client-profile */
.employee-profile {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    border: none;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.employee-profile .card-body {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: white;
    padding: 2rem;
}

.employee-profile .profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.employee-profile .profile-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.employee-profile .metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.employee-profile .metric-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.employee-profile .service-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
}

/* Modern Timeline Appointment Styles */
.appointments-timeline {
    position: relative;
}

.timeline-section {
    margin-bottom: 2rem;
}

.section-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    font-size: 1.1rem;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--bs-primary), #6c757d);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 1rem;
    width: 1rem;
    height: 1rem;
    background: var(--bs-primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e9ecef;
    z-index: 10;
}

.timeline-item.completed .timeline-marker {
    background: var(--bs-success);
}

.timeline-item.canceled .timeline-marker {
    background: var(--bs-danger);
}

.timeline-item.confirmed .timeline-marker {
    background: var(--bs-primary);
}

.timeline-item.pending .timeline-marker {
    background: var(--bs-warning);
}

.appointment-card {
    background: white;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.appointment-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.appointment-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
}

.appointment-card .card-body {
    padding: 1rem;
}

.appointment-card .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.appointment-info h6 {
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 0.25rem;
}

.appointment-info small {
    color: #6c757d;
}

.appointment-status .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.appointment-datetime,
.appointment-time,
.appointment-location,
.appointment-notes {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.appointment-datetime i,
.appointment-time i,
.appointment-location i,
.appointment-notes i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
    color: var(--bs-primary);
}

.appointment-datetime strong {
    color: var(--bs-dark);
    font-weight: 600;
}

.appointment-time {
    color: #6c757d;
}

.appointment-location {
    color: #6c757d;
}

.appointment-notes {
    color: #6c757d;
}

.appointment-notes small {
    font-style: italic;
}

/* Status Badge Enhancements */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.status-badge.status-confirmed {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid rgba(var(--bs-success-rgb), 0.2);
}

.status-badge.status-pending {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.2);
}

.status-badge.status-completed {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid rgba(var(--bs-success-rgb), 0.2);
}

.status-badge.status-canceled {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
}

/* Urgency Indicators */
.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.urgency-badge.urgency-high {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.2);
}

.urgency-badge.urgency-critical {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .timeline-container {
        padding-left: 1rem;
    }
    
    .timeline-container::before {
        left: 0.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .appointment-card .row {
        flex-direction: column;
    }
    
    .appointment-card .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
        width: 100%;
    }
    
    .appointment-card .card-header {
        padding: 0.75rem;
    }
    
    .appointment-card .card-body {
        padding: 0.75rem;
    }
    
    .appointment-card .card-footer {
        padding: 0.5rem 0.75rem;
    }
}

/* Empty State Styling */
.timeline-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.timeline-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.timeline-empty-state h5 {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.timeline-empty-state p {
    margin-bottom: 1.5rem;
    color: #6c757d;
}

/* Loading State */
.timeline-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.timeline-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timeline Tab Styles */
.appointments-timeline {
    position: relative;
    min-height: 200px;
}

.appointments-timeline .timeline-container-compact {
    position: relative;
    padding-left: 1.5rem;
}

.appointments-timeline .timeline-container-compact::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--bs-primary), #6c757d);
    border-radius: 0.5px;
}

.appointments-timeline .timeline-item-compact {
    position: relative;
    margin-bottom: 0.75rem;
}

.appointments-timeline .timeline-marker-compact {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--bs-primary);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e9ecef;
    z-index: 10;
}

.appointments-timeline .timeline-item-compact.completed .timeline-marker-compact {
    background: var(--bs-success);
}

.appointments-timeline .timeline-item-compact.canceled .timeline-marker-compact {
    background: var(--bs-danger);
}

.appointments-timeline .timeline-item-compact.confirmed .timeline-marker-compact {
    background: var(--bs-primary);
}

.appointments-timeline .timeline-item-compact.pending .timeline-marker-compact {
    background: var(--bs-warning);
}

/* Tab-specific styling for timeline tabs */
.nav-tabs.card-header-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0;
}

.nav-tabs.card-header-tabs .nav-link {
    border: none;
    border-radius: 0;
    margin-right: 0;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #6c757d;
    background: transparent;
}

.nav-tabs.card-header-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: white;
    border-color: var(--bs-primary) var(--bs-primary) #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tabs.card-header-tabs .nav-link:hover:not(.active) {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-color: transparent;
}

.nav-tabs.card-header-tabs .nav-link i {
    font-size: 0.875rem;
}

.appointment-card-compact {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    overflow: hidden;
    padding: 0.5rem 0.75rem;
}

.appointment-card-compact:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.service-info,
.teacher-info,
.datetime-info,
.room-info {
    padding: 0.25rem 0;
}

.service-name {
    font-weight: 600;
    color: var(--bs-dark);
    font-size: 0.875rem;
    margin: 0;
}

.teacher-name {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 0;
}

.room-name {
    color: #6c757d;
    font-size: 0.75rem;
    margin: 0;
}

.appointment-date {
    font-weight: 600;
    color: var(--bs-dark);
    font-size: 0.8rem;
    margin: 0;
}

.appointment-time {
    color: #6c757d;
    font-size: 0.75rem;
    margin: 0;
}

.appointment-actions-compact {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
}

.appointment-actions-compact .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

/* Common Action Block Styles - Used for recurring instances and client appointments */
.action-block {
    display: flex;
    border-left: 1px solid #e9ecef;
    border-radius: 0 4px 4px 0;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
}

.action-block-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #e9ecef;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.action-block-item:last-child {
    border-right: none;
}

.action-block-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.action-block-item-content {
    padding: 3px 0px 0px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.action-block-item-content i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.action-block-item-content span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Action-specific colors */
.action-block-item[data-action="cancel"] .action-block-item-content i {
    color: var(--bs-warning);
}

.action-block-item[data-action="cancel"]:hover .action-block-item-content i {
    color: #856404;
}

.action-block-item[data-action="edit"] .action-block-item-content i {
    color: var(--bs-info);
}

.action-block-item[data-action="edit"]:hover .action-block-item-content i {
    color: #004085;
}

.action-block-item[data-action="complete"] .action-block-item-content i {
    color: var(--bs-success);
}

.action-block-item[data-action="complete"]:hover .action-block-item-content i {
    color: #155724;
}

.action-block-item[data-action="delete"] .action-block-item-content i {
    color: var(--bs-danger);
}

.action-block-item[data-action="delete"]:hover .action-block-item-content i {
    color: #721c24;
}

.action-block-item[data-action="view"] .action-block-item-content i {
    color: var(--bs-primary);
}

.action-block-item[data-action="view"]:hover .action-block-item-content i {
    color: #004085;
}

.action-block-item:hover .action-block-item-content {
    transform: translateY(-2px);
}

.action-block-item:active .action-block-item-content {
    transform: translateY(0);
}

/* Action-block in table cells - fill width */
table td .action-block,
.datatable td .action-block,
.datatable-invoice td .action-block {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
}

/* Action-block in cards/dashboards - align right */
.card .action-block,
.dashboard .action-block {
    margin-left: auto;
}

/* Compact Urgency Badges */
.urgency-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.65rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
    font-weight: 600;
    margin-top: 0.125rem;
}

.urgency-badge-compact.urgency-high {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
    border: 1px solid rgba(var(--bs-warning-rgb), 0.2);
}

.urgency-badge-compact.urgency-critical {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    animation: pulse 2s infinite;
}

/* Compact Loading State */
.timeline-loading-compact {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.timeline-loading-compact i {
    font-size: 1rem;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Compact Empty State */
.timeline-empty-state-compact {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.timeline-empty-state-compact i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
    display: block;
}

/* Mobile Responsive for Compact Timeline */
@media (max-width: 768px) {
    .timeline-container-compact {
        padding-left: 1rem;
    }
    
    .timeline-container-compact::before {
        left: 0.375rem;
    }
    
    .timeline-marker-compact {
        left: -1rem;
        width: 0.375rem;
        height: 0.375rem;
    }
    
    .appointment-card-compact .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .appointment-card-compact .col-md-3,
    .appointment-card-compact .col-md-2,
    .appointment-card-compact .col-md-4 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .appointment-actions-compact {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .appointment-actions-compact .btn {
        flex: 1;
        min-width: 0;
        margin-bottom: 0.25rem;
    }
    
    .action-block {
        flex-direction: column;
        border-left: none;
        border-top: 1px solid #e9ecef;
        max-width: 100%;
    }
    
    .action-block-item {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .action-block-item:last-child {
        border-bottom: none;
    }
}

/* Pagination styling - match DataTables style */
.pagination {
    font-size: 0.875rem;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.pagination .page-item {
    display: inline-block;
    flex-shrink: 0;
}

.pagination .page-link {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    line-height: 1.25;
    min-width: auto;
    display: inline-block;
    text-align: center;
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Ensure Previous/Next text links are properly sized */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    min-width: auto;
    max-width: none;
    width: auto;
    padding: 0.375rem 0.75rem;
}