/* Shared layout for the portal and its same-origin modules. */
body.mg6:has(#moduleFrame){background:#f0f5f2;font-size:14px}
body.mg6:has(#moduleFrame) .app{min-width:0}
body.mg6:has(#moduleFrame) .topbar{height:88px!important;gap:14px}
body.mg6:has(#moduleFrame) #content{max-width:1440px;margin:0 auto;padding:0 24px 24px}
body.mg6:has(#moduleFrame) .workspace,body.mg6:has(#moduleFrame) .page{box-sizing:border-box;width:100%;margin:0!important;padding:20px 16px 12px!important;border:1px solid #ccdcd1!important;border-radius:12px!important;background:#f8faf8}
body.mg6:has(#moduleFrame) .mg6-selector{width:100%;max-width:none;margin:20px 0 16px;padding:16px 18px}
body.mg6:has(#moduleFrame) .workspace-heading{margin-bottom:8px;padding-bottom:10px}
body.mg6:has(#moduleFrame) .workspace-heading h1{font-size:24px!important;line-height:1.2}
body.mg6:has(#moduleFrame) .sidebar{width:224px;padding:26px 16px 18px;overflow-y:auto;overscroll-behavior:contain}
body.mg6:has(#moduleFrame) .brand{font-size:15px;line-height:1.35;overflow-wrap:anywhere;letter-spacing:0}
body.mg6:has(#moduleFrame) .brand-symbol{flex-shrink:0}
body.mg6:has(#moduleFrame) .sidebar nav a{min-height:44px;font-size:13px;padding:11px 13px!important}
body.mg6:has(#moduleFrame) .sidebar-bottom{padding-top:20px}
body.mg6:has(#moduleFrame) .breadcrumb b{font-size:13px!important}
body.mg6:has(#moduleFrame) .topbar a,body.mg6:has(#moduleFrame) .topbar button{min-height:44px;align-items:center}
body.mg6:has(#moduleFrame) .menu-shade{background:#072c24a8!important;backdrop-filter:blur(2px)}
body.mg6.portal-public{background:transparent!important;padding:0!important;color:#173c34!important}
body.mg6.portal-public .main{padding:0 4px 24px!important;max-width:none!important}
body.mg6.portal-public .summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;margin:12px 0 18px!important;padding:0 4px!important;max-width:none!important}
body.mg6.portal-public .metric{display:block!important;min-width:0;padding:18px!important;border:1px solid #d2dfd6!important;border-top:3px solid #d9b952!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important}
body.mg6.portal-public .metric strong{font-size:27px!important;line-height:1.2;margin:7px 0!important}
body.mg6.portal-public .metric small{font-size:12px;line-height:1.4;display:block}
body.mg6.portal-public .public-status-board{padding:0 4px!important;margin:0 0 12px!important;max-width:none;border:0!important;box-shadow:none!important;background:transparent!important}
body.mg6.portal-public .closing-public{font-size:12px!important;line-height:1.5;padding:12px!important;border-radius:9px!important;border:1px solid #e5c9cf!important}
body.mg6.portal-public .public-rules{margin:0 4px 18px!important;padding:16px!important;border:1px solid #d2dfd6!important;border-radius:10px!important;box-shadow:none!important}
body.mg6.portal-public .section-head{margin:18px 0 12px!important;padding:0!important;border:0!important;background:transparent!important;gap:12px!important}
body.mg6.portal-public .section-head h2{font-size:24px!important;line-height:1.3;margin:4px 0!important}
body.mg6.portal-public .layout{grid-template-columns:minmax(0,1fr) minmax(280px,340px)!important;gap:18px!important;align-items:start}
body.mg6.portal-public .matches{padding:10px!important;min-width:0}
body.mg6.portal-public .match{padding:18px 12px!important;gap:10px!important;margin-bottom:9px;grid-template-columns:minmax(0,1fr) 142px minmax(0,1fr)!important}
body.mg6.portal-public .team b{white-space:normal!important;overflow-wrap:anywhere;text-overflow:clip;font-size:13px!important;line-height:1.35}
body.mg6.portal-public .team img{width:42px!important;height:42px!important}
body.mg6.portal-public .choices{display:grid!important;grid-template-columns:repeat(3,44px)!important;gap:5px!important;justify-content:center}
body.mg6.portal-public .choices button{width:44px!important;height:44px!important;padding:0!important;font-size:15px!important;border-radius:8px!important}
body.mg6.portal-public .score-pick{grid-column:1/-1;min-width:0;padding:13px!important;margin-top:8px!important}
body.mg6.portal-public .checkout{position:sticky!important;top:18px!important;min-width:0;padding:22px!important;border:1px solid #cfddd3!important;border-top:3px solid #d9b952!important;border-radius:12px!important}
body.mg6.portal-public input,body.mg6.portal-public select,body.mg6.portal-admin input:not([type=checkbox]):not([type=radio]),body.mg6.portal-admin select,body.mg6.portal-admin textarea{font-size:16px!important;min-height:44px!important;max-width:100%;box-sizing:border-box}
body.mg6.portal-public button:not(:disabled){min-height:44px;background:#176347!important;color:#fff!important;border:1px solid #15573f!important;border-radius:8px!important;box-shadow:none!important}
body.mg6.portal-public .choices button:not(.active){background:#edf5ef!important;color:#174738!important;border-color:#99b9a6!important}
body.mg6.portal-public .choices button.active{background:#e4c76d!important;color:#173c34!important;border-color:#aa852b!important;box-shadow:inset 0 0 0 1px #aa852b!important}
body.mg6.portal-public .table-card{min-width:0;overflow-x:auto!important}
body.mg6.portal-admin{padding:0 4px 20px!important;min-width:0;background:transparent!important}
body.mg6.portal-admin .card{padding:18px!important;margin-bottom:16px!important;border:1px solid #ccdad0!important;border-top:3px solid #d9b952!important;border-radius:10px!important;min-width:0}
body.mg6.portal-admin .btn{min-height:42px!important;padding:10px 13px!important;font-size:12px!important;line-height:1.3;white-space:normal;box-shadow:none!important}
body.mg6.portal-admin .btn-blue,body.mg6.portal-admin .btn-black,body.mg6.portal-admin .btn-green{background:#176347!important;border-color:#15573f!important;color:white!important}
body.mg6.portal-admin .btn-yellow{background:#e4c76d!important;color:#173c34!important;border-color:#b49438!important}
body.mg6.portal-admin .btn-red{background:#b73a4f!important;color:#fff!important;border-color:#9f3042!important}
body.mg6.portal-admin table{border-collapse:separate;border-spacing:0;max-width:100%}
body.mg6.portal-admin .card:has(table){overflow-x:auto}
body.mg6.portal-admin .login{max-width:420px!important;width:100%!important;margin:28px auto!important;padding:25px!important}
@media screen and (min-width:961px){body.mg6:has(#moduleFrame) .app{margin-left:224px!important}body.mg6:has(#moduleFrame) .icon-button{display:none!important}}
@media screen and (min-width:961px) and (max-width:1200px){body.mg6:has(#moduleFrame) #content{padding:0 18px 22px}body.mg6.portal-public .layout{grid-template-columns:1fr!important}body.mg6.portal-public .checkout{position:static!important}body.mg6.portal-public .checkout .form-grid{grid-template-columns:1fr 1fr}}
@media screen and (max-width:960px){
 body.mg6:has(#moduleFrame) .app{margin-left:0!important}
 body.mg6:has(#moduleFrame) .sidebar{width:min(290px,85vw)!important;transform:translateX(-100%);z-index:60;transition:transform .2s ease}
 body.mg6:has(#moduleFrame) .sidebar.open{transform:translateX(0)}
 body.mg6:has(#moduleFrame) .icon-button{display:flex!important;justify-content:center;width:44px!important;height:44px!important;padding:10px!important;flex:none}
 body.mg6:has(#moduleFrame) .topbar{height:76px!important;padding:0 18px!important;position:sticky;top:0;z-index:35}
 body.mg6:has(#moduleFrame) #content{padding:0 16px 20px}
 body.mg6.portal-public .layout{grid-template-columns:minmax(0,1fr)!important}
 body.mg6.portal-public .checkout{position:static!important}
}
@media screen and (max-width:600px){
 body.mg6:has(#moduleFrame) .topbar{height:70px!important;padding:0 12px!important;gap:10px}
 body.mg6:has(#moduleFrame) .breadcrumb{font-size:0!important;letter-spacing:0;min-width:0;flex:1}
 body.mg6:has(#moduleFrame) .breadcrumb span{display:none}
 body.mg6:has(#moduleFrame) .breadcrumb b{font-size:12px!important;display:block;line-height:1.3}
 body.mg6:has(#moduleFrame) .topbar>.button.gold{font-size:11px!important;padding:10px 12px!important;gap:8px}
 body.mg6:has(#moduleFrame) .topbar #portalLogout{font-size:11px!important;padding:9px!important}
 body.mg6:has(#moduleFrame) #content{padding:0 10px 16px}
 body.mg6:has(#moduleFrame) .mg6-selector{margin:12px 0!important;padding:13px!important;gap:12px;border-radius:10px}
 body.mg6:has(#moduleFrame) .mg6-selector-title{gap:9px}
 body.mg6:has(#moduleFrame) .mg6-selector strong{font-size:14px}
 body.mg6:has(#moduleFrame) .mg6-selector small{font-size:11px;line-height:1.4}
 body.mg6:has(#moduleFrame) .mg6-selector nav{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:3px}
 body.mg6:has(#moduleFrame) .mg6-selector nav a{padding:12px 5px;min-height:44px;font-size:12px}
 body.mg6:has(#moduleFrame) .workspace,body.mg6:has(#moduleFrame) .page{padding:14px 8px 8px!important;border-radius:10px!important}
 body.mg6:has(#moduleFrame) .workspace-heading{padding:0 0 8px 10px!important;margin:0 0 8px!important}
 body.mg6:has(#moduleFrame) .workspace-heading h1{font-size:21px!important}
 body.mg6.portal-public .summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:0!important;margin:10px 0 14px!important}
 body.mg6.portal-public .metric{padding:11px 8px!important;border-radius:8px!important}
 body.mg6.portal-public .metric span{font-size:8px!important;letter-spacing:.02em!important;line-height:1.4;min-height:22px}
 body.mg6.portal-public .metric strong{font-size:22px!important;line-height:1.2;overflow-wrap:normal}
 body.mg6.portal-public .metric:nth-child(2){grid-column:1/-1;grid-row:2;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px}
 body.mg6.portal-public .metric:nth-child(2) strong{font-size:17px!important;margin:0!important}
 body.mg6.portal-public .metric:nth-child(2) span{min-height:0}
 body.mg6.portal-public .metric:nth-child(2) small{grid-column:1/-1}
 body.mg6.portal-public .metric:nth-child(3){grid-column:2;grid-row:1}
 body.mg6.portal-public .metric small{font-size:10px!important;line-height:1.4}
 body.mg6.portal-public .main{padding:0 0 18px!important}
 body.mg6.portal-public .public-status-board{padding:0!important;margin-bottom:10px!important}
 body.mg6.portal-public .closing-public{font-size:10px!important;padding:10px 8px!important;letter-spacing:0!important}
 body.mg6.portal-public .public-rules{margin:0 0 14px!important;padding:12px!important}
 body.mg6.portal-public .public-rules h2{font-size:13px!important}
 body.mg6.portal-public .public-rules .rules-heading{gap:10px;flex-wrap:wrap}
 body.mg6.portal-public .section-head{gap:6px!important;margin:14px 0 10px!important;align-items:flex-start}
 body.mg6.portal-public .section-head h2{font-size:20px!important;letter-spacing:-.4px!important}
 body.mg6.portal-public .progress{font-size:11px!important}
 body.mg6.portal-public .matches{padding:6px!important;border-radius:10px!important}
 body.mg6.portal-public .match{padding:16px 6px 12px!important;gap:6px!important;grid-template-columns:minmax(0,1fr) 140px minmax(0,1fr)!important}
 body.mg6.portal-public .team b{font-size:11px!important;line-height:1.35!important}
 body.mg6.portal-public .team img{width:34px!important;height:34px!important}
 body.mg6.portal-public .versus small{font-size:10px!important}
 body.mg6.portal-public .checkout{padding:16px!important}
 body.mg6.portal-public .form-grid{grid-template-columns:1fr!important}
 body.mg6.portal-admin{padding:0 0 18px!important}
 body.mg6.portal-admin .card{padding:12px!important;border-radius:9px!important}
 body.mg6.portal-admin .btn{min-height:44px!important;font-size:12px!important;padding:10px!important}
 body.mg6.portal-admin .card input,body.mg6.portal-admin .card select{min-width:0!important}
 body.mg6.portal-admin .card [style*="grid-template-columns"]{grid-template-columns:1fr!important}
 body.mg6.portal-admin .card [style*="display:flex"]{flex-wrap:wrap}
 body.mg6.portal-admin td{white-space:normal!important;min-width:85px}
 body.mg6.portal-admin .login{padding:20px!important;margin:18px auto!important}
}
@media(prefers-reduced-motion:reduce){body.mg6 *{scroll-behavior:auto!important;transition:none!important}}
@media screen{body.portal-admin .capture-only-bar,body.portal-admin #captureOnlyTitle{display:none!important}body.portal-admin #fotoGuiaPanel{background:#edf6ef!important;color:#173c34!important;border-color:#86baa0!important}body.portal-admin #fotoGuiaPanel b,body.portal-admin #fotoGuiaPanel small,body.portal-admin #fotoGuiaPanel p{color:#173c34!important}}

/* Button colors and capture accents — 2026-10-22 */
@media screen {
 html body.mg6.portal-admin .btn-blue{background:#1d4ed8!important;border-color:#1e40af!important;color:#fff!important}
 html body.mg6.portal-admin .btn-green{background:#15803d!important;border-color:#166534!important;color:#fff!important}
 html body.mg6.portal-admin .btn-black{background:#334155!important;border-color:#1e293b!important;color:#fff!important}
 html body.mg6.portal-admin .btn-yellow{background:#fbbf24!important;border-color:#b45309!important;color:#422006!important}
 html body.mg6.portal-admin .btn-red{background:#b91c1c!important;border-color:#991b1b!important;color:#fff!important}
 html body.mg6.portal-admin #tab-agregar{background:#f5f3ff!important;border-color:#c4b5fd!important;color:#312e81!important}
 html body.mg6.portal-admin #tab-agregar #aNombre,html body.mg6.portal-admin #tab-agregar #aTel{background:#fff!important;color:#172554!important;border-color:#a5b4fc!important}
 html body.mg6.portal-admin #tab-agregar #mgPhoto{background:#faf5ff!important;color:#3b0764!important;border-color:#c4b5fd!important}
 html body.mg6.portal-admin #tab-agregar button[onclick="abrirEscanerQuiniela()"],html body.mg6.portal-admin #tab-agregar #mgPhotoRead,html body.mg6.portal-admin #tab-agregar #mgPhoto label{background:#6d28d9!important;border-color:#5b21b6!important;color:#fff!important}
 html body.mg6.portal-admin #tab-agregar button[onclick="adminAdd()"],html body.mg6.portal-admin #tab-agregar .btn-blue,html body.mg6.portal-admin #tab-agregar #mgGeminiTickets button,html body.mg6.portal-admin #tab-agregar #mgPhotoApply{background:#0369a1!important;border-color:#075985!important;color:#fff!important}
 html body.mg6.portal-admin #tab-agregar #mgPhotoRotate{background:#475569!important;border-color:#334155!important;color:#fff!important}
 html body.mg6.portal-admin #tab-agregar #mgPhotoRemove{background:#be123c!important;border-color:#9f1239!important;color:#fff!important}
 html body.mg6.portal-admin #tab-agregar #aPicks button.manual-pick[id$="_L"],html body.mg6.portal-public .choices button[aria-label^="Local "]{--mg-pick-strong:#1d4ed8;background:#dbeafe!important;color:#1e40af!important;border-color:#60a5fa!important}
 html body.mg6.portal-admin #tab-agregar #aPicks button.manual-pick[id$="_E"],html body.mg6.portal-public .choices button[aria-label="Empate"]{--mg-pick-strong:#92400e;background:#fef3c7!important;color:#92400e!important;border-color:#f59e0b!important}
 html body.mg6.portal-admin #tab-agregar #aPicks button.manual-pick[id$="_V"],html body.mg6.portal-public .choices button[aria-label^="Visita "]{--mg-pick-strong:#6d28d9;background:#ede9fe!important;color:#5b21b6!important;border-color:#a78bfa!important}
 html body.mg6.portal-admin #tab-agregar #aPicks button.manual-pick:is(.sel,.active,.selected,.on),html body.mg6.portal-public .choices button.active{background:var(--mg-pick-strong,#0369a1)!important;color:#fff!important;border-color:#0f172a!important;outline:3px solid #0f172a!important;outline-offset:1px!important;box-shadow:none!important}
 html body.mg6.portal-admin #tab-agregar #aPicks button.manual-pick *{color:inherit!important}
 html body.mg6:has(#moduleFrame) .sidebar nav a[href*="modulo=captura"]{background:#ede9fe!important;color:#5b21b6!important;border-color:#c4b5fd!important}
 html body.mg6:has(#moduleFrame) .sidebar nav a[href*="modulo=captura"]:is(.active,.selected,[aria-current="page"]){background:#6d28d9!important;color:#fff!important;border-color:#5b21b6!important}
 html body.mg6.portal-admin .btn:hover:not(:disabled),html body.mg6.portal-admin #mgPhoto button:hover:not(:disabled){filter:brightness(.92)}
 html body.mg6.portal-admin #tab-agregar button:focus-visible,html body.mg6.portal-public .choices button:focus-visible{outline:3px solid #0f172a!important;outline-offset:3px!important}
 html body.mg6.portal-admin #tab-agregar button:disabled{opacity:.6!important}
}
