/* Accessible surfaces, shared by the application and administration. */
[data-theme="light"] { --text-primary:#142c40; --text-secondary:#304b60; --text-muted:#506778; --bg-card:#fff; }
[data-theme="light"] :is(.top5-player-card,.top5-pos-column,.top5-toolbar,.side-card,.cartola-profile-card-container,.standings-table-card,.standings-legend-card,.modal-content,.scout-modal-content,.custom-modal-card,.duvidas-category-group,.duvidas-dispute-card,.tracking-round,.market-player-card,.form-input,.form-select){background:#fff!important;border-color:#c8d6df!important;color:#183247!important;box-shadow:0 6px 22px #16334c10!important}
[data-theme="light"] :is(.top5-col-title,.top5-player-name,.top5-price-sub,.top5-stat-chip,.top5-stat-chip strong,.cartola-profile-team-name,.cartola-profile-stat-value,.standings-pos-num,.standings-team-name,.standings-pts-cell,.side-card-title,.scout-pill-val,.scout-pill-name,.round-stat-score,.tracking-round span,.market-player-name,.market-stat-val){color:#163247!important}
[data-theme="light"] :is(.top5-stat-chips-row,.cartola-profile-stats-bar,.round-stat-card,.scout-pill-box,.standings-table th,.top5-col-header){background:#eef3f7!important;border-color:#d4dfe7!important;color:#243f52!important}
[data-theme="light"] :is(.top5-header-card,.pitch-header,.corp-topbar){background:linear-gradient(110deg,#a94400,#d85c00)!important;color:#fff!important}
[data-theme="light"] :is(.top5-header-card,.pitch-header,.corp-topbar) :is(h1,h2,h3,p,span,strong,small){color:#fff!important}
[data-theme="light"] :is(input,select,textarea){color:#17354a!important;background:#fff!important;border-color:#a9bbc9!important}
[data-theme="light"] .light-readable{color:#183247!important}
[data-theme="light"] .light-surface{background-color:#fff!important}
body.app-home-active > :is(.navbar,.market-strip,.marquee-wrapper,.main-wrapper,footer){display:none!important}
.navbar{position:relative!important}.nav-container,.main-wrapper{width:100%;min-width:0}.main-wrapper > div{min-width:0}
.module-close-bar{top:0}.top5-player-card,.corp-card{transition:transform .2s,box-shadow .2s}.top5-player-card:hover{transform:translateY(-2px);box-shadow:0 8px 25px #bd560022}
.teams-workspace,.tips-panel{background:var(--bg-card);border:1px solid var(--border-subtle);border-radius:16px;padding:22px;margin:18px 0;color:var(--text-primary)}
.teams-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.teams-toolbar label{flex:1;min-width:180px;font-weight:750}.teams-toolbar select{display:block;width:100%;margin-top:6px;padding:12px;border-radius:8px;background:var(--bg-card);color:var(--text-primary)}
.teams-workspace button,.tips-panel button,.tip-launch{padding:11px 15px;border:0;border-radius:9px;background:#ad4700;color:#fff;font-weight:750;cursor:pointer;min-height:44px}.teams-workspace button:disabled{opacity:.55;cursor:wait}.teams-workspace p{margin:10px 0;color:var(--text-secondary);line-height:1.5}.teams-result{white-space:pre-wrap;padding:12px;border-radius:9px;background:var(--bg-card-elevated);color:var(--text-primary)}
.teams-workspace a{color:#b64b00;text-decoration:underline}.teams-instructions{font-size:.86rem;color:var(--text-secondary);margin:12px 0}.teams-instructions li{margin:5px 0}
.tip-stage{display:grid;grid-template-columns:minmax(130px,250px) minmax(0,1fr) minmax(130px,250px);gap:20px;align-items:center;max-width:1100px;margin:24px auto}.tip-mascot{width:100%;border-radius:24px;box-shadow:0 16px 30px #0003;animation:mascotWelcome 4s ease-in-out infinite}.tip-mascot:last-child{animation-delay:1.4s}
.tip-bubble{background:#fff4e8;color:#203749;border:1px solid #ecc2a1;border-radius:24px;padding:28px;position:relative;box-shadow:0 10px 30px #c45b0015}.tip-bubble h2{color:#9a4100!important;margin-bottom:14px}.tip-bubble p{white-space:pre-wrap;line-height:1.75;font-size:1.1rem}.tip-bubble small{display:block;margin-top:18px;color:#596b78}.tip-editor{display:grid;gap:10px}.tip-editor textarea{width:100%;min-height:150px;padding:14px;border-radius:10px;font:inherit}.tip-editor input{padding:12px;font:inherit}.tip-editor label{font-weight:700}
@keyframes mascotWelcome{0%,100%{transform:translateY(0) rotate(-.3deg)}50%{transform:translateY(-7px) rotate(.3deg)}}
:focus-visible{outline:3px solid #1d80c7!important;outline-offset:3px}
@media(max-width:1100px){.view-grid,.escalacao-main-grid,.admin-grid{grid-template-columns:1fr!important}.top5-grid-container{grid-template-columns:repeat(2,minmax(0,1fr))!important}.corp-body{grid-template-columns:210px 1fr}.corp-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tip-stage{grid-template-columns:140px 1fr 140px}}
@media(max-width:760px){.corp-body{display:block}.corp-sidebar{display:grid;grid-template-columns:1fr 1fr}.corp-main{padding:15px}.corp-welcome{padding:18px}.main-wrapper{padding:12px!important}.top5-grid-container,.view-grid,.h2h-main-grid{grid-template-columns:minmax(0,1fr)!important}.nav-container{padding:10px!important}.nav-tabs-container{gap:4px}.nav-tab-btn{white-space:normal!important}.matches-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.field-3d-wrapper{padding:8px!important;perspective:none!important}.my-field-surface,#soccer-field{min-height:460px!important;transform:none!important;max-width:100%!important;padding:14px 5px!important}.player-avatar-box{width:46px!important;height:46px!important}.player-name-label{max-width:75px!important;font-size:10px!important}.my-field-row{gap:3px!important}.player-table,.standings-table{font-size:12px!important}.standings-table-card,.admin-container .side-card{overflow-x:auto}.tip-stage{grid-template-columns:1fr 1fr;gap:12px}.tip-bubble{grid-column:1/-1;grid-row:1;padding:20px}.tip-mascot{max-width:190px;margin:auto}.teams-workspace{padding:14px}.modal-backdrop{padding:8px!important}.modal-content,.scout-modal-content{max-width:100%!important;max-height:94dvh!important;overflow:auto!important}.corp-center-logo{display:block;width:110px}.corp-footer{position:static}}
@media(min-width:1900px){.main-wrapper,.nav-container,.corp-main{max-width:1800px;margin-inline:auto}.corp-body{grid-template-columns:300px 1fr}.corp-card{min-height:180px;padding:28px}.corp-menu{font-size:1.05rem;padding:17px}.tip-stage{max-width:1350px}.corp-welcome{min-height:200px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

[data-theme="light"] :is(.top5-stat-chip span,.top5-col-formula-badge,.top5-media-sub,.top5-match-tag,.btn-top5-scout){color:#354e63!important}
[data-theme="light"] :is(.top5-col-title,.top5-price-sub){text-shadow:none!important;opacity:1!important}
[data-theme="light"] .top5-stat-chip{background:#e5edf3!important;color:#213a4c!important}
[data-theme="light"] :is(.top5-media-val,.top5-stat-chip.accent strong){color:#a74300!important}
[data-theme="light"] .teams-result{background:#eef3f7;color:#183247}

.module-close-bar.active ~ .navbar .nav-tabs-container{display:none!important}
@media(max-width:760px){.module-close-bar.active ~ .navbar .brand{display:none}.nav-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:6px!important}.nav-actions .nav-btn{justify-content:center;padding:8px!important;min-height:42px;font-size:.76rem}.nav-actions #user-badge{justify-content:center}.market-container{padding:10px!important}.main-wrapper{padding-top:16px!important}.top5-pos-column{min-width:0}.corp-card-grid{grid-template-columns:1fr!important}.corp-sidebar{grid-template-columns:1fr 1fr!important}.corp-sidebar h3{grid-column:1/-1}.corp-footer{flex-wrap:wrap}.teams-toolbar{align-items:stretch}.teams-toolbar button{flex:1 1 130px}.escalacao-grid{min-width:0}.my-pitch-card{min-width:0}}

#player-modal{position:fixed!important;inset:0!important;z-index:2147483000!important;isolation:isolate;transform:none!important}
#player-modal.active{display:flex!important;visibility:visible!important}
#player-modal .scout-modal-card{max-height:92dvh;overscroll-behavior:contain}
body:has(#player-modal.active){overflow:hidden!important}
#teams-connection{font-weight:750;padding:9px 12px;border-left:4px solid #ec7000;background:var(--bg-card-elevated);color:var(--text-primary)}

/* Warm orange cards with readable white labels in light mode. */
[data-theme="light"] :is(.corp-card,.top5-player-card,.side-card,.cartola-profile-card-container,.market-player-card,.tracking-round,.duvidas-dispute-card,.teams-workspace,.tips-panel){background:#b84900!important;color:#fff!important;border-color:#a13e00!important;--text-primary:#fff;--text-secondary:#fff;--text-muted:#fff}
[data-theme="light"] :is(.corp-card,.top5-player-card,.side-card,.cartola-profile-card-container,.market-player-card,.tracking-round,.duvidas-dispute-card,.teams-workspace,.tips-panel) :is(h1,h2,h3,h4,p,span,strong,small,b,label,a,summary,li){color:#fff!important;text-shadow:none!important;opacity:1}
[data-theme="light"] :is(.top5-stat-chips-row,.top5-stat-chip,.cartola-profile-stats-bar,.teams-result,.top5-match-tag,.top5-col-formula-badge){background:#873500!important;color:#fff!important}
[data-theme="light"] :is(.top5-stat-chip,.cartola-profile-stats-bar,.teams-result) *{color:#fff!important}
[data-theme="light"] :is(.nav-tab-btn,.nav-btn,.corp-menu){background:#fff!important;color:#243748!important;border-color:#a9b9c8!important}
[data-theme="light"] :is(.nav-tab-btn.active,.corp-menu.active){background:#b84900!important;color:#fff!important}
[data-theme="light"] :is(.nav-tab-btn,.nav-btn,.corp-menu) :is(span,small){color:inherit!important}
[data-theme="light"] :is(input,textarea,select,option){background:#fff!important;color:#17354a!important}
[data-theme="light"] :is(.btn-top5-scout,.top5-player-card button){background:#813400!important;color:#fff!important}

.match-date-badge,.match-venue{font-weight:800!important;font-size:14px!important;color:var(--text-primary)!important;line-height:1.5}.match-validity{background:#8c1717;color:#fff;padding:8px;border-radius:6px;font-weight:800;font-size:12px;margin-top:8px}.match-card.match-invalid{border:3px solid #dc3535!important}.match-venue{margin-bottom:10px}.corp-countdown{white-space:normal!important;line-height:1.7}
[data-theme="light"] .match-card{background:#b84900!important;color:#fff!important}[data-theme="light"] .match-card :is(div,span){color:#fff!important}
