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

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background: #f5f7fa;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

#app,
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
}

.header {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#main-content {
    flex: 1;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.balance-card {
    background: white;
    border-radius: 20px;
    padding: 32px 24px;
    color: #333;
    margin: -40px 0 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e8eef5;
}

.balance-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #0066cc, #0099ff);
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.balance-icon,
.balance-header .bi {
    width: 28px;
    height: 28px;
    font-size: 1.5rem;
    color: #0066cc;
    opacity: 0.9;
}

.balance-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #0066cc;
    line-height: 1;
}

.balance-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: white;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-icon,
.btn .bi { font-size: 1.2rem; }

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 20px;
}

.progress-timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-line {
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #0066cc, #0099ff, #e0e0e0);
}

.level-item {
    position: relative;
    margin-bottom: 30px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.level-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 4px solid #0066cc;
    box-shadow: 0 0 0 4px white;
}

.level-item.completed::before {
    background: #0066cc;
}

.level-item.current::before {
    background: #00ff88;
    border-color: #00ff88;
    animation: pulse 2s infinite;
}

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

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.level-badge {
    display: inline-block;
    background: #0066cc;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.level-status {
    font-size: 0.85rem;
    color: #666;
}

.level-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.75rem;
    color: #999;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.detail-value.highlight {
    color: #0066cc;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.nav-btn.active {
    color: #0066cc;
}

.nav-btn img,
.nav-btn .bi {
    width: 24px;
    height: 24px;
    font-size: 1.35rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-btn.active .bi,
.nav-btn.active img {
    opacity: 1;
    color: #0066cc;
}

.nav-btn .bi {
    display: block;
}

.nav-btn span {
    font-size: 0.7rem;
    font-weight: 500;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.stat-card .stat-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
    display: block;
}

.stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066cc;
    line-height: 1.2;
    word-break: break-all;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.extract-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.extract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.extract-type {
    font-weight: 600;
    color: #333;
}

.extract-amount {
    font-size: 1.1rem;
    font-weight: 700;
}

.extract-amount.positive {
    color: #00cc66;
}

.extract-amount.negative {
    color: #ff3366;
}

.extract-date {
    font-size: 0.8rem;
    color: #999;
}

.plan-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.plan-card.recommended {
    border-color: #0066cc;
    position: relative;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #0066cc;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 8px;
}

.plan-reward {
    color: #00cc66;
    font-weight: 600;
    margin-bottom: 16px;
}

.plan-features {
    list-style: none;
    margin-bottom: 16px;
}

.plan-features li {
    padding: 8px 0;
    color: #666;
    font-size: 0.9rem;
}

.plan-features li::before {
    content: '✓';
    color: #0066cc;
    font-weight: 700;
    margin-right: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #0066cc;
}

.btn-full {
    width: 100%;
}

.affiliate-link {
    margin-bottom: 20px;
}
.affiliate-link.input-group .link-text {
    border-radius: 0.25rem 0 0 0.25rem;
}
.affiliate-link .btn { white-space: nowrap; }

.link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-size: 0.9rem;
}

.copy-btn {
    background: #0066cc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon,
.empty-state .bi {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
    color: #0066cc;
}

/* Auth - login e cadastro */
.auth-page {
    padding-bottom: 40px;
}
.auth-page .header {
    height: 140px;
    flex-shrink: 0;
}
.auth-page .auth-content {
    flex: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 28px 24px 40px;
    box-sizing: border-box;
}
.auth-content .form-control,
.auth-content .input-group {
    min-height: 48px;
}
.auth-content .form-control {
    font-size: 1rem;
}
.auth-content .form-label {
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.auth-title {
    font-size: 1.5rem;
    color: #0066cc;
    margin-bottom: 24px;
    text-align: center;
}
.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: #666;
    font-size: 0.95rem;
}
.auth-footer a { color: #0066cc; font-weight: 600; }
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
.alert-error { background: #ffebee; color: #c62828; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.app-container { min-height: 100vh; padding-bottom: 20px; }