:root {
    /* Cores Dark Theme - Moderno e Inovador */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --bg-tertiary: #252936;
    --bg-card: #1e2130;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --border: #2d3142;
    --success: #10b981;
    --error: #ef4444;
    --warning: #fbbf24;
    --info: #3b82f6;
    
    /* Cores Light Theme */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8fafc;
    --bg-tertiary-light: #f1f5f9;
    --bg-card-light: #ffffff;
    --text-primary-light: #1e293b;
    --text-secondary-light: #64748b;
    --border-light: #e2e8f0;
    
    /* Espaçamentos - Reduzidos para design mais compacto */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.7rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    
    /* Bordas */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.3;
    font-size: 1rem;
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

/* Theme Light */
body.theme-light {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --bg-tertiary: var(--bg-tertiary-light);
    --bg-card: var(--bg-card-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border: var(--border-light);
    background-image: none !important;
}

/* Overrides para tema claro - remover gradientes e cores escuras */
body.theme-light .sidebar {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .sidebar-header {
    border-bottom: 1px solid var(--border) !important;
    background: var(--bg-secondary) !important;
}

body.theme-light .sidebar-footer {
    border-top: 1px solid var(--border) !important;
    background: var(--bg-secondary) !important;
}

body.theme-light .top-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .card,
body.theme-light .stat-card,
body.theme-light .stat-card-large,
body.theme-light .stat-card-large2,
body.theme-light .pagamentos-page .stats-grid3.card .stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .card::before,
body.theme-light .stat-card::after,
body.theme-light .stat-card-large::after,
body.theme-light .stat-card-large2::after {
    display: none !important;
}

body.theme-light .data-table thead,
body.theme-light .table-total {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
}

body.theme-light .modal-content,
body.theme-light .modal-header {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

body.theme-light .note-item,
body.theme-light .reminder-item {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .card-header {
    border-bottom: 1px solid var(--border) !important;
}

body.theme-light .nav-item:hover {
    background: var(--bg-tertiary) !important;
}

body.theme-light .nav-item.active {
    background: rgba(251, 191, 36, 0.1) !important;
    color: var(--accent) !important;
}

body.theme-light .nav-item.active::before {
    background: var(--accent) !important;
}

body.theme-light .data-table tbody tr:hover {
    background: var(--bg-tertiary) !important;
}

body.theme-light .btn-secondary {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .btn-secondary:hover {
    background: var(--bg-tertiary) !important;
    border-color: var(--border) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

body.theme-light .pagamentos-page .stats-grid3.card .stat-card::after {
    display: none !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-right: 1px solid rgba(251, 191, 36, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: var(--text-primary);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    color: var(--text-primary);
    background: rgba(251, 191, 36, 0.05);
}

body.theme-light .sidebar-header {
    border-bottom-color: var(--border);
    background: var(--bg-secondary);
}

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

.logo i {
    font-size: 0.875rem;
    color: var(--accent);
}

.sidebar-search {
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--border);
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: calc(var(--spacing-md) + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.sidebar-search input {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 2.5rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    background: transparent;
}

body.theme-light .sidebar-nav {
    background: transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.nav-item:hover {
    background: rgba(251, 191, 36, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
}

body.theme-light .nav-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.nav-item:hover::before {
    height: 60%;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.2) 0%, rgba(251, 191, 36, 0.05) 100%);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

body.theme-light .nav-item.active {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}

.nav-item.active::before {
    height: 100%;
    width: 4px;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.nav-item.logout {
    color: var(--error);
}

.sidebar-footer {
    padding: var(--spacing-md);
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    background: rgba(251, 191, 36, 0.05);
    color: var(--text-primary);
}

body.theme-light .sidebar-footer {
    border-top-color: var(--border);
    background: var(--bg-secondary);
}

/* Main Content */
.main-content {
    margin-left: 200px;
    width: calc(100% - 200px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

.top-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--text-primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

body.theme-light .top-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: var(--spacing-sm);
    color: var(--text-secondary);
}

.search-box input {
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 2.5rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    width: 300px;
    font-size: 0.9rem;
}

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

.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-card);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Content Wrapper */
.content-wrapper {
    padding: var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-header h1 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.page-header p {
    color: #a1a1aa;
    font-size: 0.75rem;
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.05);
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

body.theme-light .card {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.3);
}

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

/* Garantir que cards flutuantes tenham o mesmo tamanho da section de baixo */
.stats-grid-large + .card {
    min-height: auto;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    color: var(--text-primary);
}

body.theme-light .card-header {
    border-bottom-color: var(--border);
}

.card-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    width: 100%;
    align-items: stretch;
}

/* Grid de 6 colunas para fechamento.php */
.fechamento .stats-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

/* Estilos específicos para pagamentos.php */
.pagamentos-page .stats-grid3.card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    width: 100%;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--spacing-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-height: 200px;
}

.pagamentos-page .stats-grid3.card .stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    padding: 35px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.05);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    align-self: stretch;
}

body.theme-light .pagamentos-page .stats-grid3.card .stat-card {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pagamentos-page .stats-grid3.card .stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pagamentos-page .stats-grid3.card .stat-card:hover::after {
    opacity: 1;
}
.stats-grid2 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    width: 100%;
    align-items: stretch;
}
.stats-grid3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    width: 100%;
    align-items: stretch;
}
.stats-grid::-webkit-scrollbar {
    height: 6px;
}

.stats-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.stats-grid::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.stats-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    padding: 35px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    min-width: 140px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.05);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-primary);
}

body.theme-light .stat-card {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.4);
}

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

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.stat-icon.yellow { background: rgba(251, 191, 36, 0.2); color: var(--accent); }
.stat-icon.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 0.65rem;
    color: #a1a1aa;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.65rem;
    color: #a1a1aa;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

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

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

.form-group label {
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem 0.7rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.readonly-field {
    background: var(--bg-secondary) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border);
}

/* Buttons */
.btn {
    padding: 0.45rem 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.2s ease;
    font-size: 0.75rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    color: var(--text-primary);
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.theme-light .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.theme-light .btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-area:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

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

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

.upload-content p {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.upload-content span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.upload-preview {
    position: relative;
    max-width: 100%;
    max-height: 350px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.upload-preview img {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    display: block;
    margin: 0 auto;
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
    width: 0%;
}

/* Tables */
.table-responsive {
    overflow-x: hidden;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table thead {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-bottom: 2px solid rgba(251, 191, 36, 0.2);
}

body.theme-light .data-table thead {
    background: var(--bg-secondary);
    border-bottom-color: var(--border);
}

.data-table th {
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    font-size: 0.7rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.data-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.7rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(251, 191, 36, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.theme-light .data-table tbody tr:hover {
    background: var(--bg-tertiary);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* Alerts */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

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

/* Login Page - Design Profissional 2026 */
.login-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.login-page:not(.theme-light) {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(251, 191, 36, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    color: var(--text-primary);
}

.login-page.theme-light {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    color: #1e293b;
    background-image: none;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 
        radial-gradient(circle at 2px 2px, currentColor 1px, transparent 0);
    background-size: 40px 40px;
}

.login-page.theme-light .bg-pattern {
    opacity: 0.05;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--accent, #fbbf24);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-page:not(.theme-light) .theme-toggle-btn {
    border-color: rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, rgba(30, 33, 48, 0.8) 0%, rgba(37, 41, 54, 0.8) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

.login-page.theme-light .theme-toggle-btn {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #f59e0b;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
}

/* Login Wrapper */
.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

/* Logo Section */
.login-logo-section {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.logo-circle {
    width: 140px;
    height: 140px;
    border-radius: 32px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #000;
    box-shadow: 
        0 20px 60px rgba(251, 191, 36, 0.4),
        0 0 0 8px rgba(251, 191, 36, 0.1);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
}

.logo-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 36px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
    z-index: -1;
    opacity: 0.3;
    filter: blur(12px);
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.logo-title {
    font-size: 4rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.login-page.theme-light .logo-title {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    opacity: 0.7;
}

.logo-subtitle i {
    color: var(--accent, #fbbf24);
}

/* Login Card */
.login-card {
    background: linear-gradient(135deg, rgba(30, 33, 48, 0.95) 0%, rgba(37, 41, 54, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(251, 191, 36, 0.1) inset,
        0 0 40px rgba(251, 191, 36, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0.6;
}

.login-page.theme-light .login-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

.login-page.theme-light .login-card::before {
    display: none;
}

.login-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-card-header h2 i {
    color: var(--accent, #fbbf24);
    font-size: 1.75rem;
}

.login-card-header p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-card-header p i {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Alert */
.login-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.login-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ff6b6b;
}

.login-page.theme-light .login-alert.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.login-alert.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.login-page.theme-light .login-alert.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
}

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

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-field label {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-field label i {
    color: var(--accent, #fbbf24);
    font-size: 0.9rem;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.login-page:not(.theme-light) .input-icon {
    color: var(--text-secondary);
}

.login-page.theme-light .input-icon {
    color: rgba(0, 0, 0, 0.4);
}

.input-container.focused .input-icon {
    color: var(--accent, #fbbf24);
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(30, 33, 48, 0.5);
    border: 2px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    color: inherit;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.login-page:not(.theme-light) .form-input {
    background: rgba(30, 33, 48, 0.5);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--text-primary);
}

.login-page.theme-light .form-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.form-input::placeholder {
    opacity: 0.5;
}

.form-input:focus {
    background: rgba(30, 33, 48, 0.7);
    border-color: var(--accent, #fbbf24);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2), 0 0 20px rgba(251, 191, 36, 0.1);
    transform: translateY(-1px);
}

.login-page:not(.theme-light) .form-input:focus {
    background: rgba(30, 33, 48, 0.7);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2), 0 0 20px rgba(251, 191, 36, 0.1);
}

.login-page.theme-light .form-input:focus {
    background: rgba(0, 0, 0, 0.05);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.login-page.theme-light .password-toggle {
    color: rgba(0, 0, 0, 0.5);
}

.password-toggle:hover {
    color: var(--accent, #fbbf24);
}

.forgot-password-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent, #fbbf24);
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-password-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.login-page.theme-light .forgot-password-link {
    color: #d97706;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
}

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

.btn-submit i {
    transition: transform 0.3s ease;
}

.btn-submit:hover i {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    font-size: 0.85rem;
    opacity: 0.7;
    color: var(--text-secondary);
}

.login-page:not(.theme-light) .login-footer {
    border-top-color: rgba(251, 191, 36, 0.1);
    color: var(--text-secondary);
}

.login-page.theme-light .login-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.6);
}

.login-footer p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-footer i {
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 500px;
    }
    
    .login-logo-section {
        order: 1;
    }
    
    .login-card {
        order: 2;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .logo-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .theme-toggle-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .logo-title {
        font-size: 2.5rem;
    }
    
    .login-card-header h2 {
        font-size: 1.75rem;
    }
}

/* Button Icons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-right: var(--spacing-xs);
}

.btn-icon:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-1px);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    overflow: visible;
    width: 100%;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: fit-content;
    cursor: pointer;
    font-family: inherit;
}

.action-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.action-card i {
    font-size: 0.85rem;
    color: var(--accent);
}

.action-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: var(--bg-secondary);
}

/* Stat Cards Large */
.stats-grid-large {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: 4px;
    align-items: stretch;
    min-height: 200px;
}

.stats-grid-large::-webkit-scrollbar {
    height: 6px;
}

.stats-grid-large::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.stats-grid-large::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.stats-grid-large::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.stat-card-large2 {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    padding: 14px 60px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 200px;
    flex: 1 1 auto;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.theme-light .stat-card-large2 {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-large2::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card-large2:hover::after {
    opacity: 1;
}
.stat-card-large {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    padding: 14px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    justify-content: space-between;
}

body.theme-light .stat-card-large {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-large::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card-large:hover::after {
    opacity: 1;
}
.stat-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.stat-card-large:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.4);
}

.stat-card-large.highlight-green {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.stat-header h3 {
    font-size: 0.7rem;
    color: #a1a1aa;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.stat-header i {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
}

.stat-value-large {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.stat-description {
    font-size: 0.65rem;
    color: #a1a1aa;
    margin: 0;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.stat-icon-large {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-large {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.stat-icon-large i {
    color: white !important;
    font-size: 1rem !important;
}

.stat-card-large .progress-bar {
    margin-top: 6px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.stat-card-large .progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-comparison {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-comparison.positive {
    color: var(--success);
}

.stat-comparison.negative {
    color: var(--error);
}

/* Notes List */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.note-item {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.note-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(251, 191, 36, 0.2);
}

body.theme-light .note-item {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.theme-light .note-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--border);
}

.note-item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.note-item p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.reminder-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.reminder-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(251, 191, 36, 0.2);
}

body.theme-light .reminder-item {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.theme-light .reminder-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--border);
}

.reminder-item i {
    color: var(--accent);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.reminder-item h4 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.reminder-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

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

.empty-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Top List */
.top-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.top-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.top-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.top-info {
    flex: 1;
}

.top-name {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.top-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.top-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.top-value {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.top-value span:first-child {
    font-weight: 700;
}

.top-percent {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Payments List */
.payments-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.payment-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.payment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.payment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.payment-name {
    font-weight: 600;
}

.payment-method {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.payment-value {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.payment-status {
    font-size: 0.75rem;
    font-weight: 600;
}

.payment-status.success {
    color: var(--success);
}

/* Expenses List */
.expenses-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expense-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.expense-name {
    font-weight: 600;
}

.expense-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.expense-value {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.expense-status {
    font-size: 0.75rem;
    font-weight: 600;
}

.expense-status.success {
    color: var(--success);
}

/* Period Select */
.period-select {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.content-grid .card {
    width: 100%;
}

/* Content Grid Single - Para cards individuais em coluna */
.content-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.content-grid-single .card {
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

/* Layout dividido para Notas e Lembretes */
.content-grid-single .card > div[style*="grid-template-columns"] {
    min-height: 200px;
}

.content-grid-single .card > div[style*="grid-template-columns"] > div {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .content-grid-single .card > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border);
}

.tab-item {
    padding: var(--spacing-md) var(--spacing-lg);
    text-decoration: none;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.2s ease;
    font-weight: 600;
}

.tab-item:hover {
    color: var(--text-primary);
}

.tab-item.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.profile-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

/* Preferences */
.preferences-section {
    margin-bottom: var(--spacing-lg);
}

.preferences-section h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--accent);
}

.theme-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.theme-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-card:hover {
    border-color: var(--accent);
}

.theme-card.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.theme-card i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.theme-card h4 {
    margin-bottom: var(--spacing-xs);
}

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

.theme-card.active p {
    color: rgba(0, 0, 0, 0.7);
}

.notification-settings {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.notification-item {
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.notification-item strong {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.notification-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Data Section */
.data-section {
    margin-bottom: var(--spacing-lg);
}

.data-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
}

.data-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: var(--spacing-md);
}

.data-card h3 {
    margin-bottom: var(--spacing-sm);
}

.data-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.danger-zone {
    border: 2px solid var(--error);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    background: rgba(239, 68, 68, 0.1);
}

.danger-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--error);
}

.danger-header i {
    font-size: 1.5rem;
}

.danger-zone p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

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

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

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.search-box-inline {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box-inline i {
    position: absolute;
    left: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box-inline input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 2.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

/* Category Badge */
.category-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

/* Table Total */
.table-total {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    font-weight: 700;
    border-top: 2px solid rgba(251, 191, 36, 0.2);
}

body.theme-light .table-total {
    background: var(--bg-secondary);
    border-top-color: var(--border);
}

.table-total td {
    padding: var(--spacing-md);
    border-top: 2px solid var(--border);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* OCR Results */
#ocrResults {
    border-left: 3px solid var(--success);
}

#ocrResults p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(251, 191, 36, 0.1);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
    color: var(--text-primary);
    backdrop-filter: blur(20px);
}

body.theme-light .modal-content {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    background: rgba(251, 191, 36, 0.05);
    border-radius: 16px 16px 0 0;
}

body.theme-light .modal-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.modal-close {
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

/* Header Controls */
.header-controls {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

.period-select {
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.period-select:hover {
    border-color: var(--accent);
}

.period-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    max-height: 200px;
    overflow-y: auto;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-tertiary);
}

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

.checkbox-label span {
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Slider de Porcentagem */
.slider-container {
    margin: 20px 0;
    padding: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin: 12px 0;
    overflow: visible;
}

.slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: transparent;
    outline: none;
    position: absolute;
    z-index: 2;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(251, 191, 36, 0.5);
    transition: all 0.2s;
    border: 3px solid var(--bg-primary);
    margin-top: -10px;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 12px rgba(251, 191, 36, 0.6);
}

.slider-input::-webkit-slider-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 7px 16px rgba(251, 191, 36, 0.7);
}

.slider-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 3px 8px rgba(251, 191, 36, 0.5);
    transition: all 0.2s;
}

.slider-input::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 12px rgba(251, 191, 36, 0.6);
}

.slider-input::-moz-range-thumb:active {
    transform: scale(1.2);
    box-shadow: 0 7px 16px rgba(251, 191, 36, 0.7);
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 8px;
    transition: width 0.15s ease;
    z-index: 1;
}

.slider-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-md) 0;
}

.toggle-label {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.toggle-label strong {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.toggle-label p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid var(--border);
}

.toggle-switch.active {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    top: 1px;
    left: 1px;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* Segmented Buttons */
.segmented-control {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.segmented-button {
    flex: 1;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.segmented-button.active {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Dropdown Estilizado com Cores */
.styled-dropdown {
    position: relative;
}

.styled-dropdown-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.styled-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-lg);
}

.styled-dropdown-menu.open {
    display: block;
}

.styled-dropdown-search {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.styled-dropdown-search input {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.styled-dropdown-item {
    padding: var(--spacing-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: background 0.2s;
}

.styled-dropdown-item:hover {
    background: var(--bg-secondary);
}

.styled-dropdown-item.selected {
    background: var(--accent);
    color: var(--bg-primary);
}

.category-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.category-dot.recarga { background: #10b981; }
.category-dot.proxy { background: #3b82f6; }
.category-dot.servidor { background: #8b5cf6; }
.category-dot.tela { background: #06b6d4; }
.category-dot.ferramentas { background: #f97316; }
.category-dot.bonificacao { background: #ec4899; }
.category-dot.trafego-pago { background: #fbbf24; }
.category-dot.outros { background: #6b7280; }

/* Responsável com Busca */
.responsavel-container {
    position: relative;
}

.responsavel-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.responsavel-input-wrapper input {
    flex: 1;
}

.responsavel-add-btn {
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.responsavel-add-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

/* Estilos para formulários dentro de modais */
.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
    width: 100%;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.modal-content .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Melhorias nos styled-dropdown */
.styled-dropdown-input {
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.styled-dropdown-input:hover {
    border-color: var(--accent);
}

.styled-dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.styled-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.styled-dropdown-item:hover {
    background: var(--bg-secondary);
}

.styled-dropdown-item.selected {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Responsive - Tablet */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .fechamento .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    .fechamento .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .stat-card-large {
        padding: var(--spacing-md);
        min-height: 120px;
    }
    
    .stat-value-large {
        font-size: 1.3rem;
    }
    
    .content-wrapper {
        padding: var(--spacing-md);
    }
    
    .card {
        padding: var(--spacing-md);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 240px;
        z-index: 2000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .menu-toggle,
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1500;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        padding: 8px 12px;
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    body.theme-light .menu-toggle,
    body.theme-light .sidebar-toggle {
        background: var(--bg-secondary);
        border-color: var(--border);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .header {
        padding: var(--spacing-sm) var(--spacing-md);
        padding-left: 50px;
    }
    
    .search-box {
        display: none;
    }
    
    .user-info {
        font-size: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        overflow-x: visible;
    }
    
    .fechamento .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .fechamento .stats-grid .stat-card-large {
        padding: var(--spacing-sm);
        min-height: 150px;
    }
    
    .fechamento .stats-grid .stat-value-large {
        font-size: 1rem;
    }
    
    .fechamento .stats-grid .stat-label-large {
        font-size: 0.7rem;
    }
    
    .stats-grid-large {
        flex-direction: column;
        overflow-x: visible;
        gap: var(--spacing-sm);
    }
    
    .stats-grid2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        min-width: 100%;
        padding: var(--spacing-md);
    }
    
    .stat-card-large {
        min-width: 100%;
        min-height: auto;
        padding: var(--spacing-md);
    }
    
    .stat-value-large {
        font-size: 1.2rem;
    }
    
    .stat-label-large {
        font-size: 0.75rem;
    }
    
    .stat-description {
        font-size: 0.65rem;
    }
    
    .stat-icon-large {
        width: 36px;
        height: 36px;
        bottom: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    .stat-icon-large i {
        font-size: 0.9rem !important;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .content-wrapper {
        padding: var(--spacing-sm);
        max-width: 100%;
        margin: 0 auto;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .content-grid .card {
        width: 100%;
    }
    
    .content-grid-single {
        grid-template-columns: 1fr;
    }
    
    .content-grid-single .card {
        width: 100%;
    }
    
    .quick-actions {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .action-card {
        flex: 1 1 auto;
        min-width: calc(50% - var(--spacing-xs));
        padding: var(--spacing-sm);
        font-size: 0.75rem;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
        overflow-x: auto;
        gap: var(--spacing-xs);
    }
    
    .tab-item {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.75rem;
        white-space: nowrap;
        flex: 1 1 auto;
        min-width: fit-content;
    }
    
    .theme-grid {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .search-box-inline {
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }
    
    .page-header h1 {
        font-size: 1rem;
    }
    
    .page-header p {
        font-size: 0.7rem;
    }
    
    .header-controls {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        width: 100%;
    }
    
    .header-controls .btn {
        flex: 1 1 auto;
        min-width: calc(50% - var(--spacing-xs));
        font-size: 0.75rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .data-table {
        font-size: 0.7rem;
        display: table;
        width: 100%;
        overflow-x: hidden;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.6rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .modal-content {
        max-width: 95%;
        margin: var(--spacing-sm);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: var(--spacing-md);
    }
    
    .modal-header h2 {
        font-size: 1rem;
    }
    
    .card-header h2 {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.8rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    body {
        font-size: 0.85rem;
    }
    
    .sidebar {
        width: 220px;
    }
    
    .search-box {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .page-header h1 {
        font-size: 0.9rem;
    }
    
    .page-header p {
        font-size: 0.65rem;
    }
    
    .card {
        padding: var(--spacing-sm);
    }
    
    .card-header {
        margin-bottom: var(--spacing-xs);
        padding-bottom: var(--spacing-xs);
    }
    
    .card-header h2 {
        font-size: 0.8rem;
    }
    
    .fechamento .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-card-large {
        padding: var(--spacing-sm);
        min-height: auto;
    }
    
    .stat-value-large {
        font-size: 1rem;
    }
    
    .stat-label-large {
        font-size: 0.7rem;
    }
    
    .stat-description {
        font-size: 0.6rem;
    }
    
    .stat-icon-large {
        width: 28px;
        height: 28px;
        bottom: var(--spacing-xs);
        right: var(--spacing-xs);
    }
    
    .stat-icon-large i {
        font-size: 0.75rem !important;
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.7rem;
    }
    
    .header-controls .btn {
        min-width: 100%;
        margin-bottom: var(--spacing-xs);
    }
    
    .action-card {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.65rem;
        min-width: 100%;
    }
    
    .data-table {
        font-size: 0.6rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .modal-content {
        max-width: 98%;
        max-height: 95vh;
        margin: var(--spacing-xs);
    }
    
    .modal-header {
        padding: var(--spacing-sm);
    }
    
    .modal-header h2 {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.7rem;
    }
    
    .form-group label {
        font-size: 0.75rem;
    }
    
    .content-wrapper {
        padding: var(--spacing-xs);
    }
    
    .tabs-nav {
        gap: var(--spacing-xs);
    }
    
    .tab-item {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.7rem;
    }
}

