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

body {
    font-family: 'Noto Sans', sans-serif;
    background: #f5f5f5;
    color: #202020;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth Pages */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header svg {
    margin: 0 auto 16px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #202020;
    margin-bottom: 4px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.auth-tab.active {
    background: white;
    color: #00B37E;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.auth-form h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #202020;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: #202020;
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #202020;
}

.nav-link.active {
    background: #e6f7f0;
    color: #00B37E;
}

.btn-logout {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: #00B37E;
    color: #00B37E;
}

/* Pages */
.page {
    display: none;
}

.page-content {
    display: none;
    padding-top: 20px;
}

.page-content.active {
    display: block;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #00B37E 0%, #00935f 100%);
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 179, 126, 0.2);
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    opacity: 0.9;
    font-size: 14px;
}

.balance-amount {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 24px;
}

.balance-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.stat-label {
    font-size: 13px;
    opacity: 0.8;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
}

.stat-value.income {
    color: #a7f3d0;
}

.stat-value.expense {
    color: #fca5a5;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-btn:hover {
    border-color: #00B37E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.action-icon.receive {
    background: #00B37E;
}

.action-icon.send {
    background: #3b82f6;
}

.action-btn span {
    font-weight: 600;
    color: #202020;
}

/* Section */
.section {
    margin-bottom: 32px;
}

.section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #202020;
}

/* Transactions */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.transaction-item.income {
    border-left-color: #00B37E;
}

.transaction-item.expense {
    border-left-color: #ef4444;
}

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

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
}

.transaction-amount.income {
    color: #00B37E;
}

.transaction-amount.expense {
    color: #ef4444;
}

.transaction-type {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.transaction-type.income {
    background: #e6f7f0;
    color: #00B37E;
}

.transaction-type.expense {
    background: #fee2e2;
    color: #ef4444;
}

.transaction-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.transaction-time {
    font-size: 12px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: white;
    border-radius: 12px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #00B37E;
}

/* Cards */
.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #202020;
}

.card-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

/* API Key */
.api-key-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.api-key-container code {
    flex: 1;
    font-size: 13px;
    color: #202020;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* API Docs */
.api-docs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    font-family: monospace;
}

.endpoint-method {
    padding: 4px 8px;
    background: #00B37E;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.endpoint-path {
    font-size: 13px;
    color: #202020;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #00B37E;
}

.profile-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-info p {
    color: #666;
    font-size: 14px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #202020;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    font-family: 'Noto Sans', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #00B37E;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #00B37E;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Noto Sans', sans-serif;
}

.btn-primary:hover {
    background: #00935f;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: white;
    color: #00B37E;
    border: 2px solid #00B37E;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans', sans-serif;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #f0fdf7;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

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

.card .btn-icon {
    color: #666;
}

.card .btn-icon:hover {
    background: #f5f5f5;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

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

.modal-header h2 {
    font-size: 24px;
    color: #202020;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f5f5f5;
}

/* QR Code */
.qr-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

#qrcodeReceive {
    padding: 16px;
    background: white;
    border-radius: 8px;
}

.pix-code-container {
    margin: 24px 0;
}

.code-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.code-box {
    display: flex;
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.code-box code {
    flex: 1;
    padding: 12px 16px;
    font-size: 12px;
    color: #202020;
    overflow-x: auto;
    white-space: nowrap;
}

.btn-copy {
    padding: 12px 16px;
    background: white;
    border: none;
    border-left: 2px solid #e0e0e0;
    cursor: pointer;
    color: #00B37E;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #f0fdf7;
}

/* Utilities */
.hidden {
    display: none !important;
}

h1 {
    font-size: 28px;
    margin-bottom: 24px;
    color: #202020;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 24px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .nav-container {
        flex-wrap: wrap;
        padding: 12px;
    }

    .nav-logo {
        font-size: 16px;
    }

    .nav-logo svg {
        width: 24px;
        height: 24px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: space-around;
        margin-top: 12px;
        gap: 0;
    }

    .nav-link {
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        padding: 6px 4px;
    }

    .nav-link svg {
        width: 18px;
        height: 18px;
    }

    .btn-logout {
        font-size: 13px;
        padding: 6px 12px;
    }

    .balance-card {
        padding: 20px;
    }

    .balance-amount {
        font-size: 28px;
    }

    .stat-value {
        font-size: 16px;
    }

    .quick-actions {
        gap: 12px;
    }

    .action-btn {
        padding: 16px;
    }

    .action-icon {
        width: 48px;
        height: 48px;
    }

    .card {
        padding: 16px;
    }

    .container {
        padding: 12px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .transaction-amount {
        font-size: 16px;
    }

    .filters {
        flex-direction: column;
    }

    .qr-container {
        padding: 12px;
    }

    #qrcodeReceive {
        padding: 8px;
    }

    #qrcodeReceive canvas,
    #qrcodeReceive img {
        width: 180px !important;
        height: 180px !important;
    }

    .balance-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .code-block {
        font-size: 11px;
    }
}

/* Code blocks */
.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 12px;
}

.code-block pre {
    margin: 0;
    padding: 16px;
}

.code-block code {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

/* Webhook events */
.webhook-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.event-item {
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #00B37E;
}

.event-name {
    font-family: monospace;
    font-weight: 700;
    color: #202020;
    margin-bottom: 4px;
}

.event-description {
    font-size: 14px;
    color: #666;
}

