/* ===== RESET E CONFIGURAÇÕES BÁSICAS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores principais baseadas na referência */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    
    --secondary: #06b6d4;
    --secondary-light: #22d3ee;
    
    --accent-orange: #f97316;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-green: #22c55e;
    
    /* Tons de cinza */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Espaçamento */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* 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);
    
    /* Transições */
    --transition: 150ms ease-in-out;
}

/* ===== LAYOUT PRINCIPAL ===== */
.App {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    margin: 0;
}

/* ===== LOGIN SCREEN ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
}

/* Estilos Tailwind para o formulário de login */
.min-h-screen {
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.w-full {
    width: 100%;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.relative {
    position: relative;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-md {
    max-width: 28rem;
}

.bg-white {
    background-color: white;
}

.rounded-2xl {
    border-radius: 1rem;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.flex-col {
    flex-direction: column;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

.text-red-600 {
    color: #7f10b3;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.text-center {
    text-align: center;
}

.text-gray-700 {
    color: #374151;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.block {
    display: block;
}

.text-gray-700 {
    color: #374151;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.rounded {
    border-radius: 0.25rem;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.text-gray-800 {
    color: #1f2937;
}

.border {
    border-width: 1px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus\:ring-2:focus {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-red-400:focus {
    --tw-ring-color: #ab39ec;
}

.bg-red-600 {
    background-color: #ab39ec;
}

.hover\:bg-red-700:hover {
    background-color: #8b2dd4;
}

.text-white {
    color: white;
}

.font-semibold {
    font-weight: 600;
}

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Estilos específicos para inputs conforme referência */
input[type="email"], input[type="password"] {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    tab-size: 4;
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x: ;
    --tw-pan-y: ;
    --tw-pinch-zoom: ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position: ;
    --tw-gradient-via-position: ;
    --tw-gradient-to-position: ;
    --tw-ordinal: ;
    --tw-slashed-zero: ;
    --tw-numeric-figure: ;
    --tw-numeric-spacing: ;
    --tw-numeric-fraction: ;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgba(59,130,246,.5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
    --tw-backdrop-blur: ;
    --tw-backdrop-brightness: ;
    --tw-backdrop-contrast: ;
    --tw-backdrop-grayscale: ;
    --tw-backdrop-hue-rotate: ;
    --tw-backdrop-invert: ;
    --tw-backdrop-opacity: ;
    --tw-backdrop-saturate: ;
    --tw-backdrop-sepia: ;
    --tw-contain-size: ;
    --tw-contain-layout: ;
    --tw-contain-paint: ;
    --tw-contain-style: ;
    border: 0 solid #e5e7eb;
    box-sizing: border-box;
    font-feature-settings: inherit;
    font-family: inherit;
    font-size: 100%;
    font-variation-settings: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    margin: 0;
    width: 100%;
    border-radius: .25rem;
    border-width: 1px;
    --tw-border-opacity: 1;
    border-color: rgb(209 213 219/var(--tw-border-opacity,1));
    --tw-bg-opacity: 1;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: .5rem;
    padding-top: .5rem;
    --tw-text-opacity: 1;
}

/* Estilos específicos para o botão conforme referência */
button[type="submit"] {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    tab-size: 4;
    --tw-border-spacing-x: 0;
    --tw-border-spacing-y: 0;
    --tw-translate-x: 0;
    --tw-translate-y: 0;
    --tw-rotate: 0;
    --tw-skew-x: 0;
    --tw-skew-y: 0;
    --tw-scale-x: 1;
    --tw-scale-y: 1;
    --tw-pan-x: ;
    --tw-pan-y: ;
    --tw-pinch-zoom: ;
    --tw-scroll-snap-strictness: proximity;
    --tw-gradient-from-position: ;
    --tw-gradient-via-position: ;
    --tw-gradient-to-position: ;
    --tw-ordinal: ;
    --tw-slashed-zero: ;
    --tw-numeric-figure: ;
    --tw-numeric-spacing: ;
    --tw-numeric-fraction: ;
    --tw-ring-inset: ;
    --tw-ring-offset-width: 0px;
    --tw-ring-offset-color: #fff;
    --tw-ring-color: rgba(59,130,246,.5);
    --tw-ring-offset-shadow: 0 0 #0000;
    --tw-ring-shadow: 0 0 #0000;
    --tw-shadow: 0 0 #0000;
    --tw-shadow-colored: 0 0 #0000;
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
    --tw-backdrop-blur: ;
    --tw-backdrop-brightness: ;
    --tw-backdrop-contrast: ;
    --tw-backdrop-grayscale: ;
    --tw-backdrop-hue-rotate: ;
    --tw-backdrop-invert: ;
    --tw-backdrop-opacity: ;
    --tw-backdrop-saturate: ;
    --tw-backdrop-sepia: ;
    --tw-contain-size: ;
    --tw-contain-layout: ;
    --tw-contain-paint: ;
    --tw-contain-style: ;
    border: 0 solid #e5e7eb;
    box-sizing: border-box;
    font-feature-settings: inherit;
    font-family: inherit;
    font-size: 100%;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    text-transform: none;
    -webkit-appearance: button;
    background-image: none;
    cursor: pointer;
    margin-bottom: .5rem;
    width: 100%;
    border-radius: .25rem;
    padding-bottom: .5rem;
    padding-top: .5rem;
    font-weight: 600;
    --tw-text-opacity: 1;
    color: rgb(255 255 255/var(--tw-text-opacity,1));
    transition-duration: .15s;
    transition-property: color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    --tw-bg-opacity: 1;
    background-color: #ab39ec;
}

/* Hover effect para o botão */
button[type="submit"]:hover {
    background-color: #8b2dd4;
}

/* Estilos para o vídeo de fundo do YouTube */
.absolute.inset-0 {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.object-cover {
    object-fit: cover;
}

.z-0 {
    z-index: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.bg-opacity-70 {
    --tw-bg-opacity: 0.7;
}

.bg-opacity-85 {
    --tw-bg-opacity: 0.85;
}

.bg-opacity-90 {
    --tw-bg-opacity: 0.90;
}

.bg-opacity-95 {
    --tw-bg-opacity: 0.95;
}

/* Garantir que o vídeo cubra toda a tela */
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Permite cliques passarem através do vídeo */
    filter: brightness(0.3) contrast(1.1) saturate(0.5); /* Deixa o vídeo visível mas discreto */
}

/* Controles de Paginação */
.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-number {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.pagination-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    video {
        width: 100vw;
        height: 100vh;
        min-width: 100%;
        min-height: 100%;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease-out;
}

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

.logo-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.logo-icon-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 2rem;
}

.login-header h1 {
    color: var(--gray-800);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--gray-600);
    font-size: 1rem;
    text-align: center;
    margin-top: var(--space-2);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition);
    outline: none;
    background: white;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.login-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: var(--space-2);
    position: relative;
    overflow: hidden;
}

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

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-links {
    text-align: center;
    margin-top: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.login-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.error-message {
    background: #fef2f2;
    color: #ab39ec;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid #fecaca;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: var(--space-4);
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
    width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 60px; /* Minimizado - reduzido de 80px */
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
}

.sidebar:hover {
    width: 220px; /* Expandido - reduzido */
}


.sidebar-nav {
    flex: 1;
    padding: var(--space-4) var(--space-1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-600);
    transition: all var(--transition);
    position: relative;
    justify-content: flex-start;
    overflow: hidden;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-item.active {
    background: none; /* Remove fundo quando sidebar fechado */
    color: var(--primary);
    font-weight: 600;
}

.sidebar:hover .nav-item.active {
    background: rgba(139, 92, 246, 0.1); /* Aplica fundo apenas quando expandido */
}

.nav-icon {
    font-size: 1.2rem;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-text {
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar:hover .nav-text {
    opacity: 1;
}

.sidebar-user {
    padding: var(--space-4);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar:hover .user-info {
    opacity: 1;
}

.user-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-full-name {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.user-dropdown {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar:hover .user-dropdown {
    opacity: 1;
}

.user-dropdown:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 60px; /* Ajustado para sidebar minimizado mais estreito */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease-in-out; /* Transição suave */
}

/* Quando sidebar expande, ajusta o margin do conteúdo principal */
.sidebar:hover + .main-content,
.sidebar:hover ~ .main-content {
    margin-left: 220px; /* Ajusta para sidebar expandido - reduzido */
}

/* ===== HEADER ===== */
.main-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-3) var(--space-8) var(--space-3) var(--space-50); /* Aumentado padding vertical ainda mais */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    min-height: 55px; /* Altura mínima garantida */
}

.header-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 1.30rem; /* Aumentado ainda mais o tamanho do título */
    font-weight: 700;
    color: var(--gray-800);
    margin-left: var(--space-8); /* Adiciona espaçamento específico do título */
    line-height: 1.2;
}


.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-profile {
    display: flex;
    align-items: center;
}

.profile-btn {
    background: none;
    border: none;
    padding: var(--space-3); /* Aumentado padding do botão */
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gray-600);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* ===== DASHBOARD CONTENT ===== */
.dashboard-content {
    flex: 1;
    padding: var(--space-8);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.metric-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition);
}

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

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.metric-content {
    flex: 1;
}

.metric-title {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-2);
}

.metric-change {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-change.positive {
    color: var(--accent-green);
}

.metric-change.negative {
    color: var(--accent-red);
}

.change-icon {
    font-size: 0.7rem;
}

/* ===== CHARTS SECTION ===== */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-6);
}

.chart-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.chart-container.large {
    padding: var(--space-6);
}

.chart-container.small {
    padding: var(--space-6);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.chart-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.chart-controls {
    display: flex;
    gap: var(--space-2);
}

.time-btn {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}

.time-btn:hover {
    background: var(--gray-100);
}

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

.chart-content {
    height: 300px;
}

.simple-chart {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-bars {
    flex: 1;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-4);
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: 100%;
}

.bar-income {
    background: var(--primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    width: 100%;
    min-height: 4px;
    transition: all var(--transition);
}

.bar-expense {
    background: var(--accent-green);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    width: 100%;
    min-height: 4px;
    transition: all var(--transition);
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--gray-200);
}

.chart-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.summary-card:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.summary-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.summary-content {
    flex: 1;
}

.summary-title {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* ===== KANBAN CONTENT ===== */
.kanban-content {
    flex: 1;
    padding: var(--space-8);
}

.pipeline-selector {
    margin-bottom: var(--space-8);
}

.pipeline-selector h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-4);
}

.pipeline-select {
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    background: white;
    transition: all var(--transition);
    cursor: pointer;
    width: 300px;
    max-width: 100%;
}

.pipeline-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
    overflow-x: auto;
    padding-bottom: var(--space-4);
}

.kanban-column {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition);
    min-height: 400px;
}

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

.column-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: var(--space-6);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.card-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.column-content {
    padding: var(--space-6);
    min-height: 300px;
}

.empty-stage {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.1rem;
    color: var(--gray-600);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1200px) {
    /* Ajustes para quando o sidebar está aberto */
    .metrics-primary-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    .metrics-secondary-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
        width: 220px; /* Largura completa em mobile - reduzida */
    }
    
    .sidebar:hover {
        width: 220px; /* Mantém largura completa em mobile - reduzida */
    }
    
    .main-content {
        margin-left: 0 !important; /* Força margin 0 em mobile */
    }
    
    /* Remove a regra de hover em mobile */
    .sidebar:hover ~ .main-content {
        margin-left: 0 !important;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: var(--space-4) var(--space-4); /* Aumentado para mobile também */
        min-height: 70px;
    }
    
    .page-title {
        font-size: 1.5rem; /* Aumentado para mobile */
    }
    
    .dashboard-content,
    .kanban-content {
        padding: var(--space-4);
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-card {
        margin: var(--space-4);
        padding: var(--space-6);
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .header-right {
        gap: var(--space-4);
    }
    
    .header-actions {
        display: none;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== UNDER CONSTRUCTION ===== */
.under-construction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: var(--space-12);
}

.construction-icon {
    font-size: 5rem;
    margin-bottom: var(--space-6);
    animation: pulse 2s ease-in-out infinite;
}

.construction-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-4);
}

.construction-message {
    font-size: 1.1rem;
    color: var(--gray-600);
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.metric-card,
.chart-container,
.kanban-column {
    animation: fadeInUp 0.6s ease-out;
}

.metric-card:nth-child(1) { animation-delay: 0s; }
.metric-card:nth-child(2) { animation-delay: 0.1s; }
.metric-card:nth-child(3) { animation-delay: 0.2s; }
.metric-card:nth-child(4) { animation-delay: 0.3s; }

/* ===== TIKTOK LIVES STYLES ===== */
.lives-container {
    padding: 2rem;
    width: 100%;
    margin: 0 auto;
}

.lives-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.lives-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.lives-title p {
    color: #6b7280;
    font-size: 1rem;
}

.lives-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #374151;
    min-width: 150px;
}

.custom-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.custom-filters input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.lives-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.lives-table-container {
    overflow-x: auto;
}

.lives-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.lives-table th {
    background: #f9fafb;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.lives-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.lives-table tr:hover {
    background: #f9fafb;
}

.lives-table .currency {
    font-weight: 600;
    color: #059669;
}

.commission-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.commission-value {
    font-weight: 700;
    color: #f59e0b;
    font-size: 0.95rem;
}

.commission-percentage {
    font-size: 0.8rem;
    color: #6b7280;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #ab39ec;
}

.btn-delete:hover {
    background: #fecaca;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 2rem;
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.live-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.live-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.commission-preview {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    color: #0369a1;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: #ab39ec;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

.delete-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-content {
    padding: 1.5rem;
    text-align: center;
}

.modal-content p {
    margin-bottom: 1rem;
    color: #6b7280;
}

/* ===== MODERN UI/UX 2025 STYLES ===== */

/* Header Simplificado */
.lives-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    gap: 1.5rem;
}

/* Botão Nova Live com estilo roxo */
.lives-action-header .btn-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    background: #8b5cf6;
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: auto;
}

.lives-action-header .btn-primary:hover {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}

.lives-action-header .btn-primary svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Mensagem de Boas-vindas */
.lives-action-header .welcome-message {
    flex: 1;
    max-width: 500px;
    min-width: 300px;
}

.lives-action-header .welcome-message h2 {
    margin: 0;
    line-height: 1.3;
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lives-action-header .welcome-message p {
    margin: 0;
    line-height: 1.2;
}

/* Emoji inline para evitar quebra de linha */
.lives-action-header .welcome-message .inline-block {
    display: inline-block;
    vertical-align: baseline;
    line-height: 1;
}

/* Botão de Toggle de Métricas - Estado Padrão (Mostrando) */
.btn-toggle-metrics {
    background: #10b981;
    color: #ffffff;
    border: 1px solid #10b981;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-toggle-metrics:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-toggle-metrics:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Botão de Toggle de Métricas - Estado Oculto */
.btn-toggle-metrics.hidden {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #ef4444;
}

.btn-toggle-metrics.hidden:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.btn-toggle-metrics svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Filtro de Intervalo de Data - Date Range Picker */
.date-range-filter-container {
    position: relative;
    margin-right: 12px;
}

.date-range-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    font-size: 13px;
    color: #374151;
}

.date-range-trigger:hover {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.date-range-trigger svg {
    color: #6b7280;
    flex-shrink: 0;
}

.date-range-text {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-range-picker-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-top: 4px;
    min-width: 280px;
}

.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.date-range-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: white;
    transition: all 0.2s ease;
}

.date-range-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.date-range-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.date-range-apply {
    padding: 6px 12px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-range-apply:hover {
    background: #7c3aed;
}

.date-range-clear {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-range-clear:hover {
    background: #dc2626;
}

/* Métricas Principais - Layout Moderno */
.metrics-primary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .metrics-primary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-primary-grid {
        grid-template-columns: 1fr;
    }
}

/* Métricas Secundárias - Layout Moderno */
.metrics-secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .metrics-secondary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .metrics-secondary-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para os novos cards modernos */
.bg-white {
    background-color: white;
}

/* Garantir que os cards das métricas tenham tamanho correto */
.metrics-primary-grid > div,
.metrics-secondary-grid > div {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Forçar quebra de linha se necessário */
.metrics-primary-grid {
    grid-auto-flow: row;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
}

.metrics-secondary-grid {
    grid-auto-flow: row;
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 1.5rem !important;
}

/* Forçar que os cards não quebrem */
.metrics-primary-grid .bg-white,
.metrics-secondary-grid .bg-white {
    width: 100%;
    min-width: 200px;
    flex-shrink: 0;
}

/* Espaçamento do Relatório de IA */
.relatorio-ia-spacing {
    margin-top: 2rem !important;
    margin-bottom: 3rem !important;
}

/* Modal de Visualização */
.live-view-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.live-view-content {
    padding: 1.5rem;
}

.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.view-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.view-group.full-width {
    grid-column: 1 / -1;
}

.view-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.view-value {
    font-size: 1rem;
    color: #111827;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.view-value.currency {
    font-weight: 600;
    color: #059669;
}

/* Botão de Visualizar */
.btn-view {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.btn-view:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

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

/* Estilos para o conteúdo do relatório de IA em markdown */
.relatorio-markdown {
    line-height: 1.6;
    font-size: 0.85rem;
}

.relatorio-markdown h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.relatorio-markdown h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.relatorio-markdown h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.relatorio-markdown p {
    margin-bottom: 0.75rem;
    color: #64748b;
    line-height: 1.6;
}

.relatorio-markdown ul {
    margin-bottom: 1rem;
    padding-left: 0;
    list-style: none;
}

.relatorio-markdown li {
    margin-bottom: 0.5rem;
    color: #64748b;
    line-height: 1.5;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.relatorio-markdown li::before {
    content: "•";
    color: #64748b;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1.5;
    margin-top: 0;
}

.relatorio-markdown li span {
    flex: 1;
    line-height: 1.5;
}

.relatorio-markdown strong {
    font-weight: 600;
    color: #1e293b;
}

.relatorio-markdown em {
    font-style: italic;
    color: #475569;
}

.relatorio-markdown pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    font-family: 'Inter', system-ui, sans-serif;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Scrollbar customizada para o relatório */
.relatorio-markdown::-webkit-scrollbar {
    width: 6px;
}

.relatorio-markdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.relatorio-markdown::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 3px;
}

.relatorio-markdown::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.border {
    border-width: 1px;
}

.border-slate-200 {
    border-color: rgb(226 232 240);
}

.p-5 {
    padding: 1.25rem;
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-medium {
    font-weight: 500;
}

.text-slate-600 {
    color: rgb(71 85 105);
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

.text-slate-900 {
    color: rgb(15 23 42);
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-green-500 {
    --tw-gradient-from: #10b981;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(16, 185, 129, 0));
}

.to-green-600 {
    --tw-gradient-to: #059669;
}

.from-blue-500 {
    --tw-gradient-from: #3b82f6;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0));
}

.to-blue-600 {
    --tw-gradient-to: #2563eb;
}

.from-amber-500 {
    --tw-gradient-from: #f59e0b;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(245, 158, 11, 0));
}

.to-amber-600 {
    --tw-gradient-to: #d97706;
}

.from-purple-500 {
    --tw-gradient-from: #8b5cf6;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(139, 92, 246, 0));
}

.to-purple-600 {
    --tw-gradient-to: #7c3aed;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.text-white {
    color: white;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.bg-pink-100 {
    background-color: rgb(252 231 243);
}

.text-pink-600 {
    color: rgb(219 39 119);
}

.bg-cyan-100 {
    background-color: rgb(207 250 254);
}

.text-cyan-600 {
    color: rgb(8 145 178);
}

.bg-green-100 {
    background-color: rgb(220 252 231);
}

.text-green-600 {
    color: rgb(22 163 74);
}

.bg-orange-100 {
    background-color: rgb(255 237 213);
}

.text-orange-600 {
    color: rgb(234 88 12);
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-slate-500 {
    color: rgb(100 116 139);
}

/* Estilos para o Top 5 Lives com gradiente */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-orange-50 {
    --tw-gradient-from: #fff7ed;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 247, 237, 0));
}

.to-red-50 {
    --tw-gradient-to: #fef2f2;
}

.border-orange-200 {
    border-color: rgb(254 215 170);
}

.text-orange-800 {
    color: rgb(154 52 18);
}

.text-orange-600 {
    color: rgb(234 88 12);
}

.bg-orange-100 {
    background-color: rgb(255 237 213);
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.font-semibold {
    font-weight: 600;
}

.gap-2 {
    gap: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.bg-white {
    background-color: white;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.border-orange-100 {
    border-color: rgb(255 237 213);
}

.rounded-full {
    border-radius: 9999px;
}

.bg-yellow-500 {
    background-color: rgb(234 179 8);
}

.bg-gray-400 {
    background-color: rgb(156 163 175);
}

.bg-amber-600 {
    background-color: rgb(217 119 6);
}

.bg-orange-400 {
    background-color: rgb(251 146 60);
}

.text-slate-700 {
    color: rgb(51 65 85);
}

.text-slate-600 {
    color: rgb(71 85 105);
}

.text-blue-600 {
    color: rgb(37 99 235);
}

.text-green-600 {
    color: rgb(22 163 74);
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.bg-slate-100 {
    background-color: rgb(241 245 249);
}

.hover\:bg-slate-200:hover {
    background-color: rgb(226 232 240);
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Estilos para o gráfico Canvas */
.h-64 {
    height: 16rem;
}

.h-72 {
    height: 18rem;
}

.sm\:h-72 {
    height: 18rem;
}

@media (min-width: 640px) {
    .sm\:h-72 {
        height: 18rem;
    }
}

.md\:h-80 {
    height: 20rem;
}

@media (min-width: 768px) {
    .md\:h-80 {
        height: 20rem;
    }
}

/* Estilos para os tabs do gráfico */
.chart-tab.active {
    background-color: rgb(226 232 240);
    color: rgb(15 23 42);
}

.chart-tab {
    cursor: pointer;
    user-select: none;
}

/* Canvas responsivo */
canvas {
    max-width: 100%;
    height: auto;
}

/* Grid layout para evolução temporal e top 5 */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gap-6 {
    gap: 1.5rem;
}

.p-6 {
    padding: 1.5rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 0.5rem;
}

.h-full {
    height: 100%;
}

.p-4 {
    padding: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* Container de Gráficos Moderno */
.charts-modern-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.charts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.charts-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.chart-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.chart-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-tab.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-tab:hover:not(.active) {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

.charts-content {
    position: relative;
    min-height: 300px;
}

.modern-chart {
    display: none;
}

.modern-chart.active {
    display: block;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modern-chart-bars {
    display: flex;
    align-items: end;
    gap: 1rem;
    height: 250px;
    padding: 1rem 0;
    justify-content: space-between;
}

.modern-chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
    max-width: 100px;
}

.modern-chart-bar {
    width: 100%;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    position: relative;
}

.modern-chart-bar:hover {
    transform: scaleY(1.05);
    filter: brightness(1.1);
}

.modern-chart-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.modern-chart-value {
    font-size: 0.7rem;
    color: #374151;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Header de Gerenciamento */
.lives-management-header {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.management-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.management-title p {
    color: #64748b;
    margin: 0;
    font-size: 1rem;
}

.management-filters {
    margin-top: 1.5rem;
}

.modern-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modern-filter-select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #374151;
    min-width: 200px;
    transition: all 0.3s ease;
}

.modern-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-custom-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modern-date-input {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.3s ease;
}

.modern-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== DASHBOARD ENHANCED STYLES ===== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    width: 100%;
}

.chart-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.simple-chart {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    height: 250px;
    padding: 1rem 0;
    width: 100%;
    justify-content: space-between;
}

.chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
    max-width: 120px;
}

.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.chart-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 0.25rem;
}

.chart-value {
    font-size: 0.7rem;
    color: #374151;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.recent-lives {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.recent-lives h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.lives-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.live-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.live-date {
    font-weight: 600;
    color: #1f2937;
}

.live-metrics {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.live-metrics .metric {
    font-size: 0.9rem;
    color: #6b7280;
}

.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.action-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.empty-dashboard {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.empty-dashboard .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-dashboard h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-dashboard p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* ===== TOP LIVES STYLES ===== */
.top-lives-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.top-lives-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.top-lives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.top-live-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #10B981;
    transition: all 0.2s;
}

.top-live-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rank-badge {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50%;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.live-info {
    flex: 1;
}

.live-date {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.live-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.metric-label {
    color: #6b7280;
    font-weight: 500;
}

.metric-value {
    color: #1f2937;
    font-weight: 600;
}


/* ===== EMPRESAS MANAGEMENT ===== */
.empresas-container {
    padding: 2rem;
}

.empresas-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.empresas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.empresa-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.empresa-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.empresa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.empresa-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.empresa-details {
    margin-bottom: 1rem;
}

.empresa-details p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.empresa-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== USUARIOS MANAGEMENT ===== */
.usuarios-container {
    padding: 2rem;
}

.usuarios-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.usuarios-table-container {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.usuarios-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.usuarios-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.usuarios-table tr:hover {
    background: #f9fafb;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-badge.admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.cliente {
    background: #f3e8ff;
    color: #7c3aed;
}

.empresas-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* ===== MODAL STYLES ===== */
.empresa-modal,
.usuario-modal {
    background: white;
    border-radius: 0.75rem;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.empresa-form,
.usuario-form {
    padding: 1.5rem;
}

/* ===== ACCESS DENIED ===== */
.access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 2rem;
}

.access-denied h2 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.access-denied p {
    color: #6b7280;
    font-size: 1.125rem;
}


/* ===== SELEÇÃO DE AMBIENTE ===== */
.selecao-ambiente-content {
    padding: 2rem;
}

.selecao-ambiente-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

.selecao-ambiente-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.selecao-ambiente-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.empresas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.empresa-card-gallery {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.empresa-card-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #3b82f6;
}

.empresa-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.empresa-logo {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.empresa-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empresa-logo-placeholder {
    width: 100%;
    height: 100%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.empresa-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.empresa-slug {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.empresa-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empresa-actions {
    text-align: center;
}

.btn-select-empresa {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-select-empresa:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.no-empresas {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.no-empresas-icon {
    margin-bottom: 1.5rem;
}

.no-empresas h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.no-empresas p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== FORM STYLES ===== */
.optional {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.875rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: #374151;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .simple-chart {
        gap: 0.4rem;
        height: 200px;
    }
    
    .chart-item {
        min-width: 60px;
        max-width: 100px;
    }
    
    .top-lives-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .lives-container {
        padding: 1rem;
    }
    
    .lives-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lives-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        justify-content: center;
    }
    
    .custom-filters {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .live-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .live-metrics {
        justify-content: flex-start;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .simple-chart {
        gap: 0.25rem;
        height: 150px;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .chart-item {
        min-width: 50px;
        max-width: 80px;
        flex-shrink: 0;
    }
    
    .chart-value {
        font-size: 0.6rem;
    }
    
    .chart-label {
        font-size: 0.7rem;
    }
    
    .top-live-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .live-metrics {
        width: 100%;
    }
    
    .metric-item {
        justify-content: space-between;
    }
    
    /* Modern responsive styles */
    .metrics-primary-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    .metrics-secondary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .charts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .modern-chart-bars {
        gap: 0.75rem;
        height: 200px;
    }
    .modern-chart-item {
        min-width: 50px;
        max-width: 80px;
    }
}

@media (max-width: 768px) {
    .lives-container {
        padding: 1rem;
    }
    
    .lives-action-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .lives-action-header .welcome-message {
        max-width: none;
    }
    
    .lives-action-header .flex.items-center.space-x-3 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .date-range-filter-container {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .date-range-trigger {
        min-width: 150px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .date-range-picker-wrapper {
        left: -50%;
        width: 300px;
        max-width: 90vw;
    }
    
    .date-range-actions {
        flex-direction: column;
        gap: 6px;
    }

    /* Paginação responsiva */
    .pagination-controls {
        padding: 1rem;
        gap: 0.75rem;
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .pagination-numbers {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.125rem;
    }

    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .pagination-number {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
}

/* Relatório de IA */
.relatorio-ia-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0 3rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.relatorio-ia-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.relatorio-ia-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.relatorio-ia-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.relatorio-ia-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.relatorio-ia-content {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
    font-size: 0.875rem;
    color: #475569;
}

.relatorio-ia-content::-webkit-scrollbar {
    width: 6px;
}

.relatorio-ia-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.relatorio-ia-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.relatorio-ia-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.relatorio-ia-timestamp {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    font-style: italic;
}

    .date-range-apply,
    .date-range-clear {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .metrics-primary-grid,
    .metrics-secondary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card-primary,
    .metric-card-secondary {
        padding: 1.25rem;
    }
    
    .charts-modern-container {
        padding: 1.5rem;
    }
    
    .chart-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .chart-tab {
        flex: 1;
        text-align: center;
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .modern-chart-bars {
        gap: 0.5rem;
        height: 180px;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .modern-chart-item {
        min-width: 45px;
        max-width: 70px;
        flex-shrink: 0;
    }
    
    .lives-management-header {
        padding: 1.5rem;
    }
    
    .management-title h2 {
        font-size: 1.5rem;
    }
    
    .modern-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .modern-filter-select {
        min-width: auto;
    }
    
    .modern-custom-filters {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .metric-card-primary .metric-value {
        font-size: 1.75rem;
    }
    
    .metric-card-secondary .metric-value {
        font-size: 1.25rem;
    }
    
    .charts-modern-container {
        padding: 1rem;
    }
    
    .modern-chart-bars {
        height: 150px;
        gap: 0.25rem;
    }
    
    .modern-chart-item {
        min-width: 40px;
        max-width: 60px;
    }
    
    .modern-chart-label,
    .modern-chart-value {
        font-size: 0.65rem;
    }
}