/* Connekt Bridge - Hikvision Color Scheme */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Hikvision Official Color Scheme */
    --hikvision-primary: #005BAC;      /* Hikvision Blue */
    --hikvision-dark: #003d7a;         /* Dark Blue */
    --hikvision-light: #e6f3ff;        /* Light Blue */
    --hikvision-gray: #666666;         /* Gray */
    --hikvision-white: #ffffff;        /* White */
    --hikvision-accent: #ff6b35;       /* Orange accent */

    --primary-gradient: linear-gradient(135deg, #005BAC 0%, #003d7a 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --info-gradient: linear-gradient(135deg, #005BAC 0%, #003d7a 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
}

/* Custom viewport height classes */
.min-vh-80 {
    min-height: 80vh;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-brand .bg-white {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bg-hikvision {
    background: var(--primary-gradient) !important;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    border: none;
    background: white;
}

/* Gradient backgrounds for stats cards */
.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-success {
    background: var(--success-gradient);
}

.bg-gradient-info {
    background: var(--info-gradient);
}

.bg-gradient-warning {
    background: var(--warning-gradient);
}

.bg-gradient-danger {
    background: var(--danger-gradient);
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-success {
    background: var(--success-gradient);
    border: none;
}

.btn-info {
    background: var(--info-gradient);
    border: none;
}

.btn-warning {
    background: var(--warning-gradient);
    border: none;
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
}

/* Form styling */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    border: none;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

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

/* Progress bars */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
}

/* Hover effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Modal styling */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 1.5rem 2rem;
}

/* Stream container (legacy support) */
.stream-container {
    background-color: #000;
    border-radius: 16px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stream-placeholder {
    color: #6c757d;
}

#stream-placeholder i {
    opacity: 0.5;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }

    .btn-group .btn {
        border-radius: 8px !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 2s infinite;
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #6c757d;
}

.status-error {
    background-color: #dc3545;
}

/* Custom utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.border-radius-xl {
    border-radius: 1rem !important;
}

/* Compact Stats Cards */
.stats-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--card-shadow);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stats-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.stats-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
    color: #2d3748;
}

.stats-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Mobile Responsive Stats Cards */
@media (max-width: 991.98px) {
    .stats-card .card-body {
        flex-direction: column;
        text-align: center;
        padding: 1rem !important;
    }

    .stats-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
        margin-right: 0 !important;
    }

    .stats-content {
        align-items: center;
        min-height: auto;
    }

    .stats-number {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }

    .stats-label {
        font-size: 0.75rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 575.98px) {
    .stats-card .card-body {
        padding: 0.75rem !important;
    }

    .stats-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }

    .stats-number {
        font-size: 1.25rem;
    }

    .stats-label {
        font-size: 0.7rem;
    }
}