/* ==========================================================================
   ESTILO GERAL: SISTEMA DE RIFAS & SORTEIOS ENOQUE MENDES
   Identidade Visual Oficial Integrada ao Ecossistema enoquemendes.com.br
   Cores: Paper (#faf9f5), Ink (#1c1917), Accent/Dourado (#d97706 / #f59e0b)
   ========================================================================== */

:root {
    --bg-primary: #faf9f5;
    --bg-secondary: #f4f2ea;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border-color: rgba(28, 25, 23, 0.08);
    
    --text-main: #1c1917;
    --text-muted: #78716c;
    
    --primary: #d97706;
    --primary-hover: #b45309;
    
    --gold: #d97706;
    --gold-hover: #b45309;
    --gold-glow: rgba(217, 119, 6, 0.25);
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 25px var(--gold-glow);
}

.dark {
    --bg-primary: #121110;
    --bg-secondary: #181715;
    --bg-card: #1c1a17;
    --bg-input: #151412;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-main: #f5f5f4;
    --text-muted: #a8a29e;
    
    --primary: #f59e0b;
    --primary-hover: #d97706;
    
    --gold: #f59e0b;
    --gold-hover: #d97706;
    --gold-glow: rgba(245, 158, 11, 0.25);
    
    --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

.font-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-heading {
    font-family: 'Outfit', sans-serif;
}

/* Utilitários Visuais Compartilhados */
.hero-pattern {
    background-color: #171513;
    background-image: radial-gradient(rgba(217, 119, 6, 0.12) 1px, transparent 1px), radial-gradient(rgba(255, 255, 255, 0.04) 1px, #171513 1px);
    background-size: 32px 32px;
    background-position: 0 0, 16px 16px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(28, 25, 23, 0.08);
}

.dark .glass-card {
    background: rgba(28, 26, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Botões do Sistema */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1c1917 !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(217, 119, 6, 0.05);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: var(--radius-full);
}

.btn-block {
    width: 100%;
}

/* Badges de Status da Rifa */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active, .badge-active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.status-badge.finished, .badge-finished {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.status-badge.draft {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.badge-live {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.8; }
}

/* Detalhe da Rifa & Layout Responsivo */
.raffle-detail-header {
    margin: 30px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

@media (max-width: 900px) {
    .raffle-detail-header {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.raffle-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

.raffle-media img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
}

/* Transmissão do YouTube */
.youtube-live-box {
    background: #181715;
    border: 2px solid #ef4444;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 30px 0;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.25);
}

.youtube-live-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ef4444;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Seletor Rápido de Cotas (+1, +5, +10...) */
.quick-picks-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 30px 0;
    box-shadow: var(--shadow-card);
}

.quick-picks-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.quick-picks-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.quick-pick-btn {
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.25);
    color: var(--gold);
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-pick-btn:hover {
    background: var(--gold);
    color: #1c1917;
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

/* Legenda de Cotas */
.numbers-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.color-available {
    background: #e7e5e4;
    border: 1px solid rgba(28, 25, 23, 0.15);
}

.dark .color-available {
    background: #23201d;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-selected {
    background: var(--gold);
}

.color-reserved {
    background: rgba(217, 119, 6, 0.2);
    border: 1px dashed var(--gold);
}

.color-paid {
    background: #cbd5e1;
}

.dark .color-paid {
    background: #292524;
}

/* Grid de Números / Bilhetes */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
    max-height: 440px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.number-cell {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.number-cell.available {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.number-cell.available:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.number-cell.selected {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #1c1917 !important;
    font-weight: 800;
    border: 1px solid #fbbf24 !important;
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.45) !important;
    transform: scale(1.08);
}

.number-cell.reserved {
    background: rgba(217, 119, 6, 0.12) !important;
    color: var(--gold) !important;
    border: 1px dashed rgba(217, 119, 6, 0.5) !important;
    cursor: not-allowed;
}

.number-cell.paid {
    background: rgba(100, 116, 139, 0.15) !important;
    color: #94a3b8 !important;
    text-decoration: line-through;
    border: 1px solid transparent !important;
    cursor: not-allowed;
}

/* Barra Flutuante de Checkout */
.checkout-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 800px;
    background: rgba(22, 21, 19, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: var(--radius-full);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(217, 119, 6, 0.25);
    z-index: 99;
}

.checkout-summary-title {
    font-size: 0.8rem;
    color: #a8a29e;
}

.checkout-summary-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f59e0b;
    font-family: 'Outfit', sans-serif;
}

/* Cartões de Formulário & Auth */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    max-width: 520px;
    margin: 40px auto;
    box-shadow: var(--shadow-card);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Checkout PIX */
.pix-checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    max-width: 520px;
    margin: 40px auto;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 16px;
    border-radius: var(--radius-md);
    display: inline-block;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.qr-code-wrapper img {
    max-width: 220px;
    display: block;
}

.pix-copy-box {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* Ocultar barra de rolagem onde desejado */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
