/* ========================================
   YOUCAM - Sistema de Gerenciamento de Câmeras
   Cores: Vermelho (#E31837) e Branco (#FFFFFF)
   ======================================== */

:root {
    --primary-red: #E31837;
    --dark-red: #B71C1C;
    --light-red: #FF5252;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E0E0E0;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --shadow-sm: 0 2px 8px rgba(227, 24, 55, 0.1);
    --shadow-md: 0 4px 16px rgba(227, 24, 55, 0.15);
    --shadow-lg: 0 8px 32px rgba(227, 24, 55, 0.2);

    /* Tamanhos de fonte reduzidos */
    --font-xs: 10px;
    --font-sm: 11px;
    --font-base: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 18px;
    --font-2xl: 20px;
    --font-3xl: 24px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
    font-size: var(--font-base);
}

/* ========================================
   PÁGINAS - CONTROLE DE VISIBILIDADE
   ======================================== */

.page {
    display: none;
}

.page.active {
    display: flex;
}

/* ========================================
   LOGIN E REGISTRO - NOVO DESIGN
   ======================================== */

#login-page, #register-page {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Efeito de background animado */
#login-page::before, #register-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 60px,
        rgba(255, 255, 255, 0.03) 60px,
        rgba(255, 255, 255, 0.03) 120px
    );
    animation: slideBackground 20s linear infinite;
}

@keyframes slideBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--white);
    padding: 32px 28px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.login-box h1 {
    margin: 0;
    color: var(--text-dark);
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-box h1 .brand {
    color: var(--primary-red);
}

.login-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 11px;
    margin-top: 8px;
    margin-bottom: 32px;
}

/* ========================================
   FORMULÁRIOS
   ======================================== */

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 12px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(227, 24, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   BOTÕES
   ======================================== */

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    width: 100%;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #D0D0D0;
}

.btn-danger {
    background: var(--dark-red);
    color: var(--white);
}

.btn-danger:hover {
    background: #8B0000;
}

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

.btn-success:hover {
    background: var(--dark-red);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

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

/* ========================================
   LINKS
   ======================================== */

.register-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-gray);
    font-size: 11px;
}

.register-link a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.register-link a:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

/* ========================================
   SIDEBAR - REDESIGN COMPLETO
   ======================================== */

.sidebar {
    width: 240px;
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 4px 0 16px rgba(227, 24, 55, 0.08);
    border-right: 1px solid rgba(227, 24, 55, 0.1);
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 2px solid rgba(227, 24, 55, 0.1);
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.sidebar-logo svg {
    width: 40px;
    height: 40px;
}

.sidebar-logo-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.sidebar-toggle span {
    width: 24px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 12px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    position: relative;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-red);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.sidebar-link:hover {
    background: rgba(227, 24, 55, 0.08);
    color: var(--primary-red);
    transform: translateX(4px);
}

.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.sidebar-link.active::before {
    height: 0;
}

.sidebar-link svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.sidebar-footer {
    border-top: 2px solid rgba(227, 24, 55, 0.1);
    padding: 14px;
    background: var(--off-white);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid rgba(227, 24, 55, 0.1);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: var(--text-gray);
    font-size: 11px;
}

.sidebar-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-logout:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sidebar-logout svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   CONTEÚDO PRINCIPAL
   ======================================== */

.main-content {
    flex: 1;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--off-white);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    margin-right: 16px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary-red);
    border-radius: 2px;
    transition: all 0.3s;
}

.navbar {
    background: var(--white);
    padding: 12px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(227, 24, 55, 0.1);
}

.navbar-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-title .highlight {
    color: var(--primary-red);
}

.container {
    flex: 1;
    max-width: none;
    padding: 20px;
}

/* ========================================
   SEÇÕES DE CONTEÚDO
   ======================================== */

.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: var(--white);
    padding: 14px 18px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.dashboard-header h2 {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-header h2 .accent {
    color: var(--primary-red);
}

.dashboard-header .btn {
    width: auto;
    min-width: 160px;
}

/* ========================================
   GRID DE CÂMERAS - REDESIGN
   ======================================== */

.cameras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.camera-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.camera-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

.camera-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.camera-thumbnail svg {
    width: 80px;
    height: 80px;
    opacity: 0.9;
}

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

.camera-info {
    padding: 24px;
}

.camera-info h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 700;
}

.camera-info p {
    color: var(--text-gray);
    font-size: 11px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-info p svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.camera-actions {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--off-white);
    border-top: 2px solid rgba(227, 24, 55, 0.1);
    flex-wrap: wrap;
}

.camera-actions button {
    flex: 1;
    padding: 10px;
    font-size: 11px;
    min-width: 70px;
}

/* ========================================
   STATUS BADGES
   ======================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.status-active {
    background: rgba(227, 24, 55, 0.1);
    color: var(--primary-red);
}

.status-inactive {
    background: var(--light-gray);
    color: var(--text-gray);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ========================================
   STATS GRID - DASHBOARD
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-red);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(227, 24, 55, 0.2);
}

.stat-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 500;
}

/* ========================================
   MODAL - REDESIGN
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 0;
    border-radius: 14px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 2px solid rgba(227, 24, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(227, 24, 55, 0.05) 0%, rgba(183, 28, 28, 0.05) 100%);
}

.modal-header h3 {
    color: var(--text-dark);
    font-size: 19px;
    font-weight: 700;
}

.close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.close:hover {
    background: rgba(227, 24, 55, 0.1);
    color: var(--primary-red);
}

.modal-body {
    padding: 20px;
}

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

.modal-footer button {
    width: auto;
    min-width: 120px;
}

/* ========================================
   STREAM INFO & DETAILS
   ======================================== */

.stream-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--off-white);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-gray);
    word-break: break-all;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

#camera-details {
    margin-top: 24px;
    padding: 20px;
    background: var(--off-white);
    border-radius: 12px;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

#camera-details p {
    margin-bottom: 12px;
    color: var(--text-gray);
    display: flex;
    gap: 8px;
}

#camera-details p strong {
    color: var(--text-dark);
    min-width: 100px;
}

/* ========================================
   SHARED USERS
   ======================================== */

#shared-users-list {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid rgba(227, 24, 55, 0.1);
}

#shared-users-list h4 {
    margin-bottom: 16px;
    color: var(--text-dark);
    font-weight: 700;
}

.shared-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--off-white);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(227, 24, 55, 0.1);
    transition: all 0.2s;
}

.shared-user-item:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-sm);
}

.shared-user-info {
    flex: 1;
}

.shared-user-info strong {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 4px;
}

.shared-user-info small {
    color: var(--text-gray);
    font-size: 11px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 80px 32px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 700;
}

.empty-state p {
    color: var(--text-gray);
    font-size: 11px;
}

/* ========================================
   VIDEO PLAYER
   ======================================== */

#camera-video {
    width: 100%;
    max-height: 500px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-280px);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .cameras-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 24px 16px;
    }

    .navbar {
        padding: 16px 20px;
    }

    .login-box {
        padding: 40px 28px;
    }

    .camera-actions {
        flex-direction: column;
    }

    .camera-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-card::before {
        width: 100%;
        height: 4px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

/* ========================================
   CAMERAS TOOLBAR - NOVA SEÇÃO
   ======================================== */

.cameras-toolbar {
    background: var(--white);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.search-container {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-container svg {
    position: absolute;
    left: 16px;
    color: var(--text-gray);
    pointer-events: none;
}

.search-container input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: 11px;
    transition: all 0.3s ease;
    background: var(--off-white);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(227, 24, 55, 0.1);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Filtros */
.filter-group {
    position: relative;
}

.btn-filter {
    padding: 12px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    border-color: var(--primary-red);
    background: rgba(227, 24, 55, 0.05);
    color: var(--primary-red);
}

.filter-count {
    background: var(--primary-red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    min-width: 220px;
    z-index: 100;
    display: none;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.filter-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.filter-section {
    margin-bottom: 16px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.filter-checkbox:hover {
    background: rgba(227, 24, 55, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
    cursor: pointer;
}

.filter-checkbox span {
    font-size: 11px;
    color: var(--text-dark);
    user-select: none;
}

/* Ordenação */
.sort-select {
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.sort-select:hover {
    border-color: var(--primary-red);
    background-color: rgba(227, 24, 55, 0.05);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(227, 24, 55, 0.1);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--off-white);
    padding: 4px;
    border-radius: 12px;
}

.view-btn {
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.view-btn.active {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Contador de câmeras */
.cameras-count {
    padding: 12px 0;
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 500;
}

/* Visualização em Lista */
.cameras-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cameras-grid.list-view .camera-card {
    display: flex;
    flex-direction: row;
    height: auto;
}

.cameras-grid.list-view .camera-thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
}

.cameras-grid.list-view .camera-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cameras-grid.list-view .camera-actions {
    width: auto;
    flex-direction: row;
    align-items: center;
    border-left: 2px solid rgba(227, 24, 55, 0.1);
    border-top: none;
}

.cameras-grid.list-view .camera-actions button {
    min-width: 90px;
}

/* Card melhorado com overlay */
.camera-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.camera-card:hover .camera-thumbnail-overlay {
    opacity: 1;
}

.camera-quick-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.quick-action-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Badge "Ao Vivo" */
.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(227, 24, 55, 0.95);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

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

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Responsive toolbar */
@media (max-width: 768px) {
    .cameras-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        width: 100%;
        min-width: auto;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .sort-select {
        flex: 1;
    }

    .cameras-grid.list-view .camera-card {
        flex-direction: column;
    }

    .cameras-grid.list-view .camera-thumbnail {
        width: 100%;
        height: 200px;
    }

    .cameras-grid.list-view .camera-actions {
        flex-direction: column;
        border-left: none;
        border-top: 2px solid rgba(227, 24, 55, 0.1);
    }

    .cameras-grid.list-view .camera-actions button {
        width: 100%;
    }
}

/* ========================================
   MAPA + LISTA DE CÂMERAS
   ======================================== */

.cameras-map-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - 380px);
    min-height: 600px;
}

.map-container {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(227, 24, 55, 0.1);
    position: relative;
}

#cameras-map {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.cameras-list-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(227, 24, 55, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cameras-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Cards retangulares para lista lateral */
.camera-list-card {
    display: flex;
    gap: 12px;
    background: var(--off-white);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    align-items: center;
}

.camera-list-card:hover {
    background: var(--white);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.camera-list-card.active {
    background: var(--white);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.camera-list-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

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

.camera-list-thumbnail svg {
    width: 32px;
    height: 32px;
    color: var(--white);
    opacity: 0.9;
}

.camera-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.camera-list-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.camera-list-client {
    font-size: 11px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.camera-list-client svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.camera-list-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.camera-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(227, 24, 55, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.camera-action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.camera-action-btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.camera-action-btn:hover svg {
    color: var(--white);
}

/* Marcadores customizados do mapa */
.camera-marker {
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50% 50% 50% 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
}

.camera-marker svg {
    transform: rotate(45deg);
    width: 18px;
    height: 18px;
}

.camera-marker.active {
    background: var(--dark-red);
    width: 42px;
    height: 42px;
    z-index: 1000;
}

/* Empty state para lista de câmeras */
.cameras-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    height: 100%;
}

.cameras-list-empty svg {
    width: 80px;
    height: 80px;
    color: var(--primary-red);
    opacity: 0.5;
    margin-bottom: 16px;
}

.cameras-list-empty h4 {
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cameras-list-empty p {
    color: var(--text-gray);
    font-size: 11px;
}

/* Tooltip do mapa */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    margin: 12px;
    font-family: inherit;
}

.map-popup-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.map-popup-info {
    font-size: 11px;
    color: var(--text-gray);
    margin-bottom: 4px;
}

/* Responsive para mapa */
@media (max-width: 1200px) {
    .cameras-map-layout {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 968px) {
    .cameras-map-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 400px 1fr;
        height: auto;
    }

    .cameras-list-container {
        min-height: 400px;
    }

    .camera-list-card {
        flex-wrap: wrap;
    }

    .camera-list-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid rgba(227, 24, 55, 0.1);
    }
}

/* ========================================
   USERS MANAGEMENT PAGE
   ======================================== */

.users-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card-small {
    background: var(--white);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card-small:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card-small .stat-label {
    color: var(--text-gray);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card-small .stat-value {
    color: var(--primary-red);
    font-size: 22px;
    font-weight: 800;
}

.users-table-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.users-table thead {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
}

.users-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
}

.users-table tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: background 0.2s ease;
}

.users-table tbody tr:hover {
    background: rgba(227, 24, 55, 0.03);
}

.users-table tbody tr:last-child {
    border-bottom: none;
}

.users-table tbody td {
    padding: 12px 16px;
    font-size: 11px;
    color: var(--text-dark);
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
}

.role-badge.role-user {
    background: var(--light-gray);
    color: var(--text-gray);
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-gray);
}

.btn-icon:hover {
    background: rgba(227, 24, 55, 0.1);
    color: var(--primary-red);
}

.btn-icon.btn-danger:hover {
    background: rgba(227, 24, 55, 0.1);
    color: var(--dark-red);
}

.text-muted {
    color: var(--text-gray);
    font-style: italic;
}

/* Responsive para tabela de usuários */
@media (max-width: 968px) {
    .users-table-container {
        overflow-x: auto;
    }

    .users-table {
        min-width: 800px;
    }

    .users-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SHARED CAMERA INDICATOR
   ======================================== */

.shared-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 8px;
    background: rgba(76, 175, 80, 0.15);
    color: #2E7D32;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* ========================================
   GRAVAÇÕES - RECORDINGS SECTION
   ======================================== */

.recordings-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.recordings-count {
    color: var(--text-gray);
    font-size: var(--font-md);
}

.recordings-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
    padding: 16px;
}

.recording-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 16px;
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-red);
}

.recording-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recording-icon svg {
    stroke: white;
}

.recording-info {
    flex: 1;
    min-width: 0;
}

.recording-time {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.recording-date {
    font-size: var(--font-md);
    color: var(--text-gray);
    margin-bottom: 8px;
}

.recording-meta {
    display: flex;
    gap: 12px;
    font-size: var(--font-sm);
    color: var(--text-gray);
}

.recording-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recording-meta svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-gray);
}

.recording-play-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.recording-card:hover .recording-play-btn {
    background: var(--dark-red);
    transform: scale(1.1);
}

.recording-play-btn svg {
    fill: white;
    width: 20px;
    height: 20px;
    margin-left: 3px;
}

.recordings-storage-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.storage-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.storage-stat svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-red);
}

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

.empty-state svg {
    margin-bottom: 16px;
    stroke: var(--light-gray);
}

.empty-state p {
    font-size: var(--font-md);
}

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

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* Modal de Vídeo */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 20px;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-modal-title {
    color: white;
    font-size: var(--font-lg);
    font-weight: 600;
}

.video-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.video-modal video {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsivo */
@media (max-width: 768px) {
    .recordings-list {
        grid-template-columns: 1fr;
    }

    .recordings-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .recordings-toolbar .form-group {
        max-width: 100%;
    }
}

/* ========================================
   VIDEO PLAYER PROFISSIONAL - VIDEO.JS
   ======================================== */

/* Modal de Vídeo Profissional */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Modal */
.video-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 32px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-modal-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-modal-title svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-red);
}

.video-modal-close {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    transform: scale(1.1);
}

.video-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Container do Player */
.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Aspect ratio 16:9 */
    background: #000;
}

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

/* Customização Video.js - Tema YouCam */
.video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Big Play Button */
.video-js .vjs-big-play-button {
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-red);
    background: rgba(227, 24, 55, 0.9);
    backdrop-filter: blur(10px);
    font-size: 40px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.video-js .vjs-big-play-button:hover {
    background: var(--primary-red);
    transform: translate(-50%, -50%) scale(1.1);
    border-color: #fff;
}

.video-js .vjs-big-play-button .vjs-icon-placeholder:before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    line-height: 80px;
}

/* Control Bar */
.video-js .vjs-control-bar {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    backdrop-filter: blur(10px);
    height: 60px;
    padding: 0 20px;
}

/* Botões */
.video-js .vjs-control {
    width: 3em;
}

.video-js .vjs-button > .vjs-icon-placeholder:before {
    font-size: 1.8em;
    line-height: 2.2;
}

/* Play/Pause Button */
.video-js .vjs-play-control {
    font-size: 1em;
}

.video-js .vjs-play-control:hover .vjs-icon-placeholder:before {
    color: var(--primary-red);
}

/* Progress Bar */
.video-js .vjs-progress-control {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    width: 100%;
    height: 10px;
}

.video-js .vjs-progress-holder {
    height: 10px;
    background: rgba(255,255,255,0.2);
}

.video-js .vjs-play-progress {
    background: linear-gradient(90deg, var(--primary-red), var(--light-red));
}

.video-js .vjs-load-progress {
    background: rgba(255,255,255,0.3);
}

.video-js .vjs-progress-control:hover .vjs-progress-holder {
    font-size: 1.3em;
}

/* Time Display */
.video-js .vjs-time-control {
    padding: 0;
    min-width: 3em;
    font-size: 14px;
    font-weight: 500;
}

.video-js .vjs-current-time,
.video-js .vjs-duration {
    display: block;
    padding: 0 0.5em;
}

/* Volume */
.video-js .vjs-volume-panel {
    width: 6em;
}

.video-js .vjs-volume-bar {
    background: rgba(255,255,255,0.2);
}

.video-js .vjs-volume-level {
    background: var(--primary-red);
}

/* Fullscreen Button */
.video-js .vjs-fullscreen-control:hover .vjs-icon-placeholder:before {
    color: var(--primary-red);
}

/* Loading Spinner */
.video-js .vjs-loading-spinner {
    border-color: var(--primary-red);
    border-top-color: transparent;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
}

.video-js .vjs-loading-spinner:before,
.video-js .vjs-loading-spinner:after {
    border-color: var(--primary-red);
    border-top-color: transparent;
}

/* Poster */
.video-js .vjs-poster {
    background-size: cover;
    background-position: center;
}

/* Error Display */
.video-js .vjs-error-display {
    background: rgba(0,0,0,0.9);
}

.video-js .vjs-error-display:before {
    content: 'Erro ao carregar vídeo';
    color: white;
    font-size: 18px;
}

/* Hover State */
.video-js:hover .vjs-control-bar {
    opacity: 1;
    visibility: visible;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .video-modal-content {
        max-width: 100%;
        border-radius: 0;
    }
    
    .video-modal-header {
        padding: 16px 20px;
    }
    
    .video-modal-title {
        font-size: 14px;
    }
    
    .video-modal-close {
        width: 36px;
        height: 36px;
    }
    
    .video-js .vjs-big-play-button {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 30px;
    }
    
    .video-js .vjs-control-bar {
        height: 50px;
        padding: 0 10px;
    }
}

/* ESC Key Hint */
.video-modal-esc-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0.7;
    pointer-events: none;
    animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 0.7; }
}

/* Quality Badge */
.video-quality-badge {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(227, 24, 55, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 15;
    backdrop-filter: blur(10px);
}

