*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Arial, Helvetica, sans-serif;
}

html{
background:#0b1020;
}

body{
background:#0b1020;
color:#f8fafc;
min-height:100vh;
min-height:100dvh;
padding-bottom:env(safe-area-inset-bottom);
-webkit-tap-highlight-color:transparent;
}

.topbar{
padding:20px;
background:#111827;
border-bottom:1px solid #263245;
display:flex;
justify-content:space-between;
align-items:center;
gap:16px;
}

.topbar h1{
font-size:26px;
line-height:1.2;
}

.topbar p{
margin-top:6px;
color:#a7b3c5;
}

.account-pill{
display:flex;
align-items:center;
gap:10px;
color:#cbd5e1;
font-size:13px;
min-width:0;
}

.account-pill span{
max-width:260px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

button.small{
min-height:36px;
min-width:72px;
padding:8px 10px;
font-size:13px;
}

.auth-gate{
display:none;
padding:20px;
background:#0b1020;
border-bottom:1px solid #1f2a3d;
}

.auth-locked .auth-gate{
display:grid;
place-items:center;
min-height:calc(100dvh - 96px);
}

.auth-locked .filters,
.auth-locked .status-panel,
.auth-locked .live-section,
.auth-locked .dashboard{
display:none;
}

.auth-card{
width:min(440px, 100%);
background:#111827;
border:1px solid #22304a;
border-radius:8px;
padding:18px;
display:grid;
gap:16px;
}

.auth-card-head{
display:grid;
gap:6px;
}

.auth-card h2{
font-size:20px;
line-height:1.2;
}

#authMessage{
min-height:18px;
color:#93c5fd;
font-size:13px;
line-height:1.35;
}

#authForm,
.payment-panel{
display:grid;
gap:10px;
}

#authForm[hidden],
.payment-panel[hidden]{
display:none;
}

#authPasswordHint{
min-height:16px;
color:#94a3b8;
font-size:12px;
}

.payment-panel p{
color:#cbd5e1;
font-size:14px;
line-height:1.4;
}

.filters{
display:flex;
gap:15px;
padding:18px 20px;
background:#111827;
flex-wrap:wrap;
align-items:end;
}

.filter-box{
display:flex;
flex-direction:column;
gap:6px;
min-width:220px;
}

.filter-box.wide{
flex:1 1 360px;
}

label{
font-size:13px;
color:#cbd5e1;
}

input,
select,
button{
min-height:44px;
padding:10px 12px;
border:1px solid #334155;
border-radius:8px;
font-size:14px;
touch-action:manipulation;
}

input,
select{
background:#f8fafc;
color:#0f172a;
}

select{
min-width:220px;
}

.filter-box.wide select{
min-width:min(520px, calc(100vw - 40px));
}

button{
background:#13a85b;
color:white;
font-weight:bold;
cursor:pointer;
min-width:120px;
}

button.secondary{
background:#1e293b;
border-color:#3b4b65;
color:#dbeafe;
}

button.danger{
background:#991b1b;
border-color:#ef4444;
}

button:disabled{
opacity:.65;
cursor:wait;
}

.pix-panel{
display:grid;
gap:10px;
padding:12px;
border:1px solid #334155;
border-radius:8px;
background:#0f172a;
}

.pix-panel[hidden]{
display:none;
}

.pix-qr-wrap{
display:grid;
place-items:center;
padding:12px;
border-radius:8px;
background:#fff;
}

.pix-qr-code{
display:block;
width:min(260px, 100%);
height:auto;
}

.pix-status{
display:none;
padding:10px 12px;
border:1px solid #13a85b;
border-radius:8px;
background:#102019;
color:#86efac;
font-size:14px;
line-height:1.35;
}

.pix-status.visible{
display:block;
}

.pix-status.error{
border-color:#ef4444;
background:#2b1820;
color:#fecdd3;
}

.pix-line{
display:grid;
gap:4px;
padding-bottom:8px;
border-bottom:1px solid #22304a;
}

.pix-line span{
font-size:12px;
color:#94a3b8;
}

.pix-line strong{
font-size:14px;
line-height:1.35;
word-break:break-word;
}

.admin-panel{
display:none;
padding:20px;
background:#0b1020;
}

.admin-open .admin-panel{
display:block;
min-height:calc(100dvh - 96px);
}

.admin-open .auth-gate,
.admin-open .filters,
.admin-open .status-panel,
.admin-open .live-section,
.admin-open .dashboard{
display:none;
}

.admin-shell{
display:grid;
gap:16px;
}

.admin-heading{
display:flex;
justify-content:space-between;
gap:16px;
align-items:flex-start;
}

.admin-heading h2{
font-size:22px;
line-height:1.2;
}

.admin-heading p,
.admin-message{
margin-top:4px;
font-size:13px;
color:#a7b3c5;
}

.admin-login{
width:min(420px, 100%);
display:grid;
gap:10px;
padding:16px;
border:1px solid #22304a;
border-radius:8px;
background:#111827;
}

.admin-login[hidden],
#adminDashboard[hidden]{
display:none;
}

#adminDashboard{
display:grid;
gap:12px;
}

.admin-actions{
display:flex;
gap:10px;
flex-wrap:wrap;
}

.admin-table{
width:100%;
border-collapse:collapse;
min-width:760px;
}

.admin-table th,
.admin-table td{
padding:12px;
border-bottom:1px solid #22304a;
text-align:left;
font-size:14px;
vertical-align:top;
}

.admin-table th{
background:#0f172a;
color:#cbd5e1;
font-size:12px;
text-transform:uppercase;
letter-spacing:.04em;
}

.status-badge{
display:inline-flex;
align-items:center;
padding:5px 8px;
border-radius:999px;
font-size:12px;
font-weight:bold;
white-space:nowrap;
}

.status-badge.ok{
background:#102019;
border:1px solid #13a85b;
color:#86efac;
}

.status-badge.blocked{
background:#2b1820;
border:1px solid #ef4444;
color:#fecdd3;
}

.status-panel{
display:grid;
gap:8px;
padding:14px 20px;
background:#0f172a;
border-top:1px solid #1f2a3d;
border-bottom:1px solid #1f2a3d;
color:#dbeafe;
}

#analysisInfo{
display:flex;
gap:8px;
flex-wrap:wrap;
align-items:center;
}

#analysisInfo > span{
background:#1e293b;
border:1px solid #334155;
border-radius:999px;
padding:6px 10px;
font-size:12px;
color:#d1d5db;
}

#analysisInfo .matchup-card{
flex:1 1 100%;
}

#selectedMatchup:empty{
display:none;
}

#selectedMatchup .matchup{
padding:10px 12px;
border:1px solid #334155;
border-radius:8px;
background:#111827;
justify-content:center;
}

.matchup{
display:flex;
align-items:center;
gap:10px;
min-width:0;
}

.matchup-card .matchup{
padding:10px 12px;
border:1px solid #334155;
border-radius:8px;
background:#111827;
justify-content:center;
}

.team-badge{
display:inline-flex;
align-items:center;
gap:8px;
min-width:0;
max-width:100%;
position:relative;
}

.team-logo-fallback,
.team-badge img{
width:28px;
height:28px;
flex:0 0 auto;
}

.team-logo-fallback{
display:inline-flex;
align-items:center;
justify-content:center;
color:#dbeafe;
font-size:10px;
font-weight:bold;
line-height:1;
display:none;
}

.team-logo-fallback.visible{
display:inline-flex;
}

.team-badge img{
object-fit:contain;
filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));
position:relative;
z-index:1;
}

.team-badge span{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.matchup-versus{
color:#94a3b8;
font-size:12px;
font-weight:bold;
text-transform:uppercase;
flex:0 0 auto;
}

.matchup.compact{
gap:8px;
}

.matchup.compact .team-badge{
max-width:180px;
}

.matchup.compact .team-badge img{
width:24px;
height:24px;
}

.matchup.compact .team-logo-fallback{
width:24px;
height:24px;
}

.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
gap:16px;
padding:20px;
}

.live-section{
padding:20px;
background:#0b1020;
border-bottom:1px solid #1f2a3d;
}

.section-heading{
display:flex;
justify-content:space-between;
gap:16px;
align-items:end;
margin-bottom:12px;
}

.section-heading h2{
font-size:20px;
line-height:1.2;
}

.section-heading p{
margin-top:4px;
font-size:13px;
color:#a7b3c5;
}

#liveCount{
background:#102019;
border:1px solid #13a85b;
border-radius:999px;
padding:6px 10px;
font-size:12px;
color:#86efac;
white-space:nowrap;
}

.table-wrap{
overflow:auto;
border:1px solid #22304a;
border-radius:8px;
background:#111827;
}

.live-table{
width:100%;
border-collapse:collapse;
min-width:720px;
}

.live-table th,
.live-table td{
padding:12px;
border-bottom:1px solid #22304a;
text-align:left;
font-size:14px;
}

.live-table th{
background:#0f172a;
color:#cbd5e1;
font-size:12px;
text-transform:uppercase;
letter-spacing:.04em;
}

.live-table tbody tr{
cursor:pointer;
transition:background .15s ease;
}

.live-table tbody tr:hover,
.live-table tbody tr.selected{
background:#1e293b;
}

.live-table tbody tr.empty-row{
cursor:default;
}

.live-table tbody tr.empty-row:hover{
background:transparent;
}

.score{
font-weight:bold;
color:#86efac;
white-space:nowrap;
}

.muted{
color:#94a3b8;
font-size:12px;
}

.card{
background:#111827;
border:1px solid #22304a;
padding:16px;
border-radius:8px;
min-height:180px;
}

.card.featured{
border-color:#13a85b;
background:#102019;
}

.momentum-card{
grid-column:span 2;
}

.card h2{
font-size:17px;
margin-bottom:12px;
}

.market-row{
background:#1e293b;
padding:12px;
border-radius:8px;
margin-bottom:10px;
display:grid;
grid-template-columns:1fr auto;
gap:4px 12px;
align-items:center;
}

.market-row strong{
font-size:18px;
color:#86efac;
}

.market-row small{
grid-column:1 / -1;
color:#a7b3c5;
font-size:12px;
line-height:1.35;
}

.advice-row{
border-left:4px solid #13a85b;
}

.advice-row.watch{
border-left-color:#f59e0b;
}

.advice-row.avoid{
border-left-color:#64748b;
}

.advice-minute{
display:inline-flex;
align-items:center;
margin-left:8px;
padding:3px 7px;
border-radius:999px;
background:#0f172a;
border:1px solid #334155;
color:#dbeafe;
font-size:11px;
font-style:normal;
font-weight:bold;
white-space:nowrap;
}

.momentum{
display:grid;
gap:10px;
}

.momentum-labels{
display:flex;
justify-content:space-between;
gap:12px;
color:#cbd5e1;
font-size:13px;
}

.home-dot::before,
.away-dot::before{
content:"";
display:inline-block;
width:9px;
height:9px;
border-radius:50%;
margin-right:6px;
vertical-align:middle;
}

.home-dot::before{
background:#22c55e;
}

.away-dot::before{
background:#f43f5e;
}

.momentum-help{
display:flex;
flex-wrap:wrap;
gap:8px;
color:#a7b3c5;
font-size:12px;
line-height:1.35;
}

.momentum-help span{
background:#0f172a;
border:1px solid #22304a;
border-radius:999px;
padding:5px 8px;
}

.momentum-bars{
display:grid;
grid-template-columns:repeat(12, minmax(16px, 1fr));
gap:6px;
align-items:stretch;
min-height:190px;
padding:12px 8px;
border-radius:8px;
background:#0f172a;
border:1px solid #22304a;
}

.momentum-slot{
min-height:166px;
display:grid;
grid-template-rows:1fr 24px 2px 1fr;
gap:3px;
align-items:stretch;
position:relative;
}

.momentum-side{
display:flex;
flex-direction:column;
justify-content:flex-end;
min-height:56px;
}

.momentum-side.bottom{
justify-content:flex-start;
}

.momentum-up,
.momentum-down{
width:100%;
border-radius:4px;
min-height:4px;
}

.momentum-up{
background:linear-gradient(180deg,#86efac,#13a85b);
}

.momentum-down{
background:linear-gradient(180deg,#fb7185,#ef4444);
}

.momentum-empty{
height:4px;
border-radius:4px;
background:#334155;
}

.momentum-line{
height:2px;
background:#cbd5e1;
opacity:.65;
border-radius:999px;
}

.momentum-event-row{
display:flex;
align-items:center;
justify-content:center;
gap:2px;
min-height:24px;
}

.momentum-event{
display:inline-flex;
align-items:center;
justify-content:center;
min-width:20px;
height:20px;
padding:0 4px;
border-radius:999px;
background:#f8fafc;
color:#0f172a;
font-size:11px;
font-weight:bold;
line-height:1;
box-shadow:0 2px 6px rgba(0,0,0,.25);
}

.momentum-event.home{
border:2px solid #22c55e;
}

.momentum-event.away{
border:2px solid #f43f5e;
}

.momentum-times{
display:grid;
grid-template-columns:repeat(12, minmax(16px, 1fr));
gap:6px;
font-size:11px;
color:#94a3b8;
text-align:center;
}

@media (max-width: 640px){
body{
font-size:15px;
}

.filters,
.status-panel,
.dashboard,
.live-section,
.admin-panel{
padding-left:12px;
padding-right:12px;
}

.filter-box,
button,
select{
width:100%;
min-width:0;
}

.topbar{
padding:calc(14px + env(safe-area-inset-top)) 12px 14px;
align-items:flex-start;
flex-direction:column;
}

.topbar h1{
font-size:22px;
}

.topbar p{
font-size:14px;
line-height:1.35;
}

.filters{
gap:10px;
padding-top:12px;
padding-bottom:12px;
}

input,
select,
button{
min-height:52px;
font-size:16px;
}

button{
width:100%;
}

.account-pill{
width:100%;
justify-content:space-between;
flex-wrap:wrap;
}

.admin-heading,
.admin-actions{
flex-direction:column;
}

.section-heading{
align-items:flex-start;
flex-direction:column;
gap:10px;
}

.live-table{
min-width:620px;
}

.live-table th,
.live-table td{
padding:11px 10px;
}

.card{
min-height:auto;
padding:14px;
}

.dashboard{
gap:12px;
}

.market-row{
grid-template-columns:1fr;
gap:6px;
}

.market-row strong{
font-size:17px;
}

#selectedMatchup .matchup{
justify-content:flex-start;
overflow:hidden;
}

.matchup:not(.compact){
gap:8px;
}

.team-badge{
flex:1 1 0;
}

.team-badge span:last-child{
min-width:0;
}

.momentum-card{
grid-column:auto;
}

.momentum-bars,
.momentum-times{
grid-template-columns:repeat(6, minmax(28px, 1fr));
}

.momentum-slot{
min-height:142px;
}

.momentum-help span{
border-radius:8px;
}
}
