/* Camera Management Styles - Copied from Cases */

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

.camera-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);
}

.camera-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 */
.camera-date-range-filter {
    min-width: 280px;
}

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

.camera-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;
}

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

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

.camera-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;
}

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

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

/* Camera Table Column Filters */
.camera-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;
}

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

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

/* Camera Statistics Section */
.camera-stats-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.camera-status-cards {
    display: flex;
    gap: 16px;
}

.camera-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;
}

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

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

/* Camera Total Card Styles */
.camera-total-card {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

.camera-total-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: linear-gradient(135deg, #194D3D, #81C344);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.camera-total-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.camera-total-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-total-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.camera-total-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

/* Camera Status Card Styles */
.camera-status-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25% auto;
    min-width: 240px;
    height: 100px;
}

.camera-online-card {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08), rgba(40, 167, 69, 0.04));
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.camera-offline-card {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.04));
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.camera-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.camera-status-indicator.online {
    background: #28a745;
}

.camera-status-indicator.offline {
    background: #dc3545;
}

.camera-status-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.camera-status-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.camera-status-label {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.camera-status-count-label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 400;
}

.camera-status-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.camera-online-card .camera-status-number {
    color: #28a745;
}

.camera-offline-card .camera-status-number {
    color: #dc3545;
}


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

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

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

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

.camera-stats-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.camera-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;
}

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

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

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

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

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

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

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

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

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

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

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

.camera-branch-table th {
    background: #f8f9fa;
    padding: 18px 15px;
    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;
}

.camera-branch-table th:nth-child(1) {
    text-align: left;
    width: 80px;
}

.camera-branch-table th:nth-child(2) {
    text-align: left;
    width: 40%;
}

.camera-branch-table th:nth-child(3),
.camera-branch-table th:nth-child(4),
.camera-branch-table th:nth-child(5) {
    width: 80px;
    text-align: right;
}

.camera-branch-table th:nth-child(6) {
    width: 25%;
}

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

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

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

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

.camera-clickable-row {
    cursor: pointer;
}

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

.camera-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);
}

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

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

.camera-case-type-count {
    text-align: right;
    padding: 8px 15px 8px 5px;
}

.camera-case-count-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #e8f5e8;
    color: #194D3D;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(25, 77, 61, 0.2);
    min-width: 45px;
    text-align: center;
}

.camera-case-count-badge.camera-online {
    background: #e8f5e8;
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.camera-case-count-badge.camera-offline {
    background: #ffe6e6;
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.camera-case-count-badge.camera-total {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.3);
}

/* Camera branch name filter specific styling */
.camera-branch-name-filter {
    width: 120px;
    min-width: 120px;
    max-width: 150px;
}

/* Camera chevron column styling */
.camera-branch-chevron {
    text-align: right;
    width: 50px;
    padding: 18px 15px 18px 5px;
}

.camera-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;
}

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

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

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

.camera-table th {
    background: #ffffff;
    padding: 18px 15px;
    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;
}

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

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

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

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

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

/* Camera status cells in table */
.camera-serving-time-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 12px;
}

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

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

.camera-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);
}

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

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

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

.camera-status-indicator.active {
    background: #e74c3c;
    border-color: #c0392b;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
    animation: cameraStatusPulseRed 2s infinite;
}

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

@keyframes cameraStatusPulseRed {
    0% {
        box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.7);
    }
    100% {
        box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
    }
}

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

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

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


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

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

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

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

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

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

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

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

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

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

.camera-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;
}

.camera-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);
}

/* Camera Status Badge in Table */
.camera-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.camera-status-badge.online {
    background: #e8f5e8;
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.camera-status-badge.offline {
    background: #ffe6e6;
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Camera Downtime Cell */
.camera-downtime-cell {
    text-align: center;
    padding: 15px 12px;
    vertical-align: middle;
}

.camera-downtime-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
}

.camera-downtime-value.has-downtime {
    color: #dc3545;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Button Styles for Camera Page */
.camera-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;
}

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

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

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

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

.camera-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;
}

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

.camera-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;
}

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

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

/* Responsive Design for Camera Page - Laptop/Notebook screens */
@media (max-width: 1300px) {
    .camera-stats-section {
        gap: 15px;
    }
    
    .camera-total-card {
        padding: 15px;
    }
    
    .camera-total-icon {
        width: 60px;
        height: 60px;
    }
    
    .camera-total-icon-img {
        width: 28px;
        height: 28px;
    }
    
    .camera-status-cards {
        gap: 12px;
    }
    
    .camera-status-card {
        padding: 12px;
    }
}

@media (max-width: 1200px) {
    .camera-stats-section {
        gap: 12px;
    }
    
    .camera-total-card {
        padding: 12px;
    }
    
    .camera-total-icon {
        width: 55px;
        height: 55px;
    }
    
    .camera-total-icon-img {
        width: 26px;
        height: 26px;
    }
    
    .camera-status-cards {
        gap: 10px;
    }
    
    .camera-status-card {
        padding: 10px;
    }
    
    .camera-branch-table,
    .camera-table {
        font-size: 0.9rem;
    }
    
    .camera-branch-table th,
    .camera-table th,
    .camera-branch-table td,
    .camera-table td {
        padding: 10px 8px;
    }
    
    .camera-column-filter,
    .camera-branch-name-filter {
        font-size: 0.85rem;
        padding: 5px 8px;
    }
}