/* 7iATLAS - CSS Profissional Fintech */
/* Cores extraidas do logo: azul #1a0dff, roxo #8b5cf6, rosa #ec4899 */

:root {
    --bg: #050510;
    --bg-card: #0d0d1a;
    --bg-input: #1a1a2e;
    --text: #f1f5f9;
    --text-muted: #a1a1aa;

    /* Cores do logo 7iATLAS */
    --primary: #8b5cf6;
    --primary-hover: #a78bfa;
    --accent-blue: #1a0dff;
    --accent-pink: #ec4899;
    --gradient: linear-gradient(135deg, #1a0dff 0%, #8b5cf6 50%, #ec4899 100%);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #2d2d44;
    --radius: 10px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.logo-link {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header Navigation */
.header-nav {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-input);
}

/* Hero Crypto Section */
.hero-crypto {
    background: linear-gradient(135deg, rgba(26, 13, 255, 0.15) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.15) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-crypto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F0B90B, #26A17B, #F0B90B);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hero-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.crypto-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.crypto-logo:hover {
    transform: translateY(-4px);
}

.binance-logo:hover {
    box-shadow: 0 8px 25px rgba(240, 185, 11, 0.3);
}

.usdt-logo:hover {
    box-shadow: 0 8px 25px rgba(38, 161, 123, 0.3);
}

.crypto-logo span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.binance-logo span {
    color: #F0B90B;
}

.usdt-logo span {
    color: #26A17B;
}

.hero-arrow {
    color: var(--text-muted);
    animation: pulse-arrow 1.5s infinite;
}

@keyframes pulse-arrow {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

.hero-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.badge-bep20 {
    background: linear-gradient(135deg, #F0B90B 0%, #f8d12f 100%);
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    animation: glow-yellow 2s infinite;
}

@keyframes glow-yellow {
    0%, 100% { box-shadow: 0 0 5px rgba(240, 185, 11, 0.5); }
    50% { box-shadow: 0 0 20px rgba(240, 185, 11, 0.8); }
}

.badge-bsc {
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.3);
    color: #F0B90B;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}

.hero-subtitle {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Main */
main {
    padding: 32px 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.card h2 {
    margin-bottom: 20px;
    font-size: 1.25rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-copy {
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin: 2px;
}

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

/* Cotacao Box */
.cotacao-box {
    background: linear-gradient(135deg, rgba(240, 185, 11, 0.05) 0%, rgba(38, 161, 123, 0.05) 100%);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(240, 185, 11, 0.2);
    position: relative;
}

.cotacao-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cotacao-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.cotacao-valor {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #F0B90B;
    margin: 8px 0;
    text-shadow: 0 0 20px rgba(240, 185, 11, 0.3);
}

.cotacao-info {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Calculo Box */
.calculo-box {
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.calc-total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pagamento */
.pedido-info {
    text-align: center;
    margin-bottom: 20px;
}

.valor-grande {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
}

.usdt-info {
    color: var(--text-muted);
}

.qr-container {
    text-align: center;
    margin: 24px 0;
}

.qr-container img {
    max-width: 220px;
    background: white;
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.pix-copia {
    margin: 20px 0;
}

.pix-copia label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.copy-box {
    display: flex;
    gap: 8px;
}

.copy-box input {
    flex: 1;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.8rem;
}

.timer-box {
    text-align: center;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius);
    margin: 20px 0;
}

.timer-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--warning);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.upload-section h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.upload-section p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.upload-section input[type="file"] {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    margin-bottom: 12px;
}

.status-msg {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}

.status-msg.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-msg.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Admin */
.login-card {
    max-width: 360px;
    margin: 80px auto;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.stat-card.alert {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.stat-card.alert::before {
    background: var(--warning);
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px;
}

.admin-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    text-transform: uppercase;
}

.admin-table small {
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-pendente {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

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

.badge-ativado {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.badge-cancelado {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-expirado {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
}

.link {
    color: var(--primary);
    text-decoration: none;
}

.muted {
    color: var(--text-muted);
}

.actions {
    white-space: nowrap;
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.actions form {
    display: inline-flex;
}

.referral-code {
    color: var(--primary);
    font-family: monospace;
}

/* Rede BEP20 */
.rede-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f0b90b 0%, #f8d12f 100%);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.rede-badge.animated {
    animation: glow-yellow 2s infinite;
}

.rede-info {
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.3);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rede-info.success-glow {
    animation: border-glow 2s infinite;
}

@keyframes border-glow {
    0%, 100% { border-color: rgba(240, 185, 11, 0.3); }
    50% { border-color: rgba(240, 185, 11, 0.8); }
}

.rede-icon {
    color: #f0b90b;
    font-size: 1.1rem;
}

/* Payment Crypto Bar */
.payment-crypto-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(38, 161, 123, 0.1) 0%, rgba(240, 185, 11, 0.1) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.crypto-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.crypto-mini span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #26A17B;
}

.crypto-mini.bsc span {
    color: #F0B90B;
}

.crypto-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    animation: pulse-arrow 1.5s infinite;
}

/* Referral Section */
.referral-section {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.referral-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 1rem;
}

.referral-icon {
    font-size: 1.2rem;
}

.referral-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #fca5a5;
    line-height: 1.4;
}

.referral-warning span {
    color: var(--danger);
}

.referral-section .form-group {
    margin-bottom: 12px;
}

.referral-section .form-group:last-child {
    margin-bottom: 0;
}

.match-status {
    font-weight: 600;
}

.match-ok {
    color: var(--success);
}

.match-error {
    color: var(--danger);
}

/* Referral code no admin */
.referral-code {
    background: var(--bg-input);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--accent-pink);
}

/* Carteira no admin */
.carteira-cell {
    font-size: 0.75rem;
}

.carteira-cell code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.btn-copy-sm {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 4px;
}

.btn-copy-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Aviso P2P */
.p2p-notice {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #fca5a5;
}

.p2p-icon {
    color: var(--danger);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Footer Disclaimer */
.disclaimer {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: #fca5a5;
    text-align: left;
    line-height: 1.5;
}

.disclaimer strong {
    color: var(--danger);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Botao de Ajuda */
.btn-help {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-help:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: popup-in 0.3s ease;
}

@keyframes popup-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.popup-close:hover {
    background: var(--danger);
    color: white;
}

.popup-content h3 {
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
}

.popup-content p {
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.popup-image {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.popup-image img {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.popup-tip {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.8rem !important;
    color: var(--primary) !important;
    margin-bottom: 0 !important;
}

/* Status Page */
.status-lookup {
    margin-bottom: 24px;
}

.status-result {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 600;
}

.status-details {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.detail-row span:first-child {
    color: var(--text-muted);
}

.status-info-box {
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 16px;
    line-height: 1.6;
}

.status-info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.status-info-box.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.status-info-box.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.status-info-box.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.error-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 0 12px;
    }

    .card {
        padding: 16px;
    }

    .admin-table {
        font-size: 0.75rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 4px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}
