/* Barra de usuario y modo solo lectura (lo añade el servidor a cada página). */

#rfef-user { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 9000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#rfef-user .rfef-user-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #30363d;
  background: #161b22; color: #58a6ff; font-weight: 700; font-size: 13px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); opacity: .85; }
#rfef-user .rfef-user-btn:hover { opacity: 1; border-color: #58a6ff; }
#rfef-user .rfef-user-menu { position: absolute; left: 0; bottom: 46px; min-width: 220px; background: #161b22;
  border: 1px solid #30363d; border-radius: 10px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#rfef-user .rfef-user-head { padding: 8px 10px 10px; border-bottom: 1px solid #21262d; margin-bottom: 4px; }
#rfef-user .rfef-user-head strong { display: block; color: #e6edf3; font-size: 14px; }
#rfef-user .rfef-user-head span { color: #8b97a5; font-size: 12px; }
#rfef-user .rfef-user-menu a, #rfef-user .rfef-user-menu button { display: block; width: 100%; text-align: left;
  padding: 9px 10px; border: 0; background: none; color: #e6edf3; font-size: 14px; border-radius: 7px;
  text-decoration: none; cursor: pointer; font-family: inherit; }
#rfef-user .rfef-user-menu a:hover, #rfef-user .rfef-user-menu button:hover { background: rgba(88,166,255,.12); }

#rfef-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: #161b22; color: #e6edf3; border: 1px solid #30363d; padding: 10px 16px; border-radius: 9px;
  z-index: 9100; font: 14px system-ui, sans-serif; transition: .2s; pointer-events: none; }
#rfef-toast.show { opacity: 1; transform: translate(-50%, 0); }

.rfef-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9200; display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.rfef-modal-box { width: 100%; max-width: 360px; background: #161b22; border: 1px solid #30363d; border-radius: 12px;
  padding: 20px; color: #e6edf3; font-family: system-ui, sans-serif; }
.rfef-modal-box h3 { margin: 0 0 12px; font-size: 17px; }
.rfef-modal-box label { display: block; font-size: 13px; color: #8b97a5; margin-top: 10px; }
.rfef-modal-box input { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; padding: 9px 10px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px; color: #e6edf3; font-size: 15px; }
.rfef-modal-err { color: #f85149; font-size: 13px; min-height: 18px; margin-top: 10px; }
.rfef-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.rfef-modal-actions button { padding: 9px 14px; border-radius: 8px; border: 1px solid #30363d; background: #21262d;
  color: #e6edf3; cursor: pointer; font-size: 14px; }
.rfef-modal-actions button.primary { background: #58a6ff; border-color: #58a6ff; color: #0d1117; font-weight: 700; }

@media print { #rfef-user, #rfef-toast { display: none !important; } }

/* ── Modo solo lectura (cuentas de cliente) ─────────────────────────────
   Los botones de edición de cada página se ocultan desde auth.js. Aquí:
   enlaces a páginas de administración y aspecto de los campos bloqueados. */
html[data-role="client"] a[href*="temporadas.html"],
html[data-role="client"] a[href*="vincular.html"],
html[data-role="client"] a[href*="dados-de-baja.html"],
html[data-role="client"] a[href*="usuarios.html"] { display: none !important; }

html[data-role="client"] [data-rfef-locked] { cursor: default !important; }
html[data-role="client"] [data-rfef-locked]:disabled { opacity: 1 !important; color: inherit;
  -webkit-text-fill-color: currentColor; }
html[data-role="client"] select[data-rfef-locked] { -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: none !important; text-align-last: center; }
html[data-role="client"] input[data-rfef-locked]::-webkit-inner-spin-button,
html[data-role="client"] input[data-rfef-locked]::-webkit-outer-spin-button,
html[data-role="client"] input[data-rfef-locked]::-webkit-calendar-picker-indicator { display: none; -webkit-appearance: none; }
html[data-role="client"] input[data-rfef-locked][type="number"] { -moz-appearance: textfield; }
html[data-role="client"] [data-rfef-locked]:focus { outline: none; box-shadow: none; }
