/*
 * SocGol V6.13.47.17 · base responsive de escritorio
 *
 * Esta hoja pertenece EXCLUSIVAMENTE a la presentación de escritorio/app.
 * No debe ser cargada por las vistas móviles dedicadas.
 *
 * Breakpoints canónicos de SocGol:
 *   <= 390px  · compacto
 *   <= 560px  · estrecho
 *   <= 850px  · cambio de composición / límite móvil
 *   >= 1280px · escritorio amplio
 *
 * Los @media históricos de módulos existentes se mantienen temporalmente y se
 * migrarán por fases. Los módulos nuevos deben usar estos puntos salvo causa
 * funcional documentada.
 */
:root{
  --sg-responsive-shell-max:1440px;
  --sg-responsive-gutter:16px;
  --sg-responsive-gap:16px;
  --sg-responsive-touch-target:44px;
  --sg-responsive-form-max:760px;
}

/* Utilidades nuevas. No sustituyen aún las clases históricas del portal. */
.sg-r-container{width:min(var(--sg-responsive-shell-max),calc(100% - (var(--sg-responsive-gutter) * 2)));margin-inline:auto;min-width:0}
.sg-r-toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--sg-responsive-gap);flex-wrap:wrap;min-width:0}
.sg-r-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.sg-r-grid-2,.sg-r-grid-3,.sg-r-form-grid{display:grid;gap:var(--sg-responsive-gap);min-width:0}
.sg-r-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.sg-r-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.sg-r-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:var(--sg-responsive-form-max)}
.sg-r-table-scroll{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
.sg-r-table-scroll>table{min-width:100%}
.sg-r-desktop-only{display:initial}
.sg-r-mobile-only{display:none!important}

@media (min-width:1280px){
  :root{--sg-responsive-gutter:20px;--sg-responsive-gap:18px}
}

@media (min-width:851px) and (max-width:1279px){
  :root{--sg-responsive-gutter:16px;--sg-responsive-gap:14px}
}

/* Solo fallback al estrechar una vista de escritorio. Las vistas móviles
 * dedicadas continúan teniendo sus propios templates y CSS. */
@media (max-width:850px){
  .sg-r-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sg-r-desktop-only{display:none!important}
  .sg-r-mobile-only{display:initial!important}
}

@media (max-width:560px){
  :root{--sg-responsive-gutter:10px;--sg-responsive-gap:12px}
  .sg-r-grid-2,.sg-r-grid-3,.sg-r-form-grid{grid-template-columns:minmax(0,1fr)}
  .sg-r-actions{width:100%}
  .sg-r-actions>.button,.sg-r-actions>.mini-button{min-height:var(--sg-responsive-touch-target)}
}

@media (max-width:390px){
  :root{--sg-responsive-gutter:8px;--sg-responsive-gap:10px}
}

/* SocGol V6.13.47.18 · normalización responsive fase 2 · ESCRITORIO
 * Capa común exclusivamente para la presentación desktop.
 * No define estilos de las vistas móviles dedicadas.
 */
:root{
  --sg-r-header-height:72px;
  --sg-r-main-gap:24px;
  --sg-r-main-top:28px;
  --sg-r-control-height:44px;
  --sg-r-button-height:42px;
  --sg-r-mini-button-height:34px;
  --sg-r-control-radius:11px;
  --sg-r-focus:0 0 0 3px rgba(88,216,255,.28);
}

body.sg-surface-desktop .shell{
  width:min(var(--sg-responsive-shell-max),calc(100% - (var(--sg-responsive-gutter) * 2)));
  min-width:0;
}
body.sg-surface-desktop .topbar-inner{
  min-width:0;
  height:var(--sg-r-header-height);
}
body.sg-surface-desktop .main-grid{
  min-width:0;
  gap:var(--sg-r-main-gap);
  padding-top:var(--sg-r-main-top);
}
body.sg-surface-desktop .main-content,
body.sg-surface-desktop .main-content>*,
body.sg-surface-desktop .sidebar,
body.sg-surface-desktop .card{
  min-width:0;
  max-width:100%;
}

/* Formularios: misma geometría base sin cambiar el diseño de cada módulo. */
body.sg-surface-desktop .main-content label{min-width:0}
body.sg-surface-desktop .main-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
body.sg-surface-desktop .main-content select{
  min-width:0;
  min-height:var(--sg-r-control-height);
  border-radius:var(--sg-r-control-radius);
}
body.sg-surface-desktop .main-content textarea{min-width:0;max-width:100%;border-radius:var(--sg-r-control-radius)}
body.sg-surface-desktop .main-content :is(input,select,textarea):focus-visible{
  outline:2px solid #0878F5;
  outline-offset:1px;
}

/* Acciones comunes de escritorio. Los botones pequeños siguen siendo compactos. */
body.sg-surface-desktop .button{
  min-height:var(--sg-r-button-height);
  gap:7px;
  line-height:1.2;
}
body.sg-surface-desktop .mini-button{
  min-height:var(--sg-r-mini-button-height);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  line-height:1.2;
}
body.sg-surface-desktop :is(.button,.mini-button,.action-button,.link-button):focus-visible{
  outline:2px solid #0878F5;
  outline-offset:2px;
}
body.sg-surface-desktop :is(.section-heading,.heading-links,.row-actions,.composer-actions){min-width:0}
body.sg-surface-desktop :is(.section-heading,.heading-links,.row-actions){flex-wrap:wrap}

/* Escritorio compacto: reduce densidad de cabecera antes de ocultar elementos. */
@media (min-width:851px) and (max-width:1279px){
  :root{
    --sg-r-header-height:68px;
    --sg-r-main-gap:18px;
    --sg-r-main-top:22px;
  }
  body.sg-surface-desktop .topbar-inner{gap:10px}
  body.sg-surface-desktop .topbar .brand{min-width:148px}
  body.sg-surface-desktop .topbar .brand-logo-full{width:148px}
  body.sg-surface-desktop .topbar .header-primary{gap:9px}
  body.sg-surface-desktop .topbar .header-tools{gap:8px}
  body.sg-surface-desktop .topbar .header-primary>a,
  body.sg-surface-desktop .topbar .header-primary .header-dropdown>summary{font-size:13px}
  body.sg-surface-desktop .header-beta{margin-left:-5px}
}

@media (min-width:1280px){
  :root{--sg-r-main-gap:24px;--sg-r-main-top:28px}
}

/* Fallback si se estrecha manualmente una vista desktop. No sustituye la vista móvil. */
@media (max-width:850px){
  body.sg-surface-desktop .main-grid{gap:14px;padding-top:16px}
}


/* SocGol V6.13.47.19 · normalización responsive fase 3 · INICIO + GESTIÓN DEL CLUB
 * Mantiene la presentación desktop independiente de las vistas móviles dedicadas.
 * Se normaliza el shell y la composición superior; los breakpoints internos legacy
 * de módulos complejos se migrarán en fases posteriores.
 */

/* Inicio · contrato desktop */
body.sg-surface-desktop .main-grid--home,
body.sg-surface-desktop .main-grid--home>.main-content,
body.sg-surface-desktop .home-social-grid,
body.sg-surface-desktop .home-social-primary,
body.sg-surface-desktop .home-activity-column,
body.sg-surface-desktop .home-portal-metrics,
body.sg-surface-desktop .home-advertising-section{min-width:0;max-width:100%}
body.sg-surface-desktop .hero.socgol-hero{min-width:0;overflow:hidden}
body.sg-surface-desktop .hero-actions,
body.sg-surface-desktop .engagement-head,
body.sg-surface-desktop .engagement-subhead{min-width:0;flex-wrap:wrap}
body.sg-surface-desktop .engagement-kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
body.sg-surface-desktop .engagement-opportunity-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
body.sg-surface-desktop .home-metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body.sg-surface-desktop .home-ad-strip.managed-ad-placement{min-width:0}
body.sg-surface-desktop .home-activity-column .comment-form{min-width:0;flex-wrap:wrap}
body.sg-surface-desktop .home-activity-column .comment-form input{flex:1 1 220px}

/* Gestión del Club · contrato desktop */
body.sg-surface-desktop.club-management-modern-mode .club-management-modern,
body.sg-surface-desktop.club-management-modern-mode .club-management-module-grid,
body.sg-surface-desktop.club-management-modern-mode .club-management-category,
body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid,
body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-shell,
body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-panel,
body.sg-surface-desktop.club-management-modern-mode .club-management-native-host{min-width:0;max-width:100%}
body.sg-surface-desktop.club-management-modern-mode .club-management-modern-actions,
body.sg-surface-desktop.club-management-modern-mode .club-management-view-actions{flex-wrap:wrap;min-width:0}
body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-shell{grid-template-columns:250px minmax(0,1fr)!important}
body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav{min-width:0}
body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav nav{display:grid!important;gap:4px!important;overflow:visible!important}
body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav button,
body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav .club-management-section-external{width:100%!important;min-width:0!important;white-space:normal!important}

@media (min-width:851px) and (max-width:1279px){
  /* Inicio conserva estructura desktop; se compactan densidad y proporciones. */
  body.sg-surface-desktop .home-social-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr)!important;
    gap:18px!important;
    margin-top:16px!important;
  }
  body.sg-surface-desktop .home-social-primary .engagement-hub{margin:0 0 16px!important}
  body.sg-surface-desktop .home-social-primary .composer{margin-top:0!important}
  body.sg-surface-desktop .home-activity-column .home-activity-heading{margin:0 2px 12px!important}
  body.sg-surface-desktop .home-activity-column .post{padding:16px!important}
  body.sg-surface-desktop .home-activity-column .post-body{font-size:14px!important;line-height:1.5!important;padding:14px 0!important}
  body.sg-surface-desktop .home-ad-strip.managed-ad-placement{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}

  /* Gestión del Club permanece en layout desktop, sin convertir la navegación lateral en tabs. */
  body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-modern-head{min-height:220px!important;padding:22px 24px!important;background-position:center top!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-modern-intro{width:min(600px,66%)!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-shell{grid-template-columns:220px minmax(0,1fr)!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav{padding:16px 10px!important;border-right:1px solid var(--line)!important;border-bottom:0!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-label{padding:0 9px 9px!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav nav{display:grid!important;overflow:visible!important;padding-bottom:0!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav button,
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav .club-management-section-external{
    grid-template-columns:24px minmax(0,1fr)!important;
    padding:9px 9px!important;
    font-size:11.5px!important;
  }
  body.sg-surface-desktop.club-management-modern-mode .club-management-section-nav button.is-active::before{
    left:-10px!important;right:auto!important;top:5px!important;bottom:5px!important;width:3px!important;height:auto!important;border-radius:0 3px 3px 0!important;
  }
  body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-head{padding:17px 19px!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-native-host>details.club-workspace-mounted.club-modern-active>.collapsible-management-body{padding:20px!important}
}

@media (min-width:1280px){
  body.sg-surface-desktop .home-social-grid{grid-template-columns:minmax(0,2.15fr) minmax(380px,.95fr)!important;gap:24px!important}
  body.sg-surface-desktop .home-ad-strip.managed-ad-placement{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid{grid-template-columns:repeat(4,minmax(220px,1fr))!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-shell{grid-template-columns:250px minmax(0,1fr)!important}
}

/* Fallback de vista desktop estrechada. No sustituye la experiencia móvil dedicada. */
@media (max-width:850px){
  body.sg-surface-desktop .home-social-grid{display:block!important}
  body.sg-surface-desktop .home-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.sg-surface-desktop.club-management-modern-mode .club-management-workspace-shell{grid-template-columns:1fr!important}
}

@media (max-width:560px){
  body.sg-surface-desktop.club-management-modern-mode .club-management-category-grid{grid-template-columns:minmax(0,1fr)!important}
}

/* SocGol V6.13.47.20 · normalización responsive fase 4 · ADMINISTRACIÓN
 * Solo afecta al layout web de administración. Las vistas móviles dedicadas
 * continúan siendo independientes y no heredan estos componentes.
 */
body.sg-surface-desktop.sg-admin-area{
  --sg-admin-gap:16px;
  --sg-admin-card-padding:20px;
  --sg-admin-module-min:68px;
}
body.sg-surface-desktop.sg-admin-area .main-content{min-width:0}
body.sg-surface-desktop.sg-admin-area .main-content>:is(.card,.section-heading,.platform-admin-grid,.platform-admin-notice){min-width:0;max-width:100%}
body.sg-surface-desktop.sg-admin-area .section-heading{
  align-items:flex-end;
  gap:14px;
}
body.sg-surface-desktop.sg-admin-area .section-heading>div:first-child{min-width:0;max-width:100%}
body.sg-surface-desktop.sg-admin-area .section-heading :is(h1,h2,p){overflow-wrap:anywhere}
body.sg-surface-desktop.sg-admin-area .heading-links,
body.sg-surface-desktop.sg-admin-area .row-actions,
body.sg-surface-desktop.sg-admin-area .reg-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
body.sg-surface-desktop.sg-admin-area .platform-admin-back{min-width:0;margin-bottom:14px}
body.sg-surface-desktop.sg-admin-area .platform-admin-back .mini-button{max-width:100%;white-space:normal;text-align:left}

/* Parrilla principal de Administración de la plataforma. */
body.sg-surface-desktop.sg-admin-platform .platform-admin-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--sg-admin-gap);
  align-items:stretch;
}
body.sg-surface-desktop.sg-admin-platform .platform-admin-block{height:100%;min-width:0}
body.sg-surface-desktop.sg-admin-platform .platform-admin-block-head{min-width:0}
body.sg-surface-desktop.sg-admin-platform .platform-admin-block-head>div:last-child{min-width:0}
body.sg-surface-desktop.sg-admin-platform .platform-admin-block-head :is(h2,p){overflow-wrap:anywhere}
body.sg-surface-desktop.sg-admin-platform .platform-admin-block-body{min-width:0}
body.sg-surface-desktop.sg-admin-platform .platform-admin-modules,
body.sg-surface-desktop.sg-admin-platform .platform-admin-subgroup-items{min-width:0;align-content:start}
body.sg-surface-desktop.sg-admin-platform .platform-admin-module{
  min-width:0;
  min-height:var(--sg-admin-module-min);
}
body.sg-surface-desktop.sg-admin-platform .platform-admin-module-copy :is(strong,small){overflow-wrap:anywhere}
body.sg-surface-desktop.sg-admin-platform .platform-admin-module-arrow{align-self:center}

/* Formularios y accesos interiores: geometría común, sin modificar lógica. */
body.sg-surface-desktop.sg-admin-area .main-content :is(.two-col,.form-grid,.reg-form){
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px var(--sg-admin-gap);
  min-width:0;
}
body.sg-surface-desktop.sg-admin-area .main-content .three-col{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px var(--sg-admin-gap);
  min-width:0;
}
body.sg-surface-desktop.sg-admin-area .main-content :is(.two-col,.three-col,.form-grid,.reg-form)>*{min-width:0}
body.sg-surface-desktop.sg-admin-area .main-content :is(.two-col,.three-col,.form-grid,.reg-form) label{min-width:0}
body.sg-surface-desktop.sg-admin-area .main-content :is(.two-col,.three-col,.form-grid,.reg-form) :is(input,select,textarea){max-width:100%}
body.sg-surface-desktop.sg-admin-area .main-content :is(.table-scroll,[style*="overflow:auto"],[style*="overflow: auto"]){max-width:100%;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body.sg-surface-desktop.sg-admin-area .main-content table{max-width:100%}
body.sg-surface-desktop.sg-admin-area .main-content fieldset{min-width:0;max-width:100%}
body.sg-surface-desktop.sg-admin-area .main-content :is(.admin-role-row,.admin-access-user-link,.cleanup-row){min-width:0}
body.sg-surface-desktop.sg-admin-area .main-content :is(.admin-role-row,.admin-access-user-link,.cleanup-row)>*{min-width:0}

@media (min-width:851px) and (max-width:1279px){
  body.sg-surface-desktop.sg-admin-area{
    --sg-admin-gap:14px;
    --sg-admin-card-padding:17px;
    --sg-admin-module-min:64px;
  }
  body.sg-surface-desktop.sg-admin-area .main-content>.card{padding:var(--sg-admin-card-padding)}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-heading{align-items:flex-end}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-heading-meta{flex:0 0 auto}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-block-head{padding:17px 17px 14px;gap:12px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-block-body{padding:14px 17px 17px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-block-icon{flex-basis:46px;width:46px;height:46px;border-radius:14px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-block-svg{width:24px;height:24px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-module{grid-template-columns:38px minmax(0,1fr) auto;padding:10px 12px;gap:9px 10px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-module-icon{width:38px;height:38px;border-radius:11px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-module-svg{width:20px;height:20px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-module small{font-size:.77rem}
  body.sg-surface-desktop.sg-admin-area .main-content .three-col{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.sg-surface-desktop.sg-admin-area .main-content .three-col>.span-2{grid-column:1/-1}
}

@media (min-width:1280px){
  body.sg-surface-desktop.sg-admin-area{--sg-admin-gap:18px;--sg-admin-card-padding:22px}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-grid{gap:18px}
}

/* Fallback de escritorio estrechado. No es la vista móvil dedicada. */
@media (max-width:850px){
  body.sg-surface-desktop.sg-admin-platform .platform-admin-grid{grid-template-columns:minmax(0,1fr)}
  body.sg-surface-desktop.sg-admin-platform .platform-admin-block:last-child:nth-child(odd){grid-column:auto}
  body.sg-surface-desktop.sg-admin-area .main-content :is(.two-col,.three-col,.form-grid,.reg-form){grid-template-columns:minmax(0,1fr)}
  body.sg-surface-desktop.sg-admin-area .main-content :is(.span-2,.wide){grid-column:auto}
  body.sg-surface-desktop.sg-admin-area .section-heading{align-items:flex-start;flex-direction:column}
}

@media (max-width:560px){
  body.sg-surface-desktop.sg-admin-area .heading-links,
  body.sg-surface-desktop.sg-admin-area .row-actions,
  body.sg-surface-desktop.sg-admin-area .reg-actions{width:100%}
  body.sg-surface-desktop.sg-admin-area .heading-links>.button,
  body.sg-surface-desktop.sg-admin-area .row-actions>.button{flex:1 1 150px}
}


/* SocGol V6.13.47.24 · normalización responsive fase 5 · CALENDARIO DE CAMPOS
 * El workspace de escritorio es una superficie operativa full width.
 * No reutiliza ni modifica las vistas móviles dedicadas.
 */
body.sg-surface-desktop.field-calendar-workspace{
  --sg-field-workspace-gutter:16px;
  --sg-field-workspace-gap:14px;
  --sg-field-map-width:320px;
}
body.sg-surface-desktop.field-calendar-workspace main.shell.main-grid{
  width:calc(100% - (var(--sg-field-workspace-gutter) * 2))!important;
  max-width:none!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
  margin-inline:var(--sg-field-workspace-gutter)!important;
}
body.sg-surface-desktop.field-calendar-workspace main.main-grid>.main-content{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
body.sg-surface-desktop.field-calendar-workspace main.main-grid>.sidebar{display:none!important}
body.sg-surface-desktop.field-calendar-workspace .main-content>*{min-width:0;max-width:100%}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-heading{
  align-items:flex-end;
  gap:16px;
  margin-top:22px;
}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-heading>div:first-child{min-width:0}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-heading .field-actions{justify-content:flex-end}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-toolbar{
  grid-template-columns:minmax(145px,auto) minmax(260px,1fr) minmax(145px,auto) minmax(190px,250px);
  gap:10px 14px;
  width:100%;
}
body.sg-surface-desktop.field-calendar-workspace .field-view-switch{
  justify-content:flex-end;
  gap:8px;
}
body.sg-surface-desktop.field-calendar-workspace .field-visual-summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-visual-tools{
  width:100%;
  min-width:0;
}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-range-switch,
body.sg-surface-desktop.field-calendar-workspace .field-calendar-print-group{
  min-width:0;
  flex-wrap:wrap;
}
body.sg-surface-desktop.field-calendar-workspace .field-timeline-scroll,
body.sg-surface-desktop.field-calendar-workspace .field-month-scroll,
body.sg-surface-desktop.field-calendar-workspace .field-daily-timeline-scroll{
  width:100%;
  max-width:100%;
  min-width:0;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
body.sg-surface-desktop.field-calendar-workspace .field-timeline-grid{
  width:100%;
  grid-template-columns:68px repeat(var(--day-count,7),minmax(150px,1fr));
  min-width:var(--timeline-min,1120px);
}
body.sg-surface-desktop.field-calendar-workspace .field-month-grid{
  width:100%;
  grid-template-columns:repeat(7,minmax(145px,1fr));
  min-width:1030px;
}
body.sg-surface-desktop.field-calendar-workspace .field-daily-workspace{
  grid-template-columns:minmax(0,1fr) minmax(300px,var(--sg-field-map-width));
  gap:var(--sg-field-workspace-gap);
  width:100%;
  align-items:start;
}
body.sg-surface-desktop.field-calendar-workspace .field-daily-planner,
body.sg-surface-desktop.field-calendar-workspace .field-daily-map-panel{min-width:0}
body.sg-surface-desktop.field-calendar-workspace .field-daily-map-panel{
  position:sticky;
  top:76px;
  max-height:calc(100vh - 96px);
  overflow:auto;
}
body.sg-surface-desktop.field-calendar-workspace .field-daily-timeline-grid{
  width:100%;
  grid-template-columns:68px repeat(var(--facility-count,1),minmax(210px,1fr));
}
body.sg-surface-desktop.field-calendar-workspace .field-calendar-forms{
  width:100%;
  gap:var(--sg-field-workspace-gap);
}
body.sg-surface-desktop.field-calendar-workspace .field-map-grid{width:100%;min-width:0}
body.sg-surface-desktop.field-calendar-workspace .field-map-card,
body.sg-surface-desktop.field-calendar-workspace .field-day-column,
body.sg-surface-desktop.field-calendar-workspace .field-calendar-forms>.card{min-width:0}

/* Escritorio compacto: sigue siendo escritorio y conserva el mapa lateral.
 * El calendario puede hacer scroll interno si la información supera el ancho útil.
 */
@media (min-width:851px) and (max-width:1279px){
  body.sg-surface-desktop.field-calendar-workspace{
    --sg-field-workspace-gutter:12px;
    --sg-field-workspace-gap:12px;
    --sg-field-map-width:285px;
  }
  body.sg-surface-desktop.field-calendar-workspace .field-calendar-heading{margin-top:18px}
  body.sg-surface-desktop.field-calendar-workspace .field-calendar-toolbar{
    grid-template-columns:minmax(130px,auto) minmax(220px,1fr) minmax(130px,auto) minmax(170px,220px);
  }
  body.sg-surface-desktop.field-calendar-workspace .field-visual-summary{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-move-panel{
    grid-template-columns:repeat(3,minmax(140px,1fr));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-daily-workspace{
    grid-template-columns:minmax(0,1fr) minmax(270px,var(--sg-field-map-width));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-daily-map-panel{
    position:sticky;
    top:70px;
    max-height:calc(100vh - 88px);
  }
  body.sg-surface-desktop.field-calendar-workspace .field-daily-timeline-scroll{max-height:calc(100vh - 230px)}
  body.sg-surface-desktop.field-calendar-workspace .field-timeline-grid{
    grid-template-columns:62px repeat(var(--day-count,7),minmax(160px,1fr));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-calendar-forms{grid-template-columns:minmax(0,1fr)}
}

@media (min-width:1280px){
  body.sg-surface-desktop.field-calendar-workspace{
    --sg-field-workspace-gutter:20px;
    --sg-field-workspace-gap:16px;
    --sg-field-map-width:360px;
  }
  body.sg-surface-desktop.field-calendar-workspace .field-daily-workspace{
    grid-template-columns:minmax(0,1fr) minmax(330px,var(--sg-field-map-width));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-daily-timeline-scroll{max-height:calc(100vh - 230px)}
  body.sg-surface-desktop.field-calendar-workspace .field-week-grid{
    grid-template-columns:repeat(7,minmax(0,1fr));
  }
  body.sg-surface-desktop.field-calendar-workspace .field-calendar-forms{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* SocGol V6.13.47.27 · normalización responsive fase 6 · DELEGADOS / PLAN / CONVOCATORIA
 * Superficie operativa desktop. Conserva la vista escritorio y la vista tablet
 * del módulo como composiciones web; las vistas móviles dedicadas siguen fuera.
 */
body.sg-surface-desktop.field-delegate-page{
  --sg-fd-gap:14px;
  --sg-fd-workspace-max:1680px;
  --sg-fd-compact-sidebar:250px;
}
body.sg-surface-desktop.field-delegate-page :is(.fd,.fd-workspace,.fd-card,.fd-form,.fd-form-grid,.fd-player-table-wrap,.fd-lineup-layout,.fd-lineup-roster,.fd-pitch-panel,.fd-plan-toolbar,.fd-section-title){min-width:0;max-width:100%}
body.sg-surface-desktop.field-delegate-page .fd-head,
body.sg-surface-desktop.field-delegate-page .fd-section-title,
body.sg-surface-desktop.field-delegate-page .fd-plan-toolbar,
body.sg-surface-desktop.field-delegate-page .fd-actions,
body.sg-surface-desktop.field-delegate-page .fd-plan-save-actions,
body.sg-surface-desktop.field-delegate-page .fd-callup-section-actions{min-width:0;flex-wrap:wrap}
body.sg-surface-desktop.field-delegate-page .fd-head>*,
body.sg-surface-desktop.field-delegate-page .fd-section-title>*,
body.sg-surface-desktop.field-delegate-page .fd-plan-toolbar>*,
body.sg-surface-desktop.field-delegate-page .fd-callup-section-actions>*{min-width:0}
body.sg-surface-desktop.field-delegate-page .fd-card{overflow-wrap:anywhere}
body.sg-surface-desktop.field-delegate-page .fd-player-table-wrap,
body.sg-surface-desktop.field-delegate-page .fd-planned-subs,
body.sg-surface-desktop.field-delegate-page .fd-lineup-periods{
  width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;
}
body.sg-surface-desktop.field-delegate-page .fd-player-table-wrap{overflow-y:hidden!important}
body.sg-surface-desktop.field-delegate-page .fd-player-table-compact.fd-callup-standard{min-width:1200px!important;width:100%!important}
body.sg-surface-desktop.field-delegate-page .fd-detailed-callup-body{min-width:0;max-width:100%}
body.sg-surface-desktop.field-delegate-page .fd-lineup-layout>*{min-width:0}
body.sg-surface-desktop.field-delegate-page .fd-pitch{max-width:100%}
body.sg-surface-desktop.field-delegate-page .fd-pitch-head{min-width:0;flex-wrap:wrap}
body.sg-surface-desktop.field-delegate-page .fd-pitch-system-block{max-width:100%;min-width:0}
body.sg-surface-desktop.field-delegate-page .fd-formation-editor{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
body.sg-surface-desktop.field-delegate-page .fd-attendance-summary{min-width:0}
body.sg-surface-desktop.field-delegate-page .fd-callup-publication-meta,
body.sg-surface-desktop.field-delegate-page .fd-callup-change-summary{min-width:0}
body.sg-surface-desktop.field-delegate-page .fd-sub-row{max-width:none}
body.sg-surface-desktop.field-delegate-page .fd-sticky-save{max-width:100%}
/* V6.13.47.30 · preparación visual: el bloque de convocados toma exactamente
 * la altura del panel derecho completo (controles + campo + contador). La altura
 * llega desde JS mediante una custom property para vencer reglas legacy !important. */
body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-layout{align-items:start!important}
body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-roster{
  display:flex!important;flex-direction:column!important;align-self:start!important;
  height:var(--fd-lineup-roster-height,auto)!important;
  max-height:var(--fd-lineup-roster-height,none)!important;
  min-height:0!important;overflow:hidden!important;box-sizing:border-box;
}
body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-player-list{
  flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;
}
body.sg-surface-desktop.field-delegate-plan-page .fd-pitch-panel{align-self:start!important;height:auto!important;min-height:0}
body.sg-surface-desktop.field-delegate-page .fd-view-picker{display:none!important}

/* Los partidos y su planificación disponen de algo más de ancho que el shell
 * general sin eliminar automáticamente la sidebar del portal. */
body.sg-surface-desktop.field-delegate-workspace main.shell.main-grid{
  width:min(var(--sg-fd-workspace-max),calc(100% - (var(--sg-responsive-gutter) * 2)));
  max-width:var(--sg-fd-workspace-max);
}
body.sg-surface-desktop.field-delegate-workspace main.main-grid>.main-content{min-width:0;max-width:none}

/* Escritorio compacto: continúa siendo desktop. Priorizamos espacio operativo,
 * 2 columnas en formularios y preparación visual siempre en paralelo. */
@media (min-width:851px) and (max-width:1279px){
  body.sg-surface-desktop.field-delegate-page{--sg-fd-gap:12px}
  /* En escritorio compacto el workspace operativo gana todo el ancho de forma
   * automática. Sustituye a la antigua selección manual «Vista tablet». */
  body.sg-surface-desktop.field-delegate-workspace main.shell.main-grid,
  body.sg-surface-desktop.field-delegate-workspace main.main-grid:not(.main-grid--full),
  body.sg-surface-desktop.field-delegate-workspace main.main-grid--full{
    width:calc(100% - (var(--sg-responsive-gutter) * 2))!important;
    max-width:var(--sg-fd-workspace-max)!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:0!important;
  }
  body.sg-surface-desktop.field-delegate-workspace main.main-grid>.sidebar{display:none!important}
  body.sg-surface-desktop.field-delegate-page .fd-card{padding:14px}
  body.sg-surface-desktop.field-delegate-page .fd-form-grid,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid-team,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid-technical{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.sg-surface-desktop.field-delegate-page .fd-create-span-2{grid-column:span 2}
  body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-layout{grid-template-columns:minmax(250px,.68fr) minmax(430px,1.32fr)!important;gap:14px}
  body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-player-list{max-height:none!important}
  body.sg-surface-desktop.field-delegate-plan-page .fd-pitch{width:min(100%,580px)}
  body.sg-surface-desktop.field-delegate-page .fd-plan-toolbar{gap:10px}
  body.sg-surface-desktop.field-delegate-page .fd-plan-toolbar .button{min-width:150px}
  body.sg-surface-desktop.field-delegate-page .fd-plan-save-actions{justify-content:flex-end}
  body.sg-surface-desktop.field-delegate-page .fd-callup-section-actions{justify-content:flex-end}
  body.sg-surface-desktop.field-delegate-page .fd-live-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.sg-surface-desktop.field-delegate-page .fd-live-state{grid-template-columns:minmax(0,1fr)}
}

/* Escritorio amplio: recupera densidad y la preparación visual lado a lado. */
@media (min-width:1280px){
  body.sg-surface-desktop.field-delegate-page{--sg-fd-gap:16px}
  body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-layout{grid-template-columns:minmax(300px,.78fr) minmax(520px,1.22fr)!important;gap:18px}
  body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-player-list{max-height:none!important}
  body.sg-surface-desktop.field-delegate-page .fd-plan-save-actions{justify-content:flex-end}
  body.sg-surface-desktop.field-delegate-page .fd-live-actions{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* Fallback si una vista desktop se fuerza por debajo del límite. No sustituye
 * a /mobile/delegates ni a /mobile/callups. */
@media (max-width:850px){
  body.sg-surface-desktop.field-delegate-page .fd-head,
  body.sg-surface-desktop.field-delegate-page .fd-section-title{align-items:stretch;flex-direction:column}
  body.sg-surface-desktop.field-delegate-page .fd-form-grid,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid-team,
  body.sg-surface-desktop.field-delegate-page .fd-create-grid-technical{grid-template-columns:minmax(0,1fr)}
  body.sg-surface-desktop.field-delegate-page .fd-create-span-2{grid-column:auto}
  body.sg-surface-desktop.field-delegate-plan-page .fd-lineup-layout{grid-template-columns:minmax(0,1fr)!important}
  body.sg-surface-desktop.field-delegate-page .fd-plan-save-actions{width:100%}
  body.sg-surface-desktop.field-delegate-page .fd-plan-save-actions .button{flex:1 1 180px;min-width:0}
}
