/* ==========================================================================
   DLS CUSTOMER TOOLS - DESKTOP-FIRST RESPONSIVE DESIGN
   Optimized for 70% desktop / 30% mobile usage pattern
   ========================================================================== */

/* Font Awesome loaded via template from /public-icons/fontawesome/css/all.min.css */

:root {
    --dls-primary: #007bff;
}

/* CSS Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* Reserve space for scrollbar to prevent layout shift */
    scrollbar-gutter: stable;
    /* Don't set overflow on html - breaks position:sticky */
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
    /* Ensure consistent rendering across pages */
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Remove underlines from all links by default */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ==========================================================================
   DLS DESIGN SYSTEM - DESKTOP OPTIMIZED
   ========================================================================== */

/* Container & Layout - Desktop First */
.dls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
}

/* User Status Bar - Desktop Optimized */
.dls-user-status-bar {
    background: linear-gradient(135deg, #4a6cf7 0%, #667eea 100%);
    color: white;
    padding: 12px 20px;
    margin: -20px -20px 20px -20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dls-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.dls-status-label {
    font-weight: normal;
    opacity: 0.9;
}

.dls-status-value {
    font-weight: bold;
}

.dls-quick-browse {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.dls-quick-browse:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Main Navigation - Desktop Optimized */
.dls-main-nav {
    background: #2c3e50;
    margin: -20px -20px 30px -20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dls-nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.dls-nav-item {
    flex: 1;
}

.dls-nav-link {
    display: block;
    color: #ecf0f1;
    padding: 15px 20px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    border-right: 1px solid #34495e;
    transition: all 0.3s ease;
}

.dls-nav-link:hover {
    background: #34495e;
    color: #3498db;
}

.dls-nav-item:last-child .dls-nav-link {
    border-right: none;
}

/* Page Header */
.dls-page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.dls-page-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 300;
}

.dls-page-subtitle {
    color: #6c757d;
    font-size: 14px;
}

/* Account Cards - Desktop Two-Column Layout */
.dls-cards-container,
.dls-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch; /* Make cards equal height */
}

.dls-card {
    --card-bg: #f8f9fa;
    --card-border: #e9ecef;
    background: var(--card-bg); /* Light gray background for better visual hierarchy */
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 15px; /* Fallback margin for cards not in grid containers */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height of grid cell */
}

/* Card color variants */
.dls-card-warning {
    border-color: #ffc107;
    background: #fffbf5;
}


.dls-card-hold {
    border-color: #d39e00;
    background: #fff8e1;
}

/* Customer status styling */
.dls-customer-inactive {
    color: #dc3545;
    font-weight: 600;
    cursor: help;
}

.dls-customer-hold {
    color: #d39e00;
    font-weight: 600;
    cursor: help;
}

.dls-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}


.dls-card-title {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
    margin-bottom: 20px;
    font-weight: 500;
}

.dls-card-content {
    line-height: 1.6;
    padding: 0 5px; /* Add small padding to prevent content from touching edges */
    flex-grow: 1; /* Take up remaining space in flex container */
    display: flex;
    flex-direction: column;
}


/* Ensure perfect button alignment regardless of element type */
.dls-card-actions .dls-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
    box-sizing: border-box;
    line-height: 1.2;
}

/* General list improvements */
.dls-card-content ul:not(.dls-services-list) {
    padding-left: 25px;
    margin: 10px 0;
}

.dls-card-content li:not(.dls-service-item) {
    margin-bottom: 5px;
}

.dls-card-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.dls-card-content br {
    margin-bottom: 8px;
}

/* Services Section */
.dls-services-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.dls-services-section {
    margin-bottom: 20px;
}

.dls-services-section h4 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 600;
}

/* IP Address styling */
.dls-ip-private {
    color: #adb5bd !important; /* Lighter gray for private/internal IPs */
    opacity: 0.8;
}

.dls-ip-public {
    color: #495057; /* Normal dark color for public/billable IPs */
    font-weight: 500;
}

.dls-ip-label {
    font-size: 11px;
    font-style: italic;
    color: #6c757d;
}

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

.dls-service-header {
    background-color: #f8f9fa;
    font-size: 16px;
    border-bottom: 2px solid #dee2e6;
}


.dls-services-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Buttons - consistent with form elements */
.dls-btn {
    background: #007bff;
    color: white;
    min-height: 32px;
    padding: 6px 12px;
    margin: 4px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #007bff;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dls-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Ensure consistent rendering for button and anchor elements with dls-btn class */
button.dls-btn,
a.dls-btn {
    text-align: center;
    line-height: 20px; /* Match the min-height minus padding (32px - 12px padding) */
}

/* .dls-btn-sm definition moved to line 2281 to avoid duplication */

/* ==========================================================================
   MOBILE RESPONSIVE BREAKPOINTS - FOR 30% MOBILE USERS
   ========================================================================== */

/* Mobile Menu Toggle Styles */
.dls-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
}


/* Tablet Breakpoint */
@media screen and (max-width: 992px) {
    .dls-container {
        padding: 15px;
    }
    
    .dls-user-status-bar {
        margin: -15px -15px 15px -15px;
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .dls-main-nav {
        margin: -15px -15px 20px -15px;
    }
    
    .dls-nav-link {
        padding: 12px 15px;
        font-size: 12px;
    }
}

/* Mobile Breakpoint */
@media screen and (max-width: 768px) {
    .dls-container {
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Compact Mobile Status Bar */
    .dls-user-status-bar {
        margin: -15px -15px 12px -15px;
        padding: 8px;
        font-size: 11px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .dls-status-item {
        font-size: 11px;
        gap: 3px;
    }
    
    .dls-quick-browse {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 15px;
    }
    
    /* Mobile Navigation - Show hamburger menu */
    .dls-main-nav {
        margin: -8px -8px 15px -8px;
        padding: 10px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .dls-nav-list {
        display: none;
    }
    
    .dls-mobile-menu-toggle {
        display: block;
    }
    
    /* Compact Page Header */
    .dls-page-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .dls-page-title {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .dls-page-subtitle {
        font-size: 12px;
    }
    
    /* Mobile Cards - More compact */
    .dls-cards-container,
    .dls-cards-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .dls-card {
        padding: 15px;
        border-radius: 6px;
    }
    
    .dls-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .dls-card-title {
        font-size: 15px;
        margin: 0;
    }
    
    .dls-card-content {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .dls-card-content strong {
        font-size: 12px;
    }
    
    /* Compact Services Section */
    .dls-services-card {
        padding: 15px;
        margin-top: 12px;
    }
    
    .dls-services-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .dls-container {
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Ultra-compact status bar for small screens */
    .dls-user-status-bar {
        margin: -15px -15px 10px -15px;
        padding: 6px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .dls-status-item:nth-child(n+3) {
        display: none;
    }
    
    .dls-main-nav {
        margin: -6px -6px 12px -6px;
        padding: 8px 12px;
    }
    
    .dls-page-title {
        font-size: 18px;
    }
    
    .dls-page-subtitle {
        font-size: 11px;
    }
    
    .dls-card {
        padding: 12px;
    }
    
    .dls-card-header {
        margin-bottom: 10px;
        padding-bottom: 6px;
    }
    
    .dls-card-title {
        font-size: 14px;
    }
    
    .dls-card-content {
        font-size: 11px;
    }
    
    .dls-card-actions {
        flex-direction: column;
        gap: 8px;
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .dls-card-actions .dls-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Buttons already have consistent sizing in base styles */
    
    .dls-services-card {
        padding: 12px;
    }
    
    .dls-services-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Prevent horizontal scrolling */
    .dls-card-content {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ==========================================================================
   LAYOUT SYSTEM - MAIN CONTENT + SIDEBAR
   ========================================================================== */

/* Layout Container */
.dls-layout {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    align-items: flex-start !important;
}

/* Ensure desktop layout always applies above 768px */
@media screen and (min-width: 769px) {
    .dls-layout {
        display: flex !important;
        flex-direction: row !important;
        gap: 20px !important;
        align-items: flex-start !important;
    }
    
    .dls-sidebar {
        display: block !important;
        flex-shrink: 0 !important;
    }
}

/* Main Content */
.dls-main-content {
    flex: 1 1 70% !important;
    min-width: 0 !important;
    max-width: calc(100% - 300px) !important; /* Reserve space for sidebar + gap */
}

/* Sidebar */
.dls-sidebar {
    flex: 0 0 280px !important;
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    min-height: 400px;
    /* Sticky sidebar - stays visible while scrolling on desktop */
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    align-self: flex-start;
}

/* Clean Sidebar Styles */
.dls-clean-sidebar {
    background: #f8f9fa;
}

.dls-sidebar-branding {
    background: white;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 4px;
}

.dls-sidebar-logo {
    max-width: 120px;
    height: auto;
}

.dls-sidebar-section {
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.dls-sidebar-section-header {
    background: white;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dls-sidebar-section-header:hover {
    background: #f8f9fa;
}

.dls-sidebar-section-title {
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
}

.dls-sidebar-toggle {
    background: none;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
}

.dls-sidebar-items {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafbfc;
    display: none;
}

.dls-sidebar-section-expanded .dls-sidebar-items {
    display: block;
}

.dls-sidebar-item {
    border-top: 1px solid #e9ecef;
}

.dls-sidebar-link {
    display: block;
    padding: 8px 15px;
    color: #495057;
    text-decoration: none;
    font-size: 12px;
}

.dls-sidebar-link:hover {
    background: #e9ecef;
}

.dls-sidebar-item-active .dls-sidebar-link,
.dls-sidebar-link-active {
    background: #e3f2fd !important;
    color: #1976d2;
    font-weight: 600;
    border-left: 3px solid #5e91c9;
}

/* Sidebar category styling (for nested staff section items) with accordion */
.dls-sidebar-category {
    list-style: none;
    margin: 0 0 8px 0;
}

.dls-sidebar-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: #f1f3f4;
    border-radius: 4px;
    cursor: pointer;
}

.dls-sidebar-category-header:hover {
    background: #e9ecef;
}

.dls-sidebar-category-title {
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.dls-sidebar-category-toggle {
    background: none;
    border: none;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dls-sidebar-category-items {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    display: none; /* Hidden by default, shown by JavaScript */
}

/* Show category items when toggle is expanded */
.dls-sidebar-category-toggle[aria-expanded="true"] ~ .dls-sidebar-category-items {
    display: block;
}

.dls-sidebar-category-items .dls-sidebar-item {
    margin: 0;
}

.dls-sidebar-category-items .dls-sidebar-link {
    padding: 6px 20px;
    font-size: 12px;
    border-left: 3px solid transparent;
}

.dls-sidebar-category-items .dls-sidebar-link:hover {
    border-left-color: #5e91c9;
    background: #f8f9fa;
}

/* ============================================================================
 * USAGE PAGE - GRAPH & TABLE STYLES
 * ============================================================================ */

/* Graph Controls */
.dls-graph-controls {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.dls-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: stretch; /* Make buttons same height */
}

/* Centered button group variant */
.dls-btn-group-center {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: stretch;
    justify-content: center; /* Center the buttons */
}

/* Ensure buttons in btn-group match input height */
.dls-btn-group .dls-btn,
.dls-btn-group-center .dls-btn {
    height: 38px; /* Match default form control height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dls-btn-group-sm .dls-btn {
    padding: 5px 12px;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive Graph Container */
.dls-graph-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.dls-graph-responsive {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
}

.dls-graph-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Mobile Graph Optimizations */
@media screen and (max-width: 768px) {
    .dls-graph-responsive {
        padding: 0 10px;
    }
    
    .dls-graph-image {
        width: 100%;
        min-width: 600px; /* Allow horizontal scroll for readability */
    }
    
    .dls-btn-group {
        justify-content: center;
    }
    
    .dls-btn-group-sm .dls-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 50px;
        text-align: center;
    }
}

/* Interface Details */
.dls-interface-details {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.dls-interface-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dls-interface-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dls-interface-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.dls-interface-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.dls-interface-name {
    font-weight: 600;
    color: var(--dls-primary, #007bff);
    font-size: 16px;
    margin-bottom: 5px;
}

/* Table Enhancements for Usage Reports */
.dls-table-total {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: 2px solid #e9ecef;
}

.dls-table-total td {
    padding: 12px 8px;
}

/* Progress Bar for Email Quota */
.dls-progress {
    background-color: #e9ecef;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.dls-progress-bar {
    background-color: var(--dls-primary, #007bff);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.dls-progress-bar.dls-progress-warning {
    background-color: #ffc107;
}

.dls-progress-bar.dls-progress-danger {
    background-color: #dc3545;
}

/* Email Quota Specific Styling */
.dls-quota-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

@media screen and (max-width: 768px) {
    .dls-quota-status {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

/* ============================================================================
 * MOBILE RESPONSIVE STYLES
 * ============================================================================ */

/* Mobile responsive - hide sidebar, show hamburger menu */
@media screen and (max-width: 768px) {
    .dls-layout {
        flex-direction: column !important;
    }
    
    .dls-sidebar {
        display: none !important; /* Hide sidebar on mobile */
    }
    
    .dls-main-content {
        max-width: 100% !important; /* Use full available width on mobile */
        flex: 1 !important;
        width: 100% !important;
    }
}

/* Mobile sidebar overlay */
.dls-sidebar-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}


.dls-sidebar-mobile-overlay.active {
    display: block;
}

.dls-sidebar-mobile-panel {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: white;
    transition: left 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.dls-sidebar-mobile-panel.active {
    left: 0;
}

.dls-sidebar-mobile-header {
    background: #5e91c9;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dls-sidebar-mobile-title {
    font-weight: 600;
    font-size: 16px;
}

.dls-sidebar-mobile-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Customer Context Switcher Styles */
.dls-customer-picker {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dls-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.dls-picker-row:last-child {
    margin-bottom: 0;
}

/* Desktop: Single row layout for all picker elements */
@media screen and (min-width: 769px) {
    .dls-customer-picker .dls-picker-form {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
    }
    
    .dls-picker-row {
        display: flex;
        margin-bottom: 0;
        flex: none;
        gap: 10px;
    }
    
    .dls-picker-row .dls-picker-label {
        white-space: nowrap;
        margin-right: 10px;
    }
}

.dls-picker-select {
    min-width: 250px;
    flex: 1;
}

/* Form elements and buttons should have consistent height */
input[type="text"],
input[type="email"],
input[type="password"],
select,
.dls-form-control {
    width: 100%; /* Always use full width */
    height: 38px; /* Consistent height */
    padding: 6px 12px;
    /* font-size removed - inherits from parent/body for flexibility */
    box-sizing: border-box;
    border: 1px solid #dee2e6; /* Softer border color like IPDB */
    border-radius: 4px;
    line-height: 1.2;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    -webkit-appearance: none; /* Remove default browser styling */
    -moz-appearance: none;
    appearance: none;
}

/* Add dropdown arrow for single-select elements (not multiselects) */
select.dls-form-control:not([multiple]),
select:not([multiple]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8.5L2 4.5h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    cursor: pointer;
}

/* Hover state */
.dls-form-control:hover:not(:disabled):not([readonly]) {
    border-color: #b8c4ce;
}

/* Focus state with subtle shadow like IPDB */
.dls-form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Disabled state */
.dls-form-control:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Read-only state (for inputs and selects) */
.dls-form-control[readonly],
.dls-form-control.dls-field-readonly {
    background-color: #e9ecef;
    color: #495057;
    cursor: not-allowed;
    pointer-events: none;
}

/* Full width form control modifier */
.dls-form-control-full {
    width: 100%;
}

/* Auto width form control modifier - useful for inline selects in flex containers */
.dls-form-control-auto {
    width: auto;
}

/* Small form control - matches dls-btn-sm height */
.dls-form-control.dls-form-control-sm {
    height: 24px;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.2;
}

/* Small select controls need extra right padding for dropdown arrow */
select.dls-form-control.dls-form-control-sm {
    padding-right: 30px; /* Override the 8px from above to make room for arrow */
}

/* Medium form control - matches default dls-btn height */
/* This is the standard size for modal form controls that appear inline with buttons */
.dls-form-control.dls-form-control-md {
    height: 32px;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.3;
}

/* Large form control for prominent inputs */
.dls-form-control.dls-form-control-lg {
    height: 48px;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.4;
}

/* Read-only form display - styled like form inputs but for displaying static text */
.dls-form-control-plaintext {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 38px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Textarea should not have fixed height */
textarea.dls-form-control {
    height: auto;
    min-height: 80px;
    line-height: 1.4;
}

/* Small textarea */
textarea.dls-form-control-sm {
    min-height: 60px;
    padding: 4px 8px;
}

/* Medium textarea */
textarea.dls-form-control-md {
    min-height: 70px;
    padding: 4px 10px;
}

/* Large textarea */
textarea.dls-form-control-lg {
    min-height: 120px;
    padding: 10px 16px;
}

/* ==========================================================================
   Toggle Switch Component
   Modern on/off toggle switch for instant state changes
   ========================================================================== */

/* Toggle switch container */
.dls-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}

/* Hide default checkbox */
.dls-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Toggle slider background */
.dls-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

/* Toggle slider knob */
.dls-toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

/* Checked state - blue background */
.dls-toggle input:checked + .dls-toggle-slider {
    background-color: #007bff;
}

/* Checked state - move knob to right */
.dls-toggle input:checked + .dls-toggle-slider::before {
    transform: translateX(20px);
}

/* Disabled state */
.dls-toggle input:disabled + .dls-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hover effect (non-disabled) */
.dls-toggle input:not(:disabled) + .dls-toggle-slider:hover {
    opacity: 0.9;
}

/* Focus indicator for accessibility */
.dls-toggle input:focus + .dls-toggle-slider {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Small toggle variant */
.dls-toggle-sm {
    width: 36px;
    height: 20px;
}

.dls-toggle-sm .dls-toggle-slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.dls-toggle-sm input:checked + .dls-toggle-slider::before {
    transform: translateX(16px);
}

/* Large toggle variant */
.dls-toggle-lg {
    width: 52px;
    height: 28px;
}

.dls-toggle-lg .dls-toggle-slider::before {
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
}

.dls-toggle-lg input:checked + .dls-toggle-slider::before {
    transform: translateX(24px);
}

/* Toggle with label wrapper */
.dls-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.dls-toggle-wrapper .dls-toggle {
    flex-shrink: 0;
}

.dls-toggle-label {
    font-size: 13px;
    color: #333;
}

/* Success variant (green) */
.dls-toggle-success input:checked + .dls-toggle-slider {
    background-color: #28a745;
}

/* Danger variant (red) */
.dls-toggle-danger input:checked + .dls-toggle-slider {
    background-color: #dc3545;
}

/* Warning variant (orange) */
.dls-toggle-warning input:checked + .dls-toggle-slider {
    background-color: #ffc107;
}

.dls-picker-manual {
    flex: 1;
    max-width: 150px;
}

/* Form Container */
.dls-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Mobile form centering */
@media (max-width: 768px) {
    .dls-form {
        padding: 0 15px;
        box-sizing: border-box;
    }
}

/* Form Layout Classes */
.dls-form-group {
    margin-bottom: 15px;
}

.dls-form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #3f51b5;
}

/* Required field indicator */
.dls-required {
    color: #dc3545;
    margin-left: 2px;
}




/* === Spacing Utilities === */
/* Scale: 0, 0.25rem, 0.5rem, 1rem, 1.5rem, 2rem */
:root {
  --dls-space-0:   0;
  --dls-space-1:   0.25rem;  /* 4px */
  --dls-space-2:   0.5rem;   /* 8px */
  --dls-space-3:   1rem;     /* 16px */
  --dls-space-4:   1.5rem;   /* 24px */
  --dls-space-5:   2rem;     /* 32px */
}

/* Margin (all sides) */
.dls-m-0  { margin: var(--dls-space-0); }
.dls-m-1  { margin: var(--dls-space-1); }
.dls-m-2  { margin: var(--dls-space-2); }
.dls-m-3  { margin: var(--dls-space-3); }
.dls-m-4  { margin: var(--dls-space-4); }
.dls-m-5  { margin: var(--dls-space-5); }

/* Margin-top */
.dls-mt-0 { margin-top: var(--dls-space-0); }
.dls-mt-1 { margin-top: var(--dls-space-1); }
.dls-mt-2 { margin-top: var(--dls-space-2); }
.dls-mt-3 { margin-top: var(--dls-space-3); }
.dls-mt-4 { margin-top: var(--dls-space-4); }
.dls-mt-5 { margin-top: var(--dls-space-5); }

/* Margin-right */
.dls-mr-0 { margin-right: var(--dls-space-0); }
.dls-mr-1 { margin-right: var(--dls-space-1); }
.dls-mr-2 { margin-right: var(--dls-space-2); }
.dls-mr-3 { margin-right: var(--dls-space-3); }
.dls-mr-4 { margin-right: var(--dls-space-4); }
.dls-mr-5 { margin-right: var(--dls-space-5); }

/* Margin-bottom */
.dls-mb-0 { margin-bottom: var(--dls-space-0); }
.dls-mb-1 { margin-bottom: var(--dls-space-1); }
.dls-mb-2 { margin-bottom: var(--dls-space-2); }
.dls-mb-3 { margin-bottom: var(--dls-space-3); }
.dls-mb-4 { margin-bottom: var(--dls-space-4); }
.dls-mb-5 { margin-bottom: var(--dls-space-5); }

/* Margin-left */
.dls-ml-0 { margin-left: var(--dls-space-0); }
.dls-ml-1 { margin-left: var(--dls-space-1); }
.dls-ml-2 { margin-left: var(--dls-space-2); }
.dls-ml-3 { margin-left: var(--dls-space-3); }
.dls-ml-4 { margin-left: var(--dls-space-4); }
.dls-ml-5 { margin-left: var(--dls-space-5); }

/* Margin-x (left & right) */
.dls-mx-0 { margin-left: var(--dls-space-0); margin-right: var(--dls-space-0); }
.dls-mx-1 { margin-left: var(--dls-space-1); margin-right: var(--dls-space-1); }
.dls-mx-2 { margin-left: var(--dls-space-2); margin-right: var(--dls-space-2); }
.dls-mx-3 { margin-left: var(--dls-space-3); margin-right: var(--dls-space-3); }
.dls-mx-4 { margin-left: var(--dls-space-4); margin-right: var(--dls-space-4); }
.dls-mx-5 { margin-left: var(--dls-space-5); margin-right: var(--dls-space-5); }

/* Margin-y (top & bottom) */
.dls-my-0 { margin-top: var(--dls-space-0); margin-bottom: var(--dls-space-0); }
.dls-my-1 { margin-top: var(--dls-space-1); margin-bottom: var(--dls-space-1); }
.dls-my-2 { margin-top: var(--dls-space-2); margin-bottom: var(--dls-space-2); }
.dls-my-3 { margin-top: var(--dls-space-3); margin-bottom: var(--dls-space-3); }
.dls-my-4 { margin-top: var(--dls-space-4); margin-bottom: var(--dls-space-4); }
.dls-my-5 { margin-top: var(--dls-space-5); margin-bottom: var(--dls-space-5); }


/* Column utilities for forms */
.dls-col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.dls-col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.dls-col-3 { flex: 0 0 25%; max-width: 25%; }
.dls-col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.dls-col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.dls-col-6 { flex: 0 0 50%; max-width: 50%; }
.dls-col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.dls-col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.dls-col-9 { flex: 0 0 75%; max-width: 75%; }
.dls-col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.dls-col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.dls-col-12 { flex: 0 0 100%; max-width: 100%; }

/* Make columns responsive on mobile */
@media (max-width: 768px) {
    [class*="dls-col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.dls-form-col {
    flex: 2;
    min-width: 150px;
}

.dls-form-col-state {
    flex: 1;
    min-width: 80px;
}

.dls-form-col-zip {
    flex: 1;
    min-width: 80px;
}


/* Flex row for side-by-side form fields - full width 50/50 split */
.dls-form-row-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 15px; /* Match dls-form-group spacing */
    align-items: flex-start;
}

.dls-flex-1 {
    flex: 1;
    min-width: 0; /* Allow true 50/50 split */
}

/* Remove bottom margin from form groups inside flex rows */
.dls-form-row-flex .dls-form-group {
    margin-bottom: 0;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .dls-form-row-flex {
        flex-direction: column;
        gap: 0;
    }
    
    .dls-flex-1 {
        width: 100%;
        min-width: 100%;
    }
    
    /* Restore margin for mobile stacked layout */
    .dls-form-row-flex .dls-form-group {
        margin-bottom: 15px;
    }
    
    /* Remove margin from last item */
    .dls-form-row-flex .dls-form-group:last-child {
        margin-bottom: 0;
    }
}

/* Ensure full width usage on larger screens */
@media (min-width: 768px) {
    .dls-form-row-flex {
        gap: 30px;
    }
}

/* Label-on-left form row with fixed-width labels for aligned inputs */
.dls-form-row-labeled {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.dls-form-row-labeled > label {
    min-width: 120px;
    max-width: 120px;
    flex-shrink: 0;
}

.dls-form-row-labeled > :not(label) {
    flex: 1;
    min-width: 0;
}

/* Mobile: stack labels on top */
@media (max-width: 767px) {
    .dls-form-row-labeled {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .dls-form-row-labeled > label {
        min-width: 100%;
        max-width: 100%;
    }
}



/* Picker button styling */
.dls-picker-find,
.dls-picker-view,
.dls-picker-clear {
    white-space: nowrap;
    flex-shrink: 0;
}

.dls-picker-clear {
    background-color: #6c757d;
    border-color: #5a6268;
}

.dls-picker-clear:hover {
    background-color: #5a6268;
    border-color: #4e555b;
}

/* ==========================================
   ADDRESS/PHONE MANAGER - MINIMAL ADDITIONS
   ========================================== */

/* Only add what's truly missing from the existing framework */
.dls-cards-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .dls-cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ==========================================
   QUICK BROWSE COMPONENT
   ========================================== */

/* Quick Browse Container */
.dls-quick-browse-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Quick Browse Button - uses standard button classes for styling */
.dls-quick-browse-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dls-quick-browse-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}


/* Info Grid for condensed table-like layouts (e.g., Summary Report) */
.dls-info-grid {
    display: block;
}

.dls-info-grid .dls-info-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
}

.dls-info-grid .dls-info-row:first-child {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.dls-info-grid .dls-info-label {
    font-weight: normal;
    flex: unset;
    text-align: left;
}

.dls-info-grid .dls-info-value {
    text-align: center;
}

/* Mobile responsive for grid */
@media (max-width: 576px) {
    .dls-info-grid .dls-info-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 0.875rem;
    }
}

/* Standalone info row (flexbox layout) */
.dls-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.dls-info-row:last-child {
    border-bottom: none;
}

/* Form Components */
.dls-form-inline {
    display: inline-block;
    margin: 0 4px 4px 0;
}





.dls-input-group-text {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-right: 0;
    padding: 6px 12px;
    font-size: 11px;
    line-height: 1.5;
    color: #495057;
    display: flex;
    align-items: center;
}

.dls-input-group .dls-form-control {
    border-radius: 4px;
    flex: 1;
}

.dls-input-group .dls-btn {
    border-radius: 4px;
    margin-left: -1px;
}

/* Form Actions */
.dls-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

/* Alert Messages - See lines 3635+ for actual definitions */

/* Base List Styling - Default indentation for standard lists */
ul, ol {
    padding-left: 1.5rem; /* 24px - standard list indent */
    margin-bottom: 1rem;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

/* Nested lists */
ul ul, ol ul {
    list-style-type: circle;
}

ul ul ul, ol ul ul {
    list-style-type: square;
}

.dls-list-unstyled {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.dls-list-unstyled li {
    margin-bottom: 5px;
}

.dls-list-unstyled li:last-child {
    margin-bottom: 0;
}


/* Small stat cards for compact display */
.dls-stat-sm {
    padding: 10px !important;
    min-height: auto !important;
}

.dls-stat-sm .dls-stat-label {
    font-size: 10px !important;
}

.dls-stat-sm .dls-stat-value {
    font-size: 14px !important;
}

/* Display Utilities */
.dls-hidden {
    display: none !important;
}

.dls-d-none {
    display: none !important;
}

.dls-d-block {
    display: block !important;
}

.dls-d-inline-block {
    display: inline-block !important;
}

.dls-d-flex {
    display: flex !important;
}

/* Badge Components */
/* Badge definition removed - using the one at line 2653 which has font-size: 12px */

/* Badge color variants - See lines 2874+ for actual definitions */

/* Desktop Dropdown */
.dls-quick-browse-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 280px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 400px;
    overflow-y: auto;
}

.dls-quick-browse-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Header (hidden on desktop) */
.dls-quick-browse-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.dls-quick-browse-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.dls-quick-browse-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.dls-quick-browse-close:hover {
    background: #e9ecef;
    color: #333;
}

/* Responsive Utility Classes */
.dls-hide-mobile {
    display: block;
}

.dls-show-mobile {
    display: none;
}

/* Display Utilities */
.dls-inline-form {
    display: inline;
}

.dls-inline-block {
    display: inline-block;
}

.dls-text-center {
    text-align: center;
}

.dls-table th.dls-text-center,
.dls-table td.dls-text-center {
    text-align: center !important;
}

/* ==========================================================================
   TEXT SIZE UTILITIES
   Base text size: 13px (inherited from body)
   ========================================================================== */

/* Base text class - explicitly sets to base size */
.dls-text {
    font-size: 13px;
    line-height: 1.4;
}

/* Text size modifiers - Aligned with badge sizes */
.dls-text-xs {
    font-size: 10px;
    line-height: 1.3;
}

.dls-text-sm {
    font-size: 11px;    /* Matches dls-badge-sm */
    line-height: 1.4;
}

.dls-text-md {
    font-size: 12px;    /* Matches dls-badge */
    line-height: 1.4;
}

.dls-text-lg {
    font-size: 14px;    /* Matches dls-btn default */
    line-height: 1.5;
}

.dls-text-xl {
    font-size: 16px;
    line-height: 1.5;
}

.dls-text-xxl {
    font-size: 20px;
    line-height: 1.6;
}

/* ==========================================================================
   TINYMCE RICH TEXT CONTENT DISPLAY
   Styles for HTML content generated by TinyMCE editor
   Applied within .dls-text containers that hold TinyMCE output
   ========================================================================== */

/* Lists within TinyMCE content */
.dls-text ul,
.dls-text ol {
    margin: 10px 0;
    padding-left: 30px;
}

.dls-text li {
    margin-bottom: 5px;
    line-height: 1.6;
}

/* Nested lists - reduce spacing */
.dls-text ul ul,
.dls-text ul ol,
.dls-text ol ul,
.dls-text ol ol {
    margin: 5px 0;
}

/* TinyMCE/Quill indent classes for nested list items */
.dls-text .ql-indent-1 {
    padding-left: 3em;
}

.dls-text .ql-indent-2 {
    padding-left: 6em;
}

.dls-text .ql-indent-3 {
    padding-left: 9em;
}

.dls-text .ql-indent-4 {
    padding-left: 12em;
}

.dls-text .ql-indent-5 {
    padding-left: 15em;
}

.dls-text .ql-indent-6 {
    padding-left: 18em;
}

.dls-text .ql-indent-7 {
    padding-left: 21em;
}

.dls-text .ql-indent-8 {
    padding-left: 24em;
}

/* Paragraphs within TinyMCE content */
.dls-text p {
    margin: 10px 0;
}

.dls-text p:first-child {
    margin-top: 0;
}

.dls-text p:last-child {
    margin-bottom: 0;
}

/* Flexbox Utilities */
.dls-flex {
    display: flex;
}

.dls-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-width: 0; /* Prevent flex items from overflowing */
}


.dls-flex-nowrap > *:first-child {
    flex: 0 0 auto; /* Don't grow or shrink */
    white-space: nowrap;
}

.dls-flex-nowrap > *:last-child {
    flex: 0 0 auto; /* Don't grow or shrink */
    white-space: nowrap;
    margin-left: auto; /* Push to the right */
}

/* Statistics Cards and Grid */
.dls-stat-card {
    background: white;
    border: 3px solid var(--dls-primary, #3498db);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
}

.dls-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dls-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--dls-primary, #3498db);
    margin-bottom: 5px;
}

.dls-stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dls-stat-card.dls-stat-warning {
    border-color: #ffc107;
    background: #fff9f1;
}

.dls-stat-warning .dls-stat-value {
    color: #ffc107;
}

.dls-stat-card.dls-stat-danger {
    border-color: #dc3545;
    background: #fff5f5;
}

.dls-stat-danger .dls-stat-value {
    color: #dc3545;
}

/* Statistics Grid Layout */
.dls-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .dls-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Statistics Flex Layout - Flexible alternative to grid */
.dls-stats-flex {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dls-stats-flex .dls-stat-card {
    flex: 1 1 auto;
    min-width: 150px;
}

/* Stat Card Clickable/Interactive */
.dls-stat-card.dls-stat-clickable {
    cursor: pointer;
}

.dls-stat-card.dls-stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Active/Selected state - Inverted colors */
.dls-stat-card.dls-stat-active,
.dls-stat-card.selected {
    background: var(--dls-primary, #3498db);
    border-color: var(--dls-primary, #3498db);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.dls-stat-card.dls-stat-active .dls-stat-value,
.dls-stat-card.dls-stat-active .dls-stat-label,
.dls-stat-card.dls-stat-active .dls-stat-sublabel,
.dls-stat-card.selected .dls-stat-value,
.dls-stat-card.selected .dls-stat-label,
.dls-stat-card.selected .dls-stat-sublabel {
    color: #fff;
}

/* Stat Card Disabled State */
.dls-stat-card.dls-stat-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Stat Sublabel - For additional descriptive text */
.dls-stat-sublabel {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .dls-stats-flex {
        flex-direction: column;
    }

    .dls-stats-flex .dls-stat-card {
        flex: 1 1 100%;
    }
}

/* Card Variations */
.dls-card-bordered {
    border: 1px solid #dee2e6;
}

.dls-card-header-light {
    background-color: #f8f9fa;
}

.dls-card-header h4 {
    margin: 0;
    font-size: 18px;
}

/* Upload Zone Styling */
.dls-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.dls-upload-zone:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.dls-upload-zone.dls-drag-over {
    border-color: #28a745;
    background: #f0fff0;
    transform: scale(1.02);
}

.dls-upload-zone.dls-drag-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.dls-upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.dls-upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.dls-upload-browse {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.dls-upload-browse:hover {
    color: #0056b3;
}

.dls-upload-formats {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

.dls-upload-progress {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
}

.dls-upload-progress .upload-filename {
    font-weight: bold;
    color: #28a745;
    margin-bottom: 4px;
}

.dls-upload-progress .upload-size {
    font-size: 12px;
    color: #666;
}

.dls-hide {
    display: none !important;
}

@media (max-width: 768px) {
    .dls-hide-mobile {
        display: none !important;
    }
    
    .dls-show-mobile {
        display: block !important;
    }
}

/* Menu Items */
.dls-quick-browse-items {
    padding: 10px 0;
}

.dls-quick-browse-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.15s ease;
    font-size: 14px;
}

.dls-quick-browse-item:hover {
    background: #f8f9fa;
    color: var(--dls-primary, #5e91c9);
    padding-left: 25px;
}

.dls-quick-browse-item:last-child {
    border-bottom: none;
}

/* Desktop Responsive - ≥769px */
@media screen and (min-width: 769px) {
    .dls-quick-browse-dropdown {
        /* Keep dropdown positioning on desktop */
        position: absolute;
        width: 280px;
        max-height: 400px;
    }
    
    /* Hover effects for desktop */
    .dls-quick-browse-btn:hover .dls-quick-browse-arrow {
        transform: rotate(180deg);
    }
}

/* Mobile Responsive - ≤768px */
@media screen and (max-width: 768px) {
    /* Transform dropdown into full-screen modal on mobile */
    .dls-quick-browse-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
        transform: translateY(100%);
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: flex-end;
    }
    
    .dls-quick-browse-dropdown.active {
        transform: translateY(0);
    }
    
    .dls-quick-browse-content {
        width: 100%;
        background: white;
        border-radius: 12px 12px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Show mobile header on mobile */
    .dls-quick-browse-mobile-header {
        display: flex;
    }
    
    /* Hide desktop-only content on mobile */
    .dls-desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only content on mobile */
    .dls-mobile-only {
        display: block !important;
    }
    
    /* Touch-friendly mobile items */
    .dls-quick-browse-item {
        padding: 16px 20px;
        font-size: 16px;
        border-bottom: 1px solid #eee;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .dls-quick-browse-item:hover {
        background: #f8f9fa;
        padding-left: 20px; /* Don't indent on mobile */
    }
}

/* ==========================================
   CUSTOMER SEARCH MODAL COMPONENT
   ========================================== */

/* Customer Search Modal - Base styles without visibility */
#customerSearchModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Note: Customer search modal uses inline styles with !important to override these */
/* Other modals still need these rules to function properly */

/* Hidden state - default for customer search modal */
#customerSearchModal:not(.active) {
    opacity: 0;
    visibility: hidden;
}

/* Visible state when active */
#customerSearchModal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay - Hidden by default */
div.dls-customer-search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Modal Overlay - Visible when active */
div.dls-customer-search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - High specificity */
div.dls-customer-search-modal-overlay .dls-customer-search-modal {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    max-width: 800px !important;
    width: 95% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    transform: translateY(-30px) !important;
    transition: transform 0.3s ease !important;
}

div.dls-customer-search-modal-overlay.active .dls-customer-search-modal {
    transform: translateY(0) !important;
}

/* Modal Header */
.dls-customer-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.dls-customer-search-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.dls-customer-search-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dls-customer-search-close:hover {
    background: #e9ecef;
    color: #333;
}

/* Modal Content */
.dls-customer-search-content {
    padding: 25px;
}

/* Search Form */
.dls-customer-search-form .dls-form-group {
    margin-bottom: 20px;
}


#customerSearchInput {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

#customerSearchInput:focus {
    outline: none;
    border-color: var(--dls-primary, #5e91c9);
    box-shadow: 0 0 0 3px rgba(94, 145, 201, 0.1);
}

/* Search Results */
.dls-customer-search-results {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    min-height: 200px;
}

.dls-customer-search-instructions {
    color: #666;
    line-height: 1.6;
}

.dls-customer-search-instructions ul {
    margin: 10px 0;
    padding-left: 20px;
}

.dls-customer-search-instructions li {
    margin: 5px 0;
}

.dls-customer-search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.dls-customer-search-placeholder {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #555;
    line-height: 1.6;
}

.dls-customer-search-placeholder ul {
    margin: 10px 0;
    padding-left: 20px;
}

.dls-customer-search-placeholder li {
    margin: 5px 0;
}

/* Mobile Responsive - ≤768px */
@media screen and (max-width: 768px) {
    div.dls-customer-search-modal-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }
    
    .dls-customer-search-modal {
        width: 100%;
        max-width: none;
        max-height: 80vh;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
        margin: 0;
        position: relative;
    }
    
    .dls-customer-search-modal-overlay.active .dls-customer-search-modal {
        transform: translateY(0);
    }
    
    .dls-customer-search-header {
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .dls-customer-search-content {
        padding: 20px;
    }
    
    /* Touch-friendly form elements */
    #customerSearchInput {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 16px;
        min-height: 48px;
    }
    
    .dls-customer-search-form .dls-btn {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* High specificity modal button styles to ensure DLS framework styling */
#customerSearchModal .dls-btn,
#customerSearchModal .dls-btn-primary,
#customerSearchModal .dls-btn-secondary {
    background: #007bff !important;
    color: white !important;
    min-height: 32px !important;
    padding: 6px 12px !important;
    margin: 4px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

#customerSearchModal .dls-btn-primary {
    background: #5e91c9 !important;
    border-color: #5e91c9 !important;
    color: white !important;
}

#customerSearchModal .dls-btn-primary:hover {
    background: #4a7ba7 !important;
    border-color: #4a7ba7 !important;
}

/* ===== IMPROVED ADDRESS/PHONE MANAGER LAYOUT ===== */

/* Page intro section */
.dls-page-intro {
    background: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--dls-primary);
    border-radius: 4px;
}

.dls-intro-text {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Section headers */

.dls-section-title {
    margin: 0;
    font-size: 1.5em;
    color: var(--dls-text);
    font-weight: 600;
}

/* Items list layout */
.dls-items-list {
    display: grid;
    gap: 20px;
}

/* Individual item cards */
.dls-item-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.dls-item-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dls-item-card.empty {
    border-style: dashed;
    background: #f8f9fa;
}

.dls-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dls-item-title {
    margin: 0;
    font-size: 1.2em;
    color: var(--dls-text);
    font-weight: 500;
}

.dls-item-content {
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.dls-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Address display */
.dls-address-display {
    font-size: 14px;
    line-height: 1.4;
}

.dls-address-line {
    margin-bottom: 4px;
}

.dls-address-line:last-child {
    margin-bottom: 0;
}

/* Phone display */
.dls-phone-display {
    font-size: 16px;
    font-weight: 500;
}

.dls-phone-number {
    color: var(--dls-primary);
    letter-spacing: 0.5px;
}

/* Empty state styling */
.dls-empty-state {
    text-align: center;
    padding: 20px 0;
}

.dls-empty-text {
    margin: 0;
    color: #888;
    font-style: italic;
}

/* Badge styling - Pill shape to distinguish from buttons */
.dls-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    min-height: 22px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    vertical-align: middle;
    box-sizing: border-box;
    cursor: default;
}

.dls-badge-primary {
    background: var(--dls-primary);
    color: #fff;
}

.dls-badge-danger {
    background: #dc3545;
    color: #fff;
}

.dls-badge-warning {
    background: #ffc107;
    color: #212529;
}

.dls-badge-success {
    background: #28a745;
    color: #fff;
}

.dls-badge-info {
    background: #17a2b8;
    color: #fff;
}

.dls-badge-secondary {
    background: #6c757d;
    color: #fff;
}

/* ==========================================================================
   METRIC CARDS - Standardized summary/stats cards with filter states
   Used for displaying key metrics that can act as interactive filters
   ========================================================================== */

/* Base metric card */
.dls-metric-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid;
    border-radius: 8px;
    min-width: 140px;
    flex: 1 1 auto;
    transition: all 0.2s ease;
    user-select: none;
}

/* Metric value - the large number */
.dls-metric-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Metric label - the description */
.dls-metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.2;
}

/* Optional icon for metrics */
.dls-metric-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

/* Color variants - matching badge color system */
.dls-metric-primary {
    border-color: #007bff;
    color: #007bff;
}
.dls-metric-primary .dls-metric-label {
    color: #004085;
}

.dls-metric-success {
    border-color: #28a745;
    color: #28a745;
}
.dls-metric-success .dls-metric-label {
    color: #155724;
}

.dls-metric-warning {
    border-color: #ffc107;
    color: #e0a800;
}
.dls-metric-warning .dls-metric-label {
    color: #856404;
}

.dls-metric-danger {
    border-color: #dc3545;
    color: #dc3545;
}
.dls-metric-danger .dls-metric-label {
    color: #721c24;
}

.dls-metric-info {
    border-color: #17a2b8;
    color: #17a2b8;
}
.dls-metric-info .dls-metric-label {
    color: #0c5460;
}

.dls-metric-secondary {
    border-color: #6c757d;
    color: #6c757d;
}
.dls-metric-secondary .dls-metric-label {
    color: #545b62;
}

/* Clickable metric cards */
.dls-metric-clickable {
    cursor: pointer;
}

.dls-metric-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Active/Selected state for filters */
.dls-metric-active {
    transform: scale(1.02);
    border-width: 3px;
}

.dls-metric-primary.dls-metric-active {
    background: #007bff;
    border-color: #0056b3;
}
.dls-metric-primary.dls-metric-active .dls-metric-value,
.dls-metric-primary.dls-metric-active .dls-metric-label {
    color: white;
}

.dls-metric-success.dls-metric-active {
    background: #28a745;
    border-color: #1e7e34;
}
.dls-metric-success.dls-metric-active .dls-metric-value,
.dls-metric-success.dls-metric-active .dls-metric-label {
    color: white;
}

.dls-metric-warning.dls-metric-active {
    background: #ffc107;
    border-color: #d39e00;
}
.dls-metric-warning.dls-metric-active .dls-metric-value,
.dls-metric-warning.dls-metric-active .dls-metric-label {
    color: #212529;
}

.dls-metric-danger.dls-metric-active {
    background: #dc3545;
    border-color: #bd2130;
}
.dls-metric-danger.dls-metric-active .dls-metric-value,
.dls-metric-danger.dls-metric-active .dls-metric-label {
    color: white;
}

.dls-metric-info.dls-metric-active {
    background: #17a2b8;
    border-color: #117a8b;
}
.dls-metric-info.dls-metric-active .dls-metric-value,
.dls-metric-info.dls-metric-active .dls-metric-label {
    color: white;
}

.dls-metric-secondary.dls-metric-active {
    background: #6c757d;
    border-color: #545b62;
}
.dls-metric-secondary.dls-metric-active .dls-metric-value,
.dls-metric-secondary.dls-metric-active .dls-metric-label {
    color: white;
}

/* Pressed state */
.dls-metric-clickable:active {
    transform: scale(0.98);
}

/* Disabled state */
.dls-metric-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Container for metric cards */
.dls-metric-group {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem; /* Negative margin to offset card margins */
}

.dls-metric-group > .dls-metric-card {
    margin: 0.5rem; /* Space between cards */
}

/* Responsive behavior - cards expand to fill width */
@media (min-width: 1401px) {
    .dls-metric-card {
        flex: 1 1 calc(16.666% - 1rem); /* 6 cards per row */
    }
}

@media (max-width: 1400px) {
    .dls-metric-card {
        flex: 1 1 calc(20% - 1rem); /* 5 cards per row */
    }
}

@media (max-width: 1200px) {
    .dls-metric-card {
        flex: 1 1 calc(25% - 1rem); /* 4 cards per row */
    }
}

@media (max-width: 992px) {
    .dls-metric-card {
        flex: 1 1 calc(33.333% - 1rem); /* 3 cards per row */
    }
}

@media (max-width: 768px) {
    .dls-metric-card {
        flex: 1 1 calc(50% - 1rem); /* 2 cards per row */
        min-width: 120px;
    }
    
    .dls-metric-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dls-metric-card {
        flex: 1 1 calc(100% - 1rem); /* 1 card per row */
    }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .dls-section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .dls-section-header .dls-btn {
        align-self: center;
        min-width: 200px;
    }
    
    .dls-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dls-item-actions {
        justify-content: center;
    }
    
    .dls-item-actions .dls-btn {
        flex: 1;
        min-width: 100px;
    }
}

/* Desktop enhancements */
@media screen and (min-width: 769px) {
    .dls-items-list {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .dls-item-card:hover {
        transform: translateY(-2px);
    }
}

/* ===== CLEAN CSS TABS - HIGH CONTRAST ===== */

.dls-tabs {
    width: 100%;
    margin: 0;
}

.dls-tabs > input[type="radio"] {
    display: none;
}


/* Default tab label styling */
.dls-tab-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10.8px 14.4px;
    background: #ffffff;
    color: #495057;
    cursor: pointer;
    border: none;
    font-weight: 500;
    font-size: 16px;
    gap: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: visible;
    position: relative;
}

/* Separator between tabs */
.dls-tab-label:not(:last-of-type) {
    border-right: 1px solid #e0e0e0;
}

/* Rounded corners on outer edges of first/last tabs */
.dls-tab-label:first-of-type {
    border-radius: 7px 0 0 7px;
}

.dls-tab-label:last-of-type {
    border-radius: 0 7px 7px 0;
}

/* Auto-width tabs - use this modifier when you want tabs to size based on content */
.dls-tab-nav-auto .dls-tab-label {
    flex: 0 1 auto;
}

/* Compact padding for tabs - use when you need less padding */
.dls-tab-label-compact {
    padding: 8px 12px;
}

/* Extra small padding for tabs */
.dls-tab-label-xs {
    padding: 6px 10px;
}

.dls-tab-icon {
    font-size: 20px;
}

.dls-tab-text {
    font-size: 14px;
    font-weight: 500;
}

/* Tab action link (e.g., + to add new item) - Styled as circular button */
.dls-tab-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #6c757d;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 24px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    padding: 0;
    text-align: center;
}

.dls-tab-action:hover {
    background-color: #007bff;
    transform: translateY(-50%) scale(1.15);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,123,255,0.4);
}

/* Tab help icon - positioned at far right of tab */
.dls-tab-label .dls-tab-help {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

/* Tab action link in active tab - lighter gray background */
.dls-tab-label.dls-tab-active .dls-tab-action,
#tab-messages:checked ~ .dls-tab-nav label[for="tab-messages"] .dls-tab-action,
#tab-calls:checked ~ .dls-tab-nav label[for="tab-calls"] .dls-tab-action,
#tab-notes:checked ~ .dls-tab-nav label[for="tab-notes"] .dls-tab-action {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Hover state for active tab action link */
.dls-tab-label.dls-tab-active .dls-tab-action:hover,
#tab-messages:checked ~ .dls-tab-nav label[for="tab-messages"] .dls-tab-action:hover,
#tab-calls:checked ~ .dls-tab-nav label[for="tab-calls"] .dls-tab-action:hover,
#tab-notes:checked ~ .dls-tab-nav label[for="tab-notes"] .dls-tab-action:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 2px 5px rgba(255,255,255,0.4);
}

/* Active tab styling - Automatic based on :checked radio button state */
/* Generic rule for common tab patterns - add specific IDs as needed per page */
#tab-addresses:checked ~ .dls-tab-nav label[for="tab-addresses"],
#tab-phones:checked ~ .dls-tab-nav label[for="tab-phones"],
#tab-features:checked ~ .dls-tab-nav label[for="tab-features"],
#tab-howto:checked ~ .dls-tab-nav label[for="tab-howto"],
#tab-pricing:checked ~ .dls-tab-nav label[for="tab-pricing"],
#tab-staff:checked ~ .dls-tab-nav label[for="tab-staff"],
#tab-customer:checked ~ .dls-tab-nav label[for="tab-customer"],
#tab-general:checked ~ .dls-tab-nav label[for="tab-general"],
#tab-problem:checked ~ .dls-tab-nav label[for="tab-problem"],
#tab-messages:checked ~ .dls-tab-nav label[for="tab-messages"],
#tab-calls:checked ~ .dls-tab-nav label[for="tab-calls"],
#tab-notes:checked ~ .dls-tab-nav label[for="tab-notes"],
#tab-activity:checked ~ .dls-tab-nav label[for="tab-activity"],
#tab-attachments:checked ~ .dls-tab-nav label[for="tab-attachments"],
#tab-update:checked ~ .dls-tab-nav label[for="tab-update"],
#tab-history:checked ~ .dls-tab-nav label[for="tab-history"],
#tab-new:checked ~ .dls-tab-nav label[for="tab-new"],
#ticket-tab-messages:checked ~ .dls-tab-nav label[for="ticket-tab-messages"],
#ticket-tab-notes:checked ~ .dls-tab-nav label[for="ticket-tab-notes"],
#ticket-tab-calls:checked ~ .dls-tab-nav label[for="ticket-tab-calls"],
#ticket-tab-attachments:checked ~ .dls-tab-nav label[for="ticket-tab-attachments"],
#ticket-tab-activity:checked ~ .dls-tab-nav label[for="ticket-tab-activity"],
#ticket-tab-update:checked ~ .dls-tab-nav label[for="ticket-tab-update"],
#tab-record:checked ~ .dls-tab-nav label[for="tab-record"],
#tab-view:checked ~ .dls-tab-nav label[for="tab-view"],
#tab-comp:checked ~ .dls-tab-nav label[for="tab-comp"],
#tab-mytimecard:checked ~ .dls-tab-nav label[for="tab-mytimecard"],
#tab-team:checked ~ .dls-tab-nav label[for="tab-team"],
#tab-allstaff:checked ~ .dls-tab-nav label[for="tab-allstaff"],
#tab-invoices:checked ~ .dls-tab-nav label[for="tab-invoices"],
#tab-quotes:checked ~ .dls-tab-nav label[for="tab-quotes"],
#tab-payments:checked ~ .dls-tab-nav label[for="tab-payments"] {
    background: #007bff;
    color: #ffffff;
    font-weight: 600;
}

#tab-addresses:checked ~ .dls-tab-nav label[for="tab-addresses"] .dls-tab-icon,
#tab-addresses:checked ~ .dls-tab-nav label[for="tab-addresses"] .dls-tab-text,
#tab-addresses:checked ~ .dls-tab-nav label[for="tab-addresses"] .dls-tab-action,
#tab-phones:checked ~ .dls-tab-nav label[for="tab-phones"] .dls-tab-icon,
#tab-phones:checked ~ .dls-tab-nav label[for="tab-phones"] .dls-tab-text,
#tab-phones:checked ~ .dls-tab-nav label[for="tab-phones"] .dls-tab-action,
#tab-features:checked ~ .dls-tab-nav label[for="tab-features"] .dls-tab-text,
#tab-features:checked ~ .dls-tab-nav label[for="tab-features"] .dls-tab-action,
#tab-howto:checked ~ .dls-tab-nav label[for="tab-howto"] .dls-tab-text,
#tab-howto:checked ~ .dls-tab-nav label[for="tab-howto"] .dls-tab-action,
#tab-pricing:checked ~ .dls-tab-nav label[for="tab-pricing"] .dls-tab-text,
#tab-pricing:checked ~ .dls-tab-nav label[for="tab-pricing"] .dls-tab-action,
#tab-staff:checked ~ .dls-tab-nav label[for="tab-staff"] .dls-tab-text,
#tab-staff:checked ~ .dls-tab-nav label[for="tab-staff"] .dls-tab-action,
#tab-customer:checked ~ .dls-tab-nav label[for="tab-customer"] .dls-tab-text,
#tab-customer:checked ~ .dls-tab-nav label[for="tab-customer"] .dls-tab-action,
#tab-general:checked ~ .dls-tab-nav label[for="tab-general"] .dls-tab-text,
#tab-general:checked ~ .dls-tab-nav label[for="tab-general"] .dls-tab-action,
#tab-problem:checked ~ .dls-tab-nav label[for="tab-problem"] .dls-tab-text,
#tab-problem:checked ~ .dls-tab-nav label[for="tab-problem"] .dls-tab-action,
#tab-messages:checked ~ .dls-tab-nav label[for="tab-messages"] .dls-tab-text,
#tab-messages:checked ~ .dls-tab-nav label[for="tab-messages"] .dls-tab-action,
input[id^="tab-messages"]:checked ~ .dls-tab-nav label[for^="tab-messages"] .dls-tab-text,
input[id^="tab-messages"]:checked ~ .dls-tab-nav label[for^="tab-messages"] .dls-tab-action,
#tab-calls:checked ~ .dls-tab-nav label[for="tab-calls"] .dls-tab-text,
#tab-calls:checked ~ .dls-tab-nav label[for="tab-calls"] .dls-tab-action,
input[id^="tab-calls"]:checked ~ .dls-tab-nav label[for^="tab-calls"] .dls-tab-text,
input[id^="tab-calls"]:checked ~ .dls-tab-nav label[for^="tab-calls"] .dls-tab-action,
#tab-notes:checked ~ .dls-tab-nav label[for="tab-notes"] .dls-tab-text,
#tab-notes:checked ~ .dls-tab-nav label[for="tab-notes"] .dls-tab-action,
input[id^="tab-notes"]:checked ~ .dls-tab-nav label[for^="tab-notes"] .dls-tab-text,
input[id^="tab-notes"]:checked ~ .dls-tab-nav label[for^="tab-notes"] .dls-tab-action,
#tab-activity:checked ~ .dls-tab-nav label[for="tab-activity"] .dls-tab-text,
#tab-activity:checked ~ .dls-tab-nav label[for="tab-activity"] .dls-tab-action,
input[id^="tab-activity"]:checked ~ .dls-tab-nav label[for^="tab-activity"] .dls-tab-text,
input[id^="tab-activity"]:checked ~ .dls-tab-nav label[for^="tab-activity"] .dls-tab-action,
#tab-attachments:checked ~ .dls-tab-nav label[for="tab-attachments"] .dls-tab-text,
#tab-attachments:checked ~ .dls-tab-nav label[for="tab-attachments"] .dls-tab-action,
input[id^="tab-attachments"]:checked ~ .dls-tab-nav label[for^="tab-attachments"] .dls-tab-text,
input[id^="tab-attachments"]:checked ~ .dls-tab-nav label[for^="tab-attachments"] .dls-tab-action,
#tab-update:checked ~ .dls-tab-nav label[for="tab-update"] .dls-tab-text,
#tab-update:checked ~ .dls-tab-nav label[for="tab-update"] .dls-tab-action,
#tab-history:checked ~ .dls-tab-nav label[for="tab-history"] .dls-tab-text,
#tab-history:checked ~ .dls-tab-nav label[for="tab-history"] .dls-tab-action,
#tab-new:checked ~ .dls-tab-nav label[for="tab-new"] .dls-tab-text,
#tab-new:checked ~ .dls-tab-nav label[for="tab-new"] .dls-tab-action,
#tab-record:checked ~ .dls-tab-nav label[for="tab-record"] .dls-tab-text,
#tab-record:checked ~ .dls-tab-nav label[for="tab-record"] .dls-tab-action,
#tab-view:checked ~ .dls-tab-nav label[for="tab-view"] .dls-tab-text,
#tab-view:checked ~ .dls-tab-nav label[for="tab-view"] .dls-tab-action,
#tab-comp:checked ~ .dls-tab-nav label[for="tab-comp"] .dls-tab-text,
#tab-comp:checked ~ .dls-tab-nav label[for="tab-comp"] .dls-tab-action,
#tab-mytimecard:checked ~ .dls-tab-nav label[for="tab-mytimecard"] .dls-tab-text,
#tab-team:checked ~ .dls-tab-nav label[for="tab-team"] .dls-tab-text,
#tab-allstaff:checked ~ .dls-tab-nav label[for="tab-allstaff"] .dls-tab-text,
#tab-invoices:checked ~ .dls-tab-nav label[for="tab-invoices"] .dls-tab-text,
#tab-quotes:checked ~ .dls-tab-nav label[for="tab-quotes"] .dls-tab-text,
#tab-payments:checked ~ .dls-tab-nav label[for="tab-payments"] .dls-tab-text {
    color: #ffffff;
    opacity: 1;
}

/* Active tab styling - Manual class (for JavaScript-based tabs) */
.dls-tab-label.dls-tab-active {
    background: #007bff;
    color: #ffffff;
    font-weight: 600;
    border: 3px solid #007bff;
    box-sizing: border-box;
}

/* Remove border on side adjacent to inactive tab */
.dls-tab-label.dls-tab-active:first-of-type {
    border-right: none;
}

.dls-tab-label.dls-tab-active:last-of-type {
    border-left: none;
}

.dls-tab-label.dls-tab-active .dls-tab-icon,
.dls-tab-label.dls-tab-active .dls-tab-text {
    color: #ffffff;
}

/* Tab content panels are direct siblings of radio buttons */
.dls-tab-panel {
    display: none;
    width: 100%;
    margin-top: 20px;
}

/* Show active panels - direct sibling selectors */
#tab-general:checked ~ .dls-tab-nav ~ #general-section,
#tab-addresses:checked ~ .dls-tab-nav ~ #addresses-section,
#tab-phones:checked ~ .dls-tab-nav ~ #phones-section,
#tab-features:checked ~ .dls-tab-nav ~ #features-section,
#tab-howto:checked ~ .dls-tab-nav ~ #howto-section,
#tab-pricing:checked ~ .dls-tab-nav ~ #pricing-section,
#tab-staff:checked ~ .dls-tab-nav ~ #staff-section,
#tab-customer:checked ~ .dls-tab-nav ~ #customer-section,
#tab-mytimecard:checked ~ .dls-tab-nav ~ #myTimecardPanel,
#tab-team:checked ~ .dls-tab-nav ~ #teamPanel,
#tab-allstaff:checked ~ .dls-tab-nav ~ #allStaffPanel,
#tab-invoices:checked ~ .dls-tab-nav ~ #invoices-section,
#tab-quotes:checked ~ .dls-tab-nav ~ #quotes-section,
#tab-payments:checked ~ .dls-tab-nav ~ #payments-section {
    display: block;
}

#customerSearchModal .dls-btn-secondary {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

#customerSearchModal .dls-btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
}

/* Customer search result styles */
.dls-customer-results {
    max-height: 300px;
    overflow-y: auto;
}

.dls-customer-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f9f9f9;
}

.dls-customer-info {
    flex-grow: 1;
}

.dls-customer-info strong {
    color: #333;
    font-size: 14px;
}

.dls-customer-info small {
    color: #666;
    font-size: 12px;
}

.dls-status-active {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.dls-status-inactive {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.dls-customer-search-error {
    text-align: center;
    padding: 20px;
    color: #dc3545;
}

.dls-customer-search-no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Ensure form elements in modals use full width */
.dls-customer-search-modal .dls-form-control,
.dls-customer-search-modal input[type="text"],
.dls-customer-search-modal input[type="tel"],
.dls-customer-search-modal input[type="email"],
.dls-customer-search-modal select,
.dls-customer-search-modal textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Standard button classes for use outside modal */
.dls-btn-primary {
    background: #5e91c9;
    border: 1px solid #5e91c9;
    color: white;
}

.dls-btn-primary:hover {
    background: #4a7ba7;
    border-color: #4a7ba7;
}

.dls-btn-secondary {
    background: #6c757d;
    border: 1px solid #6c757d;
    color: white;
}

.dls-btn-secondary:hover {
    background: #545b62;
    border-color: #4e555b;
}

.dls-btn-success {
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.dls-btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}


.dls-btn-info {
    background: #17a2b8;
    color: white;
    border: 1px solid #17a2b8;
}

.dls-btn-info:hover {
    background: #138496;
    border-color: #117a8b;
}


/* Soft Warm Neutral Button Colors - for sections with many buttons */
.dls-btn-sand {
    background: #D8CBB6;
    color: #5d4e37;
    border: 1px solid #D8CBB6;
}

.dls-btn-sand:hover {
    background: #cfc099;
    border-color: #c9b79d;
    color: #4a3d2a;
}

.dls-btn-accent {
    background: #9AA899;
    color: white;
    border: 1px solid #9AA899;
}

.dls-btn-accent:hover {
    background: #8a9889;
    border-color: #7a8879;
    color: white;
}

/* AI-Powered Button Styles */
.dls-btn-ai {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    color: white;
    border: 1px solid #6f42c1;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dls-btn-ai:hover {
    background: linear-gradient(135deg, #5a2d91 0%, #4a2277 100%);
    border-color: #5a2d91;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.dls-btn-ai:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.4);
}

/* AI Button with Icon Only */
.dls-btn-ai-icon {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    color: white;
    border: 1px solid #6f42c1;
    position: relative;
    overflow: hidden;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 8px 12px;
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome";
    font-size: 16px;
    min-width: 40px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dls-btn-ai-icon:before {
    content: "\f193"; /* FontAwesome wheelchair icon - AI accessibility assistance! */
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
}

.dls-btn-ai-icon:hover {
    background: linear-gradient(135deg, #5a2d91 0%, #4a2277 100%);
    border-color: #5a2d91;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.dls-btn-ai-icon:hover:before {
    animation: aiPulse 0.6s ease-in-out;
}

/* AI Button Pulse Animation */
@keyframes aiPulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

/* AI Button Loading State */
.dls-btn-ai.loading,
.dls-btn-ai-icon.loading {
    pointer-events: none;
    background: linear-gradient(135deg, #8e6cc0 0%, #7655a3 100%);
    position: relative;
}

.dls-btn-ai.loading:after,
.dls-btn-ai-icon.loading:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: aiShimmer 1.5s infinite;
}

@keyframes aiShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dls-btn-sm,
.dls-invoice-table .dls-btn-sm,
.dls-btn.dls-btn-sm {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-height: 24px !important;
    line-height: 16px !important;
}

.dls-btn-xs,
.dls-invoice-table .dls-btn-xs,
.dls-btn.dls-btn-xs {
    padding: 2px 6px !important;
    font-size: 10px !important;
    min-height: 20px !important;
    line-height: 16px !important;
}

.dls-btn-lg {
    padding: 12px 24px;
    font-size: 18px;
    min-height: 44px;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .dls-customer-picker {
        margin: -15px -15px 20px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .dls-picker-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dls-picker-select {
        width: 100%;
        min-width: unset;
    }
    
    .dls-picker-manual {
        flex: 1;
        min-width: 80px;
    }
    
    .dls-picker-row:first-child {
        gap: 15px;
    }
    
    .dls-picker-row:last-child {
        flex-direction: row;
        gap: 10px;
    }
    
    .dls-picker-row:last-child input[type="submit"] {
        flex-shrink: 0;
    }
}

/* ==========================================================================
   ALERT STYLES - Error/Success/Info/Warning Messages
   ========================================================================== */

.dls-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dls-alert h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
    color: inherit;
}

.dls-alert ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.dls-alert li {
    margin-bottom: 4px;
}

.dls-alert li:last-child {
    margin-bottom: 0;
}

/* Danger/Error Alert (Red) */
.dls-alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.dls-alert-danger h4 {
    color: #721c24;
}

/* Success Alert (Green) */
.dls-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.dls-alert-success h4 {
    color: #155724;
}

/* Info Alert (Blue) */
.dls-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.dls-alert-info h4 {
    color: #0c5460;
}

/* Warning Alert (Yellow) */
.dls-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.dls-alert-warning h4 {
    color: #856404;
}

/* Mobile responsive alerts */
@media (max-width: 768px) {
    .dls-alert {
        padding: 12px 16px;
        margin-bottom: 16px;
        font-size: 13px;
    }
    
    .dls-alert h4 {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .dls-alert ul {
        padding-left: 16px;
    }
}

/* ==========================================================================
   RADIO BUTTON GROUPS (for forms like email preferences)
   ========================================================================== */
.dls-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.dls-radio-item {
    display: flex;
    align-items: flex-start;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dls-radio-item:hover {
    background: #f1f3f5;
    border-color: #dee2e6;
}

.dls-radio-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    accent-color: var(--dls-primary, #007bff);
    cursor: pointer;
    flex-shrink: 0;
}

.dls-radio-label {
    cursor: pointer;
    flex-grow: 1;
    margin: 0;
}

.dls-radio-title {
    font-weight: 600;
    color: #212529;
    font-size: 16px;
    margin-bottom: 4px;
}

.dls-radio-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Selected state styling */
.dls-radio-input:checked + .dls-radio-label .dls-radio-title {
    color: var(--dls-primary, #007bff);
}

.dls-radio-item:has(.dls-radio-input:checked) {
    background: #e7f3ff;
    border-color: var(--dls-primary, #007bff);
}

/* Fallback for browsers without :has() support */
.dls-radio-item.selected {
    background: #e7f3ff;
    border-color: var(--dls-primary, #007bff);
}

.dls-radio-item.selected .dls-radio-title {
    color: var(--dls-primary, #007bff);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dls-radio-item {
        padding: 14px 12px;
    }
    
    .dls-radio-input {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
    
    .dls-radio-title {
        font-size: 15px;
    }
    
    .dls-radio-description {
        font-size: 13px;
    }
}

/* ==========================================================================
   ENHANCED BILLING STYLES - Professional PDF/CSV Buttons & Modern Table Design
   ========================================================================== */

/* Distinctive PDF/CSV button styling */
.dls-btn-pdf {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3) !important;
    transition: all 0.2s ease !important;
}

.dls-btn-pdf:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4) !important;
}

.dls-btn-csv {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.2s ease !important;
}

.dls-btn-csv:hover {
    background: #218838 !important;
    border-color: #1e7e34 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4) !important;
}

.dls-btn-pbx {
    background: #fd7e14 !important;
    border-color: #fd7e14 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(253, 126, 20, 0.3) !important;
    transition: all 0.2s ease !important;
}

.dls-btn-pbx:hover {
    background: #e8650e !important;
    border-color: #dc5e0a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(253, 126, 20, 0.4) !important;
}

/* Modern table design - removes chessboard appearance */
.dls-invoice-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    table-layout: auto !important;
}

.dls-invoice-table th {
    background: linear-gradient(135deg, #5e91c9, #4a7ba7) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 15px 12px !important;
    text-align: left !important;
    border: none !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Column widths should be set in HTML with inline styles or classes when needed */
/* Removed hardcoded nth-child width rules to allow flexible column sizing */

.dls-invoice-table td {
    padding: 2px 12px !important;
    border: none !important;
    border-bottom: 1px solid #f8f9fa !important;
    vertical-align: middle !important;
    transition: background-color 0.2s ease !important;
}

.dls-invoice-table tbody tr:hover {
    background: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.dls-invoice-table tbody tr:hover td {
    background: #f8f9fa !important;
}

.dls-invoice-table tbody tr:last-child td {
    border-bottom: none !important;
}


.dls-pagination-info {
    text-align: center !important;
    margin-bottom: 15px !important;
    color: #495057 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.dls-pagination-controls {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.dls-pagination-controls .dls-btn {
    min-width: 44px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.dls-pagination-controls .dls-btn-primary {
    background: #5e91c9 !important;
    border-color: #5e91c9 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 6px rgba(94, 145, 201, 0.4) !important;
}

.dls-pagination-controls .dls-btn-secondary {
    background: white !important;
    border-color: #dee2e6 !important;
    color: #495057 !important;
}

.dls-pagination-controls .dls-btn-secondary:hover {
    background: #5e91c9 !important;
    border-color: #5e91c9 !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(94, 145, 201, 0.3) !important;
}

/* Mobile responsive adjustments for billing */
@media (max-width: 991px) {
    .dls-pagination-controls {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    .dls-pagination-controls .dls-btn {
        min-width: 40px !important;
        height: 40px !important;
        font-size: 12px !important;
    }
    
    /* Right-align Show Invoice Details button in mobile cards */
    .dls-toggle-details {
        display: block !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        margin-top: 15px !important;
        margin-bottom: 10px !important;
        width: auto !important;
        text-align: center !important;
    }
    
    /* Create a wrapper div for right alignment */
    .dls-invoice-summary {
        text-align: left !important;
    }
    
    .dls-invoice-summary .dls-toggle-details {
        text-align: right !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        display: inline-block !important;
        width: auto !important;
    }
    
    /* Alternative: Use flexbox for the summary container */
    .dls-invoice-summary {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .dls-invoice-summary .dls-toggle-details {
        align-self: flex-end !important;
    }
}

/* Desktop-only content - shown on desktop, hidden on mobile */
.dls-desktop-only {
    display: block;
    width: 100% !important;
}

/* Mobile-only content - hidden on desktop, shown on mobile */
.dls-mobile-only {
    display: none;
}

/* Standard DLS button sizing in table - consistent with site */
.dls-invoice-table .dls-btn {
    margin: 2px 3px !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
    min-height: 32px !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* Ensure table actions column keeps buttons on single line with generous space */
.dls-invoice-table td:nth-child(6) > div {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* Small button overrides MUST come after invoice table rules to take precedence */
.dls-invoice-table .dls-btn.dls-btn-sm,
.dls-invoice-table button.dls-btn-sm,
.dls-invoice-table a.dls-btn-sm {
    padding: 4px 8px !important;
    font-size: 10px !important;
    min-height: 24px !important;
    height: 24px !important;
    line-height: 16px !important;
}

.dls-invoice-table .dls-btn.dls-btn-xs,
.dls-invoice-table button.dls-btn-xs,
.dls-invoice-table a.dls-btn-xs {
    padding: 2px 6px !important;
    font-size: 9px !important;
    min-height: 20px !important;
    height: 20px !important;
    line-height: 16px !important;
}

/* Standard button styling consistent with DLS framework - ensure consistent alignment */
.dls-invoice-table .dls-btn-pdf,
.dls-invoice-table .dls-btn-csv,
.dls-invoice-table .dls-btn-pbx {
    font-weight: 500 !important;
    min-width: 45px !important;
    height: 32px !important;
}

/* Ensure all buttons have identical baseline alignment */
.dls-invoice-table .dls-btn i {
    vertical-align: middle !important;
    margin-right: 4px !important;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .dls-main-nav,
    .dls-user-status-bar {
        display: none;
    }
    
    .dls-container {
        max-width: none;
        padding: 0;
    }
    
    .dls-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* Service List and Cancellation Page Styling */
/* Note: .dls-service-item base styles are defined earlier in the file */

.dls-service-child {
    padding-left: 30px;
}

.dls-service-name {
    flex: 1;
    padding-right: 10px;
}

.dls-service-checkbox {
    flex-shrink: 0;
}

.dls-select-all {
    background: transparent;
    border: none;
    padding: 0;
}

.dls-checkbox-large {
    transform: scale(1.3);
    margin-right: 5px;
}

.dls-cancelled-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #dc3545;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    border-radius: 4px;
}

.dls-terms-section {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.dls-terms-section strong {
    color: #856404;
}

/* Remove default list styling for error messages and content lists */
.dls-alert ul,
.dls-card ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 0 0;
}

.dls-alert ul li,
.dls-card ul li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 5px;
}

.dls-alert ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #721c24;
}


/* ==========================================================================
   FRAMEWORK TABLES
   ========================================================================== */

/* Base table styles - mobile-first responsive */
.dls-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 14px;
}

.dls-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.dls-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dls-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
    vertical-align: middle;
}

.dls-table tbody tr {
    transition: background-color 0.2s ease;
}

.dls-table tbody tr:hover {
    background: #f8f9fa;
}

.dls-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table in a card */
.dls-card .dls-table {
    border-radius: 8px;
    overflow: hidden;
}

/* Striped table variant */
.dls-table-striped tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* Compact table variant */
.dls-table-compact th,
.dls-table-compact td {
    padding: 8px 12px;
}


.dls-table-responsive .dls-table {
    min-width: 600px;
}

/* Table column width utilities */
.dls-table-col-10 { width: 10%; }
.dls-table-col-15 { width: 15%; }
.dls-table-col-20 { width: 20%; }
.dls-table-col-25 { width: 25%; }
.dls-table-col-30 { width: 30%; }
.dls-table-col-35 { width: 35%; }
.dls-table-col-40 { width: 40%; }
.dls-table-col-45 { width: 45%; }
.dls-table-col-50 { width: 50%; }
.dls-table-col-55 { width: 55%; }
.dls-table-col-60 { width: 60%; }
.dls-table-col-65 { width: 65%; }
.dls-table-col-70 { width: 70%; }
.dls-table-col-75 { width: 75%; }
.dls-table-col-80 { width: 80%; }
.dls-table-col-85 { width: 85%; }
.dls-table-col-90 { width: 90%; }

/* Table layout fixed for column width control */
.dls-table-fixed {
    table-layout: fixed;
    width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .dls-table {
        font-size: 13px;
    }
    
    .dls-table th,
    .dls-table td {
        padding: 10px 12px;
    }
    
    .dls-table th {
        font-size: 12px;
    }
}

/* Desktop/Mobile View Switching for responsive tables */
.dls-desktop-view {
    display: block;
}

.dls-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .dls-desktop-view {
        display: none;
    }
    
    .dls-mobile-view {
        display: block;
    }
}

/* Clickable table headers */
.dls-clickable {
    cursor: pointer;
    user-select: none;
}

.dls-clickable:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Card variants for different states */
.dls-card-paid {
    border-left: 4px solid #17a2b8;
}

.dls-card-misc {
    border-left: 4px solid #ffc107;
}

.dls-card-danger {
    border-left: 4px solid #dc3545;
}

/* Compact card style for mobile */
.dls-card-compact .dls-card-content {
    padding: 10px 12px;
}

.dls-card-compact .dls-card-header {
    padding: 8px 12px;
}

/* Float utilities */
.dls-float-right {
    float: right;
}

.dls-float-left {
    float: left;
}

/* Clear floats */
.dls-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Text alignment */

.dls-text-left {
    text-align: left;
}

/* Small badges - matches dls-btn-sm */
.dls-badge-sm {
    padding: 2px 8px;
    font-size: 10px;
    line-height: 1.2;
    min-height: 18px;
}

/* Extra small badges */
.dls-badge-xs {
    padding: 1px 6px;
    font-size: 9px;
    line-height: 1.2;
    min-height: 16px;
}

/* Fixed width badge modifier for visual consistency */
.dls-badge-fixed {
    min-width: 110px;
    text-align: center;
}

/* ========================================
   STANDARDIZED MODAL SYSTEM
   ======================================== 
   Use these classes for general-purpose modals.
   Specialized modals (like billing invoice) can keep custom styling.
   
   Usage:
   - .dls-modal-overlay - The dark background overlay
   - .dls-modal - The modal container
   - .dls-modal-header - Gray header with title and close button
   - .dls-modal-body - Content area
   - .dls-modal-footer - Optional footer with action buttons
   
   Size variants:
   - .dls-modal-sm - Small modal (400px max)
   - .dls-modal-lg - Large modal (800px max)
   - .dls-modal-xl - Extra large modal (1140px max)
*/

/* Modal Overlay */
.dls-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.dls-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container - Fixed flexbox structure */
.dls-modal {
    background: white;
    border-radius: 8px;
    width: fit-content;
    min-width: 300px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Modal Header - Gray background with black X */
.dls-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    border-bottom: 1px solid #eee;
    background-color: #dddddd;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0; /* Keep header fixed */
}

/* Icon on left - fixed width container */
.dls-modal-header > .dls-message-modal-icon {
    width: 32px;
    flex-shrink: 0;
}

/* Title in center - takes remaining space, centered */
.dls-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    padding: 0 15px;
}

/* Close button on right - fixed width container to match icon */
.dls-modal-header > .dls-modal-close {
    width: 32px;
    flex-shrink: 0;
}

/* Modal Close Button - Black X */
.dls-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.dls-modal-close:hover {
    color: #000;
}

/* Modal Body - Scrollable content area */
.dls-modal-body {
    padding: 25px 45px;
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(90vh - 120px); /* Account for reduced header/footer */
    text-align: left;
}

/* Allow text alignment utilities to override modal body default */
.dls-modal-body.dls-text-center {
    text-align: center;
}

/* Modal Footer */
.dls-modal-footer {
    padding: 12px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #dddddd;
    flex-shrink: 0; /* Keep footer fixed */
}

/* Size Variants */
.dls-modal.dls-modal-sm {
    max-width: 400px;
}

.dls-modal.dls-modal-lg {
    max-width: 800px;
}

.dls-modal.dls-modal-xl {
    max-width: 1140px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dls-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .dls-modal {
        max-width: 100%;
        width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
    }
    
    .dls-modal-header {
        border-radius: 16px 16px 0 0;
    }
    
    .dls-modal-body {
        padding: 20px;
    }
    
    .dls-modal-footer {
        padding: 12px 20px;
    }
}

/* Animation for smooth appearance */
.dls-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dls-modal-overlay.active {
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.dls-modal-overlay .dls-modal {
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.dls-modal-overlay.active .dls-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Body Scroll Lock - Prevents background page scrolling when modals are open */
body.dls-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure modal content can still scroll independently */
.dls-modal-overlay.active .dls-modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 120px); /* Account for header/footer space */
}

/* ============================================================================
   LOADING SPINNER - Pure CSS animated spinner
   ============================================================================ */

.dls-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

.dls-loading-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.dls-loading-spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================================================
   MOVABLE MODALS - Dashboard/Window-Style Modals
   ========================================================================

   Movable modals are window-style modals for dashboard applications that can be:
   - Dragged and repositioned anywhere on the screen
   - Resized (vertical only by default)
   - Brought to front with z-index management
   - Used alongside regular dls-modal overlays

   Usage:
   <div class="dls-movable-modal" id="myModal" style="left: 100px; top: 100px;">
       <div class="dls-movable-modal-header">
           <span class="dls-movable-modal-title">Modal Title</span>
           <button class="dls-movable-modal-close" onclick="closeModal()">&times;</button>
       </div>
       <div class="dls-movable-modal-body">
           Content here
       </div>
       <div class="dls-movable-modal-footer">
           <button class="dls-btn dls-btn-secondary">Cancel</button>
           <button class="dls-btn dls-btn-primary">Save</button>
       </div>
   </div>

   Initialize with: dlsInitMovableModal('myModal');
   ======================================================================== */

.dls-movable-modal {
    position: fixed;
    background: white;
    border: 2px solid #0066cc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 900px;
    min-height: 200px;
    max-height: 800px;
    z-index: 100000;
    resize: vertical;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dls-movable-modal-header {
    background: linear-gradient(to bottom, #0066cc, #0052a3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px 4px 0 0;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    flex-shrink: 0;
}

.dls-movable-modal-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.dls-movable-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.dls-movable-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dls-movable-modal-body {
    padding: 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.dls-movable-modal-footer {
    padding: 12px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Size variants for movable modals */
.dls-movable-modal.dls-movable-modal-sm {
    min-width: 300px;
    max-width: 600px;
}

.dls-movable-modal.dls-movable-modal-lg {
    min-width: 600px;
    max-width: 1200px;
}

/* Mobile responsive - convert to full screen on small devices */
@media (max-width: 768px) {
    .dls-movable-modal {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        border-radius: 0;
        resize: none;
    }

    .dls-movable-modal-header {
        cursor: default;
        border-radius: 0;
    }
}


/* Staff Index Page Specific Classes */
.dls-card-title-link {
    color: inherit;
    text-decoration: none;
}

.dls-card-title-link:hover {
    text-decoration: underline;
}

.dls-external-link-icon {
    font-size: 0.8em;
    opacity: 0.6;
    margin-left: 2px;
}

/* Table responsive wrapper */
.dls-table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

/* Table footer row */
.dls-table-footer {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Pagination styles */
.dls-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.dls-pagination-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.dls-pagination-item {
    display: inline-block;
}

.dls-pagination-link {
    display: block;
    padding: 0.5rem 0.75rem;
    background-color: white;
    border: 1px solid #dee2e6;
    color: #0066cc;
    text-decoration: none;
    transition: all 0.2s;
}

.dls-pagination-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.dls-pagination-item.active .dls-pagination-link {
    background-color: #0066cc;
    border-color: #0066cc;
    color: white;
}

/* Input group for inline inputs and buttons */
.dls-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem; /* Add space between input and button */
}

.dls-input-group .dls-form-control {
    flex: 1;
    margin: 0; /* Remove default margins */
}

.dls-input-group-append {
    display: flex;
    align-items: stretch;
}

.dls-input-group .dls-input-group-btn {
    margin: 0; /* Remove default button margins */
    padding: 6px 12px; /* Match input padding */
    height: auto; /* Let height match input naturally */
    min-height: unset; /* Remove min-height that might cause issues */
    align-self: stretch; /* Stretch to match input height */
}

/* Input group button specific styles */
.dls-input-group .dls-btn {
    height: 38px !important; /* Match default form control height */
    line-height: 26px; /* 38px - 12px vertical padding */
    padding: 6px 12px;
    margin: 0;
    border: 1px solid #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: unset; /* Override base button min-height */
}

/* Small input group - both input and button are small */
.dls-input-group-sm .dls-form-control {
    height: 24px;
    padding: 2px 8px;
    font-size: 11px;
}

.dls-input-group-sm .dls-btn {
    height: 24px !important;
    line-height: 20px; /* 24px - 4px vertical padding */
    padding: 2px 8px;
    font-size: 11px;
    min-height: unset;
}

/* Large input group - both input and button are large */
.dls-input-group-lg .dls-form-control {
    height: 48px;
    padding: 10px 16px;
    font-size: 14px;
}

.dls-input-group-lg .dls-btn {
    height: 48px !important;
    line-height: 28px; /* 48px - 20px vertical padding */
    padding: 10px 16px;
    font-size: 14px;
    min-height: unset;
}

/* Icon button style */
.dls-btn-icon {
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.15s ease-in-out;
}

/* Card header with actions */
.dls-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.dls-card-actions {
    margin-left: auto;
}

/* Invoice Display Classes */
.dls-invoice-section {
    margin-bottom: 15px;
}

.dls-invoice-section-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.dls-invoice-divider {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}

.dls-invoice-dl {
    margin: 0;
}

.dls-invoice-dt {
    display: inline-block;
    width: 100px;
    font-weight: normal;
    color: #666;
}

.dls-invoice-dt-wide {
    display: inline-block;
    width: 120px;
    font-weight: normal;
    color: #666;
}

.dls-invoice-dd {
    display: inline;
    margin: 0;
}

.dls-text-danger {
    color: #dc3545;
}

.dls-text-success {
    color: #28a745 !important;
}

.dls-text-muted {
    color: #666;
}

.dls-text-right {
    text-align: right;
}

.dls-text-bold {
    font-weight: 600 !important;
}

.dls-text-emphasis {
    font-weight: 600;
    color: #212529;
}

/* Display Utilities */
.dls-display-inline {
    display: inline;
}

/* Field Success Flash - Visual feedback for account search modal */
.dls-field-success-flash {
    background-color: #d4f8d4;
    transition: background-color 1.5s ease;
}

/* Tab Navigation Links - for billing_letters-mobile.phtml */
.dls-tab-link {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 5px;
    background: #e0e0e0;
    border: 1px solid #dfe0e1;
    color: #626263;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px 4px 0 0;
}

.dls-tab-link:hover {
    background: #e5e5e5;
    color: #333;
}

.dls-tab-link.active {
    background: white;
    color: #5e91c9;
    font-weight: 600;
    border-bottom: 2px solid white;
    position: relative;
    z-index: 1;
}

.dls-tab-nav {
    display: flex;
    background: #ffffff;
    overflow: visible;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
}

/* Warning and danger buttons */
.dls-btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.dls-btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.dls-btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.dls-btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ============================================
   Search Results Components
   ============================================ */

/* Search results container */
.dls-search-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-top: 15px;
}

.dls-search-results-list {
    padding: 0;
}

/* Individual search result item */
.dls-search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dls-search-result-item:hover {
    background-color: #f8f9fa;
}

.dls-search-result-item:last-child {
    border-bottom: none;
}

.dls-search-result-main {
    font-size: 14px;
    margin-bottom: 4px;
}

.dls-search-result-main strong {
    color: #333;
}

.dls-search-result-sub {
    font-size: 12px;
    color: #6c757d;
}

/* Loading state */
.dls-loading {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* No results message */
.dls-no-results {
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* Error message */
.dls-error {
    padding: 30px;
    text-align: center;
    color: #dc3545;
    font-size: 14px;
}

/* Modal content sizes */
.dls-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dls-modal-content.dls-modal-lg {
    max-width: 800px;
}

.dls-modal-content.dls-modal-xl {
    max-width: 1140px;
}

/* Account Cards for Child Accounts Report */
.dls-account-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.dls-parent-account-card {
    border: 2px solid #0066cc;
    background: linear-gradient(to right, #f0f8ff, #ffffff);
    margin-bottom: 20px;
}

.dls-account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.dls-parent-account-card .dls-account-card-header {
    background: linear-gradient(to right, #e6f2ff, #f8f9fa);
    border-bottom: 1px solid #ccdff3;
}

.dls-parent-badge {
    background: #0066cc;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dls-account-card-body {
    padding: 15px;
}

.dls-account-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 12px;
}

.dls-account-info-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.dls-info-label {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    min-width: fit-content;
}

.dls-info-value {
    color: #212529;
    word-break: break-word;
}

.dls-account-services {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.dls-services-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dls-service-item {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #495057;
    display: inline-block;
}

.dls-accounts-container {
    margin-top: 15px;
}

.dls-section-header {
    margin: 20px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.dls-section-header h4 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dls-account-info-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .dls-account-card {
        margin-bottom: 10px;
    }
    
    .dls-services-list {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dls-service-item {
        width: fit-content;
    }
}
/* Disabled button state */
.dls-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

/* Apply disabled styling to buttons with disabled attribute */
.dls-btn:disabled,
.dls-btn[disabled],
button.dls-btn:disabled,
input.dls-btn:disabled,
input.dls-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(30%);
}

/* ==========================================================================
   TERMINATOR PAGE UTILITIES
   Additional utility classes for the Terminator management system
   ========================================================================== */

/* Text color utilities for status indicators */
.dls-text-primary {
    color: #007bff !important;
}

.dls-text-warning {
    color: #856404 !important;  /* Dark amber for better readability */
}

/* Text color highlighting for terminator tables - no backgrounds */
.dls-row-misc td {
    color: #856404 !important;  /* Dark amber/brown for MISC services */
    font-weight: 600 !important;
}

.dls-row-paid-terminated td {
    color: #0d6efd !important;  /* Blue for paid but not reactivated */
    font-weight: 600 !important;
}

.dls-row-overdue td {
    color: #dc3545 !important;  /* Red text */
    font-weight: 600 !important;
}

/* Date text colors - no backgrounds */
.dls-date-warning {
    color: #856404 !important;  /* Dark amber */
    font-weight: 600 !important;
}

.dls-date-danger {
    color: #dc3545 !important;  /* Red for dates > 14 days */
    font-weight: 600 !important;
}

/* Enhanced form row for better spacing */
.dls-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.dls-form-row .dls-form-group {
    flex: 1;
    min-width: 200px;
}

/* Form checkbox styling */
.dls-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dls-form-checkbox input[type="checkbox"] {
    margin: 0;
}

.dls-form-checkbox label {
    margin: 0;
    cursor: pointer;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .dls-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .dls-form-row .dls-form-group {
        width: 100%;
    }
    
    /* Stack date select fields on mobile */
    .dls-form-row select.dls-form-control {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* ==========================================
   SEARCHABLE SELECT (Dropdown with filter)
   ========================================== */

.dls-searchable-select {
    position: relative;
    width: 100%;
}

/* Special container class that prevents stacking context issues for dropdowns */
.dls-dropdown-container {
    position: relative !important;
    z-index: auto !important; /* Prevent stacking context from z-index */
    transform: none !important; /* Prevent stacking context from transform */
    opacity: 1 !important; /* Prevent stacking context from opacity */
    filter: none !important; /* Prevent stacking context from filter */
    overflow: visible !important; /* Allow dropdowns to overflow */
    will-change: auto !important; /* Prevent stacking context from will-change */
}

/* Apply to cards when they contain dropdowns */
.dls-card.dls-dropdown-container .dls-card-content {
    overflow: visible !important;
    position: static !important; /* Don't create positioning context */
}

.dls-dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background-color: #ffffff !important; /* Solid white background */
    background: #ffffff !important; /* Fallback for compatibility */
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    z-index: 99999 !important; /* Very high z-index to appear above everything */
    margin-top: 2px;
}

.dls-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    background-color: #ffffff; /* Solid white background for each item */
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.dls-dropdown-item:hover {
    background-color: #f8f9fa !important;
}

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

/* Responsive adjustments for searchable dropdown */
@media (max-width: 768px) {
    .dls-dropdown-list {
        max-height: 200px; /* Smaller on mobile */
    }
}

/* ==========================================
   COLOCATION ACCESS STYLES
   ========================================== */


/* Table styles for coloaccess results */
.dls-card-content table {
    width: 100%;
    border-collapse: collapse;
}

.dls-card-content table td,
.dls-card-content table th {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.dls-card-content table th,
.dls-card-content table td.als {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.dls-card-content table tr:hover {
    background-color: #f8f9fa;
}

/* Make tables responsive on mobile */
@media (max-width: 768px) {
    .dls-card-content {
        overflow-x: auto;
    }
    
    .dls-card-content table {
        min-width: 600px;
    }
}

/* Profile form styles */
.dls-card-content form table {
    border: none;
}

.dls-card-content form table td {
    border: none;
    padding: 5px;
    vertical-align: middle;
}

/* Photo display styles */
.dls-profile-photo {
    max-width: 200px;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 10px 0;
}

.dls-profile-photo-large {
    max-width: 280px !important;
    max-height: 350px !important;
    width: auto !important;
    height: auto !important;
    padding: 4px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dls-profile-photo-large:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Access note styles */
.dls-access-note {
    background-color: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 10px;
    margin: 10px 0;
}

.dls-access-note-date {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.dls-access-note-text {
    color: #212529;
}

/* Status badge styles */
.dls-status-enabled {
    color: #28a745;
    font-weight: 600;
}

.dls-status-disabled {
    color: #dc3545;
    font-weight: 600;
}
}

/* ============================================================================
   INVOICE MODAL SYSTEM - Migrated from components.css
   ============================================================================ */

/* Invoice Modal Overlay */
.dls-invoice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
}

.dls-invoice-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Content Container */
.dls-invoice-modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Modal Header */
.dls-invoice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.dls-invoice-modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 20px;
}

/* Modal Close Button */
.dls-invoice-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dls-invoice-modal-close:hover {
    background-color: #e9ecef;
}

/* Modal Body */
.dls-invoice-modal-body {
    padding: 20px;
}

/* Invoice Details Table */
.dls-invoice-modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.dls-invoice-modal-table thead {
    background: #f8f9fa;
}

.dls-invoice-modal-table th,
.dls-invoice-modal-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.dls-invoice-modal-table th {
    font-weight: 600;
    color: #495057;
}

.dls-invoice-modal-table tbody tr:hover {
    background: #f8f9fa;
}

/* Mobile Responsive Modal */
@media (max-width: 768px) {
    .dls-invoice-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .dls-invoice-modal-header {
        padding: 15px;
    }
    
    .dls-invoice-modal-body {
        padding: 15px;
    }
}

/* ============================================================================
   HELP & DOCUMENTATION CLASSES
   ============================================================================ */

/* Help Text */
.dls-help-text {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Help Grid for Explanation Cards */
.dls-help-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.dls-help-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #5e91c9;
}

.dls-help-item strong {
    display: block;
    color: #495057;
    margin-bottom: 5px;
}

/* ============================================================================
   SUMMARY & AUDIT DISPLAY
   ============================================================================ */

.dls-audit-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.dls-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.dls-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dls-summary-label {
    font-weight: 600;
    color: #495057;
}

.dls-summary-value {
    font-weight: bold;
    color: #212529;
}

.dls-summary-warning {
    background: #fff3cd;
    margin: -10px;
    padding: 10px;
    border-radius: 4px;
}

/* ============================================================================
   ROW STATUS CLASSES
   ============================================================================ */

.dls-row-inactive {
    background-color: #ffe6e6;
}

.dls-row-hold {
    background-color: #fff8dc;
}

.dls-row-danger {
    background-color: #ffebee !important;
}

.dls-row-danger td {
    color: #721c24;
}

.dls-row-warning {
    background-color: #fff3cd !important;
}

.dls-row-warning:hover {
    background-color: #ffe8a1 !important;
}

/* ============================================================================
   ADDITIONAL BUTTON VARIANTS
   ============================================================================ */

/* Link Button Style */
.dls-btn-link {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 2px 6px;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
}

.dls-btn-link:hover {
    color: #0056b3;
}

.dls-btn-link.dls-text-danger {
    color: #dc3545;
}

.dls-btn-link.dls-text-danger:hover {
    color: #c82333;
}

/* ============================================================================
   UTILITY CLASSES ADDITIONS
   ============================================================================ */

/* Text utilities */
.dls-text-nowrap {
    white-space: nowrap;
}

.dls-text-wrap {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
}

.dls-text-break {
    word-break: break-all;
}

.dls-text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dls-indent {
    padding-left: 20px;
}

.dls-small-text {
    font-size: 12px;
}

.dls-muted-text {
    color: #6c757d;
}

.dls-font-bold {
    font-weight: 600 !important;
}

.dls-link-sm {
  color: #2563eb;              /* blue-600 */
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.dls-link:hover {
  color: #1d4ed8;              /* blue-700 */
  text-decoration: none;       /* keep clean even on hover */
}
.dls-link:visited {
  color: #4f46e5;              /* indigo-600 */
}
.dls-link-sm:hover {
    text-decoration: none;
    color: #0056b3;  /* Darker blue on hover instead of underline */
}

/* Spacing utilities - Padding */
.dls-p-0 { padding: 0 !important; }
.dls-p-1 { padding: 0.25rem !important; }
.dls-p-2 { padding: 0.5rem !important; }
.dls-p-3 { padding: 1rem !important; }
.dls-p-4 { padding: 1.5rem !important; }
.dls-p-5 { padding: 2rem !important; }

.dls-pt-0 { padding-top: 0 !important; }
.dls-pt-1 { padding-top: 0.25rem !important; }
.dls-pt-2 { padding-top: 0.5rem !important; }
.dls-pt-3 { padding-top: 1rem !important; }
.dls-pt-4 { padding-top: 1.5rem !important; }
.dls-pt-5 { padding-top: 2rem !important; }

.dls-pb-0 { padding-bottom: 0 !important; }
.dls-pb-1 { padding-bottom: 0.25rem !important; }
.dls-pb-2 { padding-bottom: 0.5rem !important; }
.dls-pb-3 { padding-bottom: 1rem !important; }
.dls-pb-4 { padding-bottom: 1.5rem !important; }
.dls-pb-5 { padding-bottom: 2rem !important; }

.dls-pl-0 { padding-left: 0 !important; }
.dls-pl-1 { padding-left: 0.25rem !important; }
.dls-pl-2 { padding-left: 0.5rem !important; }
.dls-pl-3 { padding-left: 1rem !important; }
.dls-pl-4 { padding-left: 1.5rem !important; }
.dls-pl-5 { padding-left: 2rem !important; }

.dls-pr-0 { padding-right: 0 !important; }
.dls-pr-1 { padding-right: 0.25rem !important; }
.dls-pr-2 { padding-right: 0.5rem !important; }
.dls-pr-3 { padding-right: 1rem !important; }
.dls-pr-4 { padding-right: 1.5rem !important; }
.dls-pr-5 { padding-right: 2rem !important; }

.dls-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.dls-px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.dls-px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.dls-px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.dls-px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.dls-px-5 { padding-left: 2rem !important; padding-right: 2rem !important; }

.dls-py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.dls-py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.dls-py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.dls-py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.dls-py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.dls-py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

/* Spacing utilities - Margin (extending existing) */

/* Border utilities */
.dls-border { border: 1px solid #dee2e6 !important; }
.dls-border-0 { border: 0 !important; }
.dls-border-top { border-top: 1px solid #dee2e6 !important; }
.dls-border-right { border-right: 1px solid #dee2e6 !important; }
.dls-border-bottom { border-bottom: 1px solid #dee2e6 !important; }
.dls-border-left { border-left: 1px solid #dee2e6 !important; }

/* Width utilities */
.dls-w-auto { width: auto !important; }
.dls-w-50 { width: 50px !important; }
.dls-w-60 { width: 60px !important; }
.dls-w-100 { width: 100% !important; }

/* Margin utilities */
.dls-ml-auto { margin-left: auto !important; }

/* Background utilities */
.dls-bg-light { background-color: #f5f5f5 !important; }
.dls-bg-white { background-color: white !important; }

/* Position utilities */
.dls-sticky-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

/* Grid utilities */
.dls-grid {
    display: grid !important;
}

.dls-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.dls-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.dls-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
}

/* Gap utilities for flexbox and grid */
.dls-gap-0 { gap: 0 !important; }
.dls-gap-1 { gap: 0.25rem !important; }
.dls-gap-2 { gap: 0.5rem !important; }
.dls-gap-3 { gap: 1rem !important; }
.dls-gap-4 { gap: 1.5rem !important; }
.dls-gap-5 { gap: 2rem !important; }

/* Flexbox utilities (extending existing) */
.dls-flex-wrap {
    flex-wrap: wrap !important;
}

.dls-flex-equal {
    display: flex !important;
}

.dls-flex-equal > * {
    flex: 1;
}

.dls-flex-fixed-300 {
    flex: 0 0 300px !important;
}

.dls-flex-nowrap {
    flex-wrap: nowrap !important;
}

.dls-flex-grow {
    flex-grow: 1 !important;
    flex-basis: 0 !important;
    min-width: 0 !important;
}

.dls-flex-grow-0 {
    flex-grow: 0 !important;
}

.dls-flex-shrink {
    flex-shrink: 1 !important;
}

.dls-flex-shrink-0 {
    flex-shrink: 0 !important;
}

.dls-align-items-center {
    align-items: center !important;
}

.dls-align-items-start {
    align-items: flex-start !important;
}

.dls-align-items-end {
    align-items: flex-end !important;
}

.dls-justify-content-center {
    justify-content: center !important;
}

.dls-justify-content-start {
    justify-content: flex-start !important;
}

.dls-justify-content-end {
    justify-content: flex-end !important;
}

.dls-justify-content-between {
    justify-content: space-between !important;
}

.dls-justify-content-around {
    justify-content: space-around !important;
}

/* Image utilities */
.dls-img-thumbnail {
    padding: 0.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

.dls-img-fluid {
    max-width: 100%;
    height: auto;
}

/* Divider utility */
.dls-divider {
    height: 1px;
    background-color: #dee2e6;
    margin: 1rem 0;
}

.dls-divider-vertical {
    width: 1px;
    background-color: #dee2e6;
    margin: 0 1rem;
    align-self: stretch;
}

/* Field display utilities for forms and info */
.dls-field-group {
    margin-bottom: 0.75rem;
}

.dls-field-label {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.dls-field-value {
    display: block;
    color: #212529;
    font-size: 1rem;
}

/* Inline field display pattern - Label and value on same line */
.dls-field-inline {
    display: flex;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.dls-field-inline-label {
    flex: 0 0 140px;
    padding-right: 1rem;
}

.dls-field-inline-value {
    flex: 1;
    color: #212529;
    word-break: break-word;
}

.dls-field-inline-value strong {
    font-weight: 600;
}

/* Compact variant with smaller label width */
.dls-field-inline-compact .dls-field-inline-label {
    flex: 0 0 100px;
}

/* Wide variant for longer labels */
.dls-field-inline-wide .dls-field-inline-label {
    flex: 0 0 180px;
}

/* Mobile responsive - stack on small screens */
@media (max-width: 480px) {
    .dls-field-inline-responsive {
        flex-direction: column;
    }
    
    .dls-field-inline-responsive .dls-field-inline-label {
        padding-right: 0;
        margin-bottom: 0.125rem;
    }
}

/* Mobile responsive adjustments for grid */
@media (max-width: 768px) {
    .dls-grid-2,
    .dls-grid-3,
    .dls-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   ACTION CONTAINERS & EMPTY STATES
   ============================================================================ */

/* Action buttons container - Already exists in framework but enhanced here */
.dls-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

/* Modal button group styling */
.dls-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 12px;
}

.dls-modal-buttons .dls-btn {
    margin: 0;
}

/* Button Toolbar Pattern - Reusable container for multiple forms/buttons */
.dls-button-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: space-evenly;
}

/* Direct child forms in toolbar should be inline */
.dls-button-toolbar > form {
    display: inline-block;
    margin: 0;
}

/* Direct child buttons get consistent spacing */
.dls-button-toolbar > .dls-btn,
.dls-button-toolbar > form > .dls-btn {
    margin: 0;
}

/* Toolbar variants for different contexts */
.dls-button-toolbar-center {
    justify-content: center;
}

.dls-button-toolbar-end {
    justify-content: flex-end;
}

.dls-button-toolbar-between {
    justify-content: space-between;
}

/* Compact toolbar for space-constrained areas like table rows */
.dls-button-toolbar-compact {
    gap: 3px;
}

.dls-button-toolbar-compact .dls-btn {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 26px;
}

/* Mobile responsive toolbar */
@media (max-width: 768px) {
    .dls-button-toolbar {
        gap: 4px;
    }
    
    /* On very small screens, allow toolbar to stack */
    @media (max-width: 480px) {
        .dls-button-toolbar-responsive {
            flex-direction: column;
            align-items: stretch;
        }
        
        .dls-button-toolbar-responsive > form,
        .dls-button-toolbar-responsive > .dls-btn {
            width: 100%;
        }
        
        .dls-button-toolbar-responsive .dls-btn {
            width: 100%;
            text-align: center;
        }
    }
}

/* Empty state message */
.dls-empty-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* ============================================================================
   INVOICE-SPECIFIC CLASSES
   ============================================================================ */

/* Invoice table alignment */
.dls-invoice-table th.dls-col-right,
.dls-invoice-table td.dls-col-right {
    text-align: right;
}

.dls-invoice-table th.dls-col-center,
.dls-invoice-table td.dls-col-center {
    text-align: center;
}

/* Invoice details toggle (mobile) */
.dls-invoice-details {
    display: none;
}

/* Credit/debit indicators */
.dls-credit-amount {
    color: #dc3545;
}

.dls-credit-amount.dls-bold {
    font-weight: 600;
}

/* Overdue invoice row */
.dls-invoice-overdue-row {
    background: #fff3cd;
}

/* Invoice status indicators */
.dls-invoice-overdue {
    color: #dc3545;
    font-weight: bold;
}

.dls-invoice-paid {
    color: #28a745;
}

/* ============================================================================
   MODAL SECTIONS & VALUES
   ============================================================================ */

.dls-modal-section {
    margin-bottom: 25px;
}

.dls-modal-section-title {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dls-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dls-modal-value-large {
    font-size: 18px;
    color: #5e91c9;
}

.dls-modal-value-medium {
    font-size: 16px;
}

.dls-modal-value-small {
    font-size: 14px;
    color: #6c757d;
}

/* Modal totals table */
.dls-modal-totals-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.dls-modal-totals-table {
    width: 100%;
    border-collapse: collapse;
}

.dls-modal-totals-table tr {
    border-bottom: 1px solid #dee2e6;
}

.dls-modal-totals-table tr:last-child {
    border-bottom: none;
}

.dls-modal-totals-table td {
    padding: 10px 0;
}

.dls-modal-totals-table td.dls-label {
    font-weight: 600;
}

.dls-modal-totals-table td.dls-value {
    text-align: right;
}

.dls-modal-totals-table .dls-total-amount {
    color: #495057;
}

.dls-modal-totals-table .dls-paid-amount {
    color: #28a745;
}

.dls-modal-totals-table .dls-due-amount {
    font-weight: bold;
}

.dls-modal-totals-table .dls-due-amount.overdue {
    color: #dc3545;
}

.dls-modal-totals-table .dls-due-amount.paid {
    color: #28a745;
}

/* ==========================================================================
   MODAL SYSTEM - Flexible modal sizing and variants
   ========================================================================== */

/* Enhanced modal system - builds on base modal */
/* Modal size variants - Width */
.dls-modal-overlay.modal-sm .dls-modal {
    width: 400px;
    min-width: 400px;
}

.dls-modal-overlay.modal-md .dls-modal {
    width: 600px;
    min-width: 600px;
}

.dls-modal-overlay.modal-lg .dls-modal {
    width: 800px;
    min-width: 800px;
}

.dls-modal-overlay.modal-xl .dls-modal {
    width: 95%;
    max-width: 1200px;
}

.dls-modal-overlay.modal-auto .dls-modal {
    width: auto;
    max-width: 90%;
    min-width: 400px;
}

/* Height variants - Proper viewport-based sizing */
.dls-modal-overlay.modal-height-sm .dls-modal {
    max-height: 50vh !important;
}

.dls-modal-overlay.modal-height-sm .dls-modal-body {
    max-height: calc(50vh - 140px) !important;
}

.dls-modal-overlay.modal-height-md .dls-modal {
    max-height: 70vh !important;
}

.dls-modal-overlay.modal-height-md .dls-modal-body {
    max-height: calc(70vh - 140px) !important;
}

.dls-modal-overlay.modal-height-lg .dls-modal {
    max-height: 85vh !important;
}

.dls-modal-overlay.modal-height-lg .dls-modal-body {
    max-height: calc(85vh - 140px) !important;
    overflow-y: auto;
}

/* Remove modal-body max-height constraint when it contains scrollable lists */
/* The list handles scrolling, not the modal body */
.dls-modal-overlay.modal-height-lg .dls-modal-body:has(.dls-list-scrollable) {
    max-height: none !important;
    overflow-y: visible;
}

/* Legacy height variants - maintained for compatibility */
.dls-modal-overlay.modal-tall .dls-modal {
    max-height: 90vh !important;
}

.dls-modal-overlay.modal-tall .dls-modal-body {
    max-height: calc(90vh - 140px) !important;
}

.dls-modal-overlay.modal-short .dls-modal {
    max-height: 400px !important;
}

.dls-modal-overlay.modal-short .dls-modal-body {
    max-height: calc(400px - 140px) !important;
}

.dls-modal-overlay.modal-full .dls-modal {
    width: 95% !important;
    max-height: 95vh !important;
    max-width: none !important;
}

.dls-modal-overlay.modal-full .dls-modal-body {
    max-height: calc(95vh - 140px) !important;
}

/* Specific for edit forms */
.dls-modal-overlay.modal-edit .dls-modal {
    width: 90% !important;
    max-width: 1000px !important;
    min-width: 800px !important;
    max-height: 90vh !important;
}

.dls-modal-overlay.modal-edit .dls-modal-body {
    max-height: calc(90vh - 140px) !important;
}

/* Default profile modal to medium size */
#profileModal.dls-modal-overlay:not(.modal-edit) .dls-modal {
    width: 700px !important;
}

/* Make form elements in modals responsive */
.dls-modal-body table {
    width: 100% !important;
}

.dls-modal-body input[type="text"],
.dls-modal-body input[type="email"],
.dls-modal-body textarea,
.dls-modal-body select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Mobile responsive - Override fixed modal widths */
@media (max-width: 768px) {
    .dls-modal-overlay.modal-sm .dls-modal,
    .dls-modal-overlay.modal-md .dls-modal,
    .dls-modal-overlay.modal-lg .dls-modal,
    .dls-modal-overlay.modal-xl .dls-modal,
    .dls-modal-overlay.modal-auto .dls-modal,
    .dls-modal-overlay.modal-edit .dls-modal {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        border-radius: 16px 16px 0 0;
    }

    .dls-modal-overlay.modal-edit .dls-modal-body,
    .dls-modal-overlay.modal-lg .dls-modal-body,
    .dls-modal-overlay.modal-xl .dls-modal-body {
        max-height: calc(90vh - 140px) !important;
    }

    #profileModal.dls-modal-overlay:not(.modal-edit) .dls-modal {
        width: 100% !important;
    }
}

/* ============================================================================
   STATUS DOT INDICATORS
   ============================================================================ */

/* Status indicator group - for combining status dot with additional indicators */
.dls-status-group {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    vertical-align: top;
}

.dls-status-group .dls-status-dot {
    margin-right: 0;
}

.dls-status-subscription {
    font-size: 11px;
    color: #0066cc;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Base status dot class */
.dls-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Availability / User Presence Status */
.dls-status-online {
    background: #28a745; /* green */
}

.dls-status-offline {
    background: #6c757d; /* gray */
}

.dls-status-away {
    background: #ffc107; /* yellow */
}

.dls-status-busy {
    background: #dc3545; /* red */
}

.dls-status-invisible {
    background: #adb5bd;
    border: 1px dashed #6c757d;
}

/* Process / Job Status */
.dls-status-pending {
    background: #17a2b8; /* teal */
}

.dls-status-running {
    background: #007bff; /* blue */
}

.dls-status-success {
    background: #28a745; /* green */
}

.dls-status-failed {
    background: #dc3545; /* red */
}

.dls-status-canceled {
    background: #6c757d; /* gray */
}

/* Special / Alert Status */
.dls-status-warning {
    background: #fd7e14; /* orange */
}

.dls-status-critical {
    background: #721c24; /* dark red */
}

/* ============================================ */
/* DLS List Component - Grid-based table layout */
/* ============================================ */
/* Standardized from PBXCC for reuse across portal */

.dls-list-container,
.dls-list-view {
    width: 100%;
    margin: 0;
    padding: 0;
}

.dls-list-header {
    display: flex;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    gap: 12px; /* Spacing between column headers */
}

/* Sortable column headers */
.dls-list-header > div[onclick] {
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.dls-list-header > div[onclick]:hover {
    background-color: #e9ecef;
    color: #495057;
}

.dls-list-header > div[onclick]:active {
    background-color: #dee2e6;
}

/* Sorted column highlighting */
.dls-list-header > div[data-sort].sorted {
    background-color: #e7f3ff;
    font-weight: 700;
    color: #0056b3;
}

.dls-list-body {
    background: white;
}

/* Scrollable List Variant - Fixed Header with Scrollable Body */
.dls-list-container.dls-list-scrollable {
    max-height: var(--list-dynamic-height, 400px);
    overflow-y: auto;
    position: relative;
}

.dls-list-container.dls-list-scrollable .dls-list-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

/* Viewport-Based Scrollable List - Grows with screen size */
.dls-list-container.dls-list-scrollable-viewport {
    max-height: calc(100vh - var(--list-viewport-offset, 450px));
    overflow-y: auto;
    position: relative;
}

.dls-list-container.dls-list-scrollable-viewport .dls-list-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

.dls-list-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    background-color: white;
    position: relative;
    transition: all 0.2s ease;
    min-height: 45px;
    gap: 12px; /* Match header spacing */
}

/* Clickable list items */
.dls-list-item-clickable {
    cursor: pointer;
}

.dls-list-item-clickable:hover {
    background-color: #f0f8ff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dls-list-item-clickable.selected {
    background-color: #d4e9ff;
    border-left: 3px solid #007bff;
}

/* Column definitions - PBXCC specific */
.dls-list-col-status {
    width: 50px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dls-list-col-name {
    flex: 1 1 30%;
    min-width: 150px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dls-list-col-name a {
    font-weight: 600;
    color: #0056b3;
    text-decoration: none;
}

.dls-list-col-name a:hover {
    text-decoration: underline;
}

.dls-list-col-version {
    width: 90px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dls-list-col-calls,
.dls-list-col-peers,
.dls-list-col-exts,
.dls-list-col-cpu,
.dls-list-col-memory,
.dls-list-col-network {
    width: 80px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Give memory and network a bit more space */
.dls-list-col-memory {
    width: 90px;
}

.dls-list-col-network {
    width: 100px;
}

/* Column definitions - Customer Modal Documents/Tickets */
.dls-list-col-date {
    flex: 0 0 100px;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-filename {
    flex: 1 1 40%;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-description {
    flex: 1 1 50%;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-ticket {
    flex: 0 0 100px;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-subject {
    flex: 1 1 50%;
    padding: 0 8px;
    text-align: left;
}

/* Column definitions - Customer Modal IPdb */
.dls-list-col-ipnetwork {
    flex: 1 1 45%;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-cidr {
    flex: 0 0 80px;
    padding: 0 8px;
    text-align: left;
}

.dls-list-col-ipdescription {
    flex: 1 1 45%;
    padding: 0 8px;
    text-align: left;
}

/* Mobile responsive - stack columns on small screens */
@media (max-width: 768px) {
    /* Hide list headers and footers on mobile */
    .dls-list-header,
    .dls-list-footer {
        display: none;
    }

    /* Stack list items vertically on mobile */
    .dls-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 8px;
    }

    /* Framework-defined columns become full width on mobile */
    .dls-list-col-status,
    .dls-list-col-name,
    .dls-list-col-version,
    .dls-list-col-calls,
    .dls-list-col-peers,
    .dls-list-col-exts,
    .dls-list-col-cpu,
    .dls-list-col-memory,
    .dls-list-col-network,
    .dls-list-col-date,
    .dls-list-col-filename,
    .dls-list-col-description,
    .dls-list-col-ticket,
    .dls-list-col-subject,
    .dls-list-col-ipnetwork,
    .dls-list-col-cidr,
    .dls-list-col-ipdescription {
        width: 100%;
        min-width: unset;
        flex: unset;
        text-align: left;
        justify-content: flex-start;
        padding-left: 0;
        padding-right: 0;
    }

    /* Universal selector to catch page-specific column classes (e.g., .audit-col-*, .report-col-*, etc.)
       This ensures any custom column class ending with -col-* gets mobile behavior automatically
       Page-specific CSS should define custom ::before labels for their columns */
    [class*="-col-"]:not([class*="dls-list-col-"]) {
        width: 100% !important;
        min-width: unset !important;
        flex: 1 1 100% !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Framework-provided column labels using ::before pseudo-elements */
    .dls-list-col-version::before { content: "Ver: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-calls::before { content: "Calls: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-peers::before { content: "Registered: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-exts::before { content: "Ext: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-cpu::before { content: "CPU: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-memory::before { content: "Mem: "; font-weight: 600; margin-right: 4px; }
    .dls-list-col-network::before { content: "Net: "; font-weight: 600; margin-right: 4px; }
}

/* Customer Modal Tab Backgrounds - System-wide shared modal */
#customerInfoContent {
    padding: 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

/* Tab-specific subtle backgrounds matching tab color scheme - Applied to entire content area */
#customerInfoContent.customer-tab-overview {
    background-color: rgba(0, 123, 255, 0.03); /* Light blue for primary */
}

#customerInfoContent.customer-tab-addresses {
    background-color: rgba(40, 167, 69, 0.03); /* Light green for success */
}

#customerInfoContent.customer-tab-phones {
    background-color: rgba(23, 162, 184, 0.03); /* Light cyan for info */
}

#customerInfoContent.customer-tab-documents {
    background-color: rgba(255, 193, 7, 0.03); /* Light yellow for warning */
}

#customerInfoContent.customer-tab-tickets {
    background-color: rgba(220, 53, 69, 0.03); /* Light red for danger */
}

#customerInfoContent.customer-tab-ipdb {
    background-color: rgba(108, 117, 125, 0.03); /* Light gray for secondary */
}

/* Ticket list column spacing in customer modal */
.customer-tab-tickets .dls-list-col-status {
    margin-right: 15px;
}

/* ==========================================================================
   HELP ICON SYSTEM - Framework-wide tooltip system
   ========================================================================== */

/* ============================================================================
   HELP ICON & SMART TOOLTIP SYSTEM
   Dynamic positioning with automatic space detection
   ============================================================================ */

.dls-help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background-color: #17a2b8;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
}

.dls-help-icon:hover {
    background-color: #138496;
}

/* Smart Tooltip Container - Created dynamically by JavaScript */
.dls-tooltip {
    position: fixed;
    padding: 10px 14px;
    background-color: #2d2d2d;
    color: white;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.5;
    white-space: pre-line;
    text-align: left;
    max-width: 400px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* z-index set dynamically by JavaScript to be above all active modals */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.dls-tooltip.show {
    opacity: 1;
}

/* Directional Arrow Styles */
.dls-tooltip::before {
    content: '';
    position: absolute;
    border: 8px solid transparent;
}

/* Arrow when tooltip is above icon (arrow points down) */
.dls-tooltip.position-top::before {
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #2d2d2d;
}

/* Arrow when tooltip is below icon (arrow points up) */
.dls-tooltip.position-bottom::before {
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #2d2d2d;
}

/* Arrow when tooltip is to the left of icon (arrow points right) */
.dls-tooltip.position-left::before {
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #2d2d2d;
}

/* Arrow when tooltip is to the right of icon (arrow points left) */
.dls-tooltip.position-right::before {
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #2d2d2d;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dls-tooltip {
        max-width: 320px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* ============================================================================
   CSS-based Tooltips for Non-Help-Icon Elements
   Simple tooltips for status dots, badges, and other elements
   NOTE: .dls-help-icon uses JavaScript tooltips above for smart positioning
   ============================================================================ */

[data-tooltip]:not(.dls-help-icon) {
    position: relative;
    cursor: help;
}

/* Tooltip text */
[data-tooltip]:not(.dls-help-icon)::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #333;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Tooltip arrow */
[data-tooltip]:not(.dls-help-icon)::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Show tooltip on hover */
[data-tooltip]:not(.dls-help-icon):hover::after,
[data-tooltip]:not(.dls-help-icon):hover::before {
    opacity: 1;
    visibility: visible;
}

/* Tab action tooltip - override to ensure small size (comes after general tooltip rules) */
.dls-tab-action[data-tooltip]::after {
    font-size: 11px !important;
    line-height: 1.4 !important;
    padding: 6px 10px !important;
    font-weight: 500 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Documentation Icon - Opens detailed documentation modal */
.dls-doc-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    background-color: #6c757d;
    color: white;
    font-size: 14px;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    position: relative;
}

.dls-doc-icon:hover {
    background-color: #5a6268;
}

/* Simple tooltip for doc icon */
.dls-doc-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #333;
    color: white;
    font-size: 11px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.dls-doc-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
    pointer-events: none;
}

.dls-doc-icon:hover::after,
.dls-doc-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Debug Icon (Technicians Only) */
.dls-debug-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    background-color: #28a745;
    color: white;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    position: relative;
}

.dls-debug-icon:hover {
    background-color: #218838;
}

/* Simple tooltip for debug icon */
.dls-debug-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #333;
    color: white;
    font-size: 11px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

.dls-debug-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
    pointer-events: none;
}

.dls-debug-icon:hover::after,
.dls-debug-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   RANGE SLIDER COMPONENT
   ========================================================================== */

/* Range Slider Container */
.dls-slider-container {
    position: relative;
    padding-top: 6px;
    padding-bottom: 30px;
}

/* Range Slider Styling */
.dls-range-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e0e0e0 0%, #e0e0e0 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* Slider Labels */
.dls-slider-labels {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    font-size: 11px;
    color: #666;
    user-select: none;
    margin-top: 8px;
}

.dls-slider-labels span {
    position: absolute;
    text-align: center;
    min-width: 30px;
}

/* Position labels based on slider min=10, max=100 */
.dls-slider-labels span:nth-child(1) { left: 0%; transform: translateX(-50%); }      /* Value 10 = MIN = 0% */
.dls-slider-labels span:nth-child(2) { left: 18%; transform: translateX(-50%); }     /* Value 25 - fine-tuned more right */
.dls-slider-labels span:nth-child(3) { left: 44.44%; transform: translateX(-50%); }  /* Value 50 - PERFECT, don't change */
.dls-slider-labels span:nth-child(4) { left: 71%; transform: translateX(-50%); }     /* Value 75 - fine-tuned more left */
.dls-slider-labels span:nth-child(5) { left: 100%; transform: translateX(-50%); }    /* Value 100 = MAX = 100% */

/* WebKit browsers (Chrome, Safari, Edge) */
.dls-range-slider::-webkit-slider-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
}

.dls-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    margin-top: -12px; /* Center 20px thumb on 8px track */
}

.dls-range-slider::-webkit-slider-thumb:hover {
    background: #0052a3;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Firefox */
.dls-range-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
}

.dls-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    margin-top: -12px; /* Center 20px thumb on 8px track */
}

.dls-range-slider::-moz-range-thumb:hover {
    background: #0052a3;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* ============================================================================
   HELP MODAL COMPONENTS
   ============================================================================
   Reusable components for creating structured help documentation modals.
   
   Usage Pattern:
   1. Visual Workflow - Use .dls-help-workflow-container with .dls-help-workflow-step
   2. Roles & Permissions - Use dls-grid-3 with dls-card
   3. Important Warnings - Use dls-alert dls-alert-warning
   4. Informational Sections - Use dls-card with dls-text-md
   5. State References - Use dls-card with inline badges
   
   See /var/www/html/HELP_MODAL_GUIDELINES.md for complete documentation.
   ========================================================================= */

/* Help Workflow Container - Horizontal layout with arrows */
.dls-help-workflow-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Individual Workflow Step Card */
.dls-help-workflow-step {
    flex: 1;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    min-width: 180px; /* Prevent shrinking too narrow */
}

.dls-help-workflow-step:hover {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

/* Workflow Step Components */
.dls-help-workflow-step-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.dls-help-workflow-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.dls-help-workflow-step-content {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Arrow Between Workflow Steps */
.dls-help-workflow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #6c757d;
    flex-shrink: 0;
    width: 30px;
    padding: 0 8px;
}

/* Mobile Responsive - Stack Vertically */
@media (max-width: 992px) {
    .dls-help-workflow-container {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 16px;
    }

    .dls-help-workflow-arrow {
        width: 100%;
        height: 30px;
        font-size: 24px;
        transform: rotate(90deg);
    }

    .dls-help-workflow-step {
        width: 100%;
        min-width: unset;
    }
}

/* Tablet Responsive - Smaller Gaps */
@media (max-width: 1200px) {
    .dls-help-workflow-container {
        gap: 8px;
        padding: 16px;
    }

    .dls-help-workflow-step {
        padding: 12px;
    }

    .dls-help-workflow-step-title {
        font-size: 14px;
    }

    .dls-help-workflow-arrow {
        font-size: 22px;
        width: 24px;
    }
}

/* ==========================================================================
   MESSAGE MODALS - Unified popup messaging system
   ========================================================================== */

/* Message modal container styling */
.dls-modal-overlay[data-message-type] .dls-modal {
    border-radius: 15px;
    min-width: 20%;
}

/* Message modal header styling - no background, colored text */
.dls-modal-overlay[data-message-type] .dls-modal-header {
    border-radius: 15px 15px 0 0;
    background-color: transparent;
    border-bottom: none;
}

/* Message modal body */
.dls-modal-overlay[data-message-type] .dls-modal-body {
    /* Left-aligned by default from .dls-modal-body */
}

/* Modal body 2-column label/value grid */
.dls-modal-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    margin-bottom: 20px;
}

.dls-modal-info-label {
    text-align: right;
    font-weight: 600;
    color: #666;
}

.dls-modal-info-value {
    text-align: left;
    color: #333;
}

/* Modal message content (below the grid) */
.dls-modal-message {
    text-align: left;
    line-height: 1.6;
}

/* Message modal footer - clean, no border or background */
.dls-modal-overlay[data-message-type] .dls-modal-footer {
    border-top: none;
    background-color: transparent;
}

/* Success - green border and text */
.dls-modal-overlay[data-message-type="success"] .dls-modal {
    border: 4px solid #28a745;
}

.dls-modal-overlay[data-message-type="success"] .dls-modal-header {
    color: #28a745;
}

.dls-modal-overlay[data-message-type="success"] .dls-modal-close {
    color: #28a745;
}

.dls-modal-overlay[data-message-type="success"] .dls-modal-close:hover {
    color: #1e7e34;
}

/* Error - red border and text */
.dls-modal-overlay[data-message-type="error"] .dls-modal {
    border: 4px solid #dc3545;
}

.dls-modal-overlay[data-message-type="error"] .dls-modal-header {
    color: #dc3545;
}

.dls-modal-overlay[data-message-type="error"] .dls-modal-close {
    color: #dc3545;
}

.dls-modal-overlay[data-message-type="error"] .dls-modal-close:hover {
    color: #bd2130;
}

/* Danger - red border and text (alias for error, used for delete confirmations) */
.dls-modal-overlay[data-message-type="danger"] .dls-modal {
    border: 4px solid #dc3545;
}

.dls-modal-overlay[data-message-type="danger"] .dls-modal-header {
    color: #dc3545;
}

.dls-modal-overlay[data-message-type="danger"] .dls-modal-close {
    color: #dc3545;
}

.dls-modal-overlay[data-message-type="danger"] .dls-modal-close:hover {
    color: #bd2130;
}

/* Warning - orange border and text */
.dls-modal-overlay[data-message-type="warning"] .dls-modal {
    border: 4px solid #ffc107;
}

.dls-modal-overlay[data-message-type="warning"] .dls-modal-header {
    color: #856404;
}

.dls-modal-overlay[data-message-type="warning"] .dls-modal-close {
    color: #856404;
}

.dls-modal-overlay[data-message-type="warning"] .dls-modal-close:hover {
    color: #533f03;
}

/* Info - blue border and text */
.dls-modal-overlay[data-message-type="info"] .dls-modal {
    border: 4px solid #17a2b8;
}

.dls-modal-overlay[data-message-type="info"] .dls-modal-header {
    color: #17a2b8;
}

.dls-modal-overlay[data-message-type="info"] .dls-modal-close {
    color: #17a2b8;
}

.dls-modal-overlay[data-message-type="info"] .dls-modal-close:hover {
    color: #117a8b;
}

/* Message modal icon - circle with border */
.dls-message-modal-icon {
    font-size: 20px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid;
}

/* Icon color variants - colored text and border */
.dls-modal-overlay[data-message-type="success"] .dls-message-modal-icon {
    color: #28a745;
    border-color: #28a745;
}

.dls-modal-overlay[data-message-type="error"] .dls-message-modal-icon {
    color: #dc3545;
    border-color: #dc3545;
}

.dls-modal-overlay[data-message-type="warning"] .dls-message-modal-icon {
    color: #856404;
    border-color: #ffc107;
}

.dls-modal-overlay[data-message-type="info"] .dls-message-modal-icon {
    color: #17a2b8;
    border-color: #17a2b8;
}

/* Footer layout variants */
.dls-modal-footer-center {
    justify-content: center !important;
}

.dls-modal-footer-split {
    justify-content: space-between !important;
}

/* OK button sizing for better touch targets */
.dls-modal-footer .dls-btn {
    min-width: 100px;
}


/* ============================================================================
   ERROR PAGE STYLES (404, etc.)
   ============================================================================ */

/* 404 Page Image */
.dls-img-404 {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* Link List */
.dls-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dls-link-list .dls-link {
    padding: 0.5rem 0;
    transition: padding-left 0.2s ease;
}

.dls-link-list .dls-link:hover {
    padding-left: 0.5rem;
}



/* Customer Info Modal - Fixed Height with Scrollable Content */
#customerInfoModal .dls-modal {
    height: 40vh;
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

#customerInfoModal .dls-modal-header {
    flex-shrink: 0;
}

#customerInfoModal.dls-modal-overlay.active .dls-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    padding: 0;
}

#customerInfoModal #customerInfoTabs {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 1rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

#customerInfoModal #customerInfoTabs .dls-tab-link.active {
    background: white;
    margin-bottom: -1px;
    border-bottom: 1px solid white;
    position: relative;
    z-index: 11;
}

#customerInfoModal #customerInfoContent {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
}

/* Sticky header for lists inside customer info modal */
#customerInfoModal .dls-list-header {
    position: sticky;
    top: -2.5rem;
    z-index: 5;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    margin-top: -2.5rem;
    padding: 10px 2.5rem;
}

/* Inactive customer visual indicator */
#customerInfoModal .dls-modal-header.customer-inactive {
    background: linear-gradient(to bottom, #f8d7da 0%, #f5c6cb 100%);
    border-bottom: 2px solid #dc3545;
}

#customerInfoModal .dls-modal-header.customer-inactive .dls-modal-title {
    color: #721c24;
}

#customerInfoModal .dls-modal-header.customer-inactive .dls-modal-close {
    color: #721c24;
}

/* Customer Info Modal - Mobile Responsive */
@media (max-width: 768px) {
    #customerInfoModal .dls-modal {
        height: 85vh;
        max-height: 85vh;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
    }

    #customerInfoModal .dls-modal-header {
        padding: 12px 16px;
    }

    #customerInfoModal .dls-modal-header h4 {
        font-size: 14px;
        line-height: 1.3;
    }

    #customerInfoModal #customerInfoTabs {
        padding: 8px 12px 0 12px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }

    #customerInfoModal #customerInfoTabs .dls-tab-link {
        font-size: 11px;
        padding: 6px 10px;
        flex: 0 0 auto;
    }

    #customerInfoModal #customerInfoContent {
        padding: 12px;
    }

    /* Fix label-value pairing: tight within pair, more space between pairs */
    #customerInfoModal .dls-input-group.dls-row {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }

    #customerInfoModal .dls-input-group.dls-row:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    #customerInfoModal .dls-input-group.dls-row .dls-col-4 {
        flex: 0 0 85px;
        min-width: 85px;
    }

    #customerInfoModal .dls-input-group.dls-row .dls-col-8 {
        flex: 1;
        word-break: break-word;
    }

    #customerInfoModal .dls-list-header {
        margin-left: -12px;
        margin-right: -12px;
        margin-top: -12px;
        padding: 8px 12px;
        top: -12px;
    }

    #customerInfoModal .dls-list-header > div,
    #customerInfoModal .dls-list-item > div {
        font-size: 11px;
    }

    #customerInfoModal .dls-form-label {
        font-size: 12px;
    }

    #customerInfoModal .dls-col-8 {
        font-size: 12px;
    }

    #customerInfoModal .dls-badge-sm {
        font-size: 9px;
        padding: 2px 5px;
    }
}

@media (max-width: 480px) {
    #customerInfoModal #customerInfoTabs .dls-tab-link {
        font-size: 10px;
        padding: 5px 8px;
    }

    #customerInfoModal .dls-modal-header h4 {
        font-size: 13px;
    }

    #customerInfoModal .dls-list-col-date,
    #customerInfoModal .dls-list-col-status {
        display: none;
    }

    #customerInfoModal .dls-list-col-ticket,
    #customerInfoModal .dls-list-col-subject {
        flex: 1;
    }
}

/* ==========================================================================
   TINYMCE CONTENT DISPLAY STYLES
   Shared styles for displaying TinyMCE-generated HTML content
   ========================================================================== */

/* Override framework defaults for TinyMCE content - allow inline styles */
.dls-text {
    font-family: inherit !important;
    font-size: inherit !important;
}

/* Let individual elements set their own fonts via inline styles */
.dls-text * {
    font-family: inherit;
    font-size: inherit;
}

/* Images in TinyMCE content should be responsive */
.dls-text img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Loading Spinner Modal Overlay
   ========================================================================== */

#dls-loading-spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

#dls-loading-spinner-overlay.active {
    display: flex;
}

.dls-spinner-modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.dls-spinner-modal-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* ========================================
   Quick Browse Customization Styles
   ======================================== */

/* Settings button in Quick Browse header */
.qb-settings-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qb-settings-btn:hover {
    color: #3498db;
}

.qb-settings-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty state */
.qb-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.qb-empty-state p {
    margin-bottom: 15px;
    font-size: 14px;
}

/* Settings modal layout */
.qb-settings-modal .dls-modal-container {
    max-width: 900px;
}

.qb-settings-layout {
    display: flex;
    gap: 20px;
    min-height: 500px;
}

.qb-settings-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.qb-panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
}

.qb-item-count {
    font-size: 13px;
    font-weight: normal;
    color: #666;
}

/* Items lists */
.qb-items-list {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    background: #f8f9fa;
    overflow-y: auto;
    max-height: 450px;
}

/* Section headers */
.qb-section-header {
    font-size: 12px;
    font-weight: 600;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid #3498db;
}

.qb-section-header:first-child {
    margin-top: 0;
}

.qb-section-items {
    margin-bottom: 8px;
}

/* Available items */
.qb-available-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    transition: all 0.2s;
}

.qb-available-item:hover {
    border-color: #3498db;
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.1);
}

.qb-item-title {
    font-size: 13px;
    color: #2c3e50;
    flex: 1;
}

.qb-item-category {
    font-size: 11px;
    color: #7f8c8d;
    font-style: italic;
}

/* Current items (sortable) */
.qb-current-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s;
}

.qb-current-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.15);
}

.qb-drag-handle {
    font-size: 18px;
    color: #95a5a6;
    cursor: grab;
    user-select: none;
}

.qb-drag-handle:active {
    cursor: grabbing;
}

.qb-current-item .qb-item-title {
    flex: 1;
}

/* Sortable.js states */
.qb-sortable-ghost {
    opacity: 0.4;
    background: #ecf0f1;
}

.qb-sortable-chosen {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    border-color: #3498db;
}

.qb-sortable-drag {
    opacity: 0.8;
    transform: rotate(2deg);
}

/* Empty message */
.qb-empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 13px;
    font-style: italic;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .qb-settings-layout {
        flex-direction: column;
        gap: 15px;
    }

    .qb-settings-panel {
        min-height: 250px;
    }

    .qb-items-list {
        max-height: 300px;
    }

    .qb-settings-modal .dls-modal-container {
        max-width: 100%;
        margin: 10px;
    }
}

/* Category headers within sections */
.qb-category-header {
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 4px;
    padding-left: 8px;
}

.qb-category-items {
    margin-bottom: 6px;
}

/* ==========================================================================
   SPOTLIGHT SEARCH - macOS Spotlight-style Menu Search
   ========================================================================== */

/* Trigger button in status bar */
.dls-spotlight-trigger {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.dls-spotlight-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.dls-spotlight-trigger:active {
    transform: scale(0.95);
}

/* Prevent body scroll when spotlight is open */
body.dls-spotlight-open {
    overflow: hidden;
}

/* Full-screen overlay */
.dls-spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.dls-spotlight-overlay.active {
    display: flex;
}

/* Main container - Spotlight style with more rounded corners */
.dls-spotlight-container {
    width: 100%;
    max-width: 680px;
    background: rgba(236, 236, 236, 0.98);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: spotlightFadeIn 0.12s ease-out;
}

@keyframes spotlightFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Search input wrapper - completely seamless, no visible field */
.dls-spotlight-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.dls-spotlight-icon {
    color: rgba(0, 0, 0, 0.5);
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

input.dls-spotlight-input,
input.dls-spotlight-input[type="text"],
.dls-spotlight-input {
    flex: 1;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0;
    background: none !important;
    background-color: transparent !important;
    font-size: 26px;
    font-weight: 300;
    color: #000;
    outline: none !important;
    box-shadow: none !important;
    caret-color: #007aff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input.dls-spotlight-input::placeholder,
.dls-spotlight-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
    font-weight: 300;
}

input.dls-spotlight-input:focus,
.dls-spotlight-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Results container */
.dls-spotlight-results {
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 0;
}

/* Results only show when there's content */
.dls-spotlight-results:empty {
    display: none;
    border-top: none;
}

/* No results message */
.dls-spotlight-no-results {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* Individual result item */
.dls-spotlight-result-item {
    cursor: default;
    margin: 0 6px;
    border-radius: 6px;
}

.dls-spotlight-result-item a {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: inherit;
}

.dls-spotlight-result-item:hover,
.dls-spotlight-result-item.selected {
    background: rgba(0, 122, 255, 0.1);
}

.dls-spotlight-result-item.selected {
    background: #007aff;
}

.dls-spotlight-result-item.selected .dls-spotlight-result-title,
.dls-spotlight-result-item.selected .dls-spotlight-result-category {
    color: #fff;
}

/* Result title */
.dls-spotlight-result-title {
    font-size: 16px;
    font-weight: 400;
    color: #1f2937;
    margin-bottom: 2px;
}

.dls-spotlight-result-title mark {
    background: transparent;
    color: inherit;
    font-weight: 600;
}

/* External link indicator */
.dls-spotlight-external {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 6px;
    vertical-align: middle;
}

/* Result category/breadcrumb */
.dls-spotlight-result-category {
    font-size: 13px;
    color: #8e8e93;
}

/* Scrollbar styling for results */
.dls-spotlight-results::-webkit-scrollbar {
    width: 8px;
}

.dls-spotlight-results::-webkit-scrollbar-track {
    background: transparent;
}

.dls-spotlight-results::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dls-spotlight-results::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile responsiveness for spotlight */
@media (max-width: 640px) {
    .dls-spotlight-overlay {
        padding-top: 10vh;
        padding-left: 12px;
        padding-right: 12px;
    }

    .dls-spotlight-container {
        max-width: 100%;
        border-radius: 10px;
    }

    .dls-spotlight-input-wrapper {
        padding: 14px 16px;
    }

    .dls-spotlight-input {
        font-size: 16px; /* Prevents iOS zoom */
    }

    .dls-spotlight-results {
        max-height: 50vh;
    }

    .dls-spotlight-result-item a {
        padding: 14px 16px;
    }
}

/* Status bar layout adjustment for spotlight trigger */
.dls-user-status-bar .dls-spotlight-trigger {
    margin-left: 8px;
}

/* ==========================================================================
   Staff Feedback Floating Tab
   ========================================================================== */

.staff-feedback-tab {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: rotate(90deg) translateX(50%);
    transform-origin: right center;
    background: linear-gradient(135deg, #4a6cf7 0%, #667eea 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    transition: padding-right 0.2s ease, background 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.staff-feedback-tab:hover {
    padding-right: 20px;
    background: linear-gradient(135deg, #3a5ce7 0%, #5670da 100%);
    color: white;
    text-decoration: none;
}

.staff-feedback-tab:visited {
    color: white;
}

/* Hide feedback tab on mobile (screen too small for side tabs) */
@media (max-width: 768px) {
    .staff-feedback-tab {
        display: none;
    }
}

/* ==========================================================================
   Staff Timeclock Component (PORTAL-351)
   ========================================================================== */

/* Header trigger button */
.dls-timeclock-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dls-timeclock-trigger i {
    font-size: 14px;
}

/* Clocked in state - green */
.dls-timeclock-status-in {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.dls-timeclock-status-in:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 3px 6px rgba(16, 185, 129, 0.4);
}

/* Clocked out state - gray */
.dls-timeclock-status-out {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.dls-timeclock-status-out:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 3px 6px rgba(107, 114, 128, 0.4);
}

/* Elapsed time display */
.dls-timeclock-time {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    letter-spacing: -0.5px;
}

/* Status bar spacing */
.dls-user-status-bar .dls-timeclock-trigger {
    margin-left: 8px;
    margin-right: 4px;
}

/* Dashboard Clock Modal */
.tc-dashboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

/* Circular clock ring */
.tc-clock-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.tc-ring-active {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 4px solid #10b981;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.1), 0 4px 12px rgba(16, 185, 129, 0.2);
}

.tc-ring-inactive {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 4px solid #d1d5db;
    box-shadow: 0 0 0 8px rgba(209, 213, 219, 0.2), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tc-clock-inner {
    text-align: center;
}

.tc-elapsed {
    font-size: 28px;
    font-weight: 700;
    color: #059669;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    letter-spacing: -1px;
    line-height: 1.2;
}

.tc-clock-icon {
    font-size: 36px;
    color: #9ca3af;
}

.tc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-top: 2px;
}

/* Status info */
.tc-status-info {
    text-align: center;
    margin-bottom: 20px;
}

.tc-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tc-badge-in {
    background: #10b981;
    color: white;
}

.tc-badge-out {
    background: #6b7280;
    color: white;
}

.tc-since {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

/* Action buttons */
.tc-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.tc-actions .dls-btn {
    min-width: 110px;
}

/* Loading state */
.tc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 15px;
    color: #6b7280;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .dls-timeclock-trigger {
        padding: 3px 8px;
        font-size: 11px;
    }

    .dls-timeclock-trigger i {
        font-size: 12px;
    }

    .tc-clock-ring {
        width: 120px;
        height: 120px;
    }

    .tc-elapsed {
        font-size: 24px;
    }

    .tc-clock-icon {
        font-size: 30px;
    }

    .tc-actions {
        flex-direction: column;
    }

    .tc-actions .dls-btn {
        width: 100%;
    }
}
