/* Supplier Videos Management CSS */
:root {
    --primary: #0B4F6C;
    --primary-dark: #083b4f;
    --secondary: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles (same as other supplier pages) */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-nav {
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
}

/* Content Header */
.content-header {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-outline {
    background: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 30px;
    font-size: 14px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.video-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.video-card.inactive {
    opacity: 0.8;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 9/16;
    background: var(--gray-200);
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.video-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--gray-500);
    color: white;
}

.video-status-badge.inactive {
    background: var(--danger);
}

.video-info {
    padding: 16px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.video-caption-preview {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.view-btn:hover { background: var(--primary); color: white; }
.action-btn.edit-btn:hover { background: var(--warning); color: white; }
.action-btn.toggle-btn:hover { background: var(--secondary); color: white; }
.action-btn.delete-btn:hover { background: var(--danger); color: white; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-lg {
    max-width: 900px;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Video Preview Modal */
.video-preview-container {
    margin-bottom: 20px;
}

.video-preview-container video {
    width: 100%;
    max-height: 500px;
    background: black;
}

.video-details h2 {
    margin-bottom: 12px;
}

.detail-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.detail-caption {
    margin: 16px 0;
    padding: 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.detail-meta {
    background: var(--gray-100);
    padding: 16px;
    border-radius: var(--radius);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background: var(--secondary);
    color: white;
}

.status-badge.inactive {
    background: var(--danger);
    color: white;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    padding: 12px 24px;
    background: var(--white);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--secondary); }
.toast.error { background: var(--danger); }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-tabs {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
    }
}