/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
}

body {
    background: #0b0f14;
    color: #e5e7eb;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(17, 24, 39, .95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-bottom: 1px solid #1f2933;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo:hover {
    opacity: .9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-display {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    color: #f59e0b;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #0b0f14;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all .2s;
}

.currency-selector:hover {
    background: #1a2235;
    border-color: #f59e0b;
}

.currency-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.currency-code {
    font-size: 13px;
    font-weight: 600;
}

.header-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Botões */
.btn {
    background: #2563eb;
    border: none;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

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

.btn.success {
    background: #16a34a;
}

.btn.info {
    background: #3b82f6;
}

.btn.warning {
    background: #f59e0b;
    color: #0b0f14;
}

.btn.danger {
    background: #dc2626;
}

.btn.secondary {
    background: #374151;
}

.btn.small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn.icon {
    padding: 10px;
}

.btn.gold {
    background: #f59e0b;
    color: #0b0f14;
}

/* Main Layout */
main {
    padding: 120px 16px 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Seções */
.section {
    background: #111827;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #1f2933;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: #f59e0b;
    border-radius: 2px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.gold {
    background: #f59e0b20;
    color: #f59e0b;
}

.badge.info {
    background: #3b82f620;
    color: #3b82f6;
}

.badge.purple {
    background: #9333ea20;
    color: #9333ea;
}

.badge.success {
    background: #16a34a20;
    color: #16a34a;
}

.badge.danger {
    background: #dc262620;
    color: #dc2626;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #0b0f14;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid #1f2933;
    transition: transform .2s;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0;
    color: #f59e0b;
}

.stat-label {
    color: #9ca3af;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* List */
.list {
    background: #0b0f14;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1f2933;
    overflow-x: auto;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    min-width: 1000px;
    padding: 14px 16px;
    align-items: center;
    border-bottom: 1px solid #1f2933;
    transition: background-color .2s;
}

.row:hover {
    background: #1a2235;
}

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

.row-header {
    font-weight: 600;
    color: #9ca3af;
    background: #0f172a;
    position: sticky;
    left: 0;
    cursor: default;
}

.row-header:hover {
    background: #0f172a;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none !important;
}

.modal-box {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: #0b0f14;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #1f2933;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #1f2933;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111827;
    flex-shrink: 0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #f59e0b;
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Cores */
.positive {
    color: #22c55e;
}

.negative {
    color: #ef4444;
}

.warning {
    color: #f59e0b;
}

.info-text {
    color: #60a5fa;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #9ca3af;
    font-size: 14px;
    border-top: 1px solid #1f2933;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: #f59e0b;
}

/* Refresh Button */
.refresh-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f59e0b;
    color: #0b0f14;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, .3);
    z-index: 90;
    transition: all .3s;
}

.refresh-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(245, 158, 11, .4);
}

.refresh-button.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsivo */
@media (max-width: 768px) {
    main {
        padding: 100px 12px 30px;
    }
    
    .header-buttons .btn span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .btn {
        padding: 12px 16px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 90px 10px 30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utilitários */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}