/* 
 * Account Management CSS - Cleaned and Organized
 * 
 * This file contains all styles for the account management interface.
 * 
 * ORGANIZATION:
 * 1. Password and Username Field Styles
 * 2. Button and Interactive Element Styles
 * 3. Modal and Form Styles
 * 4. Table Styles
 * 5. Status and Device Styles
 * 6. Stream and Device Command Styles
 * 7. Statistics Modal Styles
 * 8. Responsive Design
 * 
 * RECENT CLEANUP:
 * - Removed duplicate .modal-card definitions
 * - Consolidated .stream-input-container styles
 * - Removed duplicate #viewPasswordText definitions
 * - Consolidated #clientTable styles
 * - Removed redundant status-content definitions
 * - Organized responsive styles
 * 
 * Last updated: 2025
 */

/* Account Management Specific Styles */

/* Password Field Styles - Compact and Modern */
.password-field {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #495057;
    min-height: 20px;
    transition: all 0.2s ease;
}

.password-field:hover {
    border-color: #adb5bd;
    background-color: #e9ecef;
}

.password-dots {
    letter-spacing: 1.5px;
    font-weight: 600;
    color: #6c757d;
    flex: 1;
    min-width: 0;
}

.password-text {
    font-weight: 600;
    color: #495057;
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

/* Username Field Styles - Compact and Modern */
.username-field {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 20px;
    padding: 2px 4px;
}

.username-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #495057;
}

/* Copy Button Styles - Compact and Modern */
.copy-btn {
    background: none;
    border: none;
    color: #6c757d;
    padding: 2px 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Toggle Password Button Styles - Compact and Modern */
.password-field .btn {
    padding: 2px 4px;
    font-size: 0.7rem;
    border-radius: 3px;
    height: 20px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    min-width: 20px;
}

.password-field .btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.02);
    color: #007bff;
}

.password-field .btn:active {
    transform: scale(0.98);
}

.password-field .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    border-color: #80bdff;
}

.password-field .btn i {
    font-size: 0.7rem;
}

/* Section Title Styles */
.section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.1rem;
}

/* Import Modal Styles */
#importModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

#importModal .form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 5px;
}

/* View Password Modal Styles */
#viewPasswordText {
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    word-break: break-all;
    margin: 0;
}

/* License Device Table Styles */
#licenseDeviceTable {
    font-size: 0.9rem;
}

/* Ensure table-responsive in licenseDeviceListModal has proper overflow */
#licenseDeviceListModal .table-responsive {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#licenseDeviceTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

#licenseDeviceTable td {
    vertical-align: middle;
    padding: 8px 12px;
}

#licenseDeviceTable tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Enhanced Modal Card Styles */
.modal-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.modal-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.modal-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.modal-card .detail-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.modal-card p {
    margin-bottom: 8px;
    color: #6c757d;
    line-height: 1.4;
}

.modal-card p:last-child {
    margin-bottom: 0;
}

/* Enhanced Table Styles */
#clientTable {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

#clientTable thead th {
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

#clientTable tbody tr {
    transition: all 0.2s ease;
}

#clientTable tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.001);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header Components */
.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.9rem;
}

.date-display i {
    color: #007bff;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notification-bell:hover {
    background-color: #f8f9fa;
}

.notification-bell i {
    font-size: 1.1rem;
    color: #6c757d;
}

.notification-bell .badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 10px;
}

/* Action Button Styles */
#editSetMerchantAccountBtn,
#editSetCompletedBtn,
#editSetVerifiedBtn {
    font-size: 0.8rem;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#editSetMerchantAccountBtn:hover,
#editSetCompletedBtn:hover,
#editSetVerifiedBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Device Command Button Styles */
.device-command-btn {
    font-size: 0.8rem;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-command-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.device-command-btn:active {
    transform: translateY(0);
}

/* Stream Control Styles - Moved to deviceCommands.css */

/* Status Styles */
.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-deleted {
    color: #dc3545;
    font-weight: 600;
    }

/* Modal Card Styles - Consolidated with Enhanced Modal Card Styles above */

/* Details Section Styles */
.details-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.details-section .section-content {
    margin-top: 10px;
}

/* Bank Details Section */
.bank-details-section {
    padding: 5px;
    margin-bottom: 15px;
}

/* Device Count Styles */
.device-count-badge {
    display: inline-block;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.device-count-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

/* Status Content - Consolidated above */

/* Device Count Inline */
.device-count-inline {
  font-size: 0.95em;
  color: inherit;
  font-weight: 500;
  vertical-align: middle;
  margin-left: 1px;
  padding-left: 0;
}

/* Text Light Gray */
.text-light-gray {
    color: #6c757d !important;
}

/* Stream Wrapper - Moved to deviceCommands.css */

/* WebRTC Connecting Overlay */
.webrtc-connecting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.webrtc-connecting-content {
    color: #fff;
    text-align: center;
}

.webrtc-connecting-content i {
    display: block;
    margin-bottom: 10px;
}

.webrtc-connecting-content div {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Ensure video element can be positioned relative for overlay */
/* Optimize for sharp, fast-rendering video */
#webrtcVideo {
    position: relative;
    /* Hardware acceleration for smooth, sharp rendering */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    /* Prevent subpixel rendering blur */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ensure video renders at native quality */
    object-fit: contain;
    /* Ensure crisp video rendering - prevent blur */
    image-rendering: auto; /* Use browser's best rendering for video */
    -ms-interpolation-mode: bicubic; /* Better quality for video */
    /* Prevent CSS filters that might cause blur */
    -webkit-filter: none;
    filter: none;
}

/* Stream Overlay - Moved to deviceCommands.css */
/* Stream Container, Fullscreen Styles, Device Commands Log, Guide Checkbox, and Device Commands Modal - Moved to deviceCommands.css */

/* License Device List Modal - Mobile Title */
@media (max-width: 767.98px) {
    #licenseDeviceListModalLabel {
        font-size: 0.9rem !important;
    }
    
    /* Make header layout mobile-friendly - stack search on new line */
    #licenseDeviceListModal .modal-header .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem;
    }
    
    /* Make the inner flex container wrap so search goes to new line */
    #licenseDeviceListModal .modal-header .d-flex.align-items-center {
        flex-wrap: wrap !important;
        width: 100%;
        gap: 0.5rem;
    }
    
    /* Put search input on new line - force it to wrap by taking full width */
    #licenseDeviceListModal .modal-header .input-group {
        width: 100% !important;
        flex-basis: 100% !important;
        flex-grow: 1 !important;
        margin-top: 0.5rem;
        min-width: 100%;
    }
    
    /* Ensure modal header has relative positioning for absolute close button */
    #licenseDeviceListModal .modal-header {
        position: relative;
        padding-right: 2.5rem;
    }
    
    /* Ensure close button stays in top right */
    #licenseDeviceListModal .modal-header .btn-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        margin: 0;
        z-index: 10;
    }
    
    /* Adjust title and count spacing */
    #licenseDeviceListModalLabel {
        margin-right: 0.5rem !important;
    }
    
    #licenseDeviceRecordCount {
        margin-right: 0 !important;
    }
}

/* Smaller mobile devices */
@media (max-width: 576px) {
    #licenseDeviceListModalLabel {
        font-size: 0.85rem !important;
    }
    
    #licenseDeviceListModal .modal-header .input-group {
        margin-top: 0.75rem;
    }
    
    #licenseDeviceListModal .modal-header {
        padding-right: 2.25rem;
    }
    
    #licenseDeviceListModal .modal-header .btn-close {
        top: 0.4rem;
        right: 0.4rem;
    }
}

/* Device Commands Modal - Mobile Optimizations - Moved to deviceCommands.css */

/* Client Table Specific Styles - Consolidated with Enhanced Table Styles above */

#newInvoiceTable tbody tr td {
  vertical-align: middle;
}

#newInvoiceTable.table-striped tbody tr:hover td,
#newInvoiceTable tbody tr:hover td {
    background-color: transparent !important;
    border-color: #dee2e6;
}

/* Modal Body Responsive */
.modal-body .row {
    margin-bottom: 15px;
}

.modal-body .col-md-6 {
    margin-bottom: 10px;
}

/* Modal Body Responsive - Consolidated with other responsive styles */

/* Section Titles and Cards - Enhanced */
.card .section-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #0d6efd;
    background: #e9f2fb;
    padding: 0.75rem 1rem;
    margin: -1rem -1rem 1.5rem -1rem;
    border-bottom: 2px solid #b6d4fe;
    border-radius: 0.5rem 0.5rem 0 0;
}

.card.details-section {
    background: #f8f9fa;
    border: 2px solid #b6d4fe;
    box-shadow: 0 2px 12px rgba(13, 110, 253, 0.07);
}

.details-section label,
.details-section .detail-label {
    font-weight: 600;
    color: #212529;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    clear: both;
}

.details-section p,
.details-section input,
.details-section textarea {
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 0.95rem;
}

/* Import Modal Styles */
#importForm ul {
    padding-left: 20px;
}

#importForm li {
    margin-bottom: 5px;
}

/* View Password Modal - Consolidated with View Password Modal Styles above */

/* Validation Error Styles */
.error-message {
    color: #D32F2F;
    background-color: #FFEBEE;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 5px;
}

.input-error {
    border-color: #D32F2F !important;
}

.input-error:focus {
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25) !important;
}

/* Server Error Container */
.server-error-container {
    color: #D32F2F;
    background-color: #FFEBEE;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
}

.server-error-container i {
    margin-right: 5px;
}

/* Specific column widths for account table */
/* MID */
#clientTable th:nth-child(1),
#clientTable td:nth-child(1) {
    width: 60px;
}

/* MerchantName */
#clientTable th:nth-child(2),
#clientTable td:nth-child(2) {
    width: 220px;
}

/* User ID */
#clientTable th:nth-child(3),
#clientTable td:nth-child(3) {
    width: 100px;
    padding: 4px 6px;
}

/* Username field specific table cell styling */
#clientTable td:nth-child(3) .username-field {
    max-width: 100%;
    overflow: hidden;
}

/* Password */
#clientTable th:nth-child(4),
#clientTable td:nth-child(4) {
    width: 90px;
    min-width: 90px;
    padding: 4px 6px;
}

/* Password field specific table cell styling */
#clientTable td:nth-child(4) .password-field {
    max-width: 100%;
    overflow: hidden;
}

#clientTable td:nth-child(4) .password-dots,
#clientTable td:nth-child(4) .password-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status column - increased width for better icon display */
#clientTable th:nth-child(5),
#clientTable td:nth-child(5) {
    width: 200px;
    min-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Content - improved styling for better icon display */
.status-content {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
    min-height: 32px;
}

.status-content a {
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 32px;
    min-height: 32px;
    justify-content: center;
}

.status-content a:hover {
    text-decoration: none;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.status-content a:active {
    transform: scale(0.95);
}

/* Status Content Links - Consolidated above */

/* Status column cell styling */
#clientTable td:nth-child(5) {
    padding: 8px 12px;
    vertical-align: middle;
    text-align: left;
}

/* Ensure status icons have consistent spacing and are bigger */
#clientTable td:nth-child(5) i {
    margin-right: 0;
    font-size: 18px;
    transition: all 0.2s ease;
}

#clientTable td:nth-child(5) a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

#clientTable td:nth-child(5) a:hover {
    text-decoration: none;
}

#clientTable td:nth-child(5) a:hover i {
    transform: scale(1.1);
}

/* Status column responsive adjustments */
@media (max-width: 1200px) {
    #clientTable th:nth-child(5),
    #clientTable td:nth-child(5) {
        width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    #clientTable th:nth-child(5),
    #clientTable td:nth-child(5) {
        width: 140px;
        min-width: 140px;
    }
    
    /* Status icons optimized for mobile touch */
    #clientTable td:nth-child(5) i {
        font-size: 16px;
    }
    
    .status-content {
        gap: 8px;
        min-height: 28px;
    }
    
    .status-content a {
        min-width: 32px;
        min-height: 32px;
        padding: 6px;
        border-radius: 8px;
    }
    
    .status-content a:hover {
        background-color: rgba(0, 123, 255, 0.15);
    }
}

@media (max-width: 576px) {
    #clientTable th:nth-child(5),
    #clientTable td:nth-child(5) {
        width: 120px;
        min-width: 120px;
    }
    
    /* Status icons optimized for small mobile screens */
    #clientTable td:nth-child(5) i {
        font-size: 14px;
    }
    
    .status-content {
        gap: 6px;
        min-height: 24px;
    }
    
    .status-content a {
        min-width: 28px;
        min-height: 28px;
        padding: 4px;
        border-radius: 6px;
    }
}

@media (max-width: 992px) {
    #clientTable th:nth-child(5),
    #clientTable td:nth-child(5) {
        width: 160px;
        min-width: 160px;
    }
    
    /* Status icons remain big and clickable on tablets */
    #clientTable td:nth-child(5) i {
        font-size: 16px;
    }
    
    .status-content a {
        min-width: 28px;
        min-height: 28px;
        padding: 4px;
    }
    
    /* Compact password field on smaller screens */
    .password-field {
        padding: 2px 6px;
        gap: 3px;
        min-height: 24px;
    }
    
    .password-field .btn {
        padding: 1px 3px;
        font-size: 0.65rem;
        height: 18px;
        width: 18px;
        min-width: 18px;
    }
    
    .password-field .btn i {
        font-size: 0.65rem;
    }
    
    .copy-btn {
        padding: 1px 3px;
        font-size: 0.65rem;
        min-width: 18px;
        height: 18px;
    }
    
    .username-field {
        gap: 3px;
        min-height: 18px;
    }
    
    .username-text {
        font-size: 0.8rem;
    }
}

/* Statistics Modal Styles */
.statistics-container {
  padding: 0;
}

.statistics-card {
  border: none;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.statistics-card .card-header {
  padding: 0.5rem 0.75rem;
  border-bottom: none;
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.statistics-card .card-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.2px;
}

.statistics-card:nth-child(2) .card-header {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* Table-like Statistics Layout */
.statistics-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.statistics-table th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.statistics-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.statistics-table tr:hover {
  background-color: #f8f9fa;
}

.statistics-table tr:last-child td {
  border-bottom: none;
}

/* Period Row Styling */
.period-row {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  font-weight: 700;
  color: #2c3e50;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.period-row td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #007bff;
}

.period-row i {
  margin-right: 0.4rem;
  color: #007bff;
}

/* Order Type Row Styling */
.order-type-row {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
}

.order-type-row td {
  padding: 0.4rem 0.75rem 0.4rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.order-type-row i {
  margin-right: 0.4rem;
  color: #6c757d;
}

/* Payment Method Row Styling */
.payment-method-row {
  background: white;
}

.payment-method-row td {
  padding: 0.4rem 0.75rem 0.4rem 2.5rem;
  border-bottom: 1px solid #f1f3f4;
  font-size: 0.8rem;
}

.payment-method-row:hover {
  background-color: #f8f9fa;
}

/* Data Cell Styling */
.stat-number {
  font-weight: 700;
  font-size: 1rem;
  color: #2c3e50;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.stat-currency {
  font-weight: 700;
  font-size: 1rem;
  color: #28a745;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.stat-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: #007bff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Booking Statistics Grid */
.booking-stats-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.booking-stats-table th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.booking-stats-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.booking-stats-table tr:hover {
  background-color: #f8f9fa;
}

.booking-stats-table tr:last-child td {
  border-bottom: none;
}

.booking-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

.booking-stat-icon.primary { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); }
.booking-stat-icon.success { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.booking-stat-icon.info { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }
.booking-stat-icon.warning { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); }
.booking-stat-icon.danger { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }

.booking-stat-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
}

.booking-stat-value {
  font-weight: 800;
  font-size: 1.1rem;
  color: #2c3e50;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* No Data Message */
.no-data-message {
  padding: 1.5rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px dashed #dee2e6;
}

.no-data-message i {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #adb5bd;
}

/* Mobile Responsiveness for Statistics */
@media (max-width: 768px) {
  #statisticsModal .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  #statisticsModal .modal-body {
    padding: 15px 10px;
  }
  
  .statistics-container .row {
    margin: 0;
  }
  
  .statistics-container .col-12 {
    padding: 0 0 15px 0;
  }
  
  .statistics-container .col-12:last-child {
    padding-bottom: 0;
  }
  
  .statistics-table,
  .booking-stats-table {
    font-size: 0.8rem;
    min-width: 100%;
  }
  
  .statistics-table th,
  .statistics-table td,
  .booking-stats-table th,
  .booking-stats-table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .period-row td {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .order-type-row td {
    padding: 0.3rem 0.5rem 0.3rem 1rem;
    font-size: 0.75rem;
  }
  
  .payment-method-row td {
    padding: 0.3rem 0.5rem 0.3rem 1.5rem;
    font-size: 0.7rem;
  }
  
  .stat-number,
  .stat-currency,
  .stat-count {
    font-size: 0.85rem;
  }
  
  .booking-stat-value {
    font-size: 0.9rem;
  }
  
  .booking-stat-icon {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    margin-right: 0.3rem;
  }
  
  .statistics-card .card-header {
    padding: 0.4rem 0.6rem;
  }
  
  .statistics-card .card-header h5 {
    font-size: 0.9rem;
  }
  
  .statistics-card .card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .no-data-message {
    padding: 1rem;
    font-size: 0.85rem;
  }
  
  .no-data-message i {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  #statisticsModal .modal-dialog {
    margin: 5px;
    max-width: calc(100% - 10px);
  }
  
  #statisticsModal .modal-body {
    padding: 10px 5px;
  }
  
  .statistics-table th,
  .statistics-table td,
  .booking-stats-table th,
  .booking-stats-table td {
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
  }
  
  .period-row td {
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
  }
  
  .order-type-row td {
    padding: 0.25rem 0.4rem 0.25rem 0.8rem;
    font-size: 0.7rem;
  }
  
  .payment-method-row td {
    padding: 0.25rem 0.4rem 0.25rem 1.2rem;
    font-size: 0.65rem;
  }
  
  .stat-number,
  .stat-currency,
  .stat-count {
    font-size: 0.8rem;
  }
  
  .booking-stat-value {
    font-size: 0.85rem;
  }
  
  .booking-stat-icon {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    margin-right: 0.25rem;
  }
  
  .statistics-card .card-header {
    padding: 0.3rem 0.5rem;
  }
  
  .statistics-card .card-header h5 {
    font-size: 0.85rem;
  }
  
  #statisticsModal .modal-title {
    font-size: 1rem;
  }
  
  .statistics-container .col-12 {
    padding: 0 0 10px 0;
  }
}

@media (max-width: 480px) {
  .statistics-table th,
  .statistics-table td,
  .booking-stats-table th,
  .booking-stats-table td {
    padding: 0.25rem 0.3rem;
    font-size: 0.65rem;
  }
  
  .period-row td {
    padding: 0.25rem 0.3rem;
    font-size: 0.7rem;
  }
  
  .order-type-row td {
    padding: 0.2rem 0.3rem 0.2rem 0.6rem;
    font-size: 0.65rem;
  }
  
  .payment-method-row td {
    padding: 0.2rem 0.3rem 0.2rem 1rem;
    font-size: 0.6rem;
  }
  
  .stat-number,
  .stat-currency,
  .stat-count {
    font-size: 0.75rem;
  }
  
  .booking-stat-value {
    font-size: 0.8rem;
  }
  
  .booking-stat-icon {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
    margin-right: 0.2rem;
  }
  
  .statistics-card .card-body::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.6rem;
    color: #6c757d;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
  }
}

/* Loading State */
.statistics-container.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.statistics-table,
.booking-stats-table {
  animation: fadeInUp 0.3s ease-out;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  .statistics-card {
    margin-bottom: 1rem;
  }
  
  .table-responsive {
    border: none;
    margin: 0;
  }
  
  .statistics-container .row {
    margin: 0;
  }
  
  #statisticsModal .modal-header {
    padding: 0.75rem 1rem;
  }
  
  #statisticsModal .modal-footer {
    padding: 0.75rem 1rem;
  }
  
  #statisticsModal .btn {
    min-height: 38px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #statisticsModal .modal-header {
    padding: 0.5rem 0.75rem;
  }
  
  #statisticsModal .modal-footer {
    padding: 0.5rem 0.75rem;
  }
  
  #statisticsModal .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .statistics-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

/* Enhanced Client Table Styles - Consolidated and Improved */
#clientTable tbody tr {
  background-color: #fff !important;
  border: 1px solid #e0e0e0 !important;
  transition: background-color 0.2s ease;
}

#clientTable.table-striped tbody tr:hover, 
#clientTable tbody tr:hover, 
#clientTable tr:hover {
  background-color: #e3f2fd !important;
  border-color: #2196f3 !important;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  z-index: 2;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

#clientTable tbody tr td {
  background-color: #fff !important;
  vertical-align: middle;
  padding: 6px 4px;
}

#clientTable.table-striped tbody tr:hover td,
#clientTable tbody tr:hover td,
#clientTable tr:hover td {
  background-color: #e3f2fd !important;
  transition: background 0.2s;
  border-color: #dee2e6;
}

#clientTable tbody tr:focus {
  background-color: #bbdefb !important;
  outline: 2px solid #007bff;
  outline-offset: -2px;
}

/* Progress bar - Simple, no animation */
.progress-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.progress-clickable {
  cursor: pointer;
}

.progress {
  background-color: #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
  flex: 1;
}

.progress-bar {
  transition: none !important;
  animation: none !important;
}

.progress-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 20px;
  text-align: right;
}

.progress-percentage-danger {
  color: #dc3545; /* Red for low progress (0-49%) */
}

.progress-percentage-warning {
  color: #ffc107; /* Yellow/Orange for medium progress (50-99%) */
}

.progress-percentage-success {
  color: #28a745; /* Green for high progress (100%) */
}

/* Remove Bootstrap's default progress bar animations */
.progress-bar-animated,
.progress-bar-striped {
  animation: none !important;
  background-image: none !important;
}

