/* CCTV Manager - Monitor Control Room Theme */

/* Base resets */
*, *::before, *::after {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f1419;
}
::-webkit-scrollbar-thumb {
    background: #242d3a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d3748;
}

/* Navigation items */
.nav-item {
    color: #9ca3af;
}
.nav-item:hover {
    background: rgba(14, 165, 233, 0.05);
    color: #e5e7eb;
}
.nav-item.active {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border-left: 2px solid #0ea5e9;
}

/* LED indicator pulse */
@keyframes led-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.led-pulse {
    animation: led-pulse 2s ease-in-out infinite;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-admin {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-supervisor {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-user {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.badge-coordinator {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Priority badges */
.priority-critical {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.priority-high {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.3);
}
.priority-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.priority-low {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Status indicators */
.status-open {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.status-in_progress {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-resolved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.status-closed {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Cards */
.card {
    background: #0f1419;
    border: 1px solid #1c2430;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s;
}
.card:hover {
    border-color: #242d3a;
}

/* Stat cards */
.stat-card {
    background: #0f1419;
    border: 1px solid #1c2430;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--stat-color, #0ea5e9);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-top: 8px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    border-bottom: 1px solid #1c2430;
}
.data-table td {
    padding: 12px;
    font-size: 13px;
    border-bottom: 1px solid rgba(28, 36, 48, 0.5);
    color: #d1d5db;
}
.data-table tr:hover td {
    background: rgba(14, 165, 233, 0.02);
}

/* Form inputs */
.form-input {
    width: 100%;
    background: #0a0e14;
    border: 1px solid #1c2430;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    color: white;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}
.form-input::placeholder {
    color: #4b5563;
}
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: #0ea5e9;
    color: white;
}
.btn-primary:hover {
    background: #0284c7;
}
.btn-secondary {
    background: #1c2430;
    color: #d1d5db;
    border: 1px solid #242d3a;
}
.btn-secondary:hover {
    background: #242d3a;
    color: white;
}
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}
.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

/* Operational indicator */
.op-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.op-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.op-dot.operational {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}
.op-dot.down {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Modal form */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.modal-content {
    background: #0f1419;
    border: 1px solid #1c2430;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 16px;
    padding: 24px;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: #151b23;
    border: 1px solid #242d3a;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #d1d5db;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-info { border-left: 3px solid #0ea5e9; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pagination button {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    background: #1c2430;
    color: #9ca3af;
    border: 1px solid #242d3a;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
    background: #242d3a;
    color: white;
}
.pagination button.active {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}
.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Credential card */
.cred-card {
    background: #0a0e14;
    border: 1px solid #1c2430;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s;
}
.cred-card:hover {
    border-color: #242d3a;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-open #sidebar {
        transform: translateX(0);
    }
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #242d3a;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}
