/* Cases Management Styles */

/* Header Filters */
.cases-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cases-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e6ed;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.cases-filter-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(8%) saturate(1090%) hue-rotate(169deg) brightness(93%) contrast(86%);
}

/* Date Range Filter Styles */
.cases-date-range-filter {
    min-width: 280px;
}

.cases-date-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cases-date-filter {
    padding: 6px 10px;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #2c3e50;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 120px;
}

.cases-date-filter:focus {
    outline: none;
    border-color: #81C344;
    box-shadow: 0 0 0 2px rgba(129, 195, 68, 0.1);
}

.cases-date-separator {
    color: #7f8c8d;
    font-weight: 500;
    font-size: 0.9rem;
}

.cases-branch-filter {
    padding: 6px 10px;
    border: 1px solid #e0e6ed;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #2c3e50;
    background: white;
    transition: border-color 0.3s ease;
    cursor: pointer;
    min-width: 120px;
}

.cases-branch-filter:focus {
    outline: none;
    border-color: #81C344;
    box-shadow: 0 0 0 2px rgba(129, 195, 68, 0.1);
}

.cases-branch-filter option {
    padding: 8px 12px;
    color: #2c3e50;
    background: white;
}

/* Table Column Filters */
.column-filter {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #2c3e50;
    background: white;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.column-filter:focus {
    outline: none;
    border-color: #81C344;
    box-shadow: 0 0 0 2px rgba(129, 195, 68, 0.1);
}

.column-filter::placeholder {
    color: #7f8c8d;
    font-weight: 500;
}

/* Manage Button */
.manage-btn {
    background: #f8f9fa;
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.manage-btn:hover {
    background: #e9ecef;
}

.manage-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(8%) saturate(1090%) hue-rotate(169deg) brightness(93%) contrast(86%);
}

/* Statistics Cards Section */
.stats-cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #f0f4f8;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stats-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stats-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg,#194D3D, #81C344);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(25, 77, 61, 0.3);
}

.card-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(100%);
}

.card-icon.flipped {
    transform: scaleX(-1) scaleY(-1);
}

.stats-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stats-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stats-left-number {
    color: darkgrey!important;
}

.stats-number {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.stats-change {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.stats-change.good {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.stats-change.bad {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.change-icon {
    width: 16px;
    height: 16px;
}

.change-icon.flipped {
    transform: scaleX(-1) scaleY(-1);
}

.stats-change.good .change-icon {
    filter: brightness(0) saturate(100%) invert(47%) sepia(79%) saturate(2476%) hue-rotate(86deg) brightness(118%) contrast(119%);
}

.stats-change.bad .change-icon {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}

.stats-card-footer {
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 500;
}

.stats-period {
    opacity: 0.8;
}


.search-left {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-select {
    min-width: 150px;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.search-right {
    display: flex;
    gap: 10px;
}

/* Cases Table */
.cases-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 25px;
}

.cases-table {
    width: 100%;
    border-collapse: collapse;
}

.cases-table th {
    background: #ffffff;
    padding: 18px 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e6ed;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.cases-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #e0e6ed;
    vertical-align: middle;
    font-size: 0.95rem;
    text-align: center;
}

.cases-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.cases-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.cases-table tbody tr:hover {
    background-color: #e9ecef !important;
    transition: background-color 0.3s ease;
}

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



/* Case Title Styling */
.cases-table td:nth-child(2) {
    font-weight: 500;
    color: #2c3e50;
    max-width: 200px;
}

/* Status Badge Variations */
.status-badge.critical {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.in-progress {
    background: #cce5ff;
    color: #004085;
}

.status-badge.resolved {
    background: #d4edda;
    color: #155724;
}

.status-badge.open {
    background: #fff3cd;
    color: #856404;
}

/* Priority Badge Variations */
.priority-badge.high {
    background: #f8d7da;
    color: #721c24;
}

.priority-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.priority-badge.low {
    background: #d4edda;
    color: #155724;
}

/* Action Buttons */
.cases-table .btn {
    margin-right: 5px;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cases-table .btn:hover {
    opacity: 0.9;
}

.cases-table .btn-primary {
    background: #3498db;
    border-color: #3498db;
}

.cases-table .btn-secondary {
    background: #95a5a6;
    border-color: #95a5a6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e6ed;
    margin: 0;
}

.page-info {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Pagination Button Styles */
.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #7f8c8d;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(100%);
}


/* Loading State */
.cases-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.cases-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e0e6ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Empty State */
.cases-empty {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.cases-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cases-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.cases-empty p {
    font-size: 1rem;
    margin-bottom: 25px;
}

/* Modal Styles */
.case-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.case-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

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


/* Animation for table rows */
.cases-table tbody tr {
    /*animation: slideIn 0.3s ease;*/
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects for interactive elements */
.filter-select:hover,
.search-input:hover {
    border-color: #bdc3c7;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Focus states for accessibility */
.btn:focus,
.filter-select:focus,
.search-input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Highlighted rows for stats card filtering */
.cases-table tbody tr.highlighted {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
    border-left: 4px solid #3498db;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% {
        background: rgba(52, 152, 219, 0.2);
        transform: scale(1.01);
    }
    50% {
        background: rgba(52, 152, 219, 0.1);
    }
    100% {
        background: rgba(52, 152, 219, 0.05);
        transform: scale(1);
    }
}

/* Loading state for cases table */
.cases-page-loading {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
}

.cases-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

.cases-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(127, 140, 141, 0.3);
    border-top: 3px solid #7f8c8d;
    border-radius: 50%;
    animation: casesSpinAnimation 1s linear infinite;
}

.cases-loading-text {
    color: #7f8c8d;
}

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

/* Branch Selection Styles */
.branch-selection-container {
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.branch-selection-header {
    text-align: center;
    margin-bottom: 40px;
}

.branch-selection-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.branch-selection-header p {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

/* Branch Table Styles */
.branch-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.branch-table th {
    background: #f8f9fa;
    padding: 18px 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e6ed;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.branch-table th:nth-child(1),
.branch-table th:nth-child(2) {
    text-align: left;
}

.branch-table td {
    padding: 18px 8px;
    border-bottom: 1px solid #e0e6ed;
    vertical-align: middle;
    font-size: 0.95rem;
    text-align: center;
}

.branch-table td:nth-child(1),
.branch-table td:nth-child(2) {
    text-align: left;
}

/* Branch name filter specific styling */
.branch-name-filter {
    width: 100%;
    min-width: 120px;
    max-width: 100%;
}

/* Chevron column styling */
.branch-chevron {
    text-align: center;
    width: 50px;
    padding: 18px 10px;
}

.chevron-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(8%) saturate(1090%) hue-rotate(169deg) brightness(93%) contrast(86%);
    transition: transform 0.3s ease;
}

.branch-row:hover .chevron-icon {
    transform: translateX(3px);
}

.branch-row {
    /*transition: background-color 0.3s ease;*/
    cursor: pointer;
}

.branch-row:hover {
    background: linear-gradient(135deg, rgba(25, 77, 61, 0.05), rgba(129, 195, 68, 0.05));
}

.clickable-row {
    cursor: pointer;
}


.branch-icon-cell {
    text-align: center;
    width: 80px;
}

.branch-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #194D3D, #81C344);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 3px 8px rgba(25, 77, 61, 0.3);
}

.branch-icon-img-small {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(100%);
}

.branch-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.branch-location {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.case-type-count {
    text-align: center;
    padding: 8px;
}

.case-count-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ffe6e6;
    color: #d63031;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(214, 48, 49, 0.3);
    min-width: 45px;
    text-align: center;
}

.case-count-badge.no-cases {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}



/* Status Indicator Lights */
.status-indicator-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-wrap: nowrap;
    width: 80px;
    margin: 0 auto;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.status-indicator.active {
    background: #e74c3c;
    border-color: #c0392b;
}

.status-indicator.inactive {
    background: transparent;
    border-color: #bdc3c7;
}


/* Status cells in cases table */
.serving-time-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 8px;
}

.status-cell {
    text-align: center;
    padding: 15px 8px;
    vertical-align: middle;
}

.status-cell .status-indicator {
    margin: 0 auto;
    display: block;
}

.serving-time-value {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #e8f5e8;
    color: #194D3D;
    border: 1px solid rgba(25, 77, 61, 0.2);
}

.serving-time-value.time-over-bg {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid rgba(214, 48, 49, 0.3);
}

.status-text {
    font-size: 0.85rem;
    color: #2c3e50;
}

/* Cases Table Header */
.cases-table-header {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e0e6ed;
}

.selected-branch-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-to-branches {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.back-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(100%);
}

#selectedBranchTitle {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Button Styles for Cases Page - Unique Names */
.cases-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
}

.cases-btn-primary {
    background: #3498db;
    color: white;
}

.cases-btn-primary:hover {
    background: #2980b9;
}

.cases-btn-secondary {
    background: #95a5a6;
    color: white;
}

.cases-btn-secondary:hover {
    background: #7f8c8d;
}

.cases-btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.cases-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cases-btn:active {
    opacity: 0.8;
}

/* Specific button styles for cases page */
.cases-back-to-branches {
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cases-back-to-branches:hover {
    background: #7f8c8d;
}

.cases-select-branch-btn {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cases-select-branch-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.cases-pagination-btn {
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cases-pagination-btn:hover:not(:disabled) {
    background: #7f8c8d;
}

.cases-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Case Detail View */
.case-detail-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 25px;
}

.case-detail-header {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e0e6ed;
}

.case-detail-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cases-back-to-table {
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cases-back-to-table:hover {
    background: #7f8c8d;
}

#caseDetailTitle {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

/* Case Detail Table */
.case-detail-table-section {
    padding: 20px;
    border-bottom: 1px solid #e0e6ed;
}

.case-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.case-detail-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
    font-size: 0.95rem;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
    width: 15%;
    text-align: right;
    background: #f8f9fa;
}

.detail-value {
    color: #495057;
    width: 35%;
    text-align: left;
    padding-left: 20px;
}

.detail-description {
    width: auto;
    padding: 15px 20px;
    background: #f8f9fa;
    font-style: italic;
    line-height: 1.5;
    border-left: 4px solid #81C344;
}

/* Board Status */
.board-status {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.board-status .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid transparent;
}

.board-status .status-indicator.board-placed {
    background: #27ae60;
    border-color: #229954;
}

.board-status .status-indicator.board-not-placed {
    background: #e74c3c;
    border-color: #c0392b;
}

.board-status .status-indicator.board-ignored {
    background: darkgray;
    border-color: darkgray;
}

.board-status-text {
    font-size: 0.85rem;
    color: #495057;
    padding-right: 10px;
}

.board-time-row {
    background: #f8f9fa;
}

.board-time-row .detail-label {
    background: #e9ecef;
    font-weight: 500;
    color: #495057;
}

.board-time-row .detail-value {
    color: #28a745;
    font-weight: 500;
}

/* Board Status Combined */
.board-status-combined {
    padding: 12px 20px;
}

.board-status-container {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    min-width: 0;
}

.board-time-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.board-time-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    white-space: nowrap;
}

.board-time-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.board-time-value {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
}

.board-time-divider {
    width: 1px;
    height: 30px;
    background: #dee2e6;
    border-right: 1px solid #adb5bd;
}

/* Image Gallery - Redesigned for Portrait Images */
.case-image-gallery {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.image-gallery-sidebar {
    width: 200px;
    flex-shrink: 0;
}

.image-gallery-header {
    margin-bottom: 16px;
}

.image-gallery-header h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.image-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.image-tab {
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.image-tab:hover {
    background: #E0ECD4;
    border-color: #adb5bd;
}

.image-tab.active {
    background: #E0ECD4;
    color: #01A550;
    border-color: #01A550;
}

.tab-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(50%) sepia(15%) saturate(800%) hue-rotate(200deg) brightness(85%) contrast(95%);
    transition: filter 0.3s ease;
    flex-shrink: 0;
}


.image-display-area {
    flex: 1;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e0e6ed;
    min-height: 500px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder {
    text-align: center;
    color: #6c757d;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(8%) saturate(1090%) hue-rotate(169deg) brightness(93%) contrast(86%);
    opacity: 0.4;
}

.placeholder-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: #6c757d;
}

/* Portrait Image Styles */
.case-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Case Detail Loading */
.case-detail-loading {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
}

.case-detail-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

.case-detail-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(127, 140, 141, 0.3);
    border-top: 3px solid #7f8c8d;
    border-radius: 50%;
    animation: caseDetailSpinAnimation 1s linear infinite;
}

.case-detail-loading-text {
    color: #7f8c8d;
}

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

/* Cases Page Loading */
.cases-page-loading {
    text-align: center;
    padding: 60px 40px;
    background: #f8f9fa;
}

.cases-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #7f8c8d;
    font-size: 1rem;
    font-weight: 500;
}

.cases-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(127, 140, 141, 0.3);
    border-top: 3px solid #7f8c8d;
    border-radius: 50%;
    animation: casesSpinAnimation 1s linear infinite;
}

.cases-loading-text {
    color: #7f8c8d;
}

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

/* Manage Cell Styles */
.manage-cell {
    text-align: center;
    padding: 15px 8px;
    vertical-align: middle;
}

.manage-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(8%) saturate(1090%) hue-rotate(169deg) brightness(93%) contrast(86%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.manage-icon:hover {
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
    transform: scale(1.1);
}

/* Responsive Design for Cases Page - Laptop/Notebook screens */
@media (max-width: 1300px) {
    .stats-cards-section {
        gap: 12px;
    }
    
    .stats-card {
        padding: 15px;
    }
    
    .stats-card-icon {
        width: 50px;
        height: 50px;
    }
    
    .card-icon {
        width: 24px;
        height: 24px;
    }
    
    .stats-number {
        font-size: 1.8rem;
    }
    
    .cases-date-range-inputs {
        gap: 6px;
    }
    
    .cases-date-filter {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 1200px) {
    .stats-cards-section {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
        gap: 10px;
    }
    
    .stats-card {
        padding: 12px;
    }
    
    .stats-card-title {
        font-size: 0.9rem;
    }
    
    .stats-number {
        font-size: 1.7rem;
    }
    
    .branch-table,
    .cases-table {
        font-size: 0.9rem;
    }
    
    .branch-table th,
    .cases-table th,
    .branch-table td,
    .cases-table td {
        padding: 10px 8px;
    }
    
    .column-filter,
    .branch-name-filter {
        font-size: 0.85rem;
        padding: 5px 8px;
    }
    
    .cases-date-filter {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
}
