/**
 * THEME V3 - CLEAN DARK MINIMAL
 * Design simples, limpo e profissional
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════════════════════════ */
:root {
    /* Cores principais */
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-elevated: #252525;
    --bg-input: #2a2a2a;
    --bg-hover: #333333;
    
    /* Accent (verde simples) */
    --accent: #22c55e;
    --accent-light: #4ade80;
    --accent-dark: #16a34a;
    --accent-subtle: rgba(34, 197, 94, 0.1);
    
    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-tertiary: #737373;
    --text-muted: #525252;
    
    /* Bordas */
    --border-default: #333333;
    --border-subtle: #262626;
    
    /* Status */
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Espaçamento */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Radius - mais sutil */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;
    
    /* Sombras - mais sutis */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT BASE
   ═══════════════════════════════════════════════════════════════ */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

.page-content {
    padding: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: var(--space-sm);
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-btn i {
    font-size: 1.125rem;
}

/* ═══════════════════════════════════════════════════════════════
   AÇÕES RÁPIDAS
   ═══════════════════════════════════════════════════════════════ */
.quick-actions {
    display: flex;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    flex: 1;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.quick-action:hover .quick-action-icon {
    background: var(--bg-hover);
    color: var(--accent);
}

.quick-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   BANNER
   ═══════════════════════════════════════════════════════════════ */
.banner-wrapper {
    padding: var(--space-md);
}

.banner {
    position: relative;
    height: 160px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
}

.banner-content {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
}

.banner-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   TICKER / MARQUEE
   ═══════════════════════════════════════════════════════════════ */
.ticker {
    background: var(--accent);
    padding: 10px 0;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-xl);
    color: #000;
    font-weight: 600;
    font-size: 0.8125rem;
}

.ticker-item::before {
    content: '•';
    margin-right: var(--space-sm);
    opacity: 0.5;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════
   CARDS DE PRODUTO
   ═══════════════════════════════════════════════════════════════ */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-md);
}

.product-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-image {
    width: 110px;
    min-width: 110px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.product-image img {
    width: 100%;
    height: 85px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.product-body {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.product-name {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 2px;
}

.product-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 var(--space-md);
    margin-top: 6px;
}

.product-stat {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.product-stat-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-stat-label {
    font-size: 0.5625rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.product-cta {
    margin-top: 6px;
}

.btn-buy {
    width: 100%;
    padding: 6px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-buy:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ═══════════════════════════════════════════════════════════════
   TABBAR
   ═══════════════════════════════════════════════════════════════ */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-default);
    padding: var(--space-sm) 0 calc(var(--space-sm) + env(safe-area-inset-bottom));
}

.tabbar-inner {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
    min-width: 56px;
}

.tab-item i {
    font-size: 1.125rem;
}

.tab-item span {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tab-item:hover {
    color: var(--text-secondary);
}

.tab-item.active {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   BOTÕES GERAIS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-block {
    width: 100%;
}

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

/* ═══════════════════════════════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════════════════════════════ */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast);
}

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

.input:focus {
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   CARDS GENÉRICOS
   ═══════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════════
   SALDO / PORTFOLIO
   ═══════════════════════════════════════════════════════════════ */
.balance-section {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
}

.balance-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.balance-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.balance-breakdown {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-top: var(--space-md);
}

.balance-item {
    text-align: center;
}

.balance-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.balance-item-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   CHECK-IN CARD
   ═══════════════════════════════════════════════════════════════ */
.checkin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    margin: 0 var(--space-md) var(--space-lg);
}

.checkin-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
}

.checkin-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.checkin-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.checkin-btn {
    padding: 10px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.checkin-btn:hover {
    background: var(--accent-light);
}

.checkin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMAÇÕES SIMPLES
   ═══════════════════════════════════════════════════════════════ */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fade-in 0.2s ease;
}

.animate-slide-up {
    animation: fade-in 0.2s ease;
}

/* Delays escalonados simples */
.delay-1 { animation-delay: 0.02s; }
.delay-2 { animation-delay: 0.04s; }
.delay-3 { animation-delay: 0.06s; }
.delay-4 { animation-delay: 0.08s; }
.delay-5 { animation-delay: 0.1s; }

/* ═══════════════════════════════════════════════════════════════
   BACKGROUND - SIMPLES
   ═══════════════════════════════════════════════════════════════ */
.network-bg {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
    .quick-action-icon {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
    
    .balance-value {
        font-size: 1.75rem;
    }
    
    .product-image {
        width: 90px;
        min-width: 90px;
    }
    
    .product-image img {
        height: 70px;
    }
    
    .product-price {
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITÁRIOS
   ═══════════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-tertiary); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }
