/* Reset e Variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .container {
        padding: 0 24px;
    }
}

/* Navegação entre telas */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

@media (max-width: 640px) {
    .logo-img {
        width: 28px;
        height: 28px;
    }
    
    .logo {
        font-size: 1.125rem;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.user-info {
    color: var(--text-secondary);
    margin-right: 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.nav-user-info {
    width: 100%;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-user-info .user-info {
    margin-right: 0;
    max-width: 100%;
    font-size: 1rem;
    color: var(--text-primary);
}

.nav-menu-item {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.nav-menu-item:hover {
    background-color: var(--bg-secondary);
}

@media (max-width: 640px) {
    .menu-toggle {
        display: flex;
    }
    
    /* Esconder nav no header quando em mobile (mas não quando está como drawer) */
    .header .nav:not(.active) {
        display: none !important;
    }
    
    /* Overlay para o drawer */
    .nav-overlay {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block !important;
        opacity: 1;
    }
    
    /* Nav como drawer no mobile - sempre visível quando tem classe active */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 1.5rem 1.5rem;
        box-shadow: -4px 0 6px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        gap: 1rem;
        overflow-y: auto;
        transform: translateX(100%);
        will-change: transform;
    }
    
    /* Quando o nav está ativo (drawer aberto), mostrar e posicionar */
    .nav.active {
        display: flex !important;
        transform: translateX(0);
        right: 0;
    }
    
    /* Prevenir scroll horizontal no body quando drawer está aberto */
    body.drawer-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Prevenir que o nav seja visível ao arrastar */
    .screen {
        overflow-x: hidden;
    }
    
    .nav button {
        width: 100%;
        justify-content: flex-start;
    }
    
    .header.active .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .header.active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .header.active .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .nav .user-info {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
        max-width: 100%;
    }
    
    .nav .user-info strong {
        color: var(--primary-color);
        font-weight: 600;
    }
}

/* Botões */
.btn-primary, .btn-secondary, .btn-danger, .btn-link {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9375rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-link {
    background: none;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 1.5rem 0;
    margin-top: 60px; /* Espaço para o header fixo */
}

@media (min-width: 640px) {
    .main-content {
        padding: 2rem 0;
        margin-top: 60px;
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.domain {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Consulta Box */
.consulta-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

@media (max-width: 640px) {
    .consulta-box {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
    }
}

.consulta-box h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Mensagens de Erro */
.error-message {
    display: none;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--danger-color);
    border-radius: var(--radius);
    color: #991b1b;
    font-size: 0.9375rem;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
}

.error-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.checkbox-group {
    position: relative;
}

.checkbox-group.error {
    padding: 0.75rem;
    border-radius: var(--radius);
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.file-input {
    padding: 0.5rem;
}

/* Resultado da Consulta */
.resultado-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.resultado-box.resultado-adimplente {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--secondary-color);
}

.adimplente-message {
    text-align: center;
    padding: 1.5rem 0;
}

.adimplente-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.adimplente-message h3 {
    color: #065f46;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.adimplente-message p {
    color: #047857;
    font-size: 1rem;
    margin: 0;
}

.resultado-header {
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge.verified {
    background: #d1fae5;
    color: #065f46;
}

.badge-pendente {
    background: #fef3c7;
    color: #92400e;
}

.badge-ativa {
    background: #dbeafe;
    color: #1e40af;
}

.badge-vencida {
    background: #fee2e2;
    color: #991b1b;
}

.badge-analise {
    background: #e0e7ff;
    color: #3730a3;
}

.resultado-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Info Box */
.info-box {
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    color: #1e40af;
}

.info-box.warning {
    background: #fffbeb;
    border-left: 4px solid var(--warning-color);
    color: #92400e;
}

.info-box p {
    margin: 0;
    font-size: 0.875rem;
}

.info-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Auth Box */
.auth-box {
    max-width: 500px;
    margin: 1.5rem auto;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

@media (min-width: 640px) {
    .auth-box {
        margin: 2rem auto;
        padding: 2rem;
    }
}

.auth-box h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.step.active {
    background: var(--primary-color);
    color: white;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* KYC Options */
.kyc-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kyc-option {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.kyc-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.kyc-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.kyc-option h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.kyc-option p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.kyc-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* Success Box */
.success-box {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-box h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab {
    flex: 1;
    padding: 0.875rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    text-align: center;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card[onclick] {
    cursor: pointer;
    user-select: none;
}

.stat-card[onclick]:active {
    transform: translateY(0);
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Mobile Stats - Scroll Horizontal */
@media (max-width: 640px) {
    .stats-grid {
        display: flex;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 1rem;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .stats-grid::-webkit-scrollbar {
        display: none;
    }
    
    .stat-card {
        min-width: 140px;
        flex-shrink: 0;
        scroll-snap-align: start;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Dívidas List */
.dividas-list {
    margin-top: 2rem;
}

.dividas-list h3 {
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--text-primary);
}

.dividas-list h3:first-child {
    margin-top: 0;
}

.divida-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
}

@media (max-width: 640px) {
    .divida-card {
        padding: 1rem;
        border-radius: var(--radius);
    }
}

.divida-card.status-pendente {
    border-left-color: var(--warning-color);
}

.divida-card.status-ativa {
    border-left-color: var(--primary-color);
}

.divida-card.status-vencida {
    border-left-color: var(--danger-color);
}

.divida-card.status-analise {
    border-left-color: #6366f1;
}

.divida-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.divida-header h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.divida-cpf {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.divida-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.divida-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.divida-info .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.divida-info .value {
    font-weight: 500;
    color: var(--text-primary);
}

.divida-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Form Box */
.form-box {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

@media (min-width: 640px) {
    .form-box {
        padding: 2rem;
    }
}

.form-box h2 {
    margin-bottom: 2rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Divida Resumo */
.divida-resumo {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.divida-resumo h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.radio-label:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.radio-label input[type="radio"] {
    width: auto;
}

/* Tab Header */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Divida Summary (Simplificado) */
.divida-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-wrap: wrap;
}

.divida-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.divida-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.divida-summary:hover {
    background-color: var(--bg-secondary);
}

.divida-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    flex: 1;
}

.divida-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.badges-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-divida-info {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-divida-info .divida-info {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-divida-info .divida-info:last-child {
    border-bottom: none;
}

.modal-divida-info .label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.modal-divida-info .value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 1.75rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-header button {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .divida-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .divida-value {
        font-size: 1.5rem;
    }

    .badges-container {
        width: 100%;
        justify-content: flex-start;
    }

    .divida-body {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.375rem;
        gap: 0.375rem;
    }
    
    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-width: 120px;
    }
    
    .tab.active::after {
        width: 50%;
        height: 2px;
    }

    .kyc-options {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }

    .modal-divida-info {
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .modal-divida-info .divida-info {
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.25rem 0;
    }

    .modal-divida-info .label {
        font-size: 0.8125rem;
        margin-bottom: 0.0625rem;
        line-height: 1.2;
    }

    .modal-divida-info .value {
        text-align: left;
        font-size: 0.875rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen.active {
    animation: fadeIn 0.3s ease-out;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.loading-text {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

