/* 
Sistema Web de Cadastro - Leilão Pokémon TCG
Estilo moderno, responsivo e com tema Pokémon
VERSÃO ESTÁVEL E PADRONIZADA
*/

/* Import da fonte Inter do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   VARIÁVEIS CSS PARA DARK MODE
   ============================================================ */
:root {
    /* Light Mode (Padrão) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --background-secondary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --input-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-color: #1e293b;
    --background-secondary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --border-color: #334155;
    --card-bg: #1e293b;
    --sidebar-bg: #0f172a;
    --header-bg: #1e293b;
    --input-bg: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #10b981;
    --error: #f87171;
    --warning: #fbbf24;
    --info: #60a5fa;
    
    /* Cor Roxa/Violeta - versões mais claras para melhor contraste no dark mode */
    --purple-color: #a78bfa;
    --purple-dark: #8b5cf6;
    --purple-light: #c4b5fd;
}

/* ============================================================
   RESET ROBUSTO E BASE ESTÁVEL
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    line-height: 1.6 !important;
    min-height: 100vh !important;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    
    /* ESTABILIDADE TOTAL - SEM MOVIMENTOS */
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Prevenção de mudanças de layout */
    contain: layout style !important;
    scroll-behavior: smooth !important;
}

/* Prevenção global de overflow horizontal */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    overflow-x: hidden !important;
}

/* REGRA UNIVERSAL PARA LOGOS - NUNCA MUDA */
img[src*="logo.png"],
img[alt*="Logo"],
img[alt*="logo"],
.header-logo,
.logo {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    transition: none !important;
    transform: none !important;
}

/* LOGO ESPECÍFICO DA TELA DE LOGIN - MAIOR */
.login-logo,
.login-header img {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 3px solid #4f46e5 !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3) !important;
    margin-bottom: 1rem !important;
}

/* LAYOUT DA TELA DE LOGIN */
.login-header {
    text-align: center !important;
    margin-bottom: 2rem !important;
    padding: 2rem 0 !important;
}

.login-header p {
    color: #64748b !important;
    font-size: 1.1rem !important;
    margin-top: 1rem !important;
}

.login-container {
    max-width: 400px !important;
    margin: 2rem auto !important;
    padding: 2rem !important;
}

/* ============================================================
   LAYOUT GLOBAL PADRONIZADO
   ============================================================ */

.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    
    /* LAYOUT ESTÁVEL - NUNCA MUDA */
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    
    /* Estabilidade total */
    position: relative !important;
    box-sizing: border-box !important;
    contain: layout style !important;
}

/* MAIN CONTENT - ÁREA ABAIXO DO HEADER */
.main-content {
    flex: 1 !important;
    width: 100% !important;
    padding: 1.5rem !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
}

/* CORREÇÃO PARA FORMULÁRIOS - OVERRIDE DO MAIN CONTENT */
.form-container {
    background: var(--card-bg) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important;
    margin: 1rem auto !important;
    max-width: 800px !important;
}

/* PAGE HEADER - TÍTULOS DE PÁGINA */
.page-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

/* FILTROS - ESPAÇAMENTO REDUZIDO */
.filters-container {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-select,
.filter-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--input-bg);
    color: var(--text-primary);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* CLIENTES - LAYOUT OTIMIZADO */
.clientes-container {
    margin-top: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.clientes-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.clientes-container .stat-item i {
    color: #6b7280;
}

/* Estilos específicos para clientes-stats */
.clientes-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.clientes-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.clientes-stats .stat-item i {
    color: #6b7280;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.cliente-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow);
    color: var(--text-primary);
    height: auto;
    max-width: 100%;
}

.cliente-card:hover {
    border-color: var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.cliente-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cliente-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cliente-avatar i {
    color: white;
    font-size: 0.875rem;
}

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

.cliente-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cliente-email,
.cliente-leilao {
    margin: 0 0 0.25rem 0;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cliente-status {
    flex-shrink: 0;
}

.cliente-detalhes {
    background: var(--background-secondary);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.cliente-valores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
}

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

.valor-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
    font-weight: 500;
}

.valor-numero {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cliente-actions {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.cliente-card:hover .cliente-actions {
    transform: translateY(-2px);
}

/* Menu de Ações */
.menu-acoes {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    padding: 0.5rem 0;
    min-width: 150px;
    font-size: 0.875rem;
}

.menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.menu-item i {
    width: 16px;
    color: var(--text-secondary);
}

.status-actions {
    display: flex;
    gap: 0.25rem;
}

.status-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.75rem;
}

.status-btn:hover {
    background: #f3f4f6;
}

.status-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Cards de Totais */
.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.total-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow);
    color: var(--text-primary);
}

.total-card:hover {
    border-color: var(--border-color);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.total-info h3 {
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.total-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.total-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.total-card:nth-child(1) .total-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.total-card:nth-child(2) .total-icon {
    background: linear-gradient(135deg, #10b981, #047857);
}

.total-card:nth-child(3) .total-icon {
    background: linear-gradient(135deg, #059669, #065f46);
}

.total-card:nth-child(4) .total-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.total-info h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.total-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Header Responsividade Mobile */
@media (max-width: 768px) {
    .header-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .nav-link.config-btn,
    .nav-link.logout-link {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .header-buttons .nav-link {
        padding: 0.4rem;
    }
    
    /* Responsividade de Tipografia */
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .btn-sm {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        min-height: 32px;
    }
}

/* Header Responsividade Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-link.config-btn,
    .nav-link.logout-link {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .totals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .total-card {
        padding: 1rem;
    }
    
    .total-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .total-info h3 {
        font-size: 1.25rem;
    }
}

.cliente-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.page-header h1,
.page-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.page-header p {
    color: #64748b;
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

/* DASHBOARD ESPECÍFICO */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
    border: 1px solid var(--border-color);
}

/* Seções do Dashboard com espaçamento apropriado */
.section {
    margin-bottom: 3rem;
    padding: 0;
}

.dashboard-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.dashboard-header p {
    opacity: 0.7;
    font-size: 1.1rem;
    color: #64748b;
}

.dashboard-grupo-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-grupo-text h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 600;
}

.dashboard-grupo-text p {
    margin: 0.25rem 0 0 0;
    font-size: 1rem;
    color: #6b7280;
    opacity: 1;
}

/* ============================================================
   LAYOUT GLOBAL CONSISTENTE - TODAS AS PÁGINAS
   ============================================================ */

/* Page Actions - Botões de ação no cabeçalho */
.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Main Content Wrapper */
.main-content {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Cards Grid - Layout Otimizado para 4 cartas por linha */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
    margin: 0;
}

/* Versão responsiva para diferentes tamanhos */
@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
}

/* Container das cartas com padding responsivo */
.cards-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    background: var(--bg-primary);
}

@media (min-width: 768px) {
    .cards-container {
        padding: 1.5rem;
    }
}

/* Stats Grid - Layout para estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* Flash Messages Modernas - PADRONIZADAS */
.flash-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: auto;
    min-width: 300px;
    pointer-events: none;
}

.flash-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
    position: relative;
    border-left: 4px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.4s ease-out;
    transition: all 0.3s ease;
    pointer-events: all;
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.flash-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.flash-success {
    background: rgba(236, 253, 245, 0.98);
    color: #065f46;
    border-left-color: #4f46e5;
}

.flash-error {
    background: rgba(254, 242, 242, 0.98);
    color: #991b1b;
    border-left-color: #ef4444;
}

.flash-info {
    background: rgba(239, 246, 255, 0.98);
    color: #065f46;
    border-left-color: #6366f1;
}

.flash-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    border-radius: 50%;
    opacity: 0.7;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.flash-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.flash-message i:first-child {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ============================================================
   TIPOGRAFIA UNIFICADA E MODERNA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

h2 {
    font-size: 1.875rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

h5 {
    font-size: 1.125rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

p, span, div {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
}

/* Formulários e Inputs padronizados */
input, textarea, select, button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Labels padronizados */
label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

/* ============================================================
   SISTEMA DE BOTÕES UNIFICADO E MODERNO
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    position: relative;
    overflow: hidden;
}

.btn:focus {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3730a3, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #64748b;
    color: white;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-purple:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    color: white;
}

/* Tamanhos de botões */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-height: 26px;
    min-width: 26px;
    border-radius: 4px;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: 32px;
    min-width: 32px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 52px;
}

.btn-secondary {
    background: #64748b;
    color: white;
    border-color: #64748b;
}

.btn-secondary:hover {
    background: #475569;
    border-color: #475569;
    color: white;
    transform: translateY(-1px);
}

.btn-success {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.btn-success:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* Stat Cards Modernos */
.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 140px; /* Aumentar altura para acomodar o link */
    display: flex;
    flex-direction: column; /* Mudança: layout vertical */
    justify-content: space-between; /* Mudança: distribuir espaço */
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
}

/* Área principal do conteúdo do card */
.stat-card-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1; /* Ocupar espaço disponível */
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
    opacity: 0.8;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #4f46e5;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Ícones personalizados por tipo */
.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

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

.stat-info h3 {
    font-size: 1.75rem; /* Reduzido ligeiramente para acomodar valores maiores */
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.1;
    background: linear-gradient(135deg, #1e293b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
    min-height: 2.4rem; /* Aumentado para acomodar quebra de linha */
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0 0.25rem; /* Pequeno padding para evitar corte nas bordas */
}

/* Revenue card specific styling */
.revenue-card .stat-info h3 {
    font-size: 1.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
    min-height: 3rem;
    padding: 0.25rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-info p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-link {
    align-self: flex-end; /* Posicionar no final do card */
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(79, 70, 229, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(79, 70, 229, 0.2);
    backdrop-filter: blur(10px);
    margin-top: 0.75rem; /* Espaçamento do conteúdo principal */
    width: fit-content;
    margin-left: auto; /* Alinhar à direita */
}

.stat-card:hover .stat-link {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.stat-link:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-2px) scale(1.02);
}

.stat-link i {
    font-size: 0.75rem;
}

/* === CALENDÁRIO MENSAL COMPACTO === */
.monthly-calendar-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    max-width: 500px; /* Aumentar largura máxima */
    width: 100%;
}

.monthly-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.monthly-calendar-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#current-month-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
    text-align: center;
    font-size: 0.9rem;
}

.monthly-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.monthly-calendar-weekday-header {
    background: var(--card-bg);
    padding: 0.4rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.monthly-calendar-day {
    background: var(--bg-secondary);
    min-height: 45px; /* Aumentar altura dos dias */
    padding: 4px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem; /* Aumentar fonte */
}

.monthly-calendar-day:hover {
    background: var(--bg-tertiary);
    transform: scale(1.02);
}

.monthly-calendar-day:not(.other-month):hover {
    border: 2px solid var(--primary-color);
}

.monthly-calendar-day:not(.other-month):not(.has-leilao):hover::after {
    content: '+';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: bold;
}

.monthly-calendar-day.other-month {
    background: var(--background-secondary);
    color: var(--text-muted);
    opacity: 0.5;
}

.monthly-calendar-day.today {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    font-weight: 600;
}

.monthly-calendar-day.has-leilao {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
}

/* Cores específicas por status do leilão */
.monthly-calendar-day.status-planejamento {
    background: linear-gradient(135deg, #ffa500, #ff8c00) !important;
    border-left: 4px solid #ff6b00;
}

.monthly-calendar-day.status-concluido {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border-left: 4px solid #198754;
}

.monthly-calendar-day.status-cancelado {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border-left: 4px solid #b02a37;
}

.monthly-calendar-day.status-ativo {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    border-left: 4px solid #004085;
}

.monthly-calendar-day.status-pausado {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    border-left: 4px solid #495057;
}

.monthly-calendar-day.has-leilao:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: scale(1.05);
}

.monthly-calendar-day.has-multiple-leiloes {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.monthly-calendar-day-number {
    font-weight: 600;
    margin-bottom: 1px;
    font-size: 0.7rem;
}

.monthly-calendar-leilao-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    margin: 0.5px;
}

/* Informações de leilão no calendário */
.monthly-calendar-leilao-info {
    font-size: 0.55rem;
    text-align: center;
    line-height: 1;
    margin-top: 1px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .monthly-calendar-day {
        min-height: 40px;
        font-size: 0.75rem;
    }
    
    .monthly-calendar-leilao-dot {
        width: 4px;
        height: 4px;
    }
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.action-btn {
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.action-btn i {
    font-size: 1.125rem;
}

/* ============================================================
   VARIÁVEIS CSS PADRONIZADAS
   ============================================================ */
:root {
    /* Cores Principais - Mudança para Azul */
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Cor Roxa/Violeta (para botões especiais como importar) */
    --purple-color: #8b5cf6;
    --purple-dark: #7c3aed;
    --purple-light: #a78bfa;
    
    /* Cores Neutras */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Gradientes - Atualizados para Azul */
    --gradient-primary: linear-gradient(135deg, #4f46e5, #6366f1);
    --gradient-secondary: linear-gradient(135deg, #6366f1, #4f46e5);
    
    /* Sombras */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Bordas */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Espaçamentos */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================================
   COMPONENTES GLOBAIS
   ============================================================ */

/* Flash Messages */
.flash-container {
    margin-bottom: var(--spacing-lg);
}

.flash-message {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    position: relative;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-close {
    position: absolute;
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.flash-close:hover {
    opacity: 1;
}

/* Form Container */
.form-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-header {
    background: var(--gradient-secondary) !important;
    color: white !important;
    padding: var(--spacing-xl) !important;
    text-align: center !important;
}

.form-header h2 {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    margin-bottom: var(--spacing-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--spacing-sm) !important;
}

.form-header p {
    opacity: 0.9 !important;
    font-size: 1.125rem !important;
}

/* Form Sections */
.card-form {
    padding: var(--spacing-xl) !important;
}

.form-section {
    margin-bottom: var(--spacing-2xl) !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding-bottom: var(--spacing-xl) !important;
}

.form-section:last-of-type {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.form-section h3 {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-sm) !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: var(--spacing-lg) !important;
    padding-bottom: var(--spacing-sm) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* Form Grid */
.form-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: var(--spacing-lg) !important;
    align-items: start !important;
}

.form-grid-compact {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: var(--spacing-md) !important;
    align-items: start !important;
}

/* Opções de Cadastro */
.cadastro-options {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-2xl);
}

.option-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.option-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.option-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.option-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.option-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.option-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.option-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-download {
    background: var(--success-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #6366f1;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-upload {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

/* Layout em Duas Colunas */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-section.compact {
    margin-bottom: 0;
    padding-bottom: var(--spacing-lg);
}

.form-section.compact h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.upload-area.compact {
    min-height: 200px;
}

.upload-area.compact .upload-content p {
    font-size: 0.875rem;
}

.upload-area.compact .upload-content small {
    font-size: 0.75rem;
}

/* Responsivo para Formulário */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .cadastro-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .option-divider {
        order: -1;
        margin: var(--spacing-md) auto;
    }
}

@media (max-width: 768px) {
    .form-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .option-actions {
        flex-direction: column;
    }
}

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

.form-group.full-width {
    grid-column: 1 / -1 !important;
}

/* Labels */
.form-group label {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-sm) !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: var(--spacing-sm) !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

/* Campos de moeda brasileira */
.currency-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' viewBox='0 0 16 16'%3E%3Cpath d='M4 10.781c.148 1.667 1.513 2.85 3.591 3.003V15h1.043v-1.216c2.27-.179 3.678-1.438 3.678-3.3 0-1.59-.947-2.51-2.956-3.028l-.722-.187V3.467c1.122.11 1.879.714 2.07 1.616h1.47c-.166-1.6-1.54-2.748-3.54-2.875V1H7.591v1.233c-1.939.23-3.27 1.472-3.27 3.156 0 1.454.966 2.483 2.661 2.917l.61.162v4.031c-1.149-.17-1.94-.8-2.131-1.718H4zm3.391-3.836c-1.043-.263-1.6-.825-1.6-1.616 0-.944.704-1.641 1.8-1.828v3.495l-.2-.05zm1.591 1.872c1.287.323 1.852.859 1.852 1.769 0 1.097-.826 1.828-2.2 1.939V8.73l.348.086z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
    padding-left: 40px;
    font-weight: 600;
    color: var(--success-color);
    border-color: #d1fae5;
    background-color: #f0fdf4;
}

.currency-input:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.currency-input::placeholder {
    color: #86efac;
    font-weight: 500;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

select {
    cursor: pointer;
}

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

/* Checkbox customizado */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.checkbox-label:hover {
    border-color: var(--secondary-color);
    background: rgba(59, 130, 246, 0.05);
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--success-color);
    border-color: var(--success-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

/* Upload Area */
.upload-area {
    position: relative;
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.02);
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background: rgba(59, 130, 246, 0.05);
}

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

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    pointer-events: none;
}

.upload-content i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
}

.upload-content p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.upload-content small {
    color: var(--text-secondary);
}

/* Preview Container */
.preview-container {
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.preview-container img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    transform: scale(1.1);
    background: darkred;
}

/* ========================================== */
/* FORMULÁRIOS E INPUTS */
/* ========================================== */

.btn-edit {
    background: var(--warning-color);
    color: white;
    font-size: 1rem;
    padding: var(--spacing-sm);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-edit:hover {
    background: darkorange;
    transform: translateY(-1px);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    font-size: 1rem;
    padding: var(--spacing-sm);
    width: 36px;
    height: 36px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-image {
    background: #6c5ce7;
    color: white;
    font-size: 1rem;
    padding: var(--spacing-sm);
    width: 36px;
    height: 36px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-image:hover {
    background: #5f3dc4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    font-size: 1rem;
    padding: var(--spacing-sm);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-delete:hover {
    background: darkred;
    transform: translateY(-1px);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
    margin-top: var(--spacing-xl);
}

/* Cards Container (Lista) */
.cards-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cards-header {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

.cards-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: #1e293b;
}

.cards-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.cards-stats {
    display: flex;
    gap: var(--spacing-lg);
}

.stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    opacity: 0.9;
}

/* Dropdown de Flyers */
.action-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.btn-flyers {
    background: rgba(52, 152, 219, 0.9);
    color: white;
    border: 1px solid rgba(52, 152, 219, 1);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-flyers:hover {
    background: rgba(41, 128, 185, 1);
    border-color: rgba(41, 128, 185, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-toggle {
    gap: var(--spacing-sm);
}

.dropdown-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dropdown-item i {
    color: var(--secondary-color);
    width: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-xs) 0;
}

/* Guias de Blocos */
.block-tabs {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    margin-bottom: 1.5rem;
}

.tabs-container {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
    padding: 0.5rem 0;
}

.tabs-container::-webkit-scrollbar {
    height: 4px;
}

.tabs-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.tabs-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.tabs-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.tab-button {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.tab-button.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.tab-button.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

.tab-button:not(.active) .tab-count {
    background: #e2e8f0;
    color: #64748b;
}

.tab-button:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.1);
}

.tab-button.active {
    color: white;
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    border-bottom-color: #4338ca;
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
    transform: translateY(-1px);
    z-index: 1;
}

.tab-button.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -3px;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    border-radius: 10px 10px 0 0;
    z-index: -1;
    opacity: 0.3;
}

.tab-count {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.tab-button:hover .tab-count {
    background: linear-gradient(135deg, #6366f1 0%, #3730a3 100%);
    transform: scale(1.05);
}

.tab-button.active .tab-count {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Versão responsiva para diferentes tamanhos */
@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.2rem;
        max-width: 1600px;
    }
}

.card-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow);
    display: flex;
    flex-direction: column;
    height: auto;
    max-width: 100%;
    width: 100%;
    color: var(--text-primary);
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--border-color);
}

.card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-content h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 0.85rem;
}

.card-info p {
    margin: 0;
    padding: 4px 0;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
}

.card-info strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Estilos para cartas vendidas */
.card-vendida {
    position: relative;
    opacity: 0.95;
    border: 2px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.card-vendida:hover {
    opacity: 1;
    border-color: #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

/* Dark mode - Cartas vendidas */
[data-theme="dark"] .card-vendida {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .card-vendida:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border-color: #34d399;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.vendida-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .vendida-badge {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #0f172a;
    box-shadow: 0 2px 12px rgba(52, 211, 153, 0.5);
}

.vendida-badge i {
    font-size: 0.875rem;
}

.card-vendida .card-image {
    position: relative;
}

.card-vendida .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15) 0%, 
        rgba(5, 150, 105, 0.1) 50%,
        rgba(16, 185, 129, 0.15) 100%
    );
    border: 3px solid rgba(16, 185, 129, 0.3);
    border-radius: 0;
    pointer-events: none;
}

/* Dark mode - Overlay da imagem vendida */
[data-theme="dark"] .card-vendida .card-image::after {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.25) 0%, 
        rgba(5, 150, 105, 0.2) 50%,
        rgba(16, 185, 129, 0.25) 100%
    );
    border-color: rgba(52, 211, 153, 0.4);
}

/* Classes para informações de carta vendida */
.vendida-info-valor {
    color: #059669 !important;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #d1fae5;
}

[data-theme="dark"] .vendida-info-valor {
    color: #34d399 !important;
    border-top-color: #065f46;
}

.vendida-info-comprador {
    color: #059669 !important;
    font-weight: 500;
}

[data-theme="dark"] .vendida-info-comprador {
    color: #6ee7b7 !important;
}

/* Garantir visibilidade do texto no card vendido em dark mode */
[data-theme="dark"] .card-vendida .card-content {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] .card-vendida .card-content h3 {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] .card-vendida .card-info {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .card-vendida .card-info strong {
    color: var(--text-primary, #f8fafc);
}

.card-image {
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
}

@media (min-width: 1024px) {
    .card-image {
        height: 220px;
    }
}

@media (min-width: 1400px) {
    .card-image {
        height: 240px;
    }
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #9ca3af;
}

.no-image i {
    font-size: 2rem;
}

.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
    line-height: 1.4;
    text-align: left;
}

.card-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex: 1;
}

@media (min-width: 320px) {
    .card-info {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    padding: 0.25rem 0;
    background: transparent;
    border-radius: 0;
    padding: 0.25rem 0;
}

.info-item i {
    color: #9ca3af;
    width: 14px;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.card-actions {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.card-actions .btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 0.875rem;
    box-shadow: none;
}

.btn-image {
    background: #6b7280;
    color: white;
}

.btn-image:hover {
    background: #4b5563;
    transform: none;
    box-shadow: none;
}

.btn-whatsapp {
    background: #4f46e5;
    color: white;
}

.btn-whatsapp:hover {
    background: #6366f1;
    transform: none;
    box-shadow: none;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
    color: white;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    color: white;
    text-decoration: none;
    transform: none;
    box-shadow: none;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6366f1;
    font-weight: 600;
    padding: 0.25rem 0;
}

.value-item.highlight {
    color: #dc2626;
    font-weight: 700;
}

.value-item.vendido {
    color: #10b981;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

/* Seletor de Leilão nos Relatórios */
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.reports-title h2 {
    margin: 0;
    color: #111827;
}

.reports-title p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.leilao-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 250px;
}

/* Seletor de leilão centralizado */
.leilao-selector-centered {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
    margin: 1.5rem auto;
    max-width: 400px;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
}

.leilao-selector-centered label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leilao-selector-centered select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Layout melhorado para ações dos cards */
.cards-title-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cards-title-actions h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    text-align: center;
}

.primary-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.secondary-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cards-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 0 auto;
    max-width: 500px;
}

.cards-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.cards-stats .stat i {
    color: #6b7280;
}

.leilao-selector label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leilao-selector select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leilao-selector select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.leilao-selector select:hover {
    border-color: #9ca3af;
}

@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .leilao-selector {
        min-width: auto;
    }
}

.card-values {
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.value-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.value-item:last-child {
    margin-bottom: 0;
}

.value-item.highlight {
    color: var(--success-color);
    font-size: 1rem;
}

.value-item i {
    color: var(--secondary-color);
    width: 16px;
}

.buyer-info {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.buyer-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    color: var(--success-color);
}

.final-value {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    color: var(--success-color);
    margin-top: var(--spacing-xs);
}

.paid-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--success-color);
    margin-top: var(--spacing-xs);
}

.card-notes {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-notes i {
    color: var(--warning-color);
    margin-right: var(--spacing-sm);
}

.card-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    margin-bottom: var(--spacing-xl);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.card-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Form Components */
.form-sections {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

.section-title i {
    color: var(--primary-color);
}

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

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

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

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 3rem;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.form-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
}

.form-check {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.checkbox-label i {
    color: var(--primary-color);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Utility Classes */
.text-green-500 { color: #10b981; }
.text-blue-500 { color: #3b82f6; }
.text-purple-500 { color: #8b5cf6; }
.text-green-400 { color: #34d399; }
.text-emerald-600 { color: #059669; }
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-md);
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cards-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cards-actions {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }
    
    .cards-stats {
        justify-content: center;
    }
    
    /* Guias responsivas */
    .block-tabs {
        padding: 0 var(--spacing-md);
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    }
    
    .tab-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
        gap: 4px;
    }
    
    .tab-count {
        font-size: 0.7rem;
        padding: 2px 6px;
        min-width: 20px;
    }
    
    .dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 90vw;
        max-width: 300px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }
    
    .card-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .card-form {
        padding: var(--spacing-lg);
    }
    
    .upload-area {
        padding: var(--spacing-lg);
    }
    
    .upload-content i {
        font-size: 2rem;
    }
}

/* ========================================
   PÁGINA DE RELATÓRIOS
   ======================================== */

.reports-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.reports-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.reports-header h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

/* Resumo Financeiro */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.summary-card.success {
    border-color: var(--success-color);
}

.summary-card.warning {
    border-color: var(--warning-color);
}

.summary-card.info {
    border-color: var(--secondary-color);
}

.summary-card.danger {
    border-color: var(--danger-color);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.summary-card.success .summary-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.summary-card.warning .summary-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.summary-card.info .summary-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary-color);
}

.summary-card.danger .summary-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.summary-content h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.percentage-indicator {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

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

/* Seções de Relatório */
.report-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.report-section h3 {
    background: var(--gradient-secondary);
    color: white;
    padding: var(--spacing-lg);
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.report-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    background: var(--card-bg);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.report-table th,
.report-table td {
    padding: var(--spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.report-table tbody tr {
    background: var(--card-bg);
    transition: background-color 0.2s ease;
}

.report-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.report-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.report-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Compact Table for Dashboard */
.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.compact-table th,
.compact-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.compact-table tbody tr {
    background: var(--card-bg);
    transition: background-color 0.2s ease;
}

.compact-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.compact-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.compact-table tbody tr:nth-child(even):hover {
    background: var(--bg-tertiary);
}

.compact-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.compact-table .money {
    text-align: right;
    font-weight: 500;
    color: var(--text-primary);
}

.compact-table .money.valor-pago {
    color: #059669;
}

.compact-table .percentage {
    text-align: center;
    font-weight: 500;
}

.compact-table .percentage.positive {
    color: #059669;
}

.compact-table .percentage.negative {
    color: #dc2626;
}

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

.compact-table .date {
    text-align: center;
    font-size: 0.8rem;
}

.card-info strong {
    color: var(--text-primary);
    display: block;
}

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

.buyer-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--success);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.final-value {
    font-weight: 600;
    color: var(--success-color);
}

.difference {
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.difference.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.difference.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.difference.neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

.current-bid {
    font-weight: 600;
    color: var(--warning-color);
}

.no-bid {
    color: var(--text-secondary);
    font-style: italic;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-badge.not-sold {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

/* Estado Vazio */
.empty-report {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.empty-report h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-report p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Resumo de Compradores */
.buyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.buyer-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    color: var(--text-primary);
}

.buyer-card:hover {
     border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.buyer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

.buyer-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.buyer-name i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.buyer-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-item.value {
    font-weight: 600;
    color: var(--success-color);
    font-size: 0.9rem;
}

.stat-item i {
    width: 12px;
    text-align: center;
}

/* Tooltip para cartas */
.cards-tooltip, .donos-tooltip {
    position: relative;
    cursor: help;
    transition: all 0.2s ease;
}

.donos-tooltip:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.cards-tooltip:hover {
    color: var(--primary-color);
}

.tooltip-content {
    display: none !important; /* Esconder conteúdo original, será clonado pelo JS */
}

/* Estilos para o overlay de tooltip criado pelo JavaScript */
.tooltip-overlay {
    font-family: inherit;
}

.tooltip-overlay .tooltip-header {
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #555;
    font-size: 13px;
}

.tooltip-overlay .tooltip-list {
    max-height: 200px;
    overflow-y: auto;
}

.tooltip-overlay .tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    gap: 8px;
}

.tooltip-overlay .tooltip-item:not(:last-child) {
    border-bottom: 1px solid #333;
}

.tooltip-overlay .card-name {
    flex: 1;
    font-size: 12px;
    line-height: 1.3;
}

.tooltip-overlay .card-value {
    font-weight: 600;
    color: #4ade80;
    font-size: 12px;
    white-space: nowrap;
}

.tooltip-overlay .card-quantity {
    font-size: 11px;
    color: #9ca3af;
    margin-right: 8px;
}



.tooltip-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.tooltip-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    white-space: normal;
}

.tooltip-list::-webkit-scrollbar {
    width: 4px;
}

.tooltip-list::-webkit-scrollbar-track {
    background: transparent;
}

.tooltip-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.card-quantity {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-right: var(--spacing-xs);
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-xs) 0;
    gap: var(--spacing-sm);
    white-space: normal;
}

.tooltip-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-name {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 200px;
}

.card-value {
    font-weight: 600;
    color: var(--success-color);
    font-size: 0.8rem;
    white-space: nowrap;
    margin-left: var(--spacing-sm);
}

/* Remover setas - usando posicionamento fixo */

.buyer-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.status-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #dee2e6;
    max-width: 100%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.75rem;
    min-width: 0;
    flex: 1;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 1px 2px var(--shadow);
}

.status-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-btn.pendente.active {
    background: #f59e0b;
    color: #212529;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    font-weight: 600;
}

.status-btn.pago.active {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
    font-weight: 600;
}

.status-btn.cancelado.active {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    font-weight: 600;
}

.status-btn.enviado.active {
    background: #17a2b8;
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.4);
    font-weight: 600;
}

.status-btn i {
    font-size: 1.1rem;
    margin-bottom: 1px;
}

.status-btn span {
    font-weight: 600;
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* Toast Messages */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-message.success {
    background: var(--success-color);
}

.toast-message.error {
    background: var(--danger-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toggle-switch:hover {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-switch.paid {
    background: linear-gradient(135deg, var(--success-color), #4f46e5);
    color: white;
    border-color: #6366f1;
}

.toggle-switch.pending {
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
    border-color: #d97706;
}

.toggle-slider {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 32px;
    height: 32px;
    background: var(--card-bg);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px var(--shadow), 0 1px 2px var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-slider::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: currentColor;
    transition: all 0.3s ease;
    opacity: 0.3;
}

.toggle-switch.paid .toggle-slider {
    transform: translateX(calc(100% + 20px));
}

.toggle-switch.paid .toggle-slider::before {
    background: var(--success-color);
    opacity: 0.8;
}

.toggle-switch.pending .toggle-slider {
    transform: translateX(0);
}

.toggle-switch.pending .toggle-slider::before {
    background: var(--warning-color);
    opacity: 0.8;
}

.toggle-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 1;
    position: relative;
}

.toggle-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.toggle-status i {
    font-size: 0.875rem;
}

.toggle-switch.paid + .toggle-status i {
    color: var(--success-color);
}

.toggle-switch.pending + .toggle-status i {
    color: var(--warning-color);
}

/* Remover estilos antigos do checkbox */
.checkbox-container,
.checkmark,
.checkbox-label {
    display: none;
}

.btn-message {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.btn-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.open-bid {
    color: var(--warning-color);
    font-weight: 500;
    font-style: italic;
}

.no-bid {
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsivo para Relatórios */
@media (max-width: 768px) {
    .reports-container {
        padding: var(--spacing-lg);
    }
    
    .financial-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .buyers-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    
    .buyer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .buyer-stats {
        align-items: flex-start;
        width: 100%;
    }
    
    .buyer-actions {
        width: 100%;
        gap: var(--spacing-sm);
    }
    
    .payment-status {
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .status-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        padding: 2px;
    }
    
    .status-btn {
        padding: 6px 2px;
        font-size: 0.7rem;
    }
    
    .status-btn i {
        font-size: 1rem;
    }
    
    .status-btn span {
        font-size: 0.6rem;
        line-height: 1;
    }
    
    /* Tooltip responsivo - agora gerenciado via JavaScript */
    .tooltip-content {
        min-width: 280px;
        max-width: 90vw;
    }
    
    .report-table {
        font-size: 0.875rem;
    }
    
    .report-table th,
    .report-table td {
        padding: var(--spacing-sm);
    }
}

/* Media Query para telas muito pequenas */
@media (max-width: 400px) {
    .status-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
        padding: 2px;
    }
    
    .status-btn {
        padding: 3px 1px;
        font-size: 0.65rem;
    }
    
    .status-btn i {
        font-size: 0.8rem;
    }
    
    .status-btn span {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .reports-header h2 {
        font-size: 2rem;
    }
    
    .summary-value {
        font-size: 1.5rem;
    }
    
    .report-section h3 {
        font-size: 1rem;
    }
}

/* Checkbox moderno para formulário de edição */
.checkbox-group {
    grid-column: 1 / -1;
}

.checkbox-container {
    display: flex !important;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    background: var(--card-bg);
    position: relative;
}

.checkbox-container:hover {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-1px);
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkbox-mark {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.3s ease;
    background: var(--card-bg);
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked ~ .checkbox-mark {
    background: var(--success-color);
    border-color: var(--success-color);
    transform: scale(1.1);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkbox-mark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.checkbox-container:hover .checkbox-text {
    color: var(--success-color);
}

.checkbox-container input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--success-color);
    font-weight: 600;
}

/* Melhorias no toggle de pagamento */
.toggle-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
}

.toggle-switch {
    position: relative;
    background: var(--border-color);
    border-radius: 20px;
    width: 60px;
    height: 30px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.toggle-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.toggle-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--card-bg);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow);
}

.toggle-switch.paid {
    background: var(--success-color);
}

.toggle-switch.paid .toggle-slider {
    transform: translateX(30px);
}

.toggle-switch.paid + .toggle-info .toggle-label {
    color: var(--success-color);
}

.toggle-switch.paid + .toggle-info .toggle-status {
    color: var(--success-color);
}

.toggle-switch.pending {
    background: var(--warning-color);
}

.toggle-switch.pending + .toggle-info .toggle-label {
    color: var(--warning-color);
}

.toggle-switch.pending + .toggle-info .toggle-status {
    color: var(--warning-color);
}

/* Tooltip overlay fixes */
.tooltip-overlay {
    position: fixed !important;
    z-index: 10000 !important;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Hide original tooltip content */
.tooltip-content {
    display: none !important;
}

/* Estilos para seção de rastreio */
.tracking-section {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.tracking-input label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.tracking-code-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.tracking-code-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estilos para botões de mensagem */
.message-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

/* Botões com apenas ícones */
.btn-icon {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-copy {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.liga-link {
    margin: 8px 0 12px 0;
    text-align: center;
}

.liga-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.liga-link a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
    text-decoration: none;
    color: white;
}

.liga-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1ebe57 100%);
    color: white;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #128c42 100%);
}

/* Manter estilos antigos para compatibilidade */
.btn-cobranca {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-cobranca:hover {
    background-color: #218838;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1ebe57 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #1ebe57 0%, #128c42 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.btn-envio {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-envio:hover {
    background-color: #138496;
}

/* ============================================================
   LAYOUT DA APLICAÇÃO - ESTRUTURA OTIMIZADA
   ============================================================ */

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: 1rem;
    min-height: calc(100vh - 90px); /* Subtraindo altura do header */
}

.main-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   HEADER MODERNO E ABSOLUTAMENTE ESTÁVEL - VERSÃO FINAL
   ============================================================ */

.header {
    /* Layout Base */
    background: var(--header-bg) !important;
    border-bottom: 2px solid var(--border-color) !important;
    box-shadow: 0 4px 16px var(--shadow) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, border-color 0.3s ease !important;
    
    /* LAYOUT FLEXBOX MELHORADO */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    /* Dimensões aumentadas para acomodar melhor o conteúdo */
    width: 100% !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    padding: 0 1.5rem !important; /* Reduzir padding lateral do header */
    margin: 0 !important;
    
    /* Prevenção TOTAL de Mudanças */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    
    /* Estabilidade no DOM */
    contain: layout style paint !important;
    will-change: auto !important;
}

/* === ÁREA DO LOGO === */
.header-content {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

.header-logo {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 3px solid #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    object-fit: cover !important;
    transition: none !important;
    flex-shrink: 0 !important;
    
    /* DIMENSÕES REDUZIDAS - MAIS PADRONIZADO */
    min-width: 60px !important;
    max-width: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    
    /* POSICIONAMENTO FIXO */
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header-logo:hover {
    /* REMOVE QUALQUER TRANSFORMAÇÃO */
    transform: none !important;
}

/* === ÁREA DE NAVEGAÇÃO === */
.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
    padding: 0 1rem; /* Reduzir padding lateral */
    margin: 0;
    
    /* ESTABILIDADE TOTAL - REMOVENDO OVERFLOW HIDDEN */
    flex-shrink: 1;
    min-height: 110px;
    max-height: 110px;
    overflow: visible; /* Permitir que animações apareçam */
    max-width: calc(100vw - 500px); /* Aumentar espaço reservado para botões do usuário */
}

.nav-link {
    /* Reset e Base */
    color: var(--text-secondary);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    
    /* Layout ABSOLUTAMENTE FIXO */
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    
    /* Prevenção TOTAL de Quebras */
    white-space: nowrap;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    min-height: 48px !important;
    max-height: 48px !important;
    height: 48px !important;
    box-sizing: border-box;
    
    /* Estabilidade DOM */
    contain: layout style;
    will-change: background-color, color, transform;
}

/* Estados dos Links - ESTABILIDADE GARANTIDA */
.nav-link:hover {
    background: var(--bg-tertiary) !important;
    color: #4f46e5 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

.nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #3730a3) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    
    /* MANTER DIMENSÕES EXATAS QUANDO ATIVO */
    min-height: 48px !important;
    max-height: 48px !important;
    height: 48px !important;
    padding: 0.9rem 1.2rem !important;
    margin: 0 0.5rem 0 0.5rem !important; /* Margem para evitar corte da animação */
    border-radius: 10px !important;
    transform: none !important; /* Evitar mudanças de posição */
}

/* Força texto branco em links ativos */
.nav-link.active * {
    color: #ffffff !important;
}

.nav-link.logout-link {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    padding: 0.6rem !important;
    font-size: 0.9rem !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 0.25rem !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3) !important;
}

.nav-link.logout-link:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Botão de Configurações */
.nav-link.config-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    padding: 0.6rem !important;
    font-size: 0.9rem !important;
    min-width: 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 0.25rem !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(107, 114, 128, 0.3) !important;
}

.nav-link.config-btn:hover {
    background: linear-gradient(135deg, #4b5563, #374151) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4) !important;
}

/* Ícones dos Links */
.nav-link i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* === ÁREA DO USUÁRIO === */
.header-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem; /* Reduzir gap entre elementos */
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0;
    margin: 0;
    min-width: 250px; /* Aumentar espaço mínimo */
    max-width: 400px; /* Aumentar limite máximo */
}

.header-buttons {
    display: flex;
    gap: 0.4rem; /* Reduzir gap para economizar espaço */
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    padding: 0.5rem 0;
    min-width: 90px; /* Garantir largura mínima para os dois botões */
}

.user-info {
    text-align: right;
    line-height: 1.3; /* Reduzir line-height */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 150px; /* Limitar largura do texto do usuário */
}

.user-email {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem; /* Fonte um pouco menor */
    margin-bottom: 0.2rem; /* Reduzir margem */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-type {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.group-badge {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.group-name {
    display: block;
    font-size: 0.8rem;
    color: #4f46e5;
    font-weight: 600;
    margin-top: 0.3rem;
    font-style: italic;
}

/* ============================================================
   RESPONSIVIDADE MODERNA DO HEADER
   ============================================================ */

/* Desktop Grande (1200px+) */
@media (min-width: 1200px) {
    .header {
        padding: 0 3rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    .header {
        padding: 0 1.5rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* Mobile (até 767px) */
@media (max-width: 767px) {
    .header {
        height: auto !important;
        min-height: 90px !important;
        max-height: none !important;
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .header-content {
        width: auto;
        justify-content: flex-start;
        order: 1;
    }
    
    .header-logo {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        min-height: 60px !important;
        max-height: 60px !important;
    }
    
    .header-user {
        width: auto;
        justify-content: flex-end;
        order: 2;
        flex-shrink: 0;
    }
    
    .user-info {
        display: none; /* Ocultar informações do usuário em mobile */
    }
    
    .header-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .nav {
        width: 100%;
        order: 3;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
        min-height: auto;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        flex-shrink: 0;
        gap: 0.25rem;
    }
    
    .nav-link i {
        font-size: 0.75rem;
    }
}
    
    .user-type {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .group-name {
        font-size: 0.7rem;
    }

/* ============================================================
   PÁGINA DE GERENCIAR GRUPOS - LAYOUT MODERNO
   ============================================================ */

.grupos-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    margin-top: 1rem;
}

.grupos-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.stat-item i {
    font-size: 1.25rem;
    opacity: 0.9;
}

.grupos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.grupo-card {
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.grupo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4f46e5, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grupo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

.grupo-card:hover::before {
    opacity: 1;
}

.grupo-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 1px solid #f8fafc;
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    overflow: hidden;
}

.grupo-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.grupo-card:hover .grupo-logo {
    border-color: #4f46e5;
    transform: scale(1.05);
}

.grupo-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.grupo-card:hover .grupo-logo-placeholder {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    transform: scale(1.05);
}

.grupo-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.grupo-info h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grupo-responsavel {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grupo-email {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grupo-stats {
    padding: 1.5rem 2rem;
    background: #fafbfc;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #4f46e5;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.stat-value.date {
    font-size: 1rem;
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.stat i {
    color: #4f46e5;
    font-size: 0.875rem;
}

.grupo-contato {
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.grupo-telefone {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grupo-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.grupo-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    color: white;
}

.grupo-whatsapp::before {
    content: '📱';
    font-size: 1rem;
}

.grupo-streaming {
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    color: var(--text-primary);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.streaming-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.streaming-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
    color: white;
    text-decoration: none;
}

.streaming-item i {
    font-size: 1rem;
}

.grupo-pix {
    padding: 1.5rem 2rem;
    background: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
    overflow: hidden;
}

.pix-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.pix-info i {
    font-size: 1.25rem;
    opacity: 0.9;
}

.pix-info span {
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contato-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 12px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.contato-item:hover {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.contato-item i {
    font-size: 1rem;
}

.grupo-actions {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 0.75rem;
    background: #fafbfc;
    justify-content: center;
    overflow: hidden;
}

.btn-action {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 85px;
    max-width: 85px;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    cursor: pointer;
}

.btn-action:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-view {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-view:hover {
    background: linear-gradient(135deg, #475569, #334155);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.4);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #3730a3, #4f46e5);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-leiloes {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-leiloes:hover {
    background: linear-gradient(135deg, #15803d, #4f46e5);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
    color: white;
}

.btn-novo-grupo {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    cursor: pointer;
}

/* ============================================================
   SISTEMA DE MODAIS MODERNOS E PADRONIZADOS
   ============================================================ */

/* Modal Overlay - Base para todos os modais */
.modal,
.modal-overlay,
#modalConfiguracoes {
    display: none;
    position: fixed !important;
    z-index: 10001 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
}

/* Estados ativos dos modais */
.modal.show,
.modal.active,
.modal-overlay.active,
#modalConfiguracoes[style*="display: flex"],
#modalConfiguracoes.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Conteúdo do modal - Design padronizado */
.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

/* Modais grandes */
.modal-content.modal-large {
    max-width: 900px;
}

/* Modais pequenos */
.modal-content.modal-small {
    max-width: 400px;
}

/* Animação de entrada */
.modal.show .modal-content,
.modal-overlay.active .modal-content,
#modalConfiguracoes.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Header padronizado */
.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    position: relative;
    flex-shrink: 0;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title i {
    color: #4f46e5;
    font-size: 1.125rem;
}

/* Botão fechar padronizado */
.modal-close,
.btn-close {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.modal-close:hover,
.btn-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.05);
}

/* Body padronizado */
.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Footer padronizado */
.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    border-radius: 0 0 20px 20px;
}

.btn-modal-cancel {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

.btn-modal-submit {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-modal-submit:hover {
    background: linear-gradient(135deg, #15803d, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.4);
}

/* Modal Form Styles */
.modal .form-group {
    margin-bottom: 1.5rem;
}

.modal .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.modal .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

.modal .form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.modal .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
}

.modal .form-input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: #fafbfc;
    cursor: pointer;
}

.modal .form-input[type="file"]:hover {
    border-color: #4f46e5;
    background: #f0fdf4;
}

.modal .form-input[type="file"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    background: #f0fdf4;
}

.modal .form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

.image-preview {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-image {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.remove-preview:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Modal Form Grid */
.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.modal-form-grid .form-group {
    margin-bottom: 0;
}

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

/* Values Row for Modal */
.values-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.value-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.value-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.value-input {
    padding-left: 40px !important;
    position: relative;
}

.value-field::before {
    content: 'R$';
    position: absolute;
    left: 12px;
    bottom: 12px;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 2;
}

/* Edit Modal Layout */
.edit-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.edit-image-column {
    display: flex;
    justify-content: center;
}

.edit-basic-fields {
    flex: 1;
}

.basic-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.basic-fields-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Card Image Section in Modal */
.card-image-container {
    display: inline-block;
    max-width: 250px;
    width: 100%;
    position: relative;
}

#edit-card-image {
    max-width: 100%;
    max-height: 350px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid #e5e7eb;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 280px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.875rem;
}

.no-image-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Buyer Selection */
.buyer-selection {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.buyer-select, .buyer-input {
    width: 100%;
}

/* Responsive Modal Layout */
@media (max-width: 768px) {
    .edit-main-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .basic-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .values-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-modal-cancel,
    .btn-modal-submit {
        width: 100%;
        text-align: center;
    }
    
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
    
    .grupo-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-action {
        width: 100%;
        min-width: auto;
    }
    
    .grupo-streaming {
        gap: 0.75rem;
    }
    
    .streaming-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .grupo-contato {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .grupo-whatsapp {
        align-self: stretch;
        justify-content: center;
    }
}

.btn-delete {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-delete:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-view {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.btn-view:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Responsividade da página de grupos */
@media (max-width: 768px) {
    .grupos-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .grupos-grid {
        grid-template-columns: 1fr;
    }
    
    .grupo-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .grupo-info h3 {
        white-space: normal;
        text-align: center;
    }
    
    .grupo-email {
        white-space: normal;
        text-align: center;
    }
    
    .grupo-stats {
        justify-content: center;
    }
    
    .grupo-contato {
        justify-content: center;
    }
    
    .grupo-actions {
        flex-direction: column;
    }
}

/* Estilos para imagem atual no modal de edição */
.current-image {
    margin-top: 0.5rem;
}

.current-image-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    object-fit: cover;
}

/* Botões de Status dos Leilões */
.status-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: flex-start;
    align-items: center;
}

.status-btn {
    padding: 0.8rem;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 50px;
    height: 50px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: currentColor;
}

.status-btn.active {
    border-color: currentColor;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.status-btn.status-planejamento {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b;
}

.status-btn.status-planejamento.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.status-btn.status-concluido,
.status-btn.status-finalizado {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-color: #22c55e;
}

.status-btn.status-concluido.active,
.status-btn.status-finalizado.active {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border-color: #15803d;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.status-btn.status-cancelado {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
    border-color: #f87171;
}

.status-btn.status-cancelado.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border-color: #b91c1c;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

@media (max-width: 768px) {
    .status-buttons {
        justify-content: center;
        gap: 0.5rem;
        flex-direction: row;
    }
    
    .status-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        padding: 0.7rem;
    }
    
    .action-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .status-buttons {
        gap: 0.4rem;
    }
    
    .status-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}

/* Estilos para os botões de ação dos leilões */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
}

.action-buttons .btn {
    white-space: nowrap;
}

/* Status badges para corresponder às cores dos botões */
.status-badge.status-planejamento {
    background: #f59e0b;
    color: white;
}

.status-badge.status-pendente {
    background: #f59e0b;
    color: white;
}

.status-badge.status-concluido,
.status-badge.status-finalizado {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #22c55e;
}

.status-badge.status-cancelado {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #b91c1c;
    border: 1px solid #f87171;
}

/* Utility Classes */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-secondary);
}

.tab-count {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

.tab-btn.active .tab-count {
    background: #dbeafe;
    color: #2563eb;
}

.tab-btn[data-status="planejamento"]:hover .tab-count,
.tab-btn[data-status="planejamento"].active .tab-count {
    background: #fef3c7;
    color: #92400e;
}

.tab-btn[data-status="finalizado"]:hover .tab-count,
.tab-btn[data-status="finalizado"].active .tab-count {
    background: #dcfce7;
    color: #166534;
}

.tab-btn[data-status="cancelado"]:hover .tab-count,
.tab-btn[data-status="cancelado"].active .tab-count {
    background: #fee2e2;
    color: #b91c1c;
}

/* Form Components */
.form-sections {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.form-section {
    margin-bottom: 2rem;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

.section-title i {
    color: var(--primary-color);
}

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

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

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

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 3rem;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.form-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.02);
}

.form-check {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.checkbox-label i {
    color: var(--primary-color);
}

.help-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Utility Classes */
.text-green-500 { color: #10b981; }
.text-blue-500 { color: #3b82f6; }
.text-purple-500 { color: #8b5cf6; }
.text-green-400 { color: #34d399; }
.text-emerald-600 { color: #059669; }
/* Enhanced Leilao Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.leilao-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.leilao-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.leilao-header {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.leilao-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    flex: 1;
    line-height: 1.4;
}

.header-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.leilao-group-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(8px);
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge.status-planejamento {
    background: #f59e0b;
    color: white;
}

.status-badge.status-pendente {
    background: #f59e0b;
    color: white;
}

.status-badge.status-finalizado {
    background: #10b981;
    color: white;
}

.status-badge.status-cancelado {
    background: #ef4444;
    color: white;
}

.leilao-content {
    padding: 1.5rem;
}

.leilao-description {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-style: italic;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.leilao-info {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: rgba(79, 70, 229, 0.02);
    border-color: var(--primary-color);
}

.info-item i {
    color: var(--primary-color);
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.info-item strong {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 0.5rem;
}

.valor-arrecadado {
    color: var(--success-color);
    font-weight: 600;
}

.leilao-actions {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.status-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.status-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-btn.status-planejamento.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.status-btn.status-concluido.active {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.status-btn.status-cancelado.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

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

.action-buttons .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Enhanced Cards Responsive */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .leilao-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .header-badges {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
    
    .leilao-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .status-buttons,
    .action-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ==============================================
   Fix para Botões da Tela de Cartas - Responsividade
   ============================================== */

/* Melhorar a responsividade das ações do título dos cards */
@media (max-width: 768px) {
    .cards-title-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-md);
    }
    
    .primary-actions,
    .secondary-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .primary-actions .btn,
    .secondary-actions .btn {
        flex: 1;
        min-width: calc(50% - var(--spacing-xs));
        max-width: none;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .cards-title-actions {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .primary-actions .btn,
    .secondary-actions .btn {
        flex: 1;
        min-width: 100%;
        margin-bottom: var(--spacing-xs);
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    .primary-actions .btn:last-child,
    .secondary-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Botões específicos com cores apropriadas */
    .btn-primary {
        background: linear-gradient(135deg, var(--primary-color) 0%, #4338ca 100%);
        color: white;
        border: none;
    }
    
    .btn-success {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        border: none;
    }
    
    .btn-info {
        background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
        color: white;
        border: none;
    }
    
    .btn-secondary {
        background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
        color: white;
        border: none;
    }
}


/* ==============================================
   SISTEMA DE ALERTAS PADRONIZADO E UNIFICADO
   ============================================== */

/* Remove estilos antigos e duplicados - usar apenas esta implementação */
.flash-container {
    position: fixed !important;
    top: 90px !important;
    right: 20px !important;
    z-index: 10000 !important;
    max-width: 400px !important;
    width: auto !important;
    min-width: 300px !important;
    pointer-events: none !important;
}

/* Posicionamento especial para tela de login */
.home-container .flash-container {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin: 0 auto 2rem auto !important;
    max-width: 100% !important;
    min-width: auto !important;
    pointer-events: all !important;
}

.flash-message,
.flash {
    padding: 1rem 1.25rem !important;
    border-radius: 12px !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    font-weight: 500 !important;
    position: relative !important;
    border-left: 4px solid !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    animation: slideInRight 0.4s ease-out !important;
    transition: all 0.3s ease !important;
    pointer-events: all !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-message:hover,
.flash:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Cores padronizadas para todos os tipos de alerta */
.flash-success {
    background: rgba(236, 253, 245, 0.98) !important;
    color: #065f46 !important;
    border-left-color: #10b981 !important;
}

.dark-mode .flash-success {
    background: rgba(6, 95, 70, 0.2) !important;
    color: #34d399 !important;
    border-left-color: #10b981 !important;
}

.flash-error,
.flash-danger {
    background: rgba(254, 242, 242, 0.98) !important;
    color: #991b1b !important;
    border-left-color: #ef4444 !important;
}

.dark-mode .flash-error,
.dark-mode .flash-danger {
    background: rgba(153, 27, 27, 0.2) !important;
    color: #fca5a5 !important;
    border-left-color: #ef4444 !important;
}

.flash-info,
.flash-warning {
    background: rgba(239, 246, 255, 0.98) !important;
    color: #1e40af !important;
    border-left-color: #3b82f6 !important;
}

.dark-mode .flash-info,
.dark-mode .flash-warning {
    background: rgba(30, 64, 175, 0.2) !important;
    color: #93c5fd !important;
    border-left-color: #3b82f6 !important;
}

/* Botão de fechar padronizado */
.flash-close {
    background: rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    color: inherit !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    margin-left: auto !important;
    border-radius: 50% !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
    font-size: 0.875rem !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-weight: bold !important;
    font-family: monospace !important;
}

.flash-close:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.1) !important;
}

/* Ícones padronizados */
.flash-message i:first-child,
.flash i:first-child {
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    margin-top: 0.125rem !important;
}

/* Responsividade para alerts */
@media (max-width: 768px) {
    .flash-container {
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        min-width: auto !important;
    }
    
    .flash-message,
    .flash {
        font-size: 0.875rem !important;
        padding: 0.875rem 1rem !important;
    }
    
    /* Correções para card de carta no mobile */
    .card-item {
        max-width: 100% !important;
    }
    
    .card-image {
        height: 180px !important;
        position: relative;
    }
    
    .card-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        width: auto !important;
        height: auto !important;
        display: block;
    }
    
    /* Garantir que badge vendida funcione no mobile */
    .vendida-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        z-index: 10;
    }
    
    /* Overlay vendida no mobile */
    .card-vendida .card-image::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(16, 185, 129, 0.15) 0%, 
            rgba(5, 150, 105, 0.1) 50%,
            rgba(16, 185, 129, 0.15) 100%
        );
        border: 2px solid rgba(16, 185, 129, 0.3);
        border-radius: 0;
        pointer-events: none;
        z-index: 1;
    }
    
    /* Botões de ação no mobile */
    .card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: stretch;
    }
    
    .card-actions button,
    .card-actions .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Modal forms no mobile */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px !important; /* Evitar zoom no iOS */
        padding: 0.75rem !important;
    }
    
    .modal-body {
        padding: 1rem !important;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 90vh;
        margin: 5vh auto;
    }
}

/* Animação de saída */
.flash-message.flash-removing,
.flash.flash-removing {
    animation: slideOutRight 0.3s ease-in forwards !important;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================================
   CORREÇÕES MODO ESCURO - GARANTIR LEGIBILIDADE
   ============================================================ */

[data-theme="dark"] {
    /* Garantir que tabelas sejam legíveis */
    table {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    table th {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
    }
    
    table td {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    table tr:hover td {
        background: var(--bg-secondary) !important;
    }
    
    /* Cards e containers */
    .card, .stat-card, .dashboard-card {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    /* Inputs e forms */
    input, select, textarea {
        background: var(--input-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted) !important;
    }
    
    /* Labels e textos de formulário */
    label, .form-label {
        color: var(--text-secondary) !important;
    }
    
    /* Botões secundários */
    .btn-secondary, .button-secondary {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .btn-secondary:hover, .button-secondary:hover {
        background: var(--bg-tertiary) !important;
    }
    
    /* Modal e popups */
    .modal-content, .modal {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .modal-header {
        background: var(--bg-secondary) !important;
        border-bottom-color: var(--border-color) !important;
    }
    
    /* Sidebar e navegação */
    .sidebar, .nav {
        background: var(--sidebar-bg) !important;
    }
    
    .nav-link {
        color: var(--text-secondary) !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: var(--text-primary) !important;
        background: var(--bg-secondary) !important;
    }
    
    /* Headers e títulos */
    h1, h2, h3, h4, h5, h6 {
        color: var(--text-primary) !important;
    }
    
    /* Texto geral */
    p, span, div {
        color: var(--text-primary);
    }
    
    /* Status badges - manter cores vibrantes mas ajustar contraste */
    .status-ativo, .status-pago, .badge-success {
        background: #10b981 !important;
        color: #ffffff !important;
    }
    
    .status-pendente, .badge-warning {
        background: #f59e0b !important;
        color: #000000 !important;
    }
    
    .status-inativo, .badge-error {
        background: #ef4444 !important;
        color: #ffffff !important;
    }
    
    /* Dropdown e selects */
    .dropdown-menu, select option {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    /* Alertas e mensagens */
    .alert {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    /* Lista de itens */
    .list-item, .item {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .list-item:hover, .item:hover {
        background: var(--bg-secondary) !important;
    }
    
    /* Tabs */
    .tab-button {
        background: var(--card-bg) !important;
        color: var(--text-secondary) !important;
        border-color: var(--border-color) !important;
    }
    
    .tab-button.active {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
    }
    
    /* Footer e rodapés */
    footer {
        background: var(--bg-secondary) !important;
        color: var(--text-secondary) !important;
        border-top-color: var(--border-color) !important;
    }
}

/* ============================================================
   CORREÇÕES ADICIONAIS MODO ESCURO - DASHBOARD
   ============================================================ */

[data-theme="dark"] {
    /* Header específico - Melhorar visibilidade no modo escuro */
    .header {
        background: var(--header-bg) !important;
        border-bottom: 2px solid var(--border-color) !important;
        box-shadow: 0 4px 16px var(--shadow) !important;
    }

    /* Links de navegação no header */
    .nav-link {
        color: var(--text-secondary) !important;
    }

    .nav-link:hover {
        background: var(--bg-tertiary) !important;
        color: #60a5fa !important; /* Azul mais claro para melhor contraste */
    }

    .nav-link.active {
        background: linear-gradient(135deg, #60a5fa, #3b82f6) !important; /* Azul mais claro */
        color: #ffffff !important;
    }

    /* Informações do usuário no header */
    .user-email {
        color: var(--text-primary) !important;
    }

    .group-name {
        color: #60a5fa !important; /* Azul mais claro para melhor visibilidade */
    }

    /* Botões do header */
    .nav-link.logout-link {
        background: linear-gradient(135deg, #f87171, #ef4444) !important; /* Vermelho mais claro */
    }

    .nav-link.config-btn {
        background: linear-gradient(135deg, #9ca3af, #6b7280) !important; /* Cinza mais claro */
    }

    /* Dashboard específico - Cards de estatísticas */
    .stats-grid .stat-card,
    .stat-card-wrapper,
    .dashboard-card {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 20px var(--shadow) !important;
    }
    
    .stat-card h3,
    .stat-card p,
    .stat-card span,
    .stat-value,
    .stat-label {
        color: var(--text-primary) !important;
    }
    
    .stat-number,
    .stat-text {
        color: var(--text-primary) !important;
    }

    /* Gradientes dos ícones dos stat-cards no modo escuro */
    .stat-card:nth-child(1) .stat-icon {
        background: linear-gradient(135deg, #f87171, #ef4444) !important; /* Vermelho mais claro */
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
    }

    .stat-card:nth-child(2) .stat-icon {
        background: linear-gradient(135deg, #a78bfa, #8b5cf6) !important; /* Roxo mais claro */
        box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
    }

    .stat-card:nth-child(3) .stat-icon {
        background: linear-gradient(135deg, #60a5fa, #3b82f6) !important; /* Azul mais claro */
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    }

    .stat-card:nth-child(4) .stat-icon {
        background: linear-gradient(135deg, #34d399, #10b981) !important; /* Verde mais claro */
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    }

    /* Links dos stat-cards no modo escuro */
    .stat-link {
        background: rgba(96, 165, 250, 0.1) !important;
        color: #60a5fa !important;
        border: 1px solid rgba(96, 165, 250, 0.2) !important;
    }

    .stat-link:hover {
        background: rgba(96, 165, 250, 0.2) !important;
        color: #93c5fd !important;
    }
    
    /* Melhorar exibição de valores grandes nos stat-cards */
    .stat-info h3 {
        background: linear-gradient(135deg, #f8fafc, #93c5fd) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        word-break: break-word !important;
        hyphens: auto !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        text-align: center !important;
        min-height: 2.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Seções de leilões e clientes */
    .leiloes-section,
    .clientes-section,
    .section-content {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
    }
    
    .section-header,
    .dashboard-header {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
    }
    
    .section-header h2,
    .section-header h3,
    .dashboard-header h2 {
        color: var(--text-primary) !important;
    }
    
    /* Tabelas dentro do dashboard */
    .dashboard-table,
    .leiloes-table,
    .clientes-table {
        background: var(--card-bg) !important;
    }
    
    .dashboard-table thead,
    .leiloes-table thead,
    .clientes-table thead {
        background: var(--bg-secondary) !important;
    }
    
    .dashboard-table th,
    .leiloes-table th,
    .clientes-table th {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .dashboard-table td,
    .leiloes-table td,
    .clientes-table td {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .dashboard-table tbody tr:hover td,
    .leiloes-table tbody tr:hover td,
    .clientes-table tbody tr:hover td {
        background: var(--bg-secondary) !important;
    }
    
    /* Regras específicas para tabelas compact-table no dashboard */
    .compact-table {
        background: var(--card-bg) !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px var(--shadow) !important;
    }
    
    .compact-table thead {
        background: var(--bg-secondary) !important;
    }
    
    .compact-table th {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
        font-weight: 600 !important;
        font-size: 0.8rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.025em !important;
    }
    
    .compact-table td {
        background: var(--card-bg) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .compact-table tbody tr {
        background: var(--card-bg) !important;
        transition: background-color 0.2s ease !important;
    }

    .compact-table tbody tr:nth-child(even) {
        background: var(--bg-secondary) !important;
    }
    
    .compact-table tbody tr:hover td {
        background: var(--bg-tertiary) !important;
    }
    
    /* Estilos para tabelas ordenáveis */
    .sortable {
        position: relative;
        user-select: none;
        transition: background-color 0.2s ease;
    }
    
    .sortable:hover {
        background: var(--bg-tertiary) !important;
    }
    
    .sortable.sort-active {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
    }
    
    .sort-indicator {
        display: inline-block;
        margin-left: 0.5rem;
        opacity: 0.6;
        transition: opacity 0.2s ease;
    }
    
    .sortable:hover .sort-indicator {
        opacity: 1;
    }
    
    .sort-active .sort-indicator {
        opacity: 1;
        color: #60a5fa;
    }
    
    /* Info do grupo no dashboard */
    .dashboard-grupo-info {
        background: transparent !important;
    }
    
    .dashboard-grupo-text h3,
    .dashboard-grupo-text p {
        color: var(--text-primary) !important;
    }
    
    /* Lista de itens */
    .leilao-item,
    .cliente-item {
        background: var(--card-bg) !important;
        border-color: var(--border-color) !important;
    }
    
    .leilao-item:hover,
    .cliente-item:hover {
        background: var(--bg-secondary) !important;
    }
    
    /* Textos e labels diversos */
    .leilao-nome,
    .cliente-nome,
    .item-title,
    .item-label {
        color: var(--text-primary) !important;
    }
    
    .leilao-data,
    .cliente-email,
    .item-subtitle,
    .item-meta {
        color: var(--text-secondary) !important;
    }
    
    /* Valores monetários */
    .valor,
    .preco,
    .total,
    .currency {
        color: var(--text-primary) !important;
    }
    
    /* Links dentro de cards/tabelas */
    .dashboard-card a,
    .stat-card a,
    table a {
        color: #60a5fa !important;
    }
    
    .dashboard-card a:hover,
    .stat-card a:hover,
    table a:hover {
        color: #93c5fd !important;
    }
    
    /* Botões dentro do dashboard */
    .dashboard-button,
    .action-button {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-color) !important;
    }
    
    .dashboard-button:hover,
    .action-button:hover {
        background: var(--bg-secondary) !important;
    }
    
    /* Separadores e divisores */
    hr, .divider, .separator {
        border-color: var(--border-color) !important;
        background: var(--border-color) !important;
    }
    
    /* Cards vazios / placeholders */
    .empty-state,
    .no-data,
    .placeholder {
        background: var(--bg-secondary) !important;
        color: var(--text-muted) !important;
    }
    
    /* Indicadores de sorting no modo escuro */
    .sort-active .sort-indicator {
        color: #93c5fd !important; /* Azul mais claro no modo escuro */
    }
}
