@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Cores Primárias */
    --color-navy: #0B0D3A;
    --color-purple: #582CFF;
    --color-pink: #FF2D8F;
    --color-cyan: #00C9FF;

    /* Cores Secundárias */
    --color-green: #00CE53;
    --color-orange: #FF8A00;
    --color-gold: #FFC107;

    /* Cores Neutras */
    --color-white: #FFFFFF;
    --color-light: #F3F4F7;
    --color-gray: #E6E8EF;
    --color-text-muted: #6D7280;
    --color-dark: #1A1F2B;

    /* Gradientes e Sombras */
    --gradient-primary: linear-gradient(135deg, #582CFF 0%, #FF2D8F 100%);
    --gradient-dark: linear-gradient(180deg, #0B0D3A 0%, #10194D 100%);
    --shadow-soft: 0 18px 45px rgba(11, 13, 58, 0.06);
    --shadow-card: 0 12px 32px rgba(11, 13, 58, 0.04);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--color-light);
    color: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Custom Scrollbar para visual de App */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(11, 13, 58, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(11, 13, 58, 0.3); }

/* ========================================================
   CLASSES GERAIS E TIPOGRAFIA
======================================================== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--color-navy); letter-spacing: -0.3px; }
.text-navy { color: var(--color-navy) !important; }
.text-purple { color: var(--color-purple) !important; }
.text-pink { color: var(--color-pink) !important; }
.text-cyan { color: var(--color-cyan) !important; }
.text-gold { color: var(--color-gold) !important; }
.text-gray { color: var(--color-text-muted) !important; }
.winpass-gradient { background: var(--gradient-primary) !important; color: var(--color-white) !important; }

/* ========================================================
   BOTÕES CUSTOMIZADOS WINPASS
======================================================== */
.winpass-btn-primary,
.winpass-btn-secondary,
.winpass-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 14px;
    border: 0;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.winpass-btn-primary { 
    background: var(--gradient-primary); 
    color: #fff; 
    box-shadow: 0 10px 25px rgba(88, 44, 255, 0.25); 
}
.winpass-btn-secondary { 
    background: var(--color-navy); 
    color: #fff; 
    box-shadow: 0 8px 20px rgba(11, 13, 58, 0.15);
}
.winpass-btn-ghost { 
    background: #fff; 
    border: 2px solid var(--color-purple); 
    color: var(--color-purple); 
}

.winpass-btn-primary:hover, .winpass-btn-secondary:hover { transform: translateY(-2px); color: #fff; opacity: 0.95; }
.winpass-btn-ghost:hover { background: var(--color-light); color: var(--color-purple); transform: translateY(-2px); }

/* ========================================================
   INPUTS E FORMULÁRIOS
======================================================== */
.winpass-input, .form-control.winpass-input, .form-select.winpass-input {
    border: 1px solid var(--color-gray);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-navy);
    background-color: var(--color-white);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.winpass-input::placeholder { color: #A0A5BB; font-weight: 400; }
.winpass-input:focus { border-color: var(--color-purple); box-shadow: 0 0 0 4px rgba(88, 44, 255, 0.1); outline: none; }

.winpass-input-icon { position: relative; }
.winpass-input-icon .form-control { padding-right: 44px; }
.winpass-input-icon i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #8F95B2; font-size: 16px; }

/* ========================================================
   BADGES DE STATUS E INDICADORES
======================================================== */
.winpass-badge { 
    padding: 6px 14px; 
    border-radius: 999px; 
    font-size: 12px; 
    font-weight: 700; 
    border: none; 
    display: inline-block;
}
.winpass-badge-active, .winpass-badge-paid { background-color: rgba(0, 206, 83, 0.12); color: var(--color-green); }
.winpass-badge-pending { background-color: rgba(255, 138, 0, 0.12); color: var(--color-orange); }
.winpass-badge-cancelled { background-color: rgba(255, 45, 143, 0.12); color: var(--color-pink); }
.winpass-badge-purple { background-color: rgba(88, 44, 255, 0.12); color: var(--color-purple); }
.winpass-badge-finished, .winpass-badge-drawn { background-color: rgba(11, 13, 58, 0.08); color: var(--color-navy); }

/* ========================================================
   CARDS WINPASS (DASHBOARD E COMPONENTES)
======================================================== */
.winpass-card,
.winpass-dashboard-card {
    background: var(--color-white);
    border: 1px solid rgba(230, 232, 239, 0.8);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 24px;
    height: 100%;
    transition: box-shadow 0.3s ease;
}
.winpass-dashboard-card:hover { box-shadow: var(--shadow-soft); }
.card-icon-box { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* Tabelas Customizadas */
.table-winpass { width: 100%; margin-bottom: 0; color: var(--color-dark); vertical-align: middle; }
.table-winpass thead th { background-color: var(--color-light); color: var(--color-navy); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; padding: 16px; border-bottom: 1px solid var(--color-gray); }
.table-winpass tbody td { padding: 16px; border-bottom: 1px solid var(--color-gray); font-size: 14px; }

/* ========================================================
   MÓDULO DE AUTENTICAÇÃO (LOGIN / CADASTRO)
======================================================== */
.winpass-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    padding: 20px;
}
.winpass-auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--color-white);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    padding: 45px 32px;
    position: relative;
    overflow: hidden;
}
.winpass-auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--gradient-primary);
}
.brand-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand-title { font-size: 28px; font-weight: 800; color: var(--color-navy); margin: 0; letter-spacing: -0.5px; }

/* ========================================================
   MÓDULO DE DASHBOARD E SIDEBAR
======================================================== */
.winpass-wrapper {
    display: flex;
    flex-wrap: nowrap !important;
    width: 100vw;
    min-height: 100vh;
    background-color: var(--color-light);
}

.winpass-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--gradient-dark);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, left 0.3s ease;
    z-index: 1040;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.sidebar-brand { padding: 24px; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.sidebar-brand .logo-icon { background: var(--gradient-primary); width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; }
.sidebar-menu { padding: 10px 0; list-style: none; margin: 0; flex-grow: 1; }
.sidebar-menu li { padding: 4px 20px; }
.sidebar-menu li a { padding: 12px 16px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.6); display: flex; align-items: center; gap: 14px; border-radius: 14px; text-decoration: none; transition: all 0.2s ease; }
.sidebar-menu li a i { font-size: 18px; width: 24px; text-align: center; }
.sidebar-menu li a:hover { color: var(--color-white); background: rgba(255, 255, 255, 0.05); }
.sidebar-menu li.active a { background: var(--gradient-primary); color: var(--color-white); box-shadow: 0 8px 20px rgba(88, 44, 255, 0.3); font-weight: 600; }

.sidebar-footer-card { margin: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 20px; text-align: center; }

/* Dashboard - Mobile Responsiveness */
@media (min-width: 992px) {
    .winpass-sidebar.collapsed { margin-left: -260px; }
}
@media (max-width: 991.98px) {
    .winpass-sidebar { position: fixed; left: -260px; top: 0; transition: left 0.3s ease; }
    .winpass-sidebar.show { left: 0; }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(11, 13, 58, 0.5); z-index: 1035; display: none; }
    .sidebar-overlay.show { display: block; }
}

.winpass-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.winpass-topbar {
    background-color: var(--color-white);
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-gray);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.winpass-content-body { padding: 30px; }
@media (max-width: 991.98px) { .winpass-content-body { padding: 20px 15px; } }

/* ========================================================
   PÁGINAS PÚBLICAS E MOBILE-FIRST SCREENS
======================================================== */
.winpass-public-page {
    min-height: 100vh;
    background-color: var(--color-light);
    padding-bottom: 80px;
}

.winpass-mobile-screen {
    max-width: 500px;
    margin: 0 auto;
    background: var(--color-white);
    min-height: 100vh;
    box-shadow: var(--shadow-soft);
    position: relative;
}

/* ========================================================
   MÓDULO DE PAGAMENTO PIX E CHECKOUT PÚBLICO
======================================================== */
.winpass-payment-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(0, 201, 255, .15), transparent 30%),
                radial-gradient(circle at bottom right, rgba(255, 45, 143, .15), transparent 32%),
                var(--color-light);
}
.winpass-payment-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.winpass-payment-card { width: 100%; max-width: 480px; background: #fff; border-radius: 28px; padding: 30px; box-shadow: 0 28px 80px rgba(0, 0, 0, .1); }
.winpass-payment-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.winpass-logo-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--gradient-primary); color: #fff; font-weight: 800; font-size: 20px; }
.winpass-payment-brand strong { display: block; color: var(--color-navy); font-size: 20px; font-weight: 800; line-height: 1; }
.winpass-payment-brand span { display: block; color: var(--color-text-muted); font-size: 13px; margin-top: 4px; }
.winpass-payment-status { text-align: center; padding: 14px 4px 18px; }
.winpass-payment-status .status-icon { width: 72px; height: 72px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 24px; background: rgba(255, 193, 7, .14); color: var(--color-gold); font-size: 34px; }
.winpass-payment-status.is-paid .status-icon { background: rgba(0, 206, 83, .12); color: var(--color-green); }
.winpass-payment-status h1 { color: var(--color-navy); font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.winpass-payment-status p { color: var(--color-text-muted); font-size: 14px; margin: 0; }
.winpass-payment-amount { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--color-light); border-radius: 18px; padding: 16px 20px; margin-bottom: 24px; }
.winpass-payment-amount span { color: var(--color-text-muted); font-size: 13px; font-weight: 600; }
.winpass-payment-amount strong { color: var(--color-green); font-size: 24px; font-weight: 800; }
.winpass-qr-box { background: #fff; border: 1px solid var(--color-gray); border-radius: 24px; padding: 14px; text-align: center; margin-bottom: 20px; }
.winpass-qr-box img { width: 100%; max-width: 240px; height: auto; border-radius: 16px; }
.winpass-copy-field { display: flex; gap: 0; }
.winpass-copy-field textarea { resize: none; border-top-right-radius: 0; border-bottom-right-radius: 0; font-size: 12px; background: var(--color-light); }
.winpass-copy-field button { border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 10px 24px; }
.winpass-waiting-box { display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 193, 7, .12); color: #8A6200; border-radius: 16px; padding: 14px; font-size: 13px; font-weight: 700; }
.winpass-success-panel { display: grid; gap: 8px; place-items: center; text-align: center; background: rgba(0, 206, 83, .10); border: 1px solid rgba(0, 206, 83, .20); border-radius: 24px; padding: 24px; margin-bottom: 20px; }
.winpass-success-panel i { font-size: 40px; color: var(--color-green); }
.winpass-success-panel strong { color: var(--color-navy); font-size: 20px; font-weight: 800; }
.winpass-success-panel span { color: var(--color-text-muted); font-size: 14px; }

/* ========================================================
   MÓDULO DE RIFA PÚBLICA (CARTELA E NÚMEROS)
======================================================== */
.public-raffle-page { min-height: 100vh; }
.raffle-container { max-width: 680px; margin: 0 auto; padding: 18px 12px 0; }
.raffle-art { position: relative; overflow: hidden; border-radius: 30px; padding: 24px 16px; box-shadow: 0 18px 45px rgba(11, 13, 58, .12); background: #fff; }
.raffle-brand { display: flex; justify-content: center; align-items: center; gap: 9px; font-weight: 900; margin-bottom: 16px; color: var(--color-navy); }
.raffle-brand-mark { width: 34px; height: 34px; border-radius: 12px; background: var(--gradient-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; transform: rotate(-8deg); box-shadow: 0 10px 25px rgba(255, 45, 143, .35); }
.raffle-title { font-size: clamp(32px, 8vw, 58px); line-height: .95; font-weight: 950; text-align: center; text-transform: uppercase; margin: 0; color: var(--color-navy); }
.raffle-subtitle { display: block; width: fit-content; max-width: 100%; margin: 14px auto 20px; padding: 9px 22px; border-radius: 999px; font-weight: 800; text-align: center; font-size: 14px; background: linear-gradient(135deg, #FF2D8F, #00C9FF); color: #fff;}
.raffle-hero { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
@media (min-width: 560px) { .raffle-hero { grid-template-columns: .9fr 1.1fr; align-items: center; } }
.prize-photo-box { min-height: 170px; border-radius: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; background: #F8FAFF; border: 2px dashed #C9CEDD; }
.prize-photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 170px; }
.prize-photo-placeholder { text-align: center; opacity: .65; font-weight: 800; color: var(--color-navy);}
.prize-photo-placeholder i { display: block; font-size: 44px; margin-bottom: 8px; }
.prize-name-panel { border-radius: 24px; padding: 18px; text-align: center; background: #FFFFFF; border: 1px solid #E6E8EF; }
.prize-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; font-size: 12px; font-weight: 900; text-transform: uppercase; margin-bottom: 10px; background: linear-gradient(135deg, #582CFF, #00C9FF); color: #fff; }
.prize-name { font-size: clamp(24px, 6vw, 38px); line-height: 1; font-weight: 950; text-transform: uppercase; margin: 0; color: var(--color-navy);}
.value-pill { margin-top: 14px; border-radius: 999px; padding: 12px 16px; font-size: 14px; font-weight: 800; background: #fff; border: 2px solid #E6E8EF; color: var(--color-navy); }
.value-pill strong { font-size: 24px; margin-left: 5px; color: var(--color-cyan); }

.numbers-board { border-radius: 26px; padding: 12px; margin-top: 16px; background: #fff; border: 1px solid #E6E8EF;}
.numbers-board-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 900; font-size: 13px; text-transform: uppercase; background: var(--color-navy); color: #fff; border-radius: 18px; padding: 12px; }
.numbers-count-badge { padding: 8px 10px; border-radius: 999px; font-size: 11px; white-space: nowrap; background: var(--color-cyan); color: #fff;}
.numbers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)); gap: 8px; justify-content: center; }
.number-box { width: 100%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 800; font-size: 14px; cursor: pointer; transition: all .2s ease; user-select: none; position: relative; overflow: hidden; background: #F8FAFF; border: 1px solid #CAD0E1; color: var(--color-navy);}
.number-box:hover:not(.paid):not(.reserved) { transform: scale(1.05); }
.number-box.selected { background: #AEB4C4 !important; color: #fff !important; border-color: #7A8194 !important; transform: scale(1.04); }
.number-box.reserved { background: var(--color-gold) !important; color: #fff !important; border-color: var(--color-gold) !important; cursor: not-allowed; opacity: .9; }
.number-box.paid { color: transparent !important; cursor: not-allowed; background: #E6E8EF !important;}
.number-box.paid::after { content: '\f00d'; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #dc3545; }

.draw-footer { margin-top: 14px; border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-align: center; font-weight: 900; background: linear-gradient(135deg, #582CFF, #00C9FF); color: #fff; }
@media (min-width: 560px) { .draw-footer { flex-direction: row; align-items: center; justify-content: space-around; } }
.checkout-card { background: #fff; border-radius: 24px; padding: 25px; box-shadow: var(--shadow-soft); margin-top: 18px; }
.floating-checkout { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; padding: 15px 20px; box-shadow: 0 -4px 20px rgba(0,0,0,.1); border-top-left-radius: 24px; border-top-right-radius: 24px; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transform: translateY(100%); transition: transform .3s ease; }
.floating-checkout.show { transform: translateY(0); }