/* ShipGuard Pro - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Timeline */
.timeline {
    position: relative;
    padding-right: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-right: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid #fff;
}

/* Video Stream */
#videoStream {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Live Indicator */
#liveIndicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    font-weight: bold;
    font-size: 14px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    cursor: pointer;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 5px;
}

/* Alert Animations */
.alert {
    animation: slideIn 0.5s;
}

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

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Notification Dropdown */
#notificationsList {
    max-height: 400px;
    overflow-y: auto;
    min-width: 300px;
}

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

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

    .h1, h1 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] .timeline::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .timeline-item::before {
    right: auto;
    left: -5px;
}

[dir="rtl"] .timeline-item {
    padding-right: 0;
    padding-left: 30px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Video Player */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Status Messages */
.status-success {
    color: var(--success-color);
    font-weight: bold;
}

.status-error {
    color: var(--danger-color);
    font-weight: bold;
}

.status-warning {
    color: var(--warning-color);
    font-weight: bold;
}

.status-info {
    color: var(--info-color);
    font-weight: bold;
}
