/* Shared customer presentation. Admin assets and sales rules are independent. */
:root{--client-bg:#222c36;--client-panel:#161d23;--client-line:#34434e;--client-text:#f4f6f8;--client-muted:#b6c2cd;--client-green:#168650}
body.client-secondary{background:var(--client-bg)!important;color:var(--client-text);font-family:Montserrat,Arial,sans-serif}
.client-secondary .black-bar{display:none!important}
.client-secondary .app-main{max-width:600px!important;padding:22px 12px!important;background:var(--client-bg)!important;border-radius:20px 20px 0 0;color:var(--client-text)}
.client-secondary :is(.app-title h1,.app-title h2){font-size:20px;font-weight:650;line-height:1.3;color:var(--client-text)}
.client-secondary .app-title :is(p,.app-title-desc){font-size:12px;color:var(--client-muted);margin:5px 0 0}
.client-secondary .app-title{display:block}
.client-secondary :is(.app-card,.client-empty,.client-order){background:var(--client-panel)!important;border:1px solid var(--client-line)!important;border-radius:16px!important;color:var(--client-text)!important;box-shadow:0 8px 25px #00000012}
.client-secondary .card-body{padding:20px}
.client-secondary .app-main :is(.text-dark,.text-black){color:var(--client-text)!important}
.client-secondary .text-muted{color:var(--client-muted)!important}
.client-secondary :is(.form-control,.form-select){background:#202b34!important;border:1px solid #42525f!important;color:var(--client-text)!important;border-radius:10px;min-height:46px;font-size:14px}
.client-secondary :is(input,textarea)::placeholder{color:#a9b6c2;opacity:1}
.client-secondary :is(input,select,textarea):focus{border-color:#55ce91!important;box-shadow:0 0 0 3px #3bd98a26!important}
.client-secondary :is(.form-label,label){font-size:12px;font-weight:600;color:var(--client-text)}
.client-secondary :is(.btn-success,.btn-warning,.app-main .btn-secondary,.app-main .btn-primary){background:var(--client-green)!important;border:1px solid var(--client-green)!important;color:white!important;min-height:44px;border-radius:10px;font-size:13px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.client-login-link{background:none;border:0;padding:10px 0;color:#85dfb0;font-size:12px;text-decoration:underline;text-underline-offset:4px}
.client-secondary .btn-outline-light{border-color:#4e616e;color:var(--client-text);border-radius:10px;min-height:44px;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.client-secondary .btn-outline-light:hover{background:#293a45;color:white}
.client-secondary :is(.form-floating>label){color:var(--client-muted)}
.client-secondary :is(.alert-warning,.alert-primary){background:#25362e;border:1px solid #3c6450;color:#d3f5e2;border-radius:12px}
.client-secondary .app-footer{color:var(--client-muted);font-size:11px}
.client-secondary .app-footer :is(a,span){color:inherit}
.client-secondary .app-footer .badge.bg-light{color:#17242f!important}
.client-secondary input[type=file]::file-selector-button{background:#173f2c;color:#ddffed;border:0;padding:10px 12px;margin-right:10px}
.client-secondary .app-form input[type=file]{width:100%;max-width:100%;min-width:0;font-size:12px}
.client-secondary .perfil>div:has(>#customFile){width:100%;max-width:100%;min-width:0}
.client-page-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.client-page-heading .app-title{min-width:0}
.client-page-heading .btn{flex-shrink:0}
.client-empty{padding:32px 22px;text-align:center}
.client-empty-icon{display:inline-grid;place-items:center;width:60px;height:60px;background:#153e2c;border-radius:18px;color:#61dea0;font-size:28px;margin-bottom:18px}
.client-empty h2{font-size:20px;font-weight:650;line-height:1.3;margin-bottom:10px}
.client-empty p{font-size:13px;line-height:1.7;color:var(--client-muted);max-width:350px;margin:0 auto 20px}
.client-empty small{display:block;color:var(--client-muted);font-size:11px;margin-top:14px}
.client-order{padding:18px;margin-bottom:12px}
.client-order-summary{display:flex;gap:12px;align-items:center}
.client-order-summary img{border-radius:12px;object-fit:cover;flex-shrink:0}
.client-order-summary>div{min-width:0}
.client-order h2{font-size:15px;margin:7px 0 4px;overflow-wrap:anywhere;font-weight:650}
.client-order time{font-size:11px;color:var(--client-muted)}
.client-status{display:inline-block;border-radius:6px;padding:4px 7px;font-size:10px;background:#3d3320;color:#ffe2a4}
.client-status[data-status="2"]{background:#173f2c;color:#8ce8b2}
.client-status[data-status="3"]{background:#422c31;color:#ffb7c1}
.client-order-meta{display:flex;align-items:center;justify-content:space-between;margin:17px 0;padding-top:12px;border-top:1px solid var(--client-line);font-size:12px;color:var(--client-muted)}
.client-order-meta strong{color:var(--client-text);font-size:16px}
.client-number-preview{margin:0 0 15px;font-size:12px;color:#d4e5f0}.client-number-preview summary{cursor:pointer;padding:10px;border:1px solid #34434e;border-radius:8px}.client-number-preview>div{max-height:220px;overflow:auto;padding-top:8px}.client-number-preview small{color:#b6c2cd;display:block;margin:8px 0}
.client-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;font-size:12px}
/* Existing login/registration/search forms keep their IDs, fields and handlers. */
body :is(#loginModal,#cadastroModal,#modal-buscar) .modal-content{background:#161d23!important;color:#f4f6f8!important;border:1px solid #34434e!important;border-radius:18px!important;box-shadow:0 25px 80px #0007}
body :is(#loginModal,#cadastroModal,#modal-buscar) .modal-dialog{max-width:420px;margin-left:auto;margin-right:auto;padding:12px}
body :is(#loginModal,#cadastroModal,#modal-buscar) .modal-header{padding:22px 22px 14px;border-color:#34434e}
body :is(#loginModal,#cadastroModal,#modal-buscar) .modal-title{font-size:20px;font-weight:650}
body :is(#loginModal,#cadastroModal,#modal-buscar) .modal-body{padding:22px}
body :is(#loginModal,#cadastroModal,#modal-buscar) .form-control{background:#202b34!important;border:1px solid #42525f!important;color:#f4f6f8!important;border-radius:10px;min-height:46px;font-size:14px}
body :is(#loginModal,#cadastroModal,#modal-buscar) :is(label,.form-label){color:#e8eef4}
body :is(#loginModal,#cadastroModal,#modal-buscar) .text-muted{color:#b6c2cd!important}
body :is(#loginModal,#cadastroModal,#modal-buscar) .btn-close{filter:invert(1);opacity:.8}
body :is(#loginModal,#cadastroModal,#modal-buscar) .btn-warning{background:#168650!important;border-color:#168650!important;color:white!important;border-radius:10px!important;min-height:46px}
.client-feedback{display:block;font-size:12px;line-height:1.5;color:#b9e9d0;margin:10px 0;overflow-wrap:anywhere}
.client-feedback:empty{display:none}
#modal-buscar .modal-body>button[type=submit]{margin-top:16px}
#modal-buscar .client-feedback:not(:empty)+button[type=submit]{margin-top:4px}
@media(max-width:640px){
 body.client-secondary .form-control,body :is(#loginModal,#cadastroModal,#modal-buscar) .form-control{font-size:16px!important;min-width:0}
 body :is(#loginModal,#cadastroModal,#modal-buscar){overscroll-behavior:contain}
}
.client-menu-login{display:flex;align-items:center;gap:12px;width:100%;padding:13px 14px;background:#173f2c;border:1px solid #286a49;border-radius:10px;color:#e7fff1;font:inherit;font-size:13px;text-align:left}
.client-feedback[data-error]{color:#ffb9c0}
.client-order-detail .app-alerta-msg{background:var(--client-panel);border:1px solid var(--client-line);border-radius:14px;padding:18px;display:flex;gap:12px;align-items:center}
.client-order-detail .app-alerta-msg--titulo{font-size:18px!important;color:var(--client-text);margin:0 0 4px}
.client-order-detail .app-alerta-msg p{font-size:12px;color:var(--client-muted);margin:0}
.client-order-detail .app-card-winner{background:#153e2c!important;color:#ddf7e8!important;border:1px solid #34644b;border-radius:14px}
.client-order-detail #tempo-restante{font-variant-numeric:tabular-nums;font-size:22px!important}
.client-order-detail #pixCopiaCola{min-width:0;font-family:monospace;font-size:12px}
.client-order-detail .input-group{flex-wrap:wrap;gap:6px}
.client-order-detail .input-group>.form-control{flex:1 1 150px}
.client-order-detail #pix-copy-feedback{flex-basis:100%}
.client-order-detail .btn-qr{background:#273944!important;color:#f4f6f8!important;border:1px solid #4a606d!important;border-radius:10px;padding:12px 16px;max-width:100%}
.client-order-detail .page-link{background:#202b34;color:#ecf5fa;border-color:#42525f;border-radius:7px;margin:0 2px}
.client-order-detail .page-item.active .page-link{background:#168650;border-color:#168650}
.client-order-detail .item{overflow-wrap:anywhere;min-width:0}
.client-order-detail .SorteioTpl_sorteioTpl__2s2Wu{background:var(--client-panel)!important;color:var(--client-text)!important;border:1px solid var(--client-line);border-radius:12px}.client-order-detail .SorteioTpl_sorteioTpl__2s2Wu a{color:var(--client-text)!important}
.client-order-detail .progress{height:8px;border-radius:10px}
.client-order-detail #img-qrcode{padding:10px;background:white!important}
.client-order-detail #img-qrcode img{max-width:100%;height:auto!important}
.client-secondary .client-order-detail .detalhes{color:var(--client-text)!important}
/* Keep the read-only details card consistent with the shared customer theme. */
body.client-secondary .client-order-detail .detalhes.app-card{background:var(--client-panel)!important;color:var(--client-text)!important;border-color:var(--client-line)!important}
body.client-secondary .client-order-detail .detalhes :is(.opacity-75,.opacity-50){opacity:1!important}
body.client-secondary .client-order-detail .detalhes .border-bottom-rgba{border-color:var(--client-line)!important}
body.client-secondary .client-order-detail .detalhes .pt-1.opacity-50{color:var(--client-muted)!important;overflow-wrap:anywhere;line-height:1.6}
.client-secondary .client-order-detail .bg-white{color:#17242f}
@media(max-width:575px){body :is(#loginModal,#cadastroModal) .modal-dialog{width:100%;height:auto;min-height:100%;display:flex;align-items:center}.client-page-heading h1{font-size:18px!important}.client-page-heading .btn{padding:9px 12px}.client-order-detail .card-body{padding:15px}.client-order-detail #exibeqr>.col-6{width:100%}.client-order-detail #exibeqr h5{text-align:center}.client-order-detail .pagination{flex-wrap:wrap;gap:4px}}

body.client-secondary .header-app-header{position:sticky!important;top:0;height:70px!important;z-index:1030;background:#000!important}
body.client-secondary .header-app-header-container{background:#000!important;height:70px!important}
body.client-secondary .header-app-header-container>.container{max-width:600px!important;padding:0 12px!important;height:70px}
body.client-secondary .header-app-header-container>.container>div{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0!important;text-align-last:initial!important}
body.client-secondary .header-app-brand{width:auto!important;height:auto!important;max-width:150px!important;max-height:55px!important;object-fit:contain}
body.client-secondary #mobileMenu .modal-content{background:#161d23!important;color:#eef4f8;border:0}
body.client-secondary #mobileMenu .app-header{background:#000!important;border-bottom:1px solid #34414d}
body.client-secondary #mobileMenu .modal-body>.container{padding:18px 12px!important;max-width:600px}
body.client-secondary #mobileMenu .nav-vertical ul{margin:0;padding:0;list-style:none;display:grid;gap:4px}
body.client-secondary #mobileMenu .nav-vertical li a{display:flex;align-items:center;gap:12px;padding:13px 14px!important;border:1px solid #ffffff0c;border-radius:10px;background:#202d37;color:#e7eff6!important;font-size:13px;text-decoration:none}
body.client-secondary #mobileMenu .nav-vertical li a:hover{background:#2c3c48}.home-menu-label{font-size:10px;text-transform:uppercase;letter-spacing:1.3px;color:#a8becd;margin:0 0 10px}
body.client-secondary #mobileMenu:not(:has(.card-usuario)) a[href*="logout?"]{display:none!important}
.client-secondary .client-shortcuts{background:#000;padding:8px 12px 20px}.client-shortcuts>div{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-width:576px;margin:auto}.client-shortcuts a{padding:12px;text-align:center;color:#f4f6f8;border:1px solid #34434e;border-radius:10px;font-size:12px;text-decoration:none}.client-secondary .campanhas-listagem .SorteioTpl_sorteioTpl__2s2Wu{background:#161d23!important;border:1px solid #34434e;border-radius:12px;color:#f4f6f8!important}.client-secondary .campanhas-listagem a{color:inherit}.client-secondary .btn-group a{color:#e2edf4!important;text-decoration:none}

/* Compact shared authentication: 44px fields retain comfortable touch targets. */
body :is(#loginModal,#cadastroModal) .modal-dialog{width:calc(100% - 24px)!important;max-width:390px!important;padding:0!important;margin:12px auto!important;min-height:calc(100% - 24px)!important;display:flex;align-items:center}
body :is(#loginModal,#cadastroModal) .modal-content{border-radius:16px!important;overflow:hidden;border-color:#3d554b!important}
body :is(#loginModal,#cadastroModal) .modal-header{padding:14px 16px!important;background:linear-gradient(120deg,#183c2d,#161d23);border-bottom:1px solid #345044}
body :is(#loginModal,#cadastroModal) .modal-title{font-size:18px!important;line-height:24px}
body :is(#loginModal,#cadastroModal) .modal-body{padding:16px!important}
body :is(#loginModal,#cadastroModal) .modal-body>p{font-size:12px!important;line-height:18px;margin-bottom:14px}
body :is(#loginModal,#cadastroModal,#form-cadastrar:has([name=rpassword])) .form-control{height:44px!important;min-height:44px!important;font-size:16px!important;padding:9px 11px!important;margin-bottom:0!important;border-radius:9px!important;line-height:24px!important}
body :is(#loginModal,#cadastroModal,#form-cadastrar:has([name=rpassword])) .form-label{display:block;font-size:12px!important;line-height:16px;margin-bottom:4px!important;font-weight:600}
body :is(#loginModal,#cadastroModal,#form-cadastrar:has([name=rpassword])) .mb-2{margin-bottom:12px!important}
body #loginModal .modal-body>.btn-link{display:block;text-align:right;padding:0!important;margin:0 0 12px!important;font-size:12px}
body #loginModal .modal-body>.btn-link a{display:inline-flex;min-height:32px;align-items:center}
body #loginModal [type=submit]{width:100%;min-height:44px!important;border-radius:9px!important;margin-bottom:8px!important}
body #loginModal .modal-body>.d-flex>.btn-link{padding:4px!important;font-size:12px}
body #form-cadastrar:has([name=rpassword]) .card-body{padding:16px!important}
body #form-cadastrar:has([name=rpassword]) .perfil{border-top:2px solid #397e5a!important}
body :is(#cadastroModal,#form-cadastrar:has([name=rpassword])) p.text-muted{font-size:11px!important;line-height:16px;margin:6px 0 10px!important}
body .client-registration-heading h1{font-size:19px!important;line-height:25px}
body .client-registration-heading p{font-size:12px;line-height:18px}
body .client-registration-heading .client-login-link{padding:5px 0;font-size:12px}
body .account-password-field{position:relative;min-width:0;width:100%}
body .account-password-field>.form-control{padding-right:76px!important;margin-bottom:0!important}
body :is(#loginModal,#cadastroModal,#form-cadastrar:has([name=rpassword])) .account-password-field>.form-control{padding-right:76px!important}
body .account-password-toggle{position:absolute;right:1px;top:1px;bottom:1px;min-width:66px;min-height:42px;padding:0 9px;border:0;border-radius:0 8px 8px 0;background:transparent;color:#98e1ba;font:inherit;font-size:11px;font-weight:600;cursor:pointer}
body .account-password-toggle:focus-visible{outline:2px solid #8af3b5;outline-offset:-3px}
@media(max-height:560px){body :is(#loginModal,#cadastroModal) .modal-dialog{align-items:flex-start}}
/* Shared image/caption framing for older detail templates, without action changes. */
body:has(.campanha-header):not(:has(.campaign-public)){background:var(--client-bg)!important;color:var(--client-text)}
body:has(.campanha-header):not(:has(.campaign-public)) .black-bar{display:none!important}
body:has(.campanha-header):not(:has(.campaign-public)) .header-app-header{position:sticky!important;top:0;height:70px!important;background:#000!important;z-index:1030}
body:has(.campanha-header):not(:has(.campaign-public)) .header-app-header-container{height:70px!important;background:#000!important}
body:has(.campanha-header):not(:has(.campaign-public)) .header-app-header-container>.container{max-width:600px!important;height:70px;padding:0 12px!important}
body:has(.campanha-header):not(:has(.campaign-public)) .header-app-header-container>.container>div{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0!important;text-align-last:initial!important}
body:has(.campanha-header):not(:has(.campaign-public)) .header-app-brand{width:auto!important;height:auto!important;max-width:150px!important;max-height:55px!important;object-fit:contain}
body:has(.campanha-header):not(:has(.campaign-public)) .app-main{margin:0 auto!important;padding:0 12px 20px!important;background:var(--client-bg)!important;border-radius:0!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .custom-highlight-card{height:auto!important;min-height:0!important;aspect-ratio:auto!important;display:flex!important;flex-direction:column!important;background:var(--client-panel)!important;overflow:hidden}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .SorteioTpl_imagemContainer__2-pl4{order:0;position:relative!important;flex:0 0 auto!important;width:100%!important;height:auto!important;margin:0!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header :is(.carousel,.carousel-inner,.carousel-item){height:auto!important;min-height:0!important;aspect-ratio:auto!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .carousel-item img{position:static!important;display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-width:100%!important;object-fit:contain!important;margin:0!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .custom-badge-display{order:1;position:static!important;width:auto!important;margin:10px 12px 0!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .custom-content-wrapper{order:2;position:static!important;inset:auto!important;min-height:0!important;width:100%!important;margin:0!important;padding:8px 12px 12px!important;background:var(--client-panel)!important}
body:has(.campanha-header):not(:has(.campaign-public)) .custom-content-wrapper h1{font-size:16px!important;line-height:22px!important;margin:0 0 3px!important;color:var(--client-text)!important;overflow-wrap:anywhere}
body:has(.campanha-header):not(:has(.campaign-public)) .custom-content-wrapper p{font-size:12px!important;line-height:18px!important;margin:0!important;color:var(--client-muted)!important;overflow-wrap:anywhere}
body:has(.campanha-header):not(:has(.campaign-public)) .custom-badge-display .badge{animation:none!important;opacity:1!important;background:#234334!important;color:#e4f4eb!important;font-size:10px!important;line-height:14px!important;border-radius:6px;padding:3px 6px}
/* Match the horizontal 1200 x 720 artwork frame across shared detail templates. */
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .SorteioTpl_imagemContainer__2-pl4{background:#10171d!important}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header :is(.carousel,.carousel-inner,.carousel-item){width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:5/3!important;overflow:hidden}
body:has(.campanha-header):not(:has(.campaign-public)) .campanha-header .carousel-item img{width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:5/3!important;margin:0!important;object-fit:cover!important;object-position:center!important}
/* A closed sticky panel must not reserve an invisible row before the footer. */
body:has(.campanha-header):not(:has(.campaign-public)) .sorteio-numeros-selecionados:not(.sorteio-numeros-selecionados-open){height:0!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;overflow:hidden}
/* Restore motion only for the status labels that blinked in the original template. */
@keyframes rifa-existing-status-pulse{0%,100%{filter:brightness(1);box-shadow:0 0 0 0 #24825600}50%{filter:brightness(.78);box-shadow:0 0 0 3px #24825638}}
body .campanha-header .custom-badge-display .badge.blink,body .home-public .home-state:is([data-status="1"],[data-status="2"]){animation:rifa-existing-status-pulse 1.6s ease-in-out infinite!important}
@media(prefers-reduced-motion:reduce){body .campanha-header .custom-badge-display .badge.blink,body .home-public .home-state:is([data-status="1"],[data-status="2"]){animation:none!important}}
