/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores principais */
    --primary-color: #0475ED;
    --primary-dark: #00c3ff;
    --primary-light: #00c3ff;
    --secondary-color: #0475ED;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    /* Cores de fundo */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-surface: rgba(30, 41, 59, 0.8);
    --card-bg: #1e293b;
    --sidebar-bg: #1e293b;
    --header-bg: rgba(30, 41, 59, 0.8);
    
    /* Cores de texto */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-color: #f1f5f9;
    
    /* Cores de borda */
    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Bordas */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== LAYOUT PRINCIPAL ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img {
    height: 60px; /* ajuste como quiser */
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    display: none; /* só aparece se a imagem falhar */
}


.logo i {
    font-size: 1.75rem;
    color: var(--primary-color);
}



.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.5);
    position: sticky;
    bottom: 0;
    backdrop-filter: blur(10px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: var(--bg-tertiary);
    color: var(--danger-color);
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--bg-tertiary);
}

.mobile-menu-btn i {
    font-size: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.connection-status.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.connection-status i {
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.header-btn i {
    font-size: 1.25rem;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

/* Área de Conteúdo */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ===== COMPONENTES COMUNS ===== */
/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    justify-content: center;
}

.btn i {
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-sm i {
    font-size: 1rem;
}

/* Cards */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.stat-icon.online {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-icon.offline {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.stat-icon.total {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat-icon.contents {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Seções de Conteúdo */
.content-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    text-decoration: none;
}

.quick-action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-btn i {
    font-size: 2rem;
    color: var(--primary-color);
}

.quick-action-btn span {
    font-weight: 500;
    font-size: 0.875rem;
    text-align: center;
}

/* Listas */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.activity-item:hover {
    border-color: var(--primary-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== TELAS ESPECÍFICAS ===== */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid de TVs */
.tvs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tv-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.tv-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tv-name {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.tv-code {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.tv-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tv-status.online {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    animation: pulseOnline 2s infinite;
}

.tv-status.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    animation: pulseOffline 2s infinite;
}

.tv-status.loading {
    color: #666;
}

.tv-info {
    margin-bottom: 1rem;
}

.tv-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.tv-info-item:last-child {
    border-bottom: none;
}

.tv-info-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.tv-info-value {
    font-weight: 500;
    font-size: 0.875rem;
}

.tv-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== MODAIS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    line-height: 1;
}

.close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* ===== FORMULÁRIOS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ===== NOTIFICAÇÕES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--success-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    opacity: 0;
    transition: var(--transition);
    z-index: 10000;
    min-width: 300px;
    border: 1px solid var(--border-color);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.error {
    border-left-color: var(--danger-color);
}

.notification.info {
    border-left-color: var(--info-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.25rem;
}

.notification.success .notification-content i {
    color: var(--success-color);
}

.notification.error .notification-content i {
    color: var(--danger-color);
}

.notification.info .notification-content i {
    color: var(--info-color);
}

/* ===== TELA DE LOGIN ===== */
.login-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%236366f1" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

.input-with-icon input {
    padding-left: 3rem;
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    margin-top: 1rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.demo-credentials {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.demo-credentials h3 {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.credential-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-item strong {
    color: var(--primary-color);
}

/* ===== CONTEÚDOS DA TV ===== */
.tv-contents-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.tv-info-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    flex: 1;
}

.tv-info-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.tv-info-card p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.contents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.content-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.content-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.content-card.inactive {
    opacity: 0.7;
    background: var(--bg-secondary);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0.5rem 1rem;
}

.content-type-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.content-type-badge.image { background: #10b981; }
.content-type-badge.video { background: #f59e0b; }
.content-type-badge.youtube { background: #ef4444; }
.content-type-badge.html { background: #6366f1; }

.content-card-body {
    padding: 0 1rem 1rem 1rem;
}

.content-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.content-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-item .label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.detail-item .value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.content-preview {
    margin-top: 1rem;
}

.btn-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    width: 100%;
    justify-content: center;
}

.btn-preview:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.content-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.content-card-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===== GERENCIAMENTO DE USUÁRIOS ===== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.user-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.user-card.inactive {
    opacity: 0.7;
    background: var(--bg-secondary);
}

.user-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.user-email {
    font-size: 0.9rem;
    color: var(--text-muted);
    word-break: break-all;
}

.user-role {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.user-role.super {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.user-role.common {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.user-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.user-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-detail .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.user-detail .value {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

.user-detail .value.active {
    color: #28a745;
}

.user-detail .value.inactive {
    color: #dc3545;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.user-actions .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* ===== CONFIGURAÇÕES ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.settings-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.settings-card h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-info {
    flex: 1;
}

.settings-option .label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-option .description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.settings-action {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-action:last-child {
    border-bottom: none;
}

.settings-action .btn {
    width: 100%;
    margin-bottom: 8px;
}

.action-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.settings-actions-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ===== SELEÇÃO DE TVs ===== */
.tv-selection-container {
    max-height: 400px;
    overflow-y: auto;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.tvs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tv-selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--bg-tertiary);
}

.tv-selection-item:hover {
    border-color: var(--primary-color);
    background-color: #283053;
}

.tv-info {
    flex: 1;
}

.tv-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.tv-details {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.tv-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.content-count {
    color: var(--text-muted);
}

.tv-status.online {
    color: #10b981;
    font-weight: 500;
}

.tv-status.offline {
    color: #ef4444;
    font-weight: 500;
}

.selected-tv-info {
    background: #013686;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.selected-tv-info i {
    color: #1976d2;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0 1rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .tvs-grid {
        grid-template-columns: 1fr;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .connection-status span {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tv-contents-header {
        flex-direction: column;
    }
    
    .contents-grid {
        grid-template-columns: 1fr;
    }
    
    .content-card-actions {
        flex-direction: column;
    }
    
    .users-grid {
        grid-template-columns: 1fr;
    }
    
    .user-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .user-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .header-left,
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .content-section {
        padding: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .login-screen {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .user-card {
        padding: 1rem;
        margin: 0 0.5rem;
    }
}

/* ===== ESTADOS ESPECIAIS ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.no-data .small {
    font-size: 0.875rem;
    margin-top: -1rem;
}

/* ===== ANIMAÇÕES ===== */
@keyframes pulseOnline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulseOffline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bx-spin {
    animation: spin 1s linear infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== OVERLAY MOBILE ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* ===== SIDEBAR COLLAPSED ===== */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .sidebar-nav {
    padding: 1rem 0;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-section {
    margin-bottom: 1rem;
}
/* ===== BARRA DE PROGRESSO DO UPLOAD ===== */
.upload-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.file-input {
    margin-bottom: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.upload-btn {
    margin-top: 0.5rem;
    width: 100%;
}

.upload-progress {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* Estados da barra de progresso */
.progress-fill.uploading {
    background: linear-gradient(90deg, #2196F3, #21CBF3);
}

.progress-fill.complete {
    background: linear-gradient(90deg, #4CAF50, #45a049);
}

.progress-fill.error {
    background: linear-gradient(90deg, #ff4444, #ff6666);
}

/* Loading state para upload */
.uploading .progress-fill {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== BOTÕES DE UPLOAD ===== */
.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.upload-btn.loading {
    position: relative;
    color: transparent;
}

.upload-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    to { transform: rotate(360deg); }
}

/* ===== CAMPOS DE TIPO ESPECÍFICO ===== */
.type-fields {
    transition: all 0.3s ease;
}

.no-type-selected {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.no-type-selected i {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

/* Preview HTML */
.html-preview {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: none;
}

.html-preview h5 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

#html-preview-frame {
    width: 100%;
    height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

/* ===== MENSAGENS DE CONFIGURAÇÃO ===== */
.message-container {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.message-container.hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

.message-container.visible {
    opacity: 1;
    max-height: 200px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dark mode support */
.dark-mode .message-container.visible {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #4CAF50;
}

.dark-mode .hint {
    color: #aaa;
}

/* ===== TEXTAREA DE MENSAGEM ===== */
#maintenance-message {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

#maintenance-message:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

/* ===== BOTÕES DE AÇÃO RÁPIDA RESPONSIVOS ===== */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.quick-action-btn span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== BOTÃO GERENCIAR USUÁRIOS (CONTROLE DE VISIBILIDADE) ===== */
#manageUsersBtn {
    /* A visibilidade é controlada via JavaScript */
    transition: all 0.3s ease;
}

/* ===== ESTILOS PARA FORMULÁRIO DINÂMICO ===== */
.form-group small.hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Garantir que os campos de tipo específico ficam ocultos inicialmente */
.type-fields {
    display: none;
}

.type-fields[style*="display: block"] {
    display: block !important;
}

/* ===== MELHORIAS PARA MOBILE ===== */
@media (max-width: 768px) {
    .upload-section {
        padding: 0.75rem;
    }
    
    .upload-progress {
        padding: 0.5rem;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
    
    .quick-action-btn {
        padding: 15px;
    }
    
    .quick-action-btn i {
        font-size: 1.75rem;
    }
    
    .quick-action-btn span {
        font-size: 0.8rem;
    }
}

/* ===== ESTADOS DE CARREGAMENTO ===== */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: buttonSpin 1s linear infinite;
}

.tv-status.loading {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tv-status.loading i {
    font-size: 0.9em;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== MODOS DE TEMA (DARK/LIGHT) ===== */

/* === MODO CLARO === */
body:not(.dark-mode) {
    /* Cores de fundo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-surface: rgba(255, 255, 255, 0.9);
    --card-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --header-bg: #ffffff;
    
    /* Cores de texto */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-muted: #6c757d;
    --text-color: #1a1a1a;
    
    /* Cores de borda */
    --border-color: #dee2e6;
    --border-light: rgba(0, 0, 0, 0.1);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Cores específicas para modo claro */
    --hover-color: #e9ecef;
}

/* === MODO ESCURO (padrão) === */
body.dark-mode {
    /* Cores de fundo */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-surface: rgba(30, 41, 59, 0.8);
    --card-bg: #1e293b;
    --sidebar-bg: #1e293b;
    --header-bg: rgba(30, 41, 59, 0.8);
    
    /* Cores de texto */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-color: #f1f5f9;
    
    /* Cores de borda */
    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    
    /* Cores específicas para modo escuro */
    --hover-color: #334155;
}
/* ===== CONTENT LIST STYLES ===== */
.contents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.content-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.content-item.inactive {
    opacity: 0.7;
    background: var(--bg-secondary);
}

.content-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.content-type {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.content-info {
    flex: 1;
}

.content-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.content-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.content-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.content-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.content-status.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
/* ===== APLICAÇÃO DOS TEMAS ===== */

/* Base */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
}

body:not(.dark-mode) .sidebar {
    border-right: 1px solid var(--border-color);
}

/* Header */
.main-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

body:not(.dark-mode) .main-header {
    border-bottom: 1px solid var(--border-color);
}

/* Cards e elementos de superfície */
.card,
.stat-card,
.tv-card,
.content-card,
.user-card,
.settings-card,
.activity-item,
.quick-action-btn,
.modal-content,
.login-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Estados de hover para modo claro */
body:not(.dark-mode) .nav-link:hover {
    background-color: var(--bg-secondary);
}

body:not(.dark-mode) .quick-action-btn:hover {
    background: var(--bg-secondary);
}

body:not(.dark-mode) .activity-item:hover {
    background: var(--bg-secondary);
}

/* Textos e labels */
.nav-section-title {
    color: var(--text-muted);
}

.nav-link {
    color: var(--text-secondary);
}

body:not(.dark-mode) .nav-link {
    color: var(--text-secondary);
}

/* Formulários */
.form-group label {
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea,
.file-input,
.search-box input {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Botões secundários */
.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

body:not(.dark-mode) .btn-secondary:hover {
    background-color: var(--bg-tertiary);
}

/* Estados específicos para modo claro */
body:not(.dark-mode) .sidebar-footer {
    background: rgba(255, 255, 255, 0.5);
}

body:not(.dark-mode) .activity-item {
    background: white;
}

body:not(.dark-mode) .quick-action-btn {
    background: white;
}

body:not(.dark-mode) .content-item {
    background: white;
}

body:not(.dark-mode) .tv-info-card {
    background: white;
}

/* Login screen para modo claro */
body:not(.dark-mode) .login-card {
    background: var(--card-bg);
    box-shadow: var(--shadow-xl);
}

/* Seleção de TVs para modo claro */
body:not(.dark-mode) .tv-selection-item {
    background: var(--bg-tertiary);
}

body:not(.dark-mode) .tv-selection-item:hover {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

/* Barra de progresso para modo claro */
body:not(.dark-mode) .upload-progress {
    background: var(--card-bg);
}

body:not(.dark-mode) .progress-bar {
    background: var(--bg-secondary);
}

/* Mensagens e hints */
body:not(.dark-mode) .hint {
    color: #6c757d;
}

body:not(.dark-mode) .no-type-selected {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Preview HTML */
body:not(.dark-mode) .html-preview {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body:not(.dark-mode) .html-preview h5 {
    color: var(--text-primary);
}

/* Estados de loading */
body:not(.dark-mode) .tv-status.loading {
    color: #6c757d;
}

/* Mensagens de configuração */
body:not(.dark-mode) .message-container.visible {
    background: rgba(0, 0, 0, 0.05);
    border-left-color: #4CAF50;
}

/* ===== ACESSIBILIDADE NOS TEMAS ===== */

/* Melhor contraste para modo claro */
body:not(.dark-mode) .stat-number {
    background: linear-gradient(135deg, #1a1a1a, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Foco visível consistente */
body:not(.dark-mode) button:focus-visible,
body:not(.dark-mode) input:focus-visible,
body:not(.dark-mode) select:focus-visible,
body:not(.dark-mode) textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== TRANSIÇÕES SUAVES ENTRE TEMAS ===== */

.sidebar,
.main-header,
.card,
.stat-card,
.tv-card,
.content-card,
.user-card,
.settings-card,
.activity-item,
.quick-action-btn,
.nav-link,
.btn,
.form-group input,
.form-group select,
.form-group textarea {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease,
                box-shadow 0.3s ease;
}

/* ===== CORREÇÕES ESPECÍFICAS PARA MODO CLARO ===== */

/* Garantir que textos sejam legíveis no modo claro */
body:not(.dark-mode) .text-muted {
    color: var(--text-muted) !important;
}

body:not(.dark-mode) .text-secondary {
    color: var(--text-secondary) !important;
}

/* Ícones no modo claro */
body:not(.dark-mode) .nav-link i,
body:not(.dark-mode) .quick-action-btn i,
body:not(.dark-mode) .header-btn i {
    color: var(--text-secondary);
}

body:not(.dark-mode) .nav-link:hover i,
body:not(.dark-mode) .nav-link.active i {
    color: var(--primary-color);
}

/* Status colors - manter consistência */
body:not(.dark-mode) .connection-status {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

body:not(.dark-mode) .connection-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

body:not(.dark-mode) .tv-status.online {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

body:not(.dark-mode) .tv-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

body:not(.dark-mode) .status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

body:not(.dark-mode) .status.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Demo credentials no modo claro */
body:not(.dark-mode) .demo-credentials {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Error message no modo claro */
body:not(.dark-mode) .error-message {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== RESPONSIVIDADE NOS TEMAS ===== */

@media (max-width: 768px) {
    body:not(.dark-mode) .mobile-overlay.active {
        background: rgba(0, 0, 0, 0.5);
    }
    
    body:not(.dark-mode) .sidebar.mobile-open {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
}

/* ===== ANIMAÇÕES DE TROCA DE TEMA ===== */

.theme-transition * {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease, 
                color 0.3s ease !important;
}
/* Estilos para Clientes */
.clients-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.client-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.client-card.inactive {
    opacity: 0.7;
    background: var(--bg-color);
}

.client-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.client-info {
    flex: 1;
}

.client-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.client-contact {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.client-contact span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.client-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.client-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.client-status.active {
    background: #d4edda;
    color: #155724;
}

.client-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.client-ads {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.client-ads h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.ads-list {
    display: grid;
    gap: 1rem;
}

.ad-item {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--border-color);
}

.ad-item.pending {
    border-left-color: #ffc107;
}

.ad-item.paid {
    border-left-color: #28a745;
}

.ad-item.overdue {
    border-left-color: #dc3545;
}

.ad-item.expired {
    border-left-color: #6c757d;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ad-title {
    font-weight: 600;
    color: var(--text-color);
}

.ad-status {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ad-status.pending {
    background: #fff3cd;
    color: #856404;
}

.ad-status.paid {
    background: #d4edda;
    color: #155724;
}

.ad-status.overdue {
    background: #f8d7da;
    color: #721c24;
}

.ad-status.expired {
    background: #e2e3e5;
    color: #383d41;
}

.ad-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ad-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.ad-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ad-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.no-ads {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.client-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .client-header {
        flex-direction: column;
        text-align: center;
    }
    
    .client-contact {
        justify-content: center;
    }
    
    .ad-details {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .client-actions,
    .ad-actions {
        justify-content: center;
    }
}

/* Estilos para Barra de Pesquisa */
.search-container {
    margin-right: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.search-box i {
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.search-box input {
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* Filtros de Busca */
.search-filters {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-select {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    min-width: 150px;
}

/* Resultados da Busca */
.search-results-info {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.search-results-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-results-info strong {
    color: var(--primary-color);
}

/* Estados de Busca */
.search-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.search-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* Responsividade */
@media (max-width: 768px) {
    .search-container {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .search-box {
        min-width: auto;
        width: 100%;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 1rem;
    }
}
/* Estilos para anúncios pagos */
.ad-paid-badge {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    border: 1px solid #c8e6c9;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.ad-item.PAID {
    border-left: 4px solid #4caf50;
}

.ad-status.PAID {
    background: #4caf50;
    color: white;
}
/* Estilos para seleção de TVs */
.tv-selection-container {
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.tv-selection-container h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.tv-selection-container > p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.tvs-list-container {
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.tv-selection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.tv-selection-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tv-selection-info {
    flex: 1;
}

.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tv-name {
    font-weight: 600;
    font-size: 1.1em;
    color: var(--text-color);
}

.tv-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 12px;
}



.tv-status.offline {
    background: #ffebee;
    color: #c62828;
}

.tv-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.tv-details > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.select-tv-btn {
    white-space: nowrap;
    margin-left: 15px;
}

/* Estados de loading e erro */
.loading-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.loading-content i {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.no-data, .error-content {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-data i, .error-content i {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.no-results {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin: 10px 0;
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
/* ===== POPUP DE COMPRESSÃO ===== */
.compression-popup {
    padding: 20px;
    max-width: 500px;
}

.compression-header {
    text-align: center;
    margin-bottom: 25px;
}

.compression-icon {
    font-size: 50px;
    color: #4CAF50;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.compression-info {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.dark-mode .compression-info {
    background: #2d2d2d;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 14px;
}

.info-item .label {
    color: #666;
    font-weight: 500;
}

.dark-mode .info-item .label {
    color: #aaa;
}

.info-item .value {
    color: #333;
    font-weight: 600;
}

.dark-mode .info-item .value {
    color: #fff;
}

.compression-progress {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dark-mode .compression-progress {
    background: #2d2d2d;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step i {
    width: 30px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.step span {
    font-size: 12px;
    color: #666;
}

.step.active i {
    background: #4CAF50;
    color: white;
    transform: scale(1.1);
}

.step.active span {
    color: #4CAF50;
    font-weight: 600;
}

.compression-benefits {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.dark-mode .compression-benefits {
    background: #1b5e20;
}

.compression-benefits h4 {
    margin-top: 0;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-mode .compression-benefits h4 {
    color: #a5d6a7;
}

.compression-benefits ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.compression-benefits li {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.dark-mode .compression-benefits li {
    color: #e8f5e9;
}

.compression-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#compress-now:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* ===== PAINEL DO CLIENTE ===== */

.client-panel {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.client-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.client-login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  padding: 40px;
}

.client-login-header {
  text-align: center;
  margin-bottom: 30px;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.client-logo i {
  font-size: 2.5rem;
  color: #667eea;
}

.client-logo .logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  -webkit-text-fill-color: transparent;
}

.client-login-subtitle {
  color: #666;
  font-size: 0.9rem;
}

/* ===== MODAL DE CRIAÇÃO DE CLIENT USER ===== */

.modal-body .tvs-selection {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.tv-selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.tv-selection-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.tv-selection-item.selected {
  border-color: #667eea;
  background: #f0f4ff;
}

.tv-selection-info {
  flex: 1;
}

.tv-selection-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.tv-selection-code {
  font-size: 0.85rem;
  color: #666;
}

.tv-selection-actions {
  display: flex;
  gap: 8px;
}

/* ===== LISTA DE CLIENT USERS ===== */

.client-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.client-user-card {
  background: #1e293b;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #334155;
  transition: all 0.3s ease;
}

.client-user-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.client-user-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.client-user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.client-user-info {
  flex: 1;
}

.client-user-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.client-user-email {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.client-user-phone {
  color: #888;
  font-size: 0.85rem;
}

.client-user-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.client-user-status.active {
  background: #e7f7ef;
  color: #10b981;
}

.client-user-status.inactive {
  background: #fee;
  color: #ef4444;
}

.client-user-tvs {
  margin: 15px 0;
  padding: 15px;
  background: #334155;
  border-radius: 8px;
}

.client-user-tvs h4 {
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-user-tvs h4 i {
  color: #667eea;
}

.tv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tv-tag {
  background: #1e293b;
  border: 1px solid #64748b;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tv-tag i {
  color: #667eea;
  font-size: 0.8rem;
}

.client-user-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
  .client-users-grid {
    grid-template-columns: 1fr;
  }
  
  .client-user-card {
    padding: 15px;
  }
  
  .client-user-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .client-user-actions {
    flex-wrap: wrap;
  }
}
/* Estilos para o formulário de conteúdo no painel do cliente */
.upload-section {
    margin-top: 15px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    
}

.file-input {
    display: block;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.upload-btn {
    width: 100%;
    margin-top: 10px;
}

.upload-progress {
    margin-top: 15px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #666;
}

.type-fields {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hint {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.html-preview {
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
}

.html-preview h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

/* Estilo para o preview HTML */
#html-preview-frame {
    background: white;
    padding: 10px;
    border-radius: 4px;
}

/* Estilo para campos específicos de tipo */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}
/* Badge de agendamento */
.schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: var(--radius-lg);
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.schedule-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.schedule-badge.inactive {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

.schedule-badge i {
  font-size: 12px;
}

/* Informações do agendamento no card */
.schedule-info {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
}

.schedule-info.inactive {
  opacity: 0.6;
}

.schedule-details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.schedule-details i {
  font-size: 14px;
  color: var(--primary-light);
}

.schedule-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.day-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-md);
  font-size: 10px;
  font-weight: 600;
}

/* Seção de agendamento no formulário */
.schedule-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: 5px;
  border: 1px solid var(--border-color);
}

#schedule-info-placeholder {
  flex: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.no-schedule {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
}

/* Ações de agendamento no card */
.content-card-actions .btn-warning {
  background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
  color: var(--text-primary);
  border: none;
}

.content-card-actions .btn-warning:hover {
  background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
}