
:root{
  --bg:#f3f5f8;
  --card:#ffffff;
  --line:#d9dee7;
  --text:#102a4d;
  --muted:#50627c;
  --primary:#1e63ff;
  --primary-soft:#dce9ff;
  --success:#0f766e;
  --success-soft:#ccfbf1;
  --warn:#9a3412;
  --warn-soft:#ffedd5;
  --danger:#b42318;
  --danger-soft:#fee4e2;
  --shadow:0 12px 35px rgba(16,42,77,.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}
button,input,label{font:inherit}

.fmtm-topbar{
  background:#fff;
  border-bottom:1px solid #e3e7ef;
  position:sticky;
  top:0;
  z-index:20;
}
.fmtm-topbar-inner{
  max-width:1240px;
  margin:0 auto;
  padding:18px 22px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
}
.fmtm-topbar-brand{display:flex;gap:14px;align-items:center}
.fmtm-logo-dot{
  width:18px;height:18px;border-radius:999px;
  background:radial-gradient(circle at 30% 30%, #ff7887 0, #c51b2f 70%);
  box-shadow:0 0 0 6px #ffe4e8;
}
.fmtm-topbar-title{font-size:20px;font-weight:800;line-height:1.1}
.fmtm-topbar-subtitle{font-size:12px;color:var(--muted)}
.fmtm-mini-pill{
  display:inline-flex;align-items:center;
  padding:8px 12px;border-radius:999px;
  background:#eef4ff;color:#2959c7;font-weight:700;font-size:13px;
}

.fmtm-shell{max-width:1240px;margin:0 auto;padding:28px 22px 40px}
.fmtm-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px 18px;
  margin-bottom:18px;
}
.fmtm-card-collapsible{padding-bottom:20px}
.fmtm-section-title-wrap{
  display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;
  margin-bottom:16px;
}
.fmtm-section-title-wrap h2{
  margin:0;
  font-size:30px;
  line-height:1.15;
  color:#102a4d;
}
.fmtm-section-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.fmtm-badge-info{
  display:inline-flex;align-items:center;padding:7px 11px;border-radius:999px;
  background:#eef4ff;color:#2959c7;font-weight:700;font-size:13px
}

.fmtm-alert{
  max-width:1240px;margin:18px auto 0;padding:12px 16px;border-radius:14px;border:1px solid var(--line)
}
.fmtm-alert.is-success{background:#ecfdf3;border-color:#b7ebc8;color:#086b45}
.fmtm-alert.is-error{background:#fff1f2;border-color:#fecdd3;color:#9f1239}

.fmtm-login-body{
  background:
    radial-gradient(circle at top left, rgba(30,99,255,.09), transparent 28%),
    radial-gradient(circle at bottom right, rgba(16,42,77,.08), transparent 24%),
    var(--bg);
  min-height:100vh;
}
.fmtm-login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:30px;
  align-items:center;
}
.fmtm-login-brand h1{
  margin:0 0 14px 0;
  font-size:52px;
  line-height:1.02;
  max-width:720px;
}
.fmtm-login-brand p{
  margin:0 0 18px 0;
  max-width:620px;
  color:var(--muted);
  font-size:18px;
  line-height:1.55;
}
.fmtm-brand-pill{
  display:inline-flex;align-items:center;padding:10px 14px;border-radius:999px;
  background:#eaf2ff;color:#2959c7;font-weight:800;font-size:13px;margin-bottom:18px;
}
.fmtm-login-highlights{
  list-style:none;padding:0;margin:22px 0 0 0;display:grid;gap:10px;max-width:430px
}
.fmtm-login-highlights li{
  background:#fff;border:1px solid #e6ebf2;border-radius:14px;padding:12px 14px;box-shadow:var(--shadow)
}
.fmtm-login-card{
  background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:var(--shadow)
}
.fmtm-card-header h2{margin:0 0 6px 0;font-size:34px}
.fmtm-card-header p{margin:0 0 18px 0;color:var(--muted)}
.fmtm-form-grid{display:grid;gap:16px}
.fmtm-field label{display:block;margin-bottom:8px;font-weight:700;color:#27405f}
.fmtm-field input[type="text"],
.fmtm-field input[type="password"],
.fmtm-field input[type="email"],
.fmtm-field input[type="number"]{
  width:100%;height:48px;border:1px solid #cfd8e5;border-radius:12px;padding:0 14px;background:#fff
}
.fmtm-field input:focus{outline:none;border-color:#82a8ff;box-shadow:0 0 0 4px rgba(30,99,255,.12)}
.fmtm-password-wrap{position:relative}
.fmtm-password-wrap input{padding-right:52px !important}
.fmtm-password-toggle{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border:0;background:transparent;cursor:pointer
}
.fmtm-form-actions{padding-top:4px}
.fmtm-login-note{margin-top:16px;color:var(--muted);font-size:14px;line-height:1.45}

.fmtm-btn{
  border:1px solid transparent;border-radius:12px;padding:10px 14px;font-weight:700;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px
}
.fmtm-btn-block{width:100%}
.fmtm-btn-primary{background:var(--primary);color:#fff}
.fmtm-btn-primary:hover{filter:brightness(.97)}
.fmtm-btn-secondary{background:#eef4ff;color:#2959c7;border-color:#cddcff}
.fmtm-btn-light{background:#f8fafc;color:#334155;border-color:#d7dee5}
.fmtm-btn-warn{background:var(--warn-soft);color:var(--warn);border-color:#fed7aa}
.fmtm-btn-icon{width:42px;padding:0;background:#fff;border-color:#cfd8e5}
.fmtm-inline-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.fmtm-profile-grid{
  display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap
}
.fmtm-profile-left{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.fmtm-avatar{width:88px;height:88px;border-radius:18px;object-fit:cover;border:1px solid #dce3ed;background:#edf2f7}
.fmtm-avatar-fallback{display:flex;align-items:center;justify-content:center;font-size:30px}
.fmtm-profile-name{font-size:18px;font-weight:800;margin-bottom:6px}
.fmtm-profile-line{font-size:14px;color:var(--muted);line-height:1.55}
.fmtm-profile-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.fmtm-empty{margin:0;color:var(--muted)}

.fmtm-match-list{display:grid;gap:14px}
.fmtm-match-card{
  border:1px solid #dde4ef;border-radius:16px;padding:16px;background:linear-gradient(180deg,#fff,#fafcff)
}
.fmtm-match-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.fmtm-match-acta{font-size:17px;font-weight:800}
.fmtm-match-meta{font-size:13px;color:var(--muted);margin-top:4px}
.fmtm-status{
  display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;font-size:12px;font-weight:800
}
.fmtm-status.is-assigned{background:#eef4ff;color:#2959c7}
.fmtm-status.is-accepted{background:#ecfdf3;color:#0d7a51}
.fmtm-status.is-live{background:#fee2e2;color:#b42318}
.fmtm-status.is-rejected{background:#fff1f2;color:#be123c}
.fmtm-status.is-finished{background:#eef2f6;color:#475569}

.fmtm-versus-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;margin-top:14px}
.fmtm-player-box{
  border:1px solid #dbe3ef;border-radius:14px;padding:14px;background:#fff;min-height:94px;
  display:flex;flex-direction:column;justify-content:center
}
.fmtm-player-name{font-weight:800;font-size:17px}
.fmtm-player-club{color:var(--muted);font-size:14px;margin-top:4px}
.fmtm-versus-center{font-weight:900;color:#27405f}
.fmtm-match-result{margin-top:12px;color:#27405f}

.fmtm-tournament-list{display:grid;gap:12px}
.fmtm-tournament-card{
  display:block;padding:14px 16px;border-radius:14px;border:1px solid #dbe3ef;background:#fff;transition:.15s ease
}
.fmtm-tournament-card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.fmtm-tournament-card.is-active{background:#dbeafe;border-color:#8bb9ff}
.fmtm-tournament-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.fmtm-tournament-meta{font-size:13px;color:var(--muted);margin-top:6px}
.fmtm-chip{
  display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;background:#e7edf4;color:#334155;font-size:12px;font-weight:800
}
.fmtm-chip.is-active{background:#2563eb;color:#fff}

.fmtm-notification-list{display:grid;gap:12px}
.fmtm-notification{
  border:1px solid #dde4ef;border-radius:14px;padding:14px;background:#fff
}
.fmtm-notification.is-unread{background:linear-gradient(180deg,#ffffff,#f8fbff)}
.fmtm-notification.is-read{opacity:.88}
.fmtm-notification-title-row{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.fmtm-notification-date{font-size:12px;color:var(--muted)}
.fmtm-notification-text{margin-top:6px;color:#27405f;line-height:1.5}
.fmtm-notification-foot{margin-top:8px;color:var(--muted);font-size:12px}

@media (max-width: 980px){
  .fmtm-login-shell{grid-template-columns:1fr;align-items:start;padding-top:24px}
  .fmtm-login-brand h1{font-size:40px}
}
@media (max-width: 720px){
  .fmtm-shell{padding:18px 14px 28px}
  .fmtm-card{padding:16px}
  .fmtm-section-title-wrap h2{font-size:24px}
  .fmtm-topbar-inner{padding:14px}
  .fmtm-versus-grid{grid-template-columns:1fr;gap:10px}
  .fmtm-versus-center{display:none}
}

.fmtm-foldable-box{
  margin-top:14px;
  border:1px solid #d7dfeb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.fmtm-foldable-box summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  font-weight:700;
  color:#17345f;
  background:#f6f8fc;
}
.fmtm-foldable-box summary::-webkit-details-marker{
  display:none;
}
.fmtm-foldable-box summary::before{
  content:'▶';
  margin-right:10px;
  font-size:12px;
  transition:transform .18s ease;
}
.fmtm-foldable-box[open] summary::before{
  transform:rotate(90deg);
}
.fmtm-foldable-box summary span:first-child{
  display:flex;
  align-items:center;
}
.fmtm-foldable-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#e8eefb;
  color:#1d57d8;
  font-size:13px;
  font-weight:700;
}
.fmtm-matches-list-finished{
  padding:14px;
}

.fmtm-foldable-box{
  margin-top:14px;
  border:1px solid #d7dfeb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.fmtm-foldable-box summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  font-weight:700;
  color:#17345f;
  background:#f6f8fc;
}
.fmtm-foldable-box summary::-webkit-details-marker{display:none;}
.fmtm-foldable-box summary::before{
  content:'▶';
  margin-right:10px;
  font-size:12px;
  transition:transform .18s ease;
}
.fmtm-foldable-box[open] summary::before{transform:rotate(90deg);}
.fmtm-foldable-box summary span:first-child{
  display:flex;
  align-items:center;
}
.fmtm-foldable-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#e8eefb;
  color:#1d57d8;
  font-size:13px;
  font-weight:700;
}
.fmtm-matches-list-finished{padding:14px;}
.fmtm-match-players{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:14px;
  align-items:center;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e7edf6;
}
.fmtm-match-player{min-width:0;}
.fmtm-match-player-name{
  font-weight:700;
  color:#17345f;
  line-height:1.25;
}
.fmtm-match-player-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
  font-size:13px;
  color:#6b7a90;
}
.fmtm-match-vs{
  width:34px;
  height:34px;
  border-radius:999px;
  background:#eef3ff;
  color:#1d57d8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:12px;
}

.fmtm-foldable-box{
  margin-top:14px;
  border:1px solid #d7dfeb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.fmtm-foldable-box summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  font-weight:700;
  color:#17345f;
  background:#f6f8fc;
}
.fmtm-foldable-box summary::-webkit-details-marker{display:none;}
.fmtm-foldable-box summary::before{
  content:'▶';
  margin-right:10px;
  font-size:12px;
  transition:transform .18s ease;
}
.fmtm-foldable-box[open] summary::before{transform:rotate(90deg);}
.fmtm-foldable-box summary span:first-child{
  display:flex;
  align-items:center;
}
.fmtm-foldable-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#e8eefb;
  color:#1d57d8;
  font-size:13px;
  font-weight:700;
}
.fmtm-matches-list-finished{
  padding:14px;
}
.fmtm-match-players{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:14px;
  align-items:center;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e7edf6;
}
.fmtm-match-player{
  min-width:0;
}
.fmtm-match-player-name{
  font-weight:700;
  color:#17345f;
  line-height:1.25;
}
.fmtm-match-player-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:4px;
  font-size:13px;
  color:#6b7a90;
}
.fmtm-match-vs{
  width:34px;
  height:34px;
  border-radius:999px;
  background:#eef3ff;
  color:#1d57d8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:12px;
}
.fmtm-final-result{
  font-weight:700;
  color:#1d57d8;
}

.fmtm-match-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.fmtm-match-title-row h3{
  margin:0;
}
.fmtm-match-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  background:#e8eefb;
  color:#1d57d8;
  font-size:12px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  text-transform:capitalize;
}


/* fmtm-status-colors-like-map-v1 */
.fmtm-match-badge,
.fmtm-status-badge,
.fmtm-pill-estado,
.fmtm-badge-estado{
  border:1px solid transparent;
}

.fmtm-match-badge[data-status="asignada"],
.fmtm-status-badge[data-status="asignada"],
.fmtm-pill-estado[data-status="asignada"],
.fmtm-badge-estado[data-status="asignada"],
.fmtm-match-badge.is-asignada,
.fmtm-status-badge.is-asignada,
.fmtm-pill-estado.is-asignada,
.fmtm-badge-estado.is-asignada{
  background:#E8D2A8;
  color:#1f2c3d;
  border-color:#E8D2A8;
}

.fmtm-match-badge[data-status="aceptada"],
.fmtm-status-badge[data-status="aceptada"],
.fmtm-pill-estado[data-status="aceptada"],
.fmtm-badge-estado[data-status="aceptada"],
.fmtm-match-badge.is-aceptada,
.fmtm-status-badge.is-aceptada,
.fmtm-pill-estado.is-aceptada,
.fmtm-badge-estado.is-aceptada{
  background:#A9D0FF;
  color:#17345f;
  border-color:#A9D0FF;
}

.fmtm-match-badge[data-status="en juego"],
.fmtm-status-badge[data-status="en juego"],
.fmtm-pill-estado[data-status="en juego"],
.fmtm-badge-estado[data-status="en juego"],
.fmtm-match-badge.is-en-juego,
.fmtm-status-badge.is-en-juego,
.fmtm-pill-estado.is-en-juego,
.fmtm-badge-estado.is-en-juego{
  background:#8FE4C8;
  color:#163a33;
  border-color:#8FE4C8;
}

.fmtm-match-badge[data-status="finalizada"],
.fmtm-status-badge[data-status="finalizada"],
.fmtm-pill-estado[data-status="finalizada"],
.fmtm-badge-estado[data-status="finalizada"],
.fmtm-match-badge[data-status="cerrado"],
.fmtm-status-badge[data-status="cerrado"],
.fmtm-pill-estado[data-status="cerrado"],
.fmtm-badge-estado[data-status="cerrado"],
.fmtm-match-badge.is-finalizada,
.fmtm-status-badge.is-finalizada,
.fmtm-pill-estado.is-finalizada,
.fmtm-badge-estado.is-finalizada,
.fmtm-match-badge.is-cerrado,
.fmtm-status-badge.is-cerrado,
.fmtm-pill-estado.is-cerrado,
.fmtm-badge-estado.is-cerrado{
  background:#0F1E35;
  color:#ffffff;
  border-color:#0F1E35;
}

.fmtm-match-badge[data-status="rechazada"],
.fmtm-status-badge[data-status="rechazada"],
.fmtm-pill-estado[data-status="rechazada"],
.fmtm-badge-estado[data-status="rechazada"],
.fmtm-match-badge.is-rechazada,
.fmtm-status-badge.is-rechazada,
.fmtm-pill-estado.is-rechazada,
.fmtm-badge-estado.is-rechazada{
  background:#ffffff;
  color:#E02020;
  border-color:#E02020;
}

/* fallback por texto renderizado */
.fmtm-match-badge,
.fmtm-status-badge,
.fmtm-pill-estado,
.fmtm-badge-estado{
  text-transform:capitalize;
}


/* fmtm-status-colors-real-classes-v1 */
.is-assigned{
  background:#E8D2A8 !important;
  color:#1f2c3d !important;
  border:1px solid #E8D2A8 !important;
}
.is-accepted{
  background:#A9D0FF !important;
  color:#17345f !important;
  border:1px solid #A9D0FF !important;
}
.is-live{
  background:#8FE4C8 !important;
  color:#163a33 !important;
  border:1px solid #8FE4C8 !important;
}
.is-finished{
  background:#0F1E35 !important;
  color:#ffffff !important;
  border:1px solid #0F1E35 !important;
}
.is-rejected{
  background:#ffffff !important;
  color:#E02020 !important;
  border:1px solid #E02020 !important;
}

/* por si además llevan forma de pastilla */
.is-assigned,
.is-accepted,
.is-live,
.is-finished,
.is-rejected{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}


/* fmtm-badge-colors-by-text-v1 */
.fmtm-match-badge.badge-assigned{
  background:#E8D2A8 !important;
  color:#1f2c3d !important;
  border:1px solid #E8D2A8 !important;
}
.fmtm-match-badge.badge-accepted{
  background:#A9D0FF !important;
  color:#17345f !important;
  border:1px solid #A9D0FF !important;
}
.fmtm-match-badge.badge-live{
  background:#8FE4C8 !important;
  color:#163a33 !important;
  border:1px solid #8FE4C8 !important;
}
.fmtm-match-badge.badge-finished{
  background:#0F1E35 !important;
  color:#ffffff !important;
  border:1px solid #0F1E35 !important;
}
.fmtm-match-badge.badge-rejected{
  background:#ffffff !important;
  color:#E02020 !important;
  border:1px solid #E02020 !important;
}

/* fmtm-match-actions-block2a-v1 */
.fmtm-match-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.fmtm-match-actions .fmtm-btn{
  min-width:110px;
}


/* fmtm-login-admin-left-v2 */
.fmtm-login-brand-admin{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.fmtm-login-brand-admin .fmtm-brand-pill,
.fmtm-login-brand-admin .fmtm-login-highlights,
.fmtm-login-brand-admin p{
  display:none !important;
}
.fmtm-login-brand-admin h1{
  margin:0;
}
.fmtm-side-card{
  background:#fff;
  border:1px solid #d8e0ec;
  border-radius:24px;
  padding:22px;
  box-shadow:var(--shadow);
}
.fmtm-form-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.fmtm-field-span-2{
  grid-column:1 / -1;
}
@media (max-width: 980px){
  .fmtm-form-grid-2{
    grid-template-columns:1fr;
  }
  .fmtm-field-span-2{
    grid-column:auto;
  }
}


/* fmtm-live-overlay-v2-manual-safe */
body.fmtm-live-overlay-open{
  overflow:hidden;
}
.fmtm-live-match-card{
  border-color:#c6d8ff;
}
.fmtm-live-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
}
.fmtm-live-overlay-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,30,53,.55);
}
.fmtm-live-overlay-panel{
  position:relative;
  z-index:1;
  width:min(1120px, calc(100vw - 28px));
  max-height:calc(100vh - 28px);
  overflow:auto;
  margin:14px auto;
  background:#fff;
  border-radius:24px;
  box-shadow:0 24px 80px rgba(15,30,53,.32);
  padding:26px;
}
.fmtm-live-overlay-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}
.fmtm-live-overlay-kicker{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#2959c7;
  margin-bottom:6px;
}
.fmtm-live-overlay-head h3{
  margin:0;
  font-size:32px;
  line-height:1.1;
}
.fmtm-live-v2{
  display:grid;
  gap:22px;
}
.fmtm-live-v2-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding-bottom:10px;
  border-bottom:1px solid #e3e8f0;
}
.fmtm-live-v2-title{
  font-size:34px;
  line-height:1.08;
  font-weight:900;
  color:#102a4d;
}
.fmtm-live-v2-subtitle{
  margin-top:6px;
  color:#5b6e86;
  font-size:15px;
}
.fmtm-live-v2-header-side{
  text-align:right;
}
.fmtm-live-v2-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border-radius:999px;
  background:#fee2e2;
  color:#b42318;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
}
.fmtm-live-v2-board{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:18px;
  align-items:center;
}
.fmtm-live-v2-player{
  border:1px solid #dbe4f0;
  background:#fff;
  border-radius:22px;
  padding:22px;
  min-height:170px;
  display:grid;
  align-content:center;
  gap:10px;
  box-shadow:0 8px 24px rgba(16,42,77,.05);
}
.fmtm-live-v2-player-name{
  font-size:30px;
  line-height:1.1;
  font-weight:900;
  color:#102a4d;
}
.fmtm-live-v2-player-club{
  color:#5f7289;
  font-size:15px;
  line-height:1.4;
}
.fmtm-live-v2-serve{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  padding:7px 12px;
  border-radius:999px;
  background:#e8f1ff;
  color:#2959c7;
  font-size:12px;
  font-weight:800;
}
.fmtm-live-v2-serve.is-off{
  background:#f3f5f8;
  color:#7a889b;
}
.fmtm-live-v2-center{
  display:grid;
  justify-items:center;
  gap:16px;
}
.fmtm-live-v2-vs{
  font-size:42px;
  font-weight:900;
  color:#183761;
}
.fmtm-live-v2-swap{
  min-width:170px;
}
.fmtm-live-v2-controls{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
}
.fmtm-live-v2-timer-card,
.fmtm-live-v2-sidepanel{
  border:1px solid #dbe4f0;
  background:#fff;
  border-radius:22px;
  padding:22px;
  box-shadow:0 8px 24px rgba(16,42,77,.05);
}
.fmtm-live-v2-timer-label,
.fmtm-live-v2-sidepanel-title{
  font-size:14px;
  font-weight:800;
  color:#5b6e86;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.fmtm-live-v2-timer{
  font-size:72px;
  line-height:1;
  font-weight:900;
  color:#102a4d;
  margin:14px 0 18px;
}
.fmtm-live-v2-buttons,
.fmtm-live-v2-np-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.fmtm-live-v2-result{
  margin-top:16px;
  font-size:15px;
  color:#17345f;
  line-height:1.45;
}
.fmtm-live-v2-result.is-muted{
  color:#64748b;
}
@media (max-width: 920px){
  .fmtm-live-overlay-panel{
    width:min(100vw - 18px, 1120px);
    padding:18px;
  }
  .fmtm-live-v2-board,
  .fmtm-live-v2-controls{
    grid-template-columns:1fr;
  }
  .fmtm-live-v2-header{
    display:grid;
  }
  .fmtm-live-v2-header-side{
    text-align:left;
  }
  .fmtm-live-v2-title{
    font-size:28px;
  }
  .fmtm-live-v2-player-name{
    font-size:24px;
  }
  .fmtm-live-v2-timer{
    font-size:56px;
  }
}


/* overlay paddle + category labels */
.fmtm-live-v2-serve-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:4px;
}
.fmtm-live-v2-paddle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:#fff4e5;
  border:1px solid #ffd08a;
  font-size:18px;
  line-height:1;
}
.fmtm-live-v2-paddle.is-off{
  background:#f3f5f8;
  border-color:#dbe4f0;
  filter:grayscale(1);
  opacity:.65;
}
.fmtm-live-v2-paddle-svg{
  width:28px;
  height:28px;
  display:block;
}


/* fmtm-live-overlay-mobile-safe-v1 */
.fmtm-live-overlay{
  padding:0;
}
.fmtm-live-overlay-panel{
  width:min(1120px, calc(100vw - 16px));
  max-height:calc(100vh - 16px);
  margin:8px auto;
  padding:18px;
  display:flex;
  flex-direction:column;
}
.fmtm-live-overlay-head{
  position:sticky;
  top:0;
  z-index:5;
  background:#fff;
  padding-bottom:12px;
  margin-bottom:14px;
  border-bottom:1px solid #e3e8f0;
}
.fmtm-live-overlay-body{
  overflow:auto;
  min-height:0;
  -webkit-overflow-scrolling:touch;
}
.fmtm-live-overlay-head .fmtm-btn{
  min-height:44px;
  padding:10px 16px;
}
@media (max-width: 1024px){
  .fmtm-live-overlay-panel{
    width:min(100vw - 12px, 1120px);
    max-height:calc(100vh - 12px);
    margin:6px auto;
    padding:14px;
    border-radius:18px;
  }
  .fmtm-live-overlay-head h3{
    font-size:26px;
  }
  .fmtm-live-v2-title{
    font-size:26px;
  }
  .fmtm-live-v2-board{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    gap:12px;
  }
  .fmtm-live-v2-controls,
  .fmtm-live-v2-setup{
    grid-template-columns:1fr !important;
  }
  .fmtm-live-v2-player{
    min-height:auto;
    padding:16px;
  }
  .fmtm-live-v2-player-name{
    font-size:22px;
  }
  .fmtm-live-v2-player-club{
    font-size:13px;
  }
  .fmtm-live-v2-vs{
    font-size:34px;
  }
  .fmtm-live-v2-center{
    gap:10px;
  }
  .fmtm-live-v2-swap{
    min-width:130px;
    font-size:13px;
    padding:8px 10px;
  }
  .fmtm-live-v2-timer{
    font-size:52px;
  }
  .fmtm-live-v2-buttons,
  .fmtm-live-v2-np-row,
  .fmtm-live-v2-chip-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .fmtm-live-v2-buttons .fmtm-btn,
  .fmtm-live-v2-np-row .fmtm-btn,
  .fmtm-live-v2-chip-row .fmtm-btn{
    width:100%;
    min-height:46px;
  }
}
@media (max-width: 640px){
  .fmtm-live-overlay-panel{
    width:100vw;
    height:100vh;
    max-height:100vh;
    margin:0;
    border-radius:0;
    padding:12px;
  }
  .fmtm-live-overlay-head{
    gap:10px;
    align-items:center;
  }
  .fmtm-live-overlay-head h3{
    font-size:22px;
  }
  .fmtm-live-overlay-kicker{
    font-size:11px;
  }
  .fmtm-live-v2{
    gap:14px;
  }
  .fmtm-live-v2-header{
    display:grid;
    gap:10px;
  }
  .fmtm-live-v2-header-side{
    text-align:left;
  }
  .fmtm-live-v2-title{
    font-size:22px;
  }
  .fmtm-live-v2-subtitle,
  .fmtm-live-v2-side-meta{
    font-size:13px;
  }
  .fmtm-live-v2-board{
    grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr) !important;
    gap:8px;
    align-items:start;
  }
  .fmtm-live-v2-player{
    padding:12px;
    border-radius:16px;
    min-width:0;
  }
  .fmtm-live-v2-player-name{
    font-size:17px;
    line-height:1.15;
    word-break:break-word;
  }
  .fmtm-live-v2-player-club{
    font-size:12px;
    line-height:1.35;
    word-break:break-word;
  }
  .fmtm-live-v2-center{
    gap:8px;
    align-self:center;
  }
  .fmtm-live-v2-vs{
    font-size:24px;
  }
  .fmtm-live-v2-swap{
    min-width:0;
    width:54px;
    min-height:54px;
    padding:6px;
    font-size:0;
    position:relative;
  }
  .fmtm-live-v2-swap::before{
    content:"↔";
    font-size:22px;
    line-height:1;
  }
  .fmtm-live-v2-timer-card,
  .fmtm-live-v2-sidepanel,
  .fmtm-live-v2-setup-card{
    padding:14px;
    border-radius:16px;
  }
  .fmtm-live-v2-timer{
    font-size:42px;
    margin:10px 0 14px;
  }
  .fmtm-live-v2-buttons,
  .fmtm-live-v2-np-row,
  .fmtm-live-v2-chip-row{
    grid-template-columns:1fr;
  }
  .fmtm-live-v2-paddle{
    width:36px;
    height:36px;
  }
  .fmtm-live-v2-paddle-svg{
    width:24px;
    height:24px;
  }
}


/* fmtm-live-v2-pregame-visual-block1 */
.fmtm-live-v2-pregame{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.fmtm-live-v2-pregame-card{
  border:1px solid #dbe4f0;
  background:#fff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 24px rgba(16,42,77,.05);
}
.fmtm-live-v2-pregame-step{
  font-size:14px;
  font-weight:800;
  color:#5b6e86;
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-bottom:10px;
}
.fmtm-live-v2-pregame-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.fmtm-live-v2-pregame-actions .fmtm-btn{
  min-height:44px;
}
.fmtm-live-v2-pregame-timer{
  font-size:42px;
  line-height:1;
  font-weight:900;
  color:#102a4d;
  margin:4px 0 12px;
}
@media (max-width: 1024px){
  .fmtm-live-v2-pregame{
    grid-template-columns:1fr;
  }
}
/* fmtm-fix-pregame-layout-v2 */
.fmtm-live-v2-pregame{
  grid-template-columns:1fr 1fr 1fr;
}
.fmtm-live-v2-center{
  gap:10px;
}
.fmtm-live-v2-swap-secondary{
  min-width:170px;
}
.fmtm-live-v2-controls .fmtm-live-v2-timer-card{
  display:none;
}
.fmtm-live-v2-controls{
  grid-template-columns:1fr !important;
}
.fmtm-live-v2-sidepanel{
  min-height:auto;
}
@media (max-width: 1024px){
  .fmtm-live-v2-pregame{
    grid-template-columns:1fr;
  }
}
@media (max-width: 640px){
  .fmtm-live-v2-swap-secondary{
    min-width:0;
    width:54px;
    min-height:54px;
    padding:6px;
    font-size:0;
    position:relative;
  }
  .fmtm-live-v2-swap-secondary::before{
    content:"🏓";
    font-size:20px;
    line-height:1;
  }
}
/* fmtm-overlay-tweaks-safe-v2 */
.fmtm-live-v2-sidepanel{
  display:none;
}

.fmtm-live-v2-controls{
  grid-template-columns:1fr;
}

.fmtm-live-v2-pregame{
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.fmtm-live-v2-pregame-card:first-child .fmtm-live-v2-pregame-actions,
.fmtm-live-v2-pregame-card:nth-child(2) .fmtm-live-v2-pregame-actions{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.fmtm-live-v2-pregame-actions .fmtm-btn{
  width:100%;
}

.fmtm-live-v2-player-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:24px;
}

.fmtm-live-v2-player-club{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media (max-width: 900px){
  .fmtm-live-v2-pregame{
    grid-template-columns:1fr;
  }

  .fmtm-live-v2-pregame-card:first-child .fmtm-live-v2-pregame-actions,
  .fmtm-live-v2-pregame-card:nth-child(2) .fmtm-live-v2-pregame-actions{
    grid-template-columns:1fr;
  }

  .fmtm-live-v2-player-name{
    font-size:18px;
  }
}

/* fmtm-mobile-toggle-serve-fix */
@media (max-width: 640px){
  .fmtm-live-v2-center{
    grid-template-columns:1fr;
    justify-items:center;
  }

  .fmtm-live-v2-swap-secondary{
    min-width:0;
    width:54px;
    min-height:54px;
    padding:6px;
    font-size:0;
    position:relative;
  }

  .fmtm-live-v2-swap-secondary::before{
    content:"🏓";
    font-size:20px;
    line-height:1;
  }
}

/* fmtm-mobile-overlay-fixes-v3 */
#fmtm-live-overlay .fmtm-live-v2-controls .fmtm-live-v2-sidepanel{
  display:none !important;
}

#fmtm-live-overlay .fmtm-live-v2-controls{
  grid-template-columns:1fr !important;
}

#fmtm-live-overlay .fmtm-live-v2-center{
  display:grid;
  justify-items:center;
  gap:10px;
}

@media (max-width: 640px){
  #fmtm-live-overlay .fmtm-live-v2-board{
    grid-template-columns:minmax(0,1fr) 72px minmax(0,1fr) !important;
    gap:8px !important;
    align-items:start !important;
  }

  #fmtm-live-overlay .fmtm-live-v2-center{
    display:grid !important;
    grid-template-columns:1fr !important;
    justify-items:center !important;
    align-content:start !important;
    gap:8px !important;
    width:72px !important;
    min-width:72px !important;
  }

  #fmtm-live-overlay .fmtm-live-v2-vs{
    font-size:22px !important;
    line-height:1 !important;
  }

  #fmtm-live-overlay .fmtm-live-v2-swap,
  #fmtm-live-overlay .fmtm-live-v2-swap-secondary{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:56px !important;
    min-width:56px !important;
    height:56px !important;
    min-height:56px !important;
    padding:6px !important;
    font-size:0 !important;
    overflow:hidden !important;
  }

  #fmtm-live-overlay .fmtm-live-v2-swap::before{
    content:"↔";
    font-size:22px;
    line-height:1;
  }

  #fmtm-live-overlay .fmtm-live-v2-swap-secondary::before{
    content:"🏓";
    font-size:20px;
    line-height:1;
  }
}

/* fmtm-live-stage-badge */
.fmtm-match-badges-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}

.fmtm-match-subbadge{
  font-size:11px;
  padding:4px 10px;
  border-radius:999px;
  font-weight:800;
}

.fmtm-match-subbadge.badge-sorteo{
  background:#fff4ed;
  color:#b54708;
}

.fmtm-match-subbadge.badge-acta{
  background:#ecfdf3;
  color:#027a48;
}

/* ============================================================
   Acceso árbitros · diseño profesional v2
   ============================================================ */
.fmtm-login-v2-body{
  --login-blue:#0b2a50;
  --login-blue-2:#123f77;
  --login-red:#d8232a;
  --login-gold:#f2c14e;
  --login-card:rgba(255,255,255,.92);
  min-height:100vh;
  overflow-x:hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(216,35,42,.18), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(242,193,78,.22), transparent 21%),
    radial-gradient(circle at 80% 90%, rgba(30,99,255,.15), transparent 24%),
    linear-gradient(135deg,#eef3fb 0%,#f7f9fc 42%,#e8eef7 100%);
}

.fmtm-login-v2-body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(120deg, rgba(11,42,80,.11), transparent 38%, rgba(216,35,42,.07)),
    repeating-linear-gradient(135deg, rgba(16,42,77,.04) 0 1px, transparent 1px 18px);
  mask-image:linear-gradient(90deg, #000, rgba(0,0,0,.75), transparent);
}

.fmtm-login-v2-shell{
  width:min(1180px, calc(100vw - 36px));
  min-height:100vh;
  margin:0 auto;
  padding:36px 0;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,.75fr);
  gap:34px;
  align-items:center;
  position:relative;
  z-index:1;
}

.fmtm-login-v2-hero,
.fmtm-login-v2-panel{
  min-width:0;
}

.fmtm-login-v2-brand-card{
  position:relative;
  overflow:hidden;
  min-height:650px;
  border-radius:34px;
  padding:40px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  color:#fff;
  background:
    linear-gradient(145deg, rgba(11,42,80,.97), rgba(18,63,119,.94)),
    radial-gradient(circle at 24% 16%, rgba(255,255,255,.26), transparent 30%);
  box-shadow:0 28px 70px rgba(11,42,80,.26);
}

.fmtm-login-v2-brand-card::before{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  left:-110px;
  top:-90px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}

.fmtm-login-v2-brand-card::after{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-150px;
  width:420px;
  height:420px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(216,35,42,.65), rgba(216,35,42,.08) 62%, transparent 70%);
}

.fmtm-login-v2-logo-wrap{
  position:absolute;
  top:34px;
  left:40px;
  width:128px;
  min-height:166px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  border-radius:24px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.8);
  box-shadow:0 18px 45px rgba(0,0,0,.18);
  z-index:1;
}

.fmtm-login-v2-logo{
  display:block;
  max-width:100%;
  height:auto;
  object-fit:contain;
}

.fmtm-login-v2-eyebrow,
.fmtm-login-v2-kicker{
  display:inline-flex;
  width:max-content;
  align-items:center;
  gap:8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.fmtm-login-v2-eyebrow{
  position:relative;
  z-index:1;
  padding:9px 13px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.2);
  color:#f9fbff;
  backdrop-filter:blur(10px);
}

.fmtm-login-v2-brand-card h1{
  position:relative;
  z-index:1;
  margin:18px 0 12px;
  max-width:680px;
  font-size:clamp(44px, 6vw, 76px);
  line-height:.96;
  letter-spacing:-.055em;
  color:#fff;
}

.fmtm-login-v2-lead{
  position:relative;
  z-index:1;
  margin:0;
  max-width:620px;
  font-size:19px;
  line-height:1.55;
  color:rgba(255,255,255,.84);
}

.fmtm-login-v2-metrics{
  position:relative;
  z-index:1;
  margin-top:30px;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
}

.fmtm-login-v2-metrics div{
  padding:16px;
  border-radius:20px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.17);
  backdrop-filter:blur(10px);
}

.fmtm-login-v2-metrics strong{
  display:block;
  font-size:25px;
  line-height:1;
  margin-bottom:7px;
  color:#fff;
}

.fmtm-login-v2-metrics span{
  display:block;
  font-size:13px;
  line-height:1.25;
  color:rgba(255,255,255,.77);
}

.fmtm-login-v2-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.fmtm-login-v2-alert{
  width:100%;
  margin:0;
  box-shadow:0 14px 36px rgba(16,42,77,.09);
}

.fmtm-login-v2-card{
  position:relative;
  overflow:hidden;
  padding:30px;
  border:1px solid rgba(207,216,229,.95);
  border-radius:30px;
  background:var(--login-card);
  box-shadow:0 24px 60px rgba(16,42,77,.16);
  backdrop-filter:blur(18px);
}

.fmtm-login-v2-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:6px;
  background:linear-gradient(90deg, var(--login-red), var(--login-gold), #2b62d9);
}

.fmtm-login-v2-card-head{
  display:flex;
  gap:16px;
  align-items:center;
  margin-bottom:24px;
}

.fmtm-login-v2-mini-logo{
  flex:0 0 auto;
  width:70px;
  height:86px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px;
  background:#fff;
  border:1px solid #e0e7f0;
  box-shadow:0 12px 28px rgba(16,42,77,.1);
}

.fmtm-login-v2-mini-logo img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.fmtm-login-v2-kicker{
  color:#d8232a;
  margin-bottom:6px;
}

.fmtm-login-v2-card h2,
.fmtm-login-v2-modal h2{
  margin:0;
  font-size:clamp(28px, 3.1vw, 40px);
  line-height:1;
  letter-spacing:-.035em;
  color:#0b2a50;
}

.fmtm-login-v2-card p,
.fmtm-login-v2-modal p{
  margin:8px 0 0;
  color:#64748b;
  line-height:1.45;
}

.fmtm-login-v2-form{
  gap:18px;
}

.fmtm-login-v2-field label,
.fmtm-login-v2-modal .fmtm-field label{
  color:#0b2a50;
  font-size:14px;
  font-weight:900;
}

.fmtm-login-v2-field input[type="text"],
.fmtm-login-v2-field input[type="password"],
.fmtm-login-v2-modal .fmtm-field input[type="text"],
.fmtm-login-v2-modal .fmtm-field input[type="password"],
.fmtm-login-v2-modal .fmtm-field input[type="email"]{
  height:56px;
  border-radius:16px;
  border:1px solid #cbd5e1;
  background:#fff;
  box-shadow:inset 0 1px 0 rgba(15,23,42,.03);
}

.fmtm-login-v2-submit{
  width:100%;
  min-height:56px;
  border-radius:16px;
  font-size:16px;
  box-shadow:0 15px 30px rgba(30,99,255,.27);
}

.fmtm-login-v2-actions{
  margin-top:22px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.fmtm-login-v2-action-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border:1px solid #dbe4ef;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.fmtm-login-v2-action-card:hover{
  transform:translateY(-2px);
  border-color:#b8c8de;
  box-shadow:0 16px 30px rgba(16,42,77,.11);
}

.fmtm-login-v2-action-icon{
  flex:0 0 auto;
  width:38px;
  height:38px;
  border-radius:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef4ff;
  color:#1e63ff;
  font-weight:900;
}

.fmtm-login-v2-action-card strong{
  display:block;
  color:#0b2a50;
  font-size:14px;
  line-height:1.15;
}

.fmtm-login-v2-action-card small{
  display:block;
  margin-top:3px;
  color:#667085;
  font-size:12px;
  line-height:1.25;
}

.fmtm-login-v2-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:1000;
}

.fmtm-login-v2-modal:target{
  display:flex;
}

.fmtm-login-v2-modal-bg{
  position:absolute;
  inset:0;
  background:rgba(8,22,44,.58);
  backdrop-filter:blur(7px);
}

.fmtm-login-v2-modal-card{
  position:relative;
  z-index:1;
  width:min(560px, 100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  padding:26px;
  border-radius:28px;
  background:#fff;
  box-shadow:0 30px 90px rgba(0,0,0,.35);
}

.fmtm-login-v2-modal-wide{
  width:min(880px, 100%);
}

.fmtm-login-v2-modal-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:22px;
}

.fmtm-login-v2-close{
  flex:0 0 auto;
  width:42px;
  height:42px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f1f5f9;
  color:#0b2a50;
  font-size:28px;
  line-height:1;
  font-weight:700;
}

.fmtm-login-v2-modal-form{
  gap:15px;
}

.fmtm-login-v2-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
  padding-top:8px;
}

.fmtm-login-v2-file{
  width:100%;
  min-height:56px;
  border:1px dashed #b8c8de;
  border-radius:16px;
  background:#f8fafc;
  padding:14px;
}

@media (max-width:980px){
  .fmtm-login-v2-shell{
    min-height:auto;
    grid-template-columns:1fr;
    padding:22px 0;
  }
  .fmtm-login-v2-brand-card{
    min-height:390px;
    padding:28px;
  }
  .fmtm-login-v2-logo-wrap{
    width:104px;
    min-height:135px;
    left:28px;
    top:28px;
  }
}

@media (max-width:640px){
  .fmtm-login-v2-shell{
    width:min(100% - 22px, 1180px);
    gap:16px;
    padding:12px 0 18px;
  }
  .fmtm-login-v2-brand-card{
    min-height:310px;
    border-radius:24px;
    padding:22px;
  }
  .fmtm-login-v2-logo-wrap{
    width:84px;
    min-height:110px;
    border-radius:18px;
    padding:8px;
    left:22px;
    top:22px;
  }
  .fmtm-login-v2-brand-card h1{
    font-size:34px;
    letter-spacing:-.04em;
  }
  .fmtm-login-v2-lead{
    font-size:15px;
  }
  .fmtm-login-v2-metrics{
    grid-template-columns:1fr;
    margin-top:16px;
  }
  .fmtm-login-v2-metrics div{
    padding:11px 13px;
  }
  .fmtm-login-v2-metrics strong{
    font-size:20px;
    margin-bottom:3px;
  }
  .fmtm-login-v2-card{
    border-radius:24px;
    padding:22px;
  }
  .fmtm-login-v2-card-head{
    align-items:flex-start;
  }
  .fmtm-login-v2-mini-logo{
    width:58px;
    height:72px;
    border-radius:15px;
  }
  .fmtm-login-v2-actions{
    grid-template-columns:1fr;
  }
  .fmtm-login-v2-modal{
    padding:12px;
    align-items:flex-start;
  }
  .fmtm-login-v2-modal-card{
    max-height:calc(100vh - 24px);
    border-radius:22px;
    padding:20px;
  }
  .fmtm-login-v2-modal-actions{
    justify-content:stretch;
  }
  .fmtm-login-v2-modal-actions .fmtm-btn{
    width:100%;
  }
}

/* v14: subida de fotos visible y robusta en tablet/móvil */
.fmtm-photo-form{
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.fmtm-photo-input{
  max-width:220px;
  font-size:12px;
}
.fmtm-photo-help{
  display:block;
  width:100%;
  color:#64748b;
  font-size:11px;
  line-height:1.25;
}
@media (max-width: 820px){
  .fmtm-profile-actions{align-items:stretch;}
  .fmtm-photo-form{width:100%;}
  .fmtm-photo-input{max-width:100%; width:100%;}
}

/* v15: portal arbitral más compacto para tablet */
.fmtm-topbar-inner{
  padding-top:10px;
  padding-bottom:10px;
}
.fmtm-topbar-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
  min-width:0;
}
.fmtm-topbar-logout{
  margin:0;
  display:inline-flex;
}
.fmtm-btn-topbar{
  min-height:34px;
  padding:7px 10px;
  border-radius:10px;
  font-size:13px;
  white-space:nowrap;
}
.fmtm-topbar-tools .fmtm-mini-pill{
  padding:7px 10px;
  font-size:12px;
  white-space:nowrap;
}
#fmtm-profile-panel{
  padding:12px 14px;
}
.fmtm-profile-compact{
  display:grid;
  gap:10px;
}
.fmtm-profile-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.fmtm-avatar-compact{
  width:62px;
  height:62px;
  border-radius:14px;
}
.fmtm-profile-kicker{
  font-size:12px;
  font-weight:900;
  color:#2959c7;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:2px;
}
.fmtm-profile-compact .fmtm-profile-name{
  font-size:17px;
  line-height:1.15;
  margin-bottom:3px;
}
.fmtm-profile-compact .fmtm-profile-line{
  font-size:12px;
  line-height:1.35;
}
.fmtm-photo-details{
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#f8fbff;
  overflow:hidden;
}
.fmtm-photo-details summary{
  cursor:pointer;
  list-style:none;
  padding:8px 10px;
  font-weight:800;
  font-size:13px;
  color:#17345f;
  display:flex;
  align-items:center;
  gap:8px;
}
.fmtm-photo-details summary::-webkit-details-marker{display:none;}
.fmtm-photo-details summary::before{
  content:'📷';
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#eef4ff;
}
.fmtm-photo-details[open] summary{
  border-bottom:1px solid #dbe3ef;
}
.fmtm-photo-details .fmtm-photo-form{
  padding:10px;
}
.fmtm-shell{
  padding-top:14px;
}

@media (max-width: 720px){
  .fmtm-topbar-inner{
    padding:8px 10px;
    gap:8px;
  }
  .fmtm-topbar-brand{
    gap:8px;
    min-width:0;
  }
  .fmtm-logo-dot{
    width:14px;
    height:14px;
    box-shadow:0 0 0 4px #ffe4e8;
    flex:0 0 auto;
  }
  .fmtm-topbar-title{
    font-size:15px;
    max-width:180px;
    white-space:normal;
  }
  .fmtm-topbar-subtitle{
    font-size:10px;
  }
  .fmtm-topbar-tools{
    gap:5px;
    margin-left:auto;
  }
  .fmtm-btn-topbar{
    min-height:30px;
    padding:5px 7px;
    font-size:11px;
    border-radius:9px;
  }
  .fmtm-topbar-tools .fmtm-mini-pill{
    padding:5px 7px;
    font-size:10px;
  }
  .fmtm-shell{
    padding:10px 8px 22px;
  }
  .fmtm-card{
    margin-bottom:12px;
  }
  #fmtm-profile-panel{
    padding:10px;
  }
  .fmtm-profile-main{
    gap:10px;
  }
  .fmtm-avatar-compact{
    width:56px;
    height:56px;
    border-radius:12px;
  }
  .fmtm-profile-compact .fmtm-profile-name{
    font-size:16px;
  }
  .fmtm-profile-compact .fmtm-profile-line{
    font-size:11px;
  }
  .fmtm-photo-details summary{
    padding:7px 9px;
  }
}

@media (max-width: 520px){
  .fmtm-topbar-title{
    max-width:145px;
    font-size:13px;
  }
  .fmtm-topbar-subtitle{
    display:none;
  }
  .fmtm-topbar-tools{
    gap:4px;
  }
  .fmtm-btn-topbar{
    padding-left:6px;
    padding-right:6px;
    font-size:10px;
  }
  .fmtm-topbar-tools .fmtm-mini-pill{
    max-width:64px;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* v17: Datos del arbitro + torneo activo en dos etiquetas compactas */
.fmtm-dashboard-top-grid{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr);
  gap:12px;
  align-items:stretch;
  margin-bottom:12px;
}
.fmtm-dashboard-top-grid .fmtm-card{
  margin-bottom:0;
}
.fmtm-dashboard-card{
  min-width:0;
}
.fmtm-tournament-compact{
  display:grid;
  gap:10px;
  height:100%;
}
.fmtm-empty-compact{
  margin:0;
  font-size:13px;
}
.fmtm-active-tournament-card{
  border:1px solid #9bc2ff;
  background:linear-gradient(180deg,#eff6ff,#dbeafe);
  border-radius:16px;
  padding:12px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.fmtm-active-tournament-main{min-width:0;}
.fmtm-active-tournament-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#2563eb;
  margin-bottom:4px;
}
.fmtm-active-tournament-name{
  font-size:16px;
  line-height:1.15;
  font-weight:900;
  color:#102a4f;
}
.fmtm-active-tournament-meta{
  margin-top:5px;
  color:#5b6f8d;
  font-size:12px;
  line-height:1.35;
}
.fmtm-tournament-picker{
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.fmtm-tournament-picker summary{
  list-style:none;
  cursor:pointer;
  padding:9px 11px;
  font-weight:900;
  color:#17345f;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.fmtm-tournament-picker summary::-webkit-details-marker{display:none;}
.fmtm-tournament-picker summary::before{
  content:'↕';
  width:24px;
  height:24px;
  border-radius:9px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#2563eb;
  background:#eef4ff;
}
.fmtm-tournament-picker[open] summary{
  border-bottom:1px solid #dbe3ef;
}
.fmtm-tournament-picker-list{
  display:grid;
  gap:8px;
  padding:10px;
  max-height:265px;
  overflow:auto;
}
.fmtm-tournament-option{
  padding:10px 11px;
  border-radius:12px;
  box-shadow:none;
}
.fmtm-tournament-option:hover{
  transform:none;
}
.fmtm-tournament-option .fmtm-tournament-meta{
  font-size:12px;
}
@media (max-width: 820px){
  .fmtm-dashboard-top-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
  .fmtm-active-tournament-card{
    padding:10px;
  }
  .fmtm-active-tournament-name{
    font-size:15px;
  }
  .fmtm-tournament-picker-list{
    max-height:220px;
  }
}


/* v18: tarjetas superiores lado a lado y títulos sin numeración */

.fmtm-section-header-check h2{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 14px 0;
}
.fmtm-section-header-check h2::before{
  content:'✓';
  width:26px;
  height:26px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:#fff;
  font-size:15px;
  font-weight:900;
  background:linear-gradient(135deg,#2563eb,#10b981);
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}
@media (max-width: 820px){
  .fmtm-dashboard-top-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px;
    align-items:stretch;
  }
  #fmtm-profile-panel,
  #fmtm-tournaments-panel{
    padding:10px;
    border-radius:14px;
  }
  .fmtm-profile-main{
    align-items:flex-start;
    gap:8px;
  }
  .fmtm-avatar-compact{
    width:48px;
    height:48px;
    border-radius:11px;
  }
  .fmtm-profile-kicker{
    font-size:10px;
    line-height:1.1;
    margin-bottom:2px;
  }
  .fmtm-profile-compact .fmtm-profile-name,
  .fmtm-active-tournament-name{
    font-size:13px;
    line-height:1.12;
  }
  .fmtm-profile-compact .fmtm-profile-line,
  .fmtm-active-tournament-meta{
    font-size:10px;
    line-height:1.25;
  }
  .fmtm-photo-details summary,
  .fmtm-tournament-picker summary{
    padding:7px 8px;
    font-size:11px;
  }
  .fmtm-photo-details summary::before,
  .fmtm-tournament-picker summary::before{
    width:20px;
    height:20px;
    border-radius:7px;
  }
  .fmtm-active-tournament-card{
    padding:8px;
    border-radius:12px;
    gap:6px;
  }
  .fmtm-active-tournament-label{
    font-size:9px;
    margin-bottom:3px;
  }
  .fmtm-chip{
    font-size:9px;
    padding:5px 7px;
  }
  .fmtm-section-header-check h2{
    font-size:22px;
    margin-bottom:12px;
  }
}
@media (max-width: 430px){
  .fmtm-dashboard-top-grid{
    grid-template-columns:1fr;
  }
}

.fmtm-federation-panel{margin-top:12px}
.fmtm-federation-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.fmtm-federation-action{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;border:1px solid rgba(37,99,235,.18);background:linear-gradient(180deg,#fff,#f7fbff);border-radius:18px;padding:14px;min-height:86px}
.fmtm-federation-action:hover{border-color:rgba(37,99,235,.42);box-shadow:0 14px 30px rgba(9,38,74,.10)}
.fmtm-federation-action-icon{width:40px;height:40px;flex:0 0 40px;border-radius:14px;background:#eef4ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:950}
.fmtm-federation-action strong{display:block;color:#09264a;font-size:15px;line-height:1.1}
.fmtm-federation-action small{display:block;margin-top:5px;color:#64748b;font-size:12px;line-height:1.25}
.fmtm-page-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.fmtm-admin-table{width:100%;border-collapse:collapse}
.fmtm-admin-table th,.fmtm-admin-table td{border-bottom:1px solid rgba(148,163,184,.25);padding:10px;text-align:left;vertical-align:top}
.fmtm-admin-table th{font-size:12px;text-transform:uppercase;color:#4f67a2;letter-spacing:.04em}
.fmtm-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fmtm-form-grid .is-wide{grid-column:1/-1}
.fmtm-form-grid label{display:grid;gap:7px;font-weight:900;color:#09264a}
.fmtm-form-grid input,.fmtm-form-grid select,.fmtm-form-grid textarea{border:1px solid #cbd5e1;border-radius:14px;padding:12px;font:inherit}
.fmtm-check-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.fmtm-check-row label{display:flex;gap:7px;align-items:center}
.fmtm-history-details summary{cursor:pointer;list-style:none;border:1px solid rgba(37,99,235,.18);background:#f7fbff;border-radius:16px;padding:14px 16px;color:#09264a;font-weight:950}
.fmtm-history-details summary::-webkit-details-marker{display:none}
.fmtm-history-details summary::before{content:"+";display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin-right:10px;border-radius:10px;background:#eef4ff;color:#2563eb}
.fmtm-history-details[open] summary::before{content:"-"}
.fmtm-history-details table{margin-top:14px}
.fmtm-week-field{
  display:grid;
  gap:7px;
  font-weight:900;
  color:#09264a;
  position:relative;
}
.fmtm-week-input-row{
  position:relative;
  display:flex;
  align-items:stretch;
  gap:8px;
}
.fmtm-week-input-row input{
  flex:1 1 auto;
  min-width:0;
}
.fmtm-calendar-button{
  cursor:pointer;
  width:48px;
  height:48px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.fmtm-calendar-button span{
  content:"";
  display:block;
  width:20px;
  height:20px;
  border-radius:6px;
  background:
    linear-gradient(#2563eb 0 4px, transparent 4px),
    linear-gradient(90deg, transparent 0 5px, #cbd5e1 5px 6px, transparent 6px 13px, #cbd5e1 13px 14px, transparent 14px),
    linear-gradient(transparent 0 8px, #cbd5e1 8px 9px, transparent 9px 15px, #cbd5e1 15px 16px, transparent 16px),
    #eef4ff;
  border:1px solid #9bb7f0;
}
.fmtm-calendar-button:hover,
.fmtm-calendar-button[aria-expanded="true"]{
  border-color:#82a8ff;
  box-shadow:0 0 0 4px rgba(30,99,255,.12);
}
.fmtm-calendar-popover{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  z-index:30;
  width:318px;
  max-width:calc(100vw - 40px);
  border:1px solid #dbe3ef;
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 45px rgba(9,38,74,.18);
  padding:12px;
}
.fmtm-calendar-popover[hidden]{
  display:none !important;
}
.fmtm-month-calendar{
  display:grid;
  gap:10px;
}
.fmtm-month-calendar-head{
  display:grid;
  grid-template-columns:34px 1fr 34px;
  gap:8px;
  align-items:center;
}
.fmtm-month-calendar-head strong{
  text-align:center;
  text-transform:capitalize;
  color:#09264a;
  font-size:15px;
}
.fmtm-month-nav{
  width:34px;
  height:34px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#f8fbff;
  color:#1d57d8;
  font-weight:950;
  cursor:pointer;
}
.fmtm-month-nav:hover{
  border-color:#82a8ff;
  background:#eef4ff;
}
.fmtm-month-weekdays,
.fmtm-month-grid{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:4px;
}
.fmtm-month-weekdays span{
  text-align:center;
  font-size:11px;
  font-weight:950;
  color:#4f67a2;
}
.fmtm-month-day{
  height:34px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#09264a;
  font-size:13px;
  font-weight:850;
}
.fmtm-month-day.is-empty{
  visibility:hidden;
}
.fmtm-month-day.has-events{
  background:#ffe4e6;
  border-color:#fda4af;
  color:#8a111f;
  box-shadow:inset 0 0 0 1px rgba(190,18,60,.08);
}
.fmtm-calendar-legend{
  display:flex;
  align-items:center;
  gap:8px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.fmtm-calendar-swatch{
  width:18px;
  height:18px;
  border-radius:6px;
  background:#ffe4e6;
  border:1px solid #fda4af;
}
.fmtm-month-calendar p{
  margin:0;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
@media(max-width:800px){.fmtm-federation-actions,.fmtm-form-grid{grid-template-columns:1fr}}
@media(max-width:800px){
  .fmtm-calendar-popover{right:0}
}


/* v15: dirección arbitral obligatoria y editable */
.fmtm-address-required-card{max-width:720px;margin:42px auto;padding:28px}
.fmtm-address-required-card h1{margin:.25rem 0 .75rem}
.fmtm-address-required-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:22px}
.fmtm-address-required-form label{display:flex;flex-direction:column;gap:6px;font-weight:700}
.fmtm-address-required-form label:first-of-type{grid-column:1/-1}
.fmtm-address-required-form input,.fmtm-address-form input{min-height:42px;border:1px solid #cbd5e1;border-radius:8px;padding:9px 11px;font:inherit;background:#fff}
.fmtm-address-required-form button{grid-column:1/-1;justify-self:start}
.fmtm-address-logout{margin-top:12px}
.fmtm-address-form{display:grid;grid-template-columns:2fr 1fr 1.25fr 1.25fr;gap:8px;align-items:end}
.fmtm-address-form .fmtm-photo-help{grid-column:1/-1}
@media (max-width:760px){.fmtm-address-required-form,.fmtm-address-form{grid-template-columns:1fr}.fmtm-address-required-form label:first-of-type,.fmtm-address-required-form button,.fmtm-address-form .fmtm-photo-help{grid-column:auto}.fmtm-address-required-card{margin:16px auto;padding:18px}}

.fmtm-admin-access-strip{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;padding:12px 16px;border:1px solid #bfdbfe;border-radius:16px;background:#eff6ff}.fmtm-admin-access-strip span{display:flex;flex-direction:column}.fmtm-admin-access-strip small{color:#64748b;margin-top:2px}.fmtm-federation-action.is-disabled{background:#f1f5f9;border-color:#d7dee8;color:#94a3b8;box-shadow:none;cursor:not-allowed}.fmtm-federation-action.is-disabled .fmtm-federation-action-icon{background:#e2e8f0;color:#94a3b8}.fmtm-federation-action.is-disabled strong,.fmtm-federation-action.is-disabled small{color:#94a3b8}


/* Estado intermedio: designado federativamente, pendiente de alta operativa en torneo */
.fmtm-federation-action.is-pending{border-color:#cbd5e1;background:linear-gradient(135deg,#f8fafc,#eef2f7)}
.fmtm-federation-action.is-pending .fmtm-federation-action-icon{filter:grayscale(.35);opacity:.9}
.fmtm-tournament-waiting{display:grid;gap:16px}
.fmtm-tournament-waiting-list{display:grid;gap:12px}
.fmtm-tournament-waiting-card{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px 18px;border:1px solid #dbe4ef;border-radius:16px;background:#fff}
.fmtm-tournament-waiting-card strong{display:block;font-size:18px;color:#0f2f58;margin-bottom:7px}
.fmtm-tournament-waiting-meta{display:flex;flex-wrap:wrap;gap:8px 16px;color:#5f6f84;font-size:14px}
.fmtm-tournament-waiting-status{display:flex;flex-direction:column;align-items:flex-end;gap:7px;text-align:right}
.fmtm-tournament-waiting-status small{color:#64748b;max-width:260px}
@media(max-width:720px){.fmtm-tournament-waiting-card{align-items:flex-start;flex-direction:column}.fmtm-tournament-waiting-status{align-items:flex-start;text-align:left}}


/* v3.2: visor PDF profesional para Contenido del portal */
.fmtm-content-hint{display:block;margin-top:6px;color:#2563eb;font-size:12px;font-style:normal;font-weight:800}
html.fmtm-modal-open,body.fmtm-modal-open{overflow:hidden}
.fmtm-pdf-modal[hidden]{display:none!important}
.fmtm-pdf-modal{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:22px}
.fmtm-pdf-modal-backdrop{position:absolute;inset:0;background:rgba(8,20,38,.72);backdrop-filter:blur(5px)}
.fmtm-pdf-modal-dialog{position:relative;width:min(1180px,96vw);height:min(88vh,900px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.34);border-radius:22px;background:#fff;box-shadow:0 30px 90px rgba(2,15,35,.38)}
.fmtm-pdf-modal-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px 14px 18px;border-bottom:1px solid #dce5ef;background:linear-gradient(135deg,#f6f9ff,#fff)}
.fmtm-pdf-modal-heading{display:flex;align-items:center;gap:12px;min-width:0}
.fmtm-pdf-modal-heading>div{min-width:0}
.fmtm-pdf-modal-heading strong{display:block;max-width:620px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#09264a;font-size:17px}
.fmtm-pdf-modal-heading small{display:block;margin-top:2px;color:#64748b;font-size:12px}
.fmtm-pdf-modal-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e8f0ff;font-size:20px}
.fmtm-pdf-modal-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.fmtm-pdf-modal-actions .fmtm-btn{white-space:nowrap}
.fmtm-pdf-modal-body{position:relative;flex:1;min-height:0;background:#d9e0e8}
.fmtm-pdf-modal-body iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.fmtm-pdf-loading{position:absolute;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:10px;padding:11px 15px;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(15,23,42,.18);color:#334155;font-weight:800;font-size:13px}
.fmtm-pdf-loading[hidden]{display:none!important}
.fmtm-pdf-loading span{width:16px;height:16px;border:2px solid #bfdbfe;border-top-color:#2563eb;border-radius:50%;animation:fmtmPdfSpin .8s linear infinite}
@keyframes fmtmPdfSpin{to{transform:rotate(360deg)}}
@media(max-width:720px){
 .fmtm-pdf-modal{padding:0}
 .fmtm-pdf-modal-dialog{width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}
 .fmtm-pdf-modal-header{align-items:flex-start;padding:11px 10px}
 .fmtm-pdf-modal-heading small{display:none}
 .fmtm-pdf-modal-heading strong{max-width:42vw;font-size:14px}
 .fmtm-pdf-modal-icon{width:34px;height:34px;border-radius:10px;font-size:17px}
 .fmtm-pdf-modal-actions{gap:5px}
 .fmtm-pdf-modal-actions .fmtm-btn{padding:8px 9px;font-size:12px}
}

/* ===== Visor PDF.js FMTM ===== */

.fmtm-pdf-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #dfe3e8;
    background: #f7f8fa;
    flex: 0 0 auto;
}

.fmtm-pdf-tool {
    border: 1px solid #cfd5dc;
    background: #fff;
    color: #25364a;
    border-radius: 7px;
    padding: 7px 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.fmtm-pdf-tool:hover:not(:disabled) {
    background: #eef3f8;
}

.fmtm-pdf-tool:disabled {
    opacity: .4;
    cursor: default;
}

.fmtm-pdf-page-info,
.fmtm-pdf-zoom-label {
    font-size: 13px;
    color: #45566b;
    white-space: nowrap;
}

.fmtm-pdf-zoom-label {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
}

.fmtm-pdf-toolbar-separator {
    width: 1px;
    height: 24px;
    background: #d5dbe2;
    margin: 0 3px;
}

.fmtm-pdf-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fmtm-pdf-canvas-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #525659;
    padding: 16px;
    text-align: center;
}

#fmtmPdfCanvas {
    display: block;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.30);
}

.fmtm-pdf-loading {
    color: #fff;
    padding: 40px 20px;
    text-align: center;
}

.fmtm-pdf-error {
    background: #fff;
    color: #9b1c1c;
    display: inline-block;
    padding: 18px 22px;
    border-radius: 8px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .fmtm-pdf-modal-actions .fmtm-btn-primary {
        display: none;
    }

    .fmtm-pdf-viewer-toolbar {
        gap: 5px;
        padding: 7px;
    }

    .fmtm-pdf-tool {
        padding: 7px 8px;
        font-size: 12px;
    }

    .fmtm-pdf-toolbar-separator {
        display: none;
    }

    .fmtm-pdf-canvas-wrap {
        padding: 8px;
    }
}

/* ===== PDF.js: desplazamiento continuo ===== */

.fmtm-pdf-pages-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
}

.fmtm-pdf-page {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.fmtm-pdf-page canvas {
    display: block;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.32);
    max-width: none;
}

.fmtm-pdf-page-number {
    display: inline-block;
    margin: 0 auto 5px;
    padding: 3px 9px;
    border-radius: 12px;
    background: rgba(20,30,40,.72);
    color: #fff;
    font-size: 11px;
}

.fmtm-pdf-canvas-wrap {
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

@media (max-width: 700px) {
    .fmtm-pdf-pages-container {
        gap: 10px;
    }
}
