[x-cloak] { display: none !important; }

/* Ocultar main quando não logado */
body:not(.logged-in) main.container {
    display: none !important;
}

/* ============================================================================
   OmniLegal - Estilos Globais
   Design: Minimalista e Executivo
   Baseado no Figma Design
   ============================================================================ */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores principais do Figma - Refinadas */
    --primary-dark: #1a1f4d;
    --primary-blue: #2e3b7c;
    --card-bg: rgba(46, 59, 124, 0.25);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dark: #1a1f4d;
    --input-bg: #f5f5f7;
    --button-bg: #ffffff;
    --button-text: #1a1f4d;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Espaçamentos - Mais compactos */
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 28px;
    --spacing-xl: 36px;
    
    /* Bordas - Mais suaves */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    /* Sombras - Mais sutis e modernas */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* Transições - Mais fluidas */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0; 
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 0 var(--spacing-md);
    animation: fadeIn 0.4s ease-out;
}

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

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: 0 25px 35px rgba(0, 0, 0, 0.12), 0 15px 15px rgba(0, 0, 0, 0.06);
}

/* Login Card Specifics (Smaller width) */
.login-card {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Logo Styles */
.logo {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.logo-img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Page Title Styles */
.page-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--info);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Header Navigation */
.page-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-xl);
    background: rgba(26, 31, 77, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    position: relative;
}

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

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

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
}

.modal-overlay {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-close:hover {
    color: var(--text-light);
}

.btn-icon {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.table-row-clickable {
    cursor: pointer;
    transition: background var(--transition-fast);
}

.table-row-clickable:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    margin: var(--spacing-sm) 0;
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.btn-logout-header {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout-header:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Menu Principal Styles */
.main-menu {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.main-menu h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
}

.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.menu-btn .btn-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 58, 138, 0.2));
    border-radius: 50%;
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all var(--transition-base);
}

.menu-btn:hover .btn-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(30, 58, 138, 0.4));
    transform: scale(1.1) rotate(5deg);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.menu-btn h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

.menu-btn p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Upload Section */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    margin-bottom: var(--spacing-lg);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--info);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--spacing-md);
}

/* Dashboard Tables */
.table-container {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    font-size: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-light);
}

th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { 
    background: rgba(239, 68, 68, 0.2); 
    color: var(--danger); 
    border: 1px solid rgba(239, 68, 68, 0.3); 
}
.badge-danger[style*="cursor: pointer"]:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Badge clicável para status validado */
.badge-warning[style*="cursor: pointer"]:hover,
.badge-success[style*="cursor: pointer"]:hover {
    background: rgba(139, 92, 246, 0.4) !important;
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 4px 12px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8) !important;
}

/* Realce roxo no badge de status validado quando clicável */
.badge-warning[style*="cursor: pointer"],
.badge-success[style*="cursor: pointer"] {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    transition: all 0.3s ease;
}

/* Realce roxo especial para VALIDADO_EDITADO (sempre, mesmo sem cursor) */
.badge-warning {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

/* Intensificar quando clicável */
.badge-warning[style*="cursor: pointer"] {
    background: rgba(139, 92, 246, 0.25) !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
}

.badge-info { background: rgba(59, 130, 246, 0.2); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.3); }

/* Badge especial para VALIDADO - Violeta vibrante */
.badge-validado {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(168, 85, 247, 0.35)) !important;
    color: #e0d4ff !important;
    border: 1px solid rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4), inset 0 0 6px rgba(168, 85, 247, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.badge-validado:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(168, 85, 247, 0.5)) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 4px 12px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

/* Badge especial para RELATORIO_GERADO - Dourado/Ouro */
.badge-relatorio {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(234, 179, 8, 0.35)) !important;
    color: #fef3c7 !important;
    border: 1px solid rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4), inset 0 0 6px rgba(234, 179, 8, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.badge-relatorio:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(234, 179, 8, 0.5)) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6), 0 4px 12px rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
}

/* Badge especial para LOTE_FINALIZADO - Cinza/Arquivado */
.badge-finalizado {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.35), rgba(75, 85, 99, 0.35)) !important;
    color: #d1d5db !important;
    border: 1px solid rgba(107, 114, 128, 0.6) !important;
    box-shadow: 0 0 8px rgba(107, 114, 128, 0.3), inset 0 0 4px rgba(75, 85, 99, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.badge-finalizado:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.5), rgba(75, 85, 99, 0.5)) !important;
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.5), 0 4px 10px rgba(75, 85, 99, 0.3);
}

/* Badge especial para GUIA_ENVIADA - Azul/Email */
.badge-enviada {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(99, 102, 241, 0.35)) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4), inset 0 0 6px rgba(99, 102, 241, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.badge-enviada:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(99, 102, 241, 0.5)) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Badge especial para GERANDO_GUIA - Azul pulsante (processando) */
.badge-gerando {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(14, 165, 233, 0.4)) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(59, 130, 246, 0.7) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5), inset 0 0 8px rgba(14, 165, 233, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    animation: badgePulse 1.5s ease-in-out infinite !important;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.4), inset 0 0 6px rgba(14, 165, 233, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.7), 0 0 40px rgba(14, 165, 233, 0.4), inset 0 0 10px rgba(14, 165, 233, 0.4);
        transform: scale(1.02);
    }
}

/* Badge especial para ENVIANDO_EMAIL - Rosa/Magenta pulsante */
.badge-enviando {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(219, 39, 119, 0.4)) !important;
    color: #fbcfe8 !important;
    border: 1px solid rgba(236, 72, 153, 0.7) !important;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5), inset 0 0 8px rgba(219, 39, 119, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    animation: emailPulse 1.5s ease-in-out infinite !important;
}

@keyframes emailPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.4), inset 0 0 6px rgba(219, 39, 119, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(236, 72, 153, 0.7), 0 0 40px rgba(219, 39, 119, 0.4), inset 0 0 10px rgba(219, 39, 119, 0.4);
        transform: scale(1.02);
    }
}

/* Badge especial para REGERANDO_GUIA - Laranja pulsante (retentativa) */
.badge-regenerando {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(234, 88, 12, 0.4)) !important;
    color: #fed7aa !important;
    border: 1px solid rgba(249, 115, 22, 0.7) !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.5), inset 0 0 8px rgba(234, 88, 12, 0.3) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    animation: regenerandoPulse 1.5s ease-in-out infinite !important;
}

@keyframes regenerandoPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(249, 115, 22, 0.4), inset 0 0 6px rgba(234, 88, 12, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(249, 115, 22, 0.7), 0 0 40px rgba(234, 88, 12, 0.4), inset 0 0 10px rgba(234, 88, 12, 0.4);
        transform: scale(1.02);
    }
}

/* Botão Gerar Lote com GLOW quando todos prontos */
.btn-glow {
    animation: btnGlow 1.5s ease-in-out infinite alternate !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6), 0 0 40px rgba(139, 92, 246, 0.4) !important;
}

@keyframes btnGlow {
    0% {
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.5), 0 0 30px rgba(139, 92, 246, 0.3);
        transform: translateY(0);
    }
    100% {
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.8), 0 0 50px rgba(139, 92, 246, 0.5), 0 0 70px rgba(168, 85, 247, 0.3);
        transform: translateY(-2px);
    }
}

/* Linha selecionada na tabela */
.row-selected {
    background: rgba(239, 68, 68, 0.15) !important;
    border-left: 3px solid var(--danger) !important;
}

.row-selected:hover {
    background: rgba(239, 68, 68, 0.2) !important;
}

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

/* Visualizador de Guias */
.guia-item-selecionada {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Badge para guia validada */
.badge-guia-validada {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.3)) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

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

/* Loader */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    display: inline-block;
}

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

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Footer */
.footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================================
   Gestão de Processos - Tabela Estilosa
   ============================================================================ */

.tabela-processos {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tabela-processos thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

.tabela-processos thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.tabela-processos th {
    padding: 0;
    text-align: left;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tabela-processos th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.tabela-processos .th-content {
    padding: 16px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tabela-processos .th-content:hover {
    background: rgba(255, 255, 255, 0.15);
}

.tabela-processos .th-content.menu-open {
    background: rgba(255, 255, 255, 0.25);
}

.tabela-processos tbody tr {
    transition: all 0.2s ease;
}

.tabela-processos tbody tr:nth-child(odd) {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.tabela-processos tbody tr:nth-child(even) {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.04) 0%, rgba(118, 75, 162, 0.04) 100%);
}

.tabela-processos tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(240, 147, 251, 0.15) 100%) !important;
    transform: scale(1.002);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.tabela-processos td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
    color: var(--text-light);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabela-processos tbody tr:last-child td {
    border-bottom: none;
}

/* Menu dropdown da coluna - Estiloso */
.coluna-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 240px;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid rgba(167, 139, 250, 0.4);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
    z-index: 100;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.coluna-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1e1b4b;
    border-left: 1px solid rgba(167, 139, 250, 0.4);
    border-top: 1px solid rgba(167, 139, 250, 0.4);
    transform: rotate(45deg);
}

.menu-section-title {
    font-size: 0.65rem;
    color: #a78bfa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.menu-btn-group {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.menu-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.3);
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(167, 139, 250, 0.5);
    transform: translateY(-1px);
}

.menu-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border-color: transparent;
}

.menu-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.menu-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.menu-btn-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.menu-btn-success:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.3), transparent);
    margin: 10px 0;
}

.menu-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    color: #1e1b4b;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

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

.menu-select {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    color: #1e1b4b;
    font-size: 0.85rem;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Indicadores na coluna */
.indicador-ordem {
    color: #fbbf24;
    font-size: 0.8rem;
}

.indicador-filtro {
    color: #34d399;
    font-size: 0.65rem;
    background: rgba(52, 211, 153, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Container da tabela */
.tabela-processos-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.1);
}

/* Stats bar */
.stats-bar-processos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stats-bar-processos .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.stats-bar-processos .stat-item i {
    color: #a78bfa;
}

.stats-bar-processos .stat-value {
    font-weight: 700;
    color: #c4b5fd;
}

/* ============================================================================
   MANUAL DO USUÁRIO - Estilos
   ============================================================================ */

/* Navegação lateral do manual */
.manual-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.manual-nav-item:hover {
    background: rgba(236, 72, 153, 0.1);
    border-left-color: rgba(236, 72, 153, 0.5);
    color: #f472b6;
}

.manual-nav-item.active {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.2) 0%, transparent 100%);
    border-left-color: #ec4899;
    color: #f472b6;
    font-weight: 600;
}

.manual-nav-item i {
    width: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.manual-nav-item:hover i {
    transform: scale(1.1);
}

/* Scrollbar personalizada para sidebar do manual */
.manual-sidebar::-webkit-scrollbar {
    width: 6px;
}

.manual-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.manual-sidebar::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.3);
    border-radius: 3px;
}

.manual-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

/* Card de informação do manual */
.manual-info-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.manual-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animação de entrada para seções */
.manual-section-enter {
    animation: manualFadeIn 0.3s ease-out;
}

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

/* Badge de status no manual */
.badge-secondary {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.badge-validated {
    background: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.badge-relatorio {
    background: rgba(6, 182, 212, 0.3);
    color: #22d3ee;
}

.badge-regenerando {
    background: rgba(249, 115, 22, 0.3);
    color: #fb923c;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsividade do Manual */
@media (max-width: 900px) {
    .manual-layout {
        grid-template-columns: 1fr !important;
    }
    
    .manual-sidebar {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
    }
}

