/* ============================================================
   RPPLANNING — estilos específicos de la app
   Variables, reset, navbar, footer, landing, login, botones
   comunes y responsive base → rp-shared-style.css (assets)
   ============================================================ */

/* ── Variables específicas de RPPlanning ── */
:root {
  --rp-black:     #000;
  --rp-white:     #fff;
  --rp-danger:    #DC3545;
  --rp-success:   #1a7a4a;
  --red:          #C62828;
  --font-hashtag: 'Adlery Blockletter', 'Black Ops One', Impact, sans-serif;
  --label-w:      58px;
}

/* ── Modo claro: overrides específicos de RPPlanning ── */
body.light-mode .config-subtab.active { color: #012C1D; border-bottom-color: #012C1D; }
body.light-mode .config-subtab        { color: #3a5a4a; }
body.light-mode .config-subtab:hover  { color: #012C1D; }
body.light-mode .tab-header h2,
body.light-mode .config-card h3,
body.light-mode .hc-titulo,
body.light-mode .entity-form h4 { color: #012C1D; }
body.light-mode .fg-field input,
body.light-mode .fg-field select,
body.light-mode .form-row input,
body.light-mode .form-row select { background: #fff; color: #012C1D; border-color: rgba(1,44,29,0.35); }
body.light-mode .fg-field input::placeholder { color: rgba(1,44,29,0.4); }
body.light-mode .fg-field select option,
body.light-mode .form-row select option         { background: #fff; color: #012C1D; }
body.light-mode .fg-field select option:checked,
body.light-mode .form-row select option:checked { background: #e0ede6; color: #012C1D; }
body.light-mode .btn-edit   { background: rgba(1,44,29,0.1);  color: #012C1D; border-color: rgba(1,44,29,0.3); }
body.light-mode .btn-edit:hover { background: rgba(1,44,29,0.2); border-color: #012C1D; }
body.light-mode .tipo-btn   { color: #3a5a4a; border-color: rgba(1,44,29,0.3); }
body.light-mode .historial-card      { border-color: rgba(1,44,29,0.2); }
body.light-mode .historial-card:hover { border-color: #012C1D; }
body.light-mode .hc-dia    { color: #3a5a4a; }
body.light-mode .entity-item { background: rgba(1,44,29,0.05); }
body.light-mode .ei-sub    { color: #3a5a4a; }
body.light-mode .dia-label { background: #012C1D; }
body.light-mode .config-card h3  { border-bottom-color: rgba(1,44,29,0.2); }
body.light-mode .historial-card:hover { border-color: #012C1D; }
body.light-mode .entity-form     { background: rgba(1,44,29,0.04); border-color: rgba(1,44,29,0.2); }
body.light-mode .fg-field input::placeholder { color: rgba(1,44,29,0.4); }
body.light-mode .ds-section-hd   { background: rgba(1,44,29,0.05); }
body.light-mode .ds-section-hd:hover { background: rgba(1,44,29,0.1); }
body.light-mode .ds-section-hd.open  { background: rgba(1,44,29,0.08); border-bottom-color: rgba(1,44,29,0.15); }
body.light-mode::-webkit-scrollbar-track { background: #e8f0eb; }

/* ── Layout app ── */
html, body { overflow-x: hidden; }
#screen-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--app-bg); }

/* ── Tabs ── */
.tab-content { display: none; flex-direction: column; padding: 20px 24px; gap: 20px; }
.tab-content.active { display: flex; flex: 1; }
.tab-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.tab-header h2 { font-family: var(--font-ui) !important; font-size: 22px; font-weight: 400; letter-spacing: 1px; color: #fff; }
.tab-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Botones específicos de Planning ── */
.btn-export      { background: var(--rp-success); color: #fff; border: none; padding: 11px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn-export:hover { background: #1a9e63; }
.btn-export-ical  { background: #1a4b8c; color: #fff; border: none; padding: 11px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn-danger { background: #c62828; color: #fff; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.btn-edit   { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }

/* ===== SEMANA LAYOUT ===== */
.semana-layout { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .semana-layout { grid-template-columns: minmax(0, 1fr); } }

/* ===== DISEÑO LAYOUT ===== */
#cfg-diseno.cfg-panel.active { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-top: 20px; }
.diseno-preview { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1100px) { #cfg-diseno.cfg-panel.active { grid-template-columns: 1fr; } }

/* ===== DÍAS EDITOR ===== */
.dias-grid { display: flex; flex-direction: column; gap: 8px; }
.dia-row { background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 68px minmax(0, 1fr); }
.dia-label { background: #000; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 10px 4px; min-height: 68px; }
.dia-letra { font-family: var(--font-card); font-size: 22px; color: #fff; line-height: 1; }
.dia-num   { font-family: var(--font-card); font-size: 22px; color: #fff; line-height: 1; }
.dia-form  { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.dia-tipo-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tipo-btn { padding: 6px 14px; border-radius: 20px; border: 2px solid var(--app-border);
  background: transparent; color: var(--app-muted); cursor: pointer; font-size: 13px;
  font-weight: 600; transition: all .15s; font-family: var(--font-ui); }
.tipo-btn:hover { border-color: var(--app-muted); color: #fff; }
.tipo-btn.sel-ENTRENAMIENTO    { border-color: #4caf50; background: rgba(76,175,80,.15); color: #4caf50; }
.tipo-btn.sel-DESCANSO         { border-color: var(--app-muted); background: rgba(136,136,136,.12); color: var(--app-muted); }
.tipo-btn.sel-PARTIDO          { border-color: #ff4444; background: rgba(255,68,68,.12); color: #ff4444; }
.tipo-btn.sel-PARTIDO_AMISTOSO { border-color: var(--yellow); background: rgba(245,200,0,.12); color: var(--yellow); }
.tipo-btn.sel-TORNEO           { border-color: #ff9800; background: rgba(255,152,0,.12); color: #ff9800; }
.tipo-btn.sel-FOTOS            { border-color: #03a9f4; background: rgba(3,169,244,.12); color: #03a9f4; }
.tipo-btn.sel-OTRO             { border-color: #ce93d8; background: rgba(206,147,216,.12); color: #ce93d8; }
.dia-extra { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row label { font-size: 13px; color: var(--app-muted); white-space: nowrap; }
.form-row input, .form-row select { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 5px; color: var(--app-text); padding: 7px 10px; font-size: 15px;
  flex: 1; min-width: 100px; font-family: var(--font-ui); }
.form-row input[type="time"]  { flex: 0 0 auto; width: 100px; }
.form-row input[type="range"] { flex: 1; min-width: 120px; accent-color: var(--yellow); }
.form-row select option { background: #1a2e22; color: #fff; }
.form-row select option:checked { background: #024a2a; color: #fff; }

/* ===== PREVIEW LATERAL ===== */
.preview-lateral { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 78px; }
.preview-lateral-title { font-family: var(--font-card); font-size: 12px; color: var(--app-muted); letter-spacing: 2px; text-transform: uppercase; }
.export-bar { display: flex; flex-direction: column; gap: 8px; }
.card-scale-wrap { width: 100%; max-width: 420px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; margin: 0 auto; min-width: 0; }

/* ===== PLANNING CARD ===== */
.planning-card {
  width: 420px; min-width: 420px; flex-shrink: 0; aspect-ratio: 9/16;
  border-radius: 0; overflow: hidden; position: relative;
  font-family: var(--font-card); display: flex; flex-direction: column;
  background: #111; transform-origin: top center;
}
.pc-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; background-color: #0a2010; }
.pc-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(0,0,0,0); }
.pc-inner { position: relative; z-index: 2; display: flex; flex-direction: column; flex: 1; }
.pc-header { }
.pc-title-block { text-align: center; padding: 8px 12px 2px; }
.pc-club { font-family: var(--font-card); font-size: clamp(14px, 4vw, 22px); color: #000;
  text-transform: uppercase; line-height: 1.05; letter-spacing: 1px;
  -webkit-text-stroke: 2px #fff; paint-order: stroke fill; text-shadow: 0 0 8px rgba(255,255,255,.4); }
.pc-categoria { font-family: var(--font-card); font-size: clamp(9px, 2.5vw, 13px); color: #000;
  letter-spacing: 3px; text-transform: uppercase; margin-top: 0;
  -webkit-text-stroke: 1.5px var(--yellow); paint-order: stroke fill; }
.pc-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 3px 10px 4px; gap: 6px; }
.pc-header-escudo { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pc-header-escudo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 3px rgba(0,0,0,.8)); }
.pc-semana-label { font-family: var(--font-card); font-size: clamp(8px, 2vw, 11px); color: #000;
  letter-spacing: 1.5px; text-align: center; text-transform: uppercase; flex: 1;
  -webkit-text-stroke: 1px #fff; paint-order: stroke fill; }
.pc-dias { flex: 1; display: flex; flex-direction: column; padding: 2px 5px; gap: 4px; }
.pc-dia  { display: flex; align-items: stretch; border-radius: 3px; overflow: hidden; min-height: 0; flex: 1; }
.pc-dia-label { background: #000; color: #fff; width: var(--label-w); min-width: var(--label-w);
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-dia-label .pl { font-family: var(--font-card); font-size: clamp(14px,3vw,18px); color: #fff; line-height: 1; }
.pc-dia-label .pn { font-family: var(--font-card); font-size: clamp(14px,3vw,18px); color: #fff; line-height: 1; }
.pc-dia-label.torneo-label { background: #fff; border: 2px solid #000; }
.pc-dia-label.torneo-label .pl,
.pc-dia-label.torneo-label .pn { color: #000; }
.pc-dia-content { flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4px 3px; gap: 2px; text-align: center; }
.pc-c-entrenamiento    { background: rgba(255,255,255,.84); color: #111; }
.pc-c-descanso         { background: rgba(200,200,200,.80); color: #333; }
.pc-c-partido-oficial  { background: rgba(198,40,40,.92);   color: #fff; }
.pc-c-partido-amistoso { background: rgba(245,200,0,.93);   color: #111; }
.pc-c-torneo           { background: #fff; color: #000; border-top: 2px solid #000; border-bottom: 2px solid #000; }
.pc-c-fotos            { background: rgba(255,255,255,.75); color: #111; }
.pc-c-otro             { background: rgba(255,255,255,.65); color: #111; }
.pc-dia-tipo { font-family: var(--font-card); font-size: clamp(10px,2.5vw,15px);
  text-transform: uppercase; letter-spacing: .5px; line-height: 1.1; text-align: center; }
.pc-dia-sub  { font-family: var(--font-ui); font-size: clamp(7px,1.7vw,10px);
  font-weight: 700; opacity: .9; text-align: center; line-height: 1.2; }
.pc-dia-iconbox { background: #000; width: var(--label-w); min-width: var(--label-w);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-dia-iconbox svg { width: 52%; height: 52%; }
.pc-dia-iconbox img { width: 58%; height: 58%; object-fit: contain; }
.pc-iconbox-torneo { background: #fff; border: 2px solid #000; }
.pc-iconbox-torneo img { width: 65%; height: 65%; }
.pc-partido-block  { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.pc-partido-teams  { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.pc-partido-side   { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; }
.pc-partido-side-l { justify-content: flex-end; }
.pc-partido-side-r { justify-content: flex-start; }
.pc-team-siglas { font-family: var(--font-card); line-height: 1; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-c-partido-amistoso .pc-team-siglas,
.pc-c-torneo .pc-team-siglas { color: #000; }
.pc-shield-ring { background: #fff; border: 2px solid #000; border-radius: 4px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-shield-ring img { width: 88%; height: 88%; object-fit: contain; display: block; }
.pc-shield-ring.txt { font-family: var(--font-card); font-size: 9px; color: #000; text-align: center; }
.pc-vs-text { font-family: var(--font-card); color: #fff; flex-shrink: 0; }
.pc-c-partido-amistoso .pc-vs-text,
.pc-c-torneo .pc-vs-text { color: #000; }
.pc-partido-comp { font-family: var(--font-card); font-size: clamp(7px,1.7vw,10px);
  text-transform: uppercase; letter-spacing: .5px; text-align: center; }
.pc-partido-info { font-family: var(--font-ui); font-size: clamp(6px,1.4vw,9px);
  font-weight: 700; text-align: center; opacity: .9; }
.pc-footer { display: flex; align-items: center; justify-content: space-between; padding: 2px 10px 6px; gap: 4px; }
.pc-hashtag { font-family: var(--font-hashtag); font-size: clamp(13px, 3.5vw, 20px);
  color: #fff; letter-spacing: .5px; text-transform: uppercase; line-height: 1;
  text-shadow: 1px 1px 4px rgba(0,0,0,.8), -1px -1px 4px rgba(0,0,0,.8); flex: 1; }
.pc-hashtag-l { text-align: right; }
.pc-hashtag-r { text-align: left; }
.pc-footer-logo { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-footer-logo img { height: clamp(16px, 4vw, 24px); width: auto; object-fit: contain; }

/* ===== HISTORIAL ===== */
.historial-lista { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 14px; }
.historial-card { background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 8px; padding: 16px; transition: border-color .2s; display: flex; flex-direction: column; gap: 10px; }
.historial-card:hover { border-color: #fff; }
.hc-titulo { font-family: var(--font-card); font-size: 16px; color: #fff; letter-spacing: 1px; }
.hc-dias { display: flex; flex-direction: column; gap: 3px; padding: 0 8px; }
.hc-dia  { display: flex; align-items: baseline; font-size: 13px; color: var(--app-muted); }
.hc-d-letra { width: 16px; font-weight: 700; color: var(--app-text); flex-shrink: 0; }
.hc-d-num   { width: 28px; font-weight: 700; color: var(--app-text); flex-shrink: 0; margin-left: 5px; }
.hc-d-sep   { width: 28px; text-align: center; flex-shrink: 0; }
.hc-d-tipo  { flex: 1; margin-left: 6px; }
.hc-actions { display: flex; gap: 8px; justify-content: center; padding-top: 4px; }

/* ===== CONFIG ===== */
.config-subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--app-border); flex-wrap: wrap; }
.config-subtab { background: transparent; border: none; color: var(--app-muted);
  padding: 10px 16px; cursor: pointer; font-size: 15px; font-weight: 600;
  font-family: var(--font-ui); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .2s; }
.config-subtab:hover  { color: var(--app-text); }
.config-subtab.active { color: #fff; border-bottom-color: #fff; }
.cfg-panel        { display: none; padding-top: 20px; }
.cfg-panel.active { display: block; }
.config-card { background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.config-card h3 { font-family: var(--font-card); font-size: 18px; letter-spacing: 1px;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }

/* ===== SECCIONES COLAPSABLES DISEÑO ===== */
.ds-section { border: 1px solid var(--app-border); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.ds-section-hd { width: 100%; background: rgba(255,255,255,0.05); border: none;
  color: var(--app-text); padding: 10px 14px; cursor: pointer;
  text-align: left; font-weight: 700; font-family: var(--font-ui); font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; letter-spacing: .5px; }
.ds-section-hd:hover { background: rgba(255,255,255,0.1); }
.ds-section-hd.open  { background: rgba(255,255,255,0.08); border-bottom: 1px solid var(--app-border); }
.ds-chevron { transition: transform .2s; }
.ds-section-hd.open .ds-chevron { transform: rotate(180deg); }
.ds-section-body      { display: none; padding: 14px; }
.ds-section-body.open { display: block; }
.ds-section-body h5 { font-size: 11px; color: var(--app-muted); letter-spacing: 1px; text-transform: uppercase; margin: 12px 0 6px; }
.ds-section-body h5:first-child { margin-top: 0; }
.fg-field { display: flex; flex-direction: column; gap: 5px; }
.fg-field label { font-size: 12px; color: var(--app-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.fg-field input, .fg-field select { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px; color: #fff; padding: 9px 12px; font-size: 15px; font-family: var(--font-ui); }
.fg-field input:focus, .fg-field select:focus { outline: none; border-color: #fff; }
.fg-field input[type="color"] { width: 48px; height: 36px; padding: 2px 4px; cursor: pointer; flex-shrink: 0; align-self: flex-start; }
.fg-field input::placeholder { color: rgba(255,255,255,0.4); }
.fg-field select option         { background: #1a2e22; color: #fff; }
.fg-field select option:checked { background: #024a2a; color: #fff; }

.assets-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.asset-upload { display: flex; flex-direction: column; gap: 6px; }
.asset-upload label { font-size: 11px; color: var(--app-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.asset-upload.wide { flex: 1; min-width: 200px; }
.shield-box { background: #fff; border-radius: 8px; width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px solid var(--app-border); transition: border-color .2s; flex-shrink: 0; }
.shield-box:hover { border-color: #fff; }
.shield-box img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.upload-ph { font-size: 11px; color: var(--app-muted); text-align: center; padding: 4px; }
.fondo-box { background: #222; border-radius: 8px; height: 80px; flex: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px dashed var(--app-border); transition: border-color .2s; overflow: hidden; }
.fondo-box:hover { border-color: #fff; }
.fondo-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.icons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.icon-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.icon-slot-label { font-size: 11px; color: var(--app-muted); text-align: center; line-height: 1.2; }
.icon-preview-box { background: #000; border-radius: 8px; width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px solid var(--app-border); transition: border-color .2s; }
.icon-preview-box:hover { border-color: #fff; }
.icon-preview-box svg { width: 54%; height: 54%; }
.icon-preview-box img { width: 60%; height: 60%; object-fit: contain; }
.icon-reset { font-size: 10px; color: var(--app-muted); cursor: pointer; text-decoration: underline; }
.icon-reset:hover { color: var(--red); }
.entity-lista { display: flex; flex-direction: column; gap: 6px; }
.entity-item  { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.2); border-radius: 6px; padding: 10px 12px; }
.ei-shield { background: #fff; border-radius: 5px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ei-shield img { width: 100%; height: 100%; object-fit: contain; }
.ei-info   { flex: 1; }
.ei-nombre { font-size: 14px; font-weight: 600; }
.ei-sub    { font-size: 11px; color: var(--app-muted); margin-top: 1px; }
.ei-actions { display: flex; gap: 6px; }
.entity-form { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.entity-form h4 { font-size: 13px; color: var(--app-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.entity-form-actions { display: flex; gap: 8px; }
/* Botones de cuenta: ancho automático */
#cfg-cuenta .btn-secondary { width: auto; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; z-index: 500; padding: 16px; }
.modal-content { background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 12px; padding: 24px; width: 100%; display: flex;
  flex-direction: column; gap: 16px; position: relative; max-height: 92vh; overflow-y: auto; }
.modal-wide { max-width: 480px; }
#planning-card-export { width: 420px; }
.modal-close { position: absolute; top: 14px; right: 14px; background: transparent;
  border: none; color: var(--app-muted); font-size: 20px; cursor: pointer; z-index: 10; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.copy-feedback { color: #4caf50; font-weight: 600; font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 769px) {
  .config-subtab { font-size: 17px; }
  .tab-header h2 { font-size: 24px; }
  .btn-export, .btn-export-ical { font-size: 16px; }
  .btn-danger, .btn-edit { font-size: 14px; }
  .tipo-btn { font-size: 15px; }
  .hc-titulo { font-size: 18px; }
  .hc-dia { font-size: 15px; }
  .form-row label { font-size: 15px; }
  .form-row input, .form-row select { font-size: 16px; }
  .fg-field label { font-size: 13px; }
  .fg-field input, .fg-field select { font-size: 16px; }
  .ei-nombre { font-size: 16px; }
  .ei-sub    { font-size: 13px; }
}

@media (max-width: 768px) {
  .entity-lista { max-height: 400px; overflow-y: auto; }
  .preview-lateral { position: static; max-width: 100%; width: 100%; }
  .planning-card { max-width: 100%; width: 100%; }
  .tab-content { padding: 16px 12px; overflow-x: hidden; }
  .config-subtabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .dias-grid, .dia-row, .dia-form { min-width: 0; }
  .dia-form { padding: 8px 10px; }
  .form-row input, .form-row select { min-width: 0; font-size: 14px; }
  .form-row label { font-size: 13px; }
  .dia-tipo-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .tipo-btn { padding: 5px 4px; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .form-grid { grid-template-columns: 1fr; }
  .config-card { min-width: 0; overflow: hidden; }
  .fg-field input[type="range"] { width: 100%; min-width: 0; }
  #cfg-diseno.cfg-panel.active { display: flex !important; flex-direction: column; overflow: hidden; }
  .diseno-preview { position: static; width: 100%; }
  .diseno-controls { width: 100%; min-width: 0; overflow: hidden; }
  /* Admin */
  .adm-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-user-grid    { grid-template-columns: 1fr; }
  .adm-toolbar      { flex-direction: column; }
  .adm-toolbar input, .adm-toolbar select { width: 100%; }
  .adm-table        { font-size: 12px; }
  .adm-table th, .adm-table td { padding: 6px 6px; }
  .adm-code-form    { flex-direction: column; }
  .adm-code-form input, .adm-code-form select { width: 100%; }

  /* Registro y pago */
  .reg-box { padding: 24px 16px; border-radius: 12px; width: 100%; }
  .reg-discount-row { flex-direction: column; }
  .reg-discount-row input { width: 100%; }
  .reg-discount-row .btn-secondary { width: 100%; }

  /* Onboarding */
  .ob-header        { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .ob-header h2     { font-size: 16px; }
  .ob-body          { padding: 16px; }
  .ob-footer        { padding: 12px 16px; }
  .ob-assets        { flex-direction: column; }
  .ob-asset-slot.wide { flex: unset; width: 100%; }

  /* Modal en móvil */
  .modal-wide       { max-width: 100%; }
  .modal-content    { padding: 16px; border-radius: 8px; }
}

/* ============================================================
   REGISTRO, PAGO, ONBOARDING, ADMIN
   ============================================================ */

.reg-box {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 420px;
  max-width: 92vw;
}
.reg-box input, .reg-box select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 15px;
  font-family: var(--font-ui);
}
.reg-box input::placeholder { color: rgba(255,255,255,0.45); }
.reg-box input:focus, .reg-box select:focus { outline: none; border-color: #fff; }
.reg-box button { width: 100%; padding: 13px; background: #fff; color: #012C1D;
  font-weight: 700; font-size: 17px; border: none; border-radius: 6px;
  cursor: pointer; letter-spacing: 1px; font-family: var(--font-card); }
.reg-box button:hover { background: #e0e0e0; }
.reg-price-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; color: rgba(255,255,255,0.8);
}
.reg-price-row strong { margin-left: auto; font-size: 18px; color: #fff; }
.reg-offer-badge { background: #f5a623; color: #000; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: 1px; }
.reg-discount-row { display: flex; gap: 8px; width: 100%; align-items: stretch; }
.reg-discount-row input { flex: 1; min-width: 0; }
.reg-discount-row .btn-secondary { width: auto; flex-shrink: 0; padding: 12px 16px; font-size: 14px; }
.reg-discount-ok { color: #4caf50; font-size: 13px; text-align: center; width: 100%; }
.reg-terms-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.7); width: 100%; cursor: pointer; }
.reg-terms-label input[type="checkbox"] { width: auto; accent-color: #fff; }
.reg-terms-label a { color: #fff; }
.pay-method-btn {
  width: 100%; padding: 14px; background: #635bff; color: #fff;
  border: none; border-radius: 8px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: var(--font-ui); transition: background .2s;
}
.pay-method-btn:hover { background: #4f46e0; }
.btn-register {
  background: transparent; border: 2px solid rgba(255,255,255,0.6); color: rgba(255,255,255,0.85);
  padding: 14px 40px; border-radius: 8px; font-size: 17px; font-weight: 700;
  cursor: pointer; font-family: var(--font-ui); letter-spacing: 1px; transition: all .2s; margin-top: 8px;
  width: 100%; max-width: 320px; box-sizing: border-box;
}
.btn-register:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* Onboarding */
.ob-wrapper { display: flex; flex-direction: column; min-height: 100dvh; background: #012C1D; }
.ob-header { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 2px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.2); }
.ob-dots { display: flex; gap: 8px; justify-content: center; padding: 16px 0 8px; }
.ob-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.25); transition: background .2s; }
.ob-dot.active { background: #fff; }
.ob-body { flex: 1; padding: 24px; max-width: 640px; width: 100%; margin: 0 auto; }
.ob-desc { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 20px; }
.ob-form { display: flex; flex-direction: column; gap: 12px; }
.ob-field { display: flex; flex-direction: column; gap: 5px; }
.ob-field label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: .5px; }
.ob-field input, .ob-field select { padding: 11px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.25); color: #fff; font-size: 15px; font-family: var(--font-ui); }
.ob-field input:focus, .ob-field select:focus { outline: none; border-color: #fff; }
.ob-assets { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.ob-asset-slot { display: flex; flex-direction: column; gap: 8px; }
.ob-asset-slot label { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 600; }
.ob-asset-slot.wide { flex: 1 1 100%; }
.ob-tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ob-tag { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); border-radius: 20px; padding: 4px 10px; font-size: 13px; color: #fff; display: flex; align-items: center; gap: 6px; }
.ob-tag button { background: transparent; border: none; color: rgba(255,255,255,0.5); cursor: pointer; padding: 0; font-size: 12px; line-height: 1; }
.ob-footer { display: flex; justify-content: space-between; padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.15); }

/* Admin */
.adm-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
.adm-metric { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; padding: 14px 16px; text-align: center; }
.adm-metric span { display: block; font-size: 24px; font-weight: 700; color: #fff; }
.adm-metric label { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: .5px; }
.adm-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-toolbar input { flex: 1; min-width: 160px; padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.25); color: #fff; font-size: 14px; font-family: var(--font-ui); }
.adm-toolbar select { padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.4); color: #fff; font-size: 14px; font-family: var(--font-ui); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; padding: 8px 10px; border-bottom: 2px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.adm-table td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,0.07); vertical-align: middle; }
.adm-table tr:hover td { background: rgba(255,255,255,0.04); }
.adm-actions { display: flex; gap: 6px; }
.adm-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.adm-badge-active    { background: rgba(76,175,80,.25);  color: #4caf50; }
.adm-badge-pending   { background: rgba(245,166,35,.25); color: #f5a623; }
.adm-badge-suspended { background: rgba(229,57,53,.25);  color: #e57373; }
.adm-badge-completed { background: rgba(76,175,80,.25);  color: #4caf50; }
.adm-badge-failed    { background: rgba(229,57,53,.25);  color: #e57373; }
.adm-badge-refunded  { background: rgba(200,200,200,.2); color: #aaa; }
.adm-user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; font-size: 14px; }
.adm-user-grid strong { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 2px; text-transform: uppercase; }
.adm-code-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.adm-code-form input, .adm-code-form select { padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.25); color: #fff; font-size: 13px; font-family: var(--font-ui); flex: 1; min-width: 100px; }
.adm-inv-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.adm-inv-form input, .adm-inv-form select { flex: 1; min-width: 140px; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.25); color: #fff; font-size: 13px; font-family: var(--font-ui); }
