/* Dialog surfaces follow the exercise editor. Only UI is affected, never saved artwork. */
html {
  --mfa-dialog-accent:#22c55e; --mfa-dialog-dark:#16a34a; --mfa-dialog-rgb:34,197,94;
  --mfa-dialog-text:#e5e7eb; --mfa-dialog-title:#f8fafc; --mfa-dialog-muted:#cbd5e1;
  --mfa-dialog-bg:linear-gradient(180deg,#0f172a,#020617);
  --mfa-dialog-input:linear-gradient(180deg,#07111f,#020617);
  --mfa-dialog-border:#223047; --mfa-dialog-soft:rgba(255,255,255,.08);
  --mfa-dialog-contrast:#fff; --mfa-dialog-shadow:0 24px 60px rgba(0,0,0,.45);
}
html[data-mfe-theme="light"] {
  --mfa-dialog-accent:#16a34a; --mfa-dialog-dark:#15803d; --mfa-dialog-rgb:22,163,74;
  --mfa-dialog-text:#0f172a; --mfa-dialog-title:#0f172a; --mfa-dialog-muted:#334155;
  --mfa-dialog-bg:linear-gradient(180deg,#ffffff,#eef4ef);
  --mfa-dialog-input:linear-gradient(180deg,#ffffff,#f2f7f3);
  --mfa-dialog-border:#cbd5e1; --mfa-dialog-soft:rgba(15,23,42,.10);
  --mfa-dialog-shadow:0 20px 42px rgba(15,23,42,.16);
}
html[data-mfe-theme="gray"] {
  --mfa-dialog-accent:#d1d5db; --mfa-dialog-dark:#9ca3af; --mfa-dialog-rgb:209,213,219;
  --mfa-dialog-text:#f3f4f6; --mfa-dialog-title:#fff; --mfa-dialog-muted:#d1d5db;
  --mfa-dialog-bg:linear-gradient(180deg,#20242a,#111315);
  --mfa-dialog-input:linear-gradient(180deg,#1b1f24,#111315);
  --mfa-dialog-border:#3f4650; --mfa-dialog-soft:rgba(255,255,255,.10); --mfa-dialog-contrast:#111827;
}
html[data-mfe-theme="custom"] {
  --mfa-dialog-accent:var(--mfe-custom-primary,#22c55e); --mfa-dialog-dark:var(--mfe-custom-primary-dark,#16a34a); --mfa-dialog-rgb:var(--mfe-custom-primary-rgb,34,197,94);
  --mfa-dialog-text:#eef3f9; --mfa-dialog-title:#fff; --mfa-dialog-muted:#c9d4e2;
  --mfa-dialog-bg:linear-gradient(180deg,#0a1627,#04101a);
  --mfa-dialog-input:linear-gradient(180deg,#081827,#04101a);
  --mfa-dialog-border:rgba(var(--mfa-dialog-rgb),.26); --mfa-dialog-soft:rgba(var(--mfa-dialog-rgb),.16);
}
/* Leave the approved exercise export/confirmation cards alone. */
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.mfe-excel-progress-card,.mfe-export-progress-card,.gps-export-card,.gps-page-loader-card,.gps-progress-card,.dashboard-identity-modal-card,.mfa-feedback-card) {
  background:radial-gradient(circle at top,rgba(var(--mfa-dialog-rgb),.12),transparent 42%),var(--mfa-dialog-bg)!important;
  color:var(--mfa-dialog-text)!important; border:1px solid var(--mfa-dialog-soft)!important;
  border-radius:20px!important; box-shadow:var(--mfa-dialog-shadow)!important;
  backdrop-filter:none!important; font-family:Arial,Helvetica,sans-serif;
  padding:22px; box-sizing:border-box;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.mfe-excel-progress-card,.mfe-export-progress-card,.gps-export-card,.gps-page-loader-card,.gps-progress-card) :is(.rename-plan-badge,.pm-kicker,.confirm-action-badge,.export-choice-badge,.export-file-badge,.matchday-export-progress-badge,.modal-badge,.pill.active,.mfe-excel-badge,.mfe-export-progress-badge,.gps-kicker) {
  display:inline-flex; align-items:center; width:max-content; max-width:100%; min-height:30px;
  padding:0 12px; border-radius:999px!important; background:rgba(var(--mfa-dialog-rgb),.14)!important;
  border:1px solid rgba(var(--mfa-dialog-rgb),.28)!important; color:var(--mfa-dialog-title)!important;
  font-family:inherit!important; font-size:12px!important; font-weight:800!important; letter-spacing:.35px!important;
  text-transform:uppercase; box-shadow:none!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card,.gps-page-loader-card,.gps-progress-card) :is(.rename-plan-title,.section-title,.confirm-action-title,.export-choice-title,.export-file-title,.modal-title,h3) {
  color:var(--mfa-dialog-title)!important; font-size:24px!important; line-height:1.15!important;
  font-weight:900!important; margin:14px 0 8px; font-family:inherit!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card,.gps-page-loader-card,.gps-progress-card) :is(.rename-plan-copy,.section-copy,.confirm-action-copy,.export-choice-copy,.export-file-copy,.modal-copy,p) {
  color:var(--mfa-dialog-muted)!important; font-family:inherit!important; font-size:14px; line-height:1.5;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]),select,textarea) {
  color:var(--mfa-dialog-text)!important; background:var(--mfa-dialog-input)!important;
  border:1px solid var(--mfa-dialog-border)!important; border-radius:12px!important;
  font-family:inherit!important; font-size:14px!important; font-weight:400!important;
  padding:10px 14px; box-sizing:border-box;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(input,select,textarea):focus {
  outline:none; border-color:var(--mfa-dialog-accent)!important; box-shadow:0 0 0 3px rgba(var(--mfa-dialog-rgb),.16)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(input[type="checkbox"],input[type="radio"]) {accent-color:var(--mfa-dialog-accent)!important;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(.rename-plan-actions,.matchday-overlay-head,.confirm-action-actions,.export-choice-actions,.export-file-actions,.microcycle-modal-actions,.matchday-export-progress-actions,.modal-actions,.mfe-excel-actions,.gps-export-actions,.row,.export-actions) > button,
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(button.btn,button.export-choice-btn) {
  font-family:inherit!important; font-size:14px!important; font-weight:800!important; border-radius:12px!important;
  min-height:40px; padding:10px 18px; line-height:1.25;
  color:var(--mfa-dialog-text)!important; background:var(--mfa-dialog-input)!important; border:1px solid var(--mfa-dialog-border)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(button.primary,button.btn-primary,button.mfe-btn-primary,button.active) {
  background:linear-gradient(135deg,var(--mfa-dialog-accent),var(--mfa-dialog-dark))!important;
  color:var(--mfa-dialog-contrast)!important; border-color:var(--mfa-dialog-accent)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) button:is(.danger,.btn-danger,[data-variant="danger"]) {background:#991b1b!important;border-color:#b91c1c!important;color:#fff!important;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(.export-choice-btn.is-active,.gps-choice-card.is-active,.micro-export-option:has(input:checked),.match-export-option.active,.export-choice.active) {
  background:rgba(var(--mfa-dialog-rgb),.12)!important; border-color:var(--mfa-dialog-accent)!important; box-shadow:0 0 0 1px rgba(var(--mfa-dialog-rgb),.18)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.gps-progress-bar,.gps-page-loader-bar) > div,
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.mfe-excel-fill,.mfe-progress-fill) {background:var(--mfa-dialog-accent)!important;background-image:none!important;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) * {scrollbar-color:rgba(var(--mfa-dialog-rgb),.65) transparent;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) ::-webkit-scrollbar-thumb {background:rgba(var(--mfa-dialog-rgb),.65)!important;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) :is(.rename-plan-actions,.matchday-overlay-head,.confirm-action-actions,.export-choice-actions,.export-file-actions,.microcycle-modal-actions,.matchday-export-progress-actions,.modal-actions,.mfe-excel-actions,.gps-export-actions) {gap:10px;}
@media(max-width:600px){html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card){padding:18px;max-width:calc(100vw - 24px)!important;}html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.microcycle-modal-card,.matchday-export-progress-card,.mfa-feedback-dialog,.game-model-modal-surface,.modal-card,.mfe-excel-card,.gps-export-card) .modal-title {font-size:22px!important;}}
/* GPS injects its original styles at runtime: override the actual dialog IDs. */
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.matchday-overlay-card,.microcycle-modal-card) {padding:0;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.confirm-action-card,.rename-plan-card,.export-choice-card,.export-file-card,.gps-export-card,.mfe-excel-card) {
  max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(#gpsImportModal,#gpsDetailModal,#gpsImportProgress) .modal-card {
  background:radial-gradient(circle at top,rgba(var(--mfa-dialog-rgb),.12),transparent 42%),var(--mfa-dialog-bg)!important;
  background-color:#04101a!important; backdrop-filter:none!important;
  border:1px solid var(--mfa-dialog-soft)!important; box-shadow:var(--mfa-dialog-shadow)!important;
}
html[data-mfe-theme="light"] body :is(#gpsImportModal,#gpsDetailModal,#gpsImportProgress) .modal-card {background-color:#fff!important;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.modal-card,.microcycle-modal-card,.gps-export-card,.mfe-excel-card) button.btn.primary,
html[data-mfe-theme]:not([data-mfe-theme=""]) body #gpsImportModal button.primary {
  background:linear-gradient(135deg,var(--mfa-dialog-accent),var(--mfa-dialog-dark))!important;
  border-color:var(--mfa-dialog-accent)!important;color:var(--mfa-dialog-contrast)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.matchday-overlay-card,.exercise-detail-card,.daily-report-dialog,.upgrade-dialog,.confirm-action-card,.export-file-card,.export-choice-card,.modal-card,.microcycle-modal-card,.gps-export-card) :is(.export-content-master:has(input:checked),.export-content-option:has(input:checked)) {
  background:rgba(var(--mfa-dialog-rgb),.12)!important; border-color:rgba(var(--mfa-dialog-rgb),.28)!important;
}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.rename-plan-card,.confirm-action-card,.export-file-card,.export-choice-card,.modal-card,.matchday-overlay-card,.gps-export-card,.mfe-excel-card) button.btn:hover:not(:disabled),
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.export-file-card,.export-choice-card) button.export-choice-btn.is-active {
  border-color:var(--mfa-dialog-accent)!important;
  box-shadow:0 0 0 1px rgba(var(--mfa-dialog-rgb),.18)!important;
}
/* Some legacy page rules target every child with !important. Dialog IDs keep
   button contrast and nested panels consistent without affecting the pitch. */
html[data-mfe-theme] body :is(#folderNameModal,#renamePlanModal,#confirmActionModal,#microExportChoiceModal,#pdfModal,#matchExportOptionsModal,#playersLineupModal,#postMatchOverlayModal) button.btn:not(.primary):not(.danger) {
  background:var(--mfa-dialog-input)!important;color:var(--mfa-dialog-text)!important;border-color:var(--mfa-dialog-border)!important;
}
html[data-mfe-theme] body :is(#microExportChoiceModal,#pdfModal,#matchExportOptionsModal) button.export-choice-btn.is-active {
  background:rgba(var(--mfa-dialog-rgb),.14)!important;border-color:var(--mfa-dialog-accent)!important;
  box-shadow:0 0 0 1px rgba(var(--mfa-dialog-rgb),.18)!important;
}
html[data-mfe-theme] body :is(#microExportChoiceModal,#pdfModal,#matchExportOptionsModal) button.export-choice-btn > span {color:var(--mfa-dialog-text)!important;}
html[data-mfe-theme] body :is(#microExportChoiceModal,#pdfModal,#matchExportOptionsModal) button.export-choice-btn > small {color:var(--mfa-dialog-muted)!important;}
html[data-mfe-theme] body #postMatchOverlayModal :is(.postmatch-panel,.block) {
  background:var(--mfa-dialog-input)!important;border-color:var(--mfa-dialog-soft)!important;color:var(--mfa-dialog-text)!important;
}
html[data-mfe-theme] body #postMatchOverlayModal :is(.section-title,.block-title) {color:var(--mfa-dialog-title)!important;}
html[data-mfe-theme] body #postMatchOverlayModal :is(.section-copy,.label) {color:var(--mfa-dialog-muted)!important;}
html[data-mfe-theme] body #postMatchOverlayModal :is(input,textarea) {
  background:var(--mfa-dialog-input)!important;color:var(--mfa-dialog-text)!important;border-color:var(--mfa-dialog-border)!important;
}
html[data-mfe-theme] body #postMatchOverlayModal :is(input,textarea)::placeholder {color:var(--mfa-dialog-muted)!important;opacity:.7;}
html[data-mfe-theme]:not([data-mfe-theme=""]) body :is(.export-file-card,.export-choice-card) button.export-choice-btn.is-active {
  background:rgba(var(--mfa-dialog-rgb),.14)!important;color:var(--mfa-dialog-text)!important;
}

/* Native re-entry dialog: page button heights must not clip its labels. */
html body dialog#mfa-session-pause {
  background:var(--mfa-dialog-bg)!important;color:var(--mfa-dialog-text)!important;
  border:1px solid var(--mfa-dialog-soft)!important;border-radius:20px!important;
  box-shadow:var(--mfa-dialog-shadow)!important;font:14px/1.5 Arial,Helvetica,sans-serif!important;
  width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:22px!important;overflow:auto;
}
html body #mfa-session-pause h2 {font:900 24px/1.15 Arial,Helvetica,sans-serif!important;color:var(--mfa-dialog-title)!important;}
html body #mfa-session-pause p {color:var(--mfa-dialog-muted)!important;overflow-wrap:anywhere;}
html body #mfa-session-pause form {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:stretch;}
html body #mfa-session-pause form > :not(button) {grid-column:1/-1;}
html body #mfa-session-pause input[type="password"] {
  width:100%!important;box-sizing:border-box!important;height:auto!important;min-height:44px!important;max-height:none!important;
  padding:12px!important;background:var(--mfa-dialog-input)!important;color:var(--mfa-dialog-text)!important;
  border:1px solid var(--mfa-dialog-border)!important;border-radius:12px!important;font:14px/1.4 Arial,Helvetica,sans-serif!important;
}
html body #mfa-session-pause input[type="password"]:focus {outline:none;border-color:var(--mfa-dialog-accent)!important;box-shadow:0 0 0 3px rgba(var(--mfa-dialog-rgb),.16)!important;}
html body #mfa-session-pause button {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;
  position:static!important;width:100%!important;min-width:0!important;height:auto!important;min-height:46px!important;max-height:none!important;
  padding:12px 18px!important;margin:0!important;line-height:1.4!important;font:800 14px/1.4 Arial,Helvetica,sans-serif!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;text-align:center!important;vertical-align:top!important;
  border:1px solid var(--mfa-dialog-border)!important;border-radius:12px!important;
  background:var(--mfa-dialog-input)!important;color:var(--mfa-dialog-text)!important;
}
html body #mfa-session-pause button[type="submit"] {
  background:linear-gradient(135deg,var(--mfa-dialog-accent),var(--mfa-dialog-dark))!important;
  color:var(--mfa-dialog-contrast)!important;border-color:var(--mfa-dialog-accent)!important;
}
html body #mfa-session-pause #mfa-session-error {color:#fa989f!important;}
html body #mfa-session-pause #mfa-session-error:empty {display:none;}
html body #mfa-session-pause button:disabled {opacity:.65;cursor:wait;}
@media(max-width:560px){html body #mfa-session-pause form {grid-template-columns:minmax(0,1fr);}}

/* Compact tactical position controls must fit the common modal typography. */
html[data-mfe-theme] body #playersLineupModal .matchday-lineup-position-picker select {
  height:auto;min-height:40px;max-height:none;padding:8px 10px;line-height:1.25;
}

@media (min-width:901px) and (max-width:1180px) {
  #playersLineupModal .matchday-lineup-player-controls {flex-wrap:wrap;}
  #playersLineupModal .matchday-lineup-player-controls .matchday-lineup-role-switch {flex:1 1 100%;min-width:0;}
}
