:root {
  --court: #65AAC2;
  --court-light: #d7eef5;
  --cream: #E7E5D7;
  --cream-2: #f6f5ee;
  --ball: #ADBA5E;
  --olive: #869A69;
  --olive-deep: #4f6240;
  --ink: #243028;
  --line: #c9d3b4;
  --danger: #8d2f2f;
  --ok: #3f6a32;
  --warn: #8a5a12;
  --link: #2f6478;
  --shadow: 0 12px 28px rgba(47, 90, 108, 0.12);
  font-family: "Segoe UI", "Source Sans 3", sans-serif;
  color: var(--ink);
  background: #1e568f;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #1e568f; }
a { color: var(--link); }
h1, h2, h3 { font-family: Palatino, "Iowan Old Style", Georgia, serif; font-weight: 600; letter-spacing: -0.02em; color: var(--olive-deep); }
.wrap > h1 {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 0.85rem;
  padding: 0.4rem 1rem;
  background: var(--cream-2);
  color: var(--olive-deep);
  border-radius: 16px;
  box-shadow: var(--shadow);
  line-height: 1.25;
}
header, nav, main { position: relative; z-index: 1; }

.court { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #1e568f; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.top {
  background: var(--olive-deep);
  color: var(--cream);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.4rem;
  border-bottom: 4px solid var(--ball);
}
.brand { color: var(--cream); text-decoration: none; font-family: Palatino, Georgia, serif; font-size: 1.35rem; display: inline-flex; align-items: center; gap: 0.55rem; }
.brand::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d5e28a, var(--ball) 62%, #7d8c45);
  box-shadow: inset -2px -2px 0 rgba(79, 98, 64, 0.25);
}
.who { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.who form { display: inline; margin: 0; }
.top a { color: var(--cream); }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.55rem 1rem; background: var(--olive); }
.nav a { color: var(--cream-2); text-decoration: none; font-size: 0.92rem; padding: 0.28rem 0.6rem; border-radius: 999px; }
.nav a:hover, .nav a.on { background: var(--ball); color: var(--olive-deep); }
.wrap { width: 100%; max-width: none; margin: 0; padding: 1.1rem 1.25rem 2rem; }
.card { background: var(--cream-2); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
details.fold > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; font-weight: 700; color: var(--olive-deep); list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 0.85rem; }
details.fold > summary .fold-hint { font-size: 0.78rem; font-weight: 600; color: #5d6754; }
details.fold > summary .fold-hint::after { content: "Abrir"; }
details.fold[open] > summary .fold-hint::after { content: "Plegar"; }
.grid { display: grid; gap: 0.8rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
label.field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.92rem; margin-bottom: 0.7rem; }
input, select, textarea { font: inherit; padding: 0.55rem 0.65rem; border: 1px solid #b7c3a4; border-radius: 10px; background: white; width: 100%; color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; border-radius: 4px; }
label:has(input[type="checkbox"]), label:has(input[type="radio"]) { display: flex; align-items: center; gap: 0.4rem; margin: 0.3rem 0; }
textarea { min-height: 110px; }
button, .btn { background: var(--ball); color: var(--olive-deep); border: 0; border-radius: 999px; padding: 0.55rem 0.95rem; text-decoration: none; display: inline-block; cursor: pointer; font-weight: 600; }
button:hover, .btn:hover { background: #9aab4e; }
.btn.quiet { background: var(--olive); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--olive-deep); border: 1px solid var(--olive); }
.top .btn.ghost { color: var(--cream); border-color: rgba(231, 229, 215, 0.7); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: rgba(255, 255, 255, 0.45); }
th, td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--olive-deep); background: rgba(173, 186, 94, 0.22); }
.flash { background: #e7f0d4; border: 1px solid #b7c98a; padding: 0.7rem 0.9rem; border-radius: 12px; margin-bottom: 1rem; }
.errors { background: #fdecec; border: 1px solid #e7b8b8; padding: 0.7rem 0.9rem; border-radius: 12px; margin-bottom: 1rem; }
.pill { display: inline-block; border-radius: 999px; padding: 0.1rem 0.55rem; font-size: 0.8rem; background: #e4ebc4; color: var(--olive-deep); }
.rojo { color: var(--danger); font-weight: 700; }
.ambar { color: var(--warn); font-weight: 700; }
.verde { color: var(--ok); font-weight: 700; }
.row-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.muted { color: #5d6754; }
.lead-light { color: #f7f4ea; text-shadow: 0 1px 2px rgba(18, 48, 86, 0.45); margin: 0.35rem 0 1rem; max-width: 70ch; }
.login { width: 100%; max-width: 440px; margin: 6vh auto; }
.captcha-row { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.captcha-row img { flex: 1 1 auto; width: 100%; height: 46px; min-width: 0; border: 1px solid #b7c3a4; border-radius: 10px; background: var(--cream); object-fit: fill; }
.captcha-row input { flex: 1 1 auto; width: 100%; min-width: 0; letter-spacing: 0.12em; text-align: center; }
.captcha-row a { flex: 0 0 auto; font-size: 0.85rem; white-space: nowrap; }
.login form > p { margin: 0.2rem 0 0; }
.login form > p button { width: 100%; }
.password-row { position: relative; display: block; }
.password-row input { padding-right: 2.7rem; }
.password-row .eye { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); width: 2.15rem; height: 2.15rem; padding: 0; border-radius: 8px; background: transparent; color: var(--olive-deep); display: grid; place-items: center; }
.password-row .eye:hover { background: rgba(173, 186, 94, 0.35); }
.password-row .eye svg { width: 1.15rem; height: 1.15rem; }
.password-row .eye .eye-off { display: none; }
.password-row .eye.is-on .eye-on { display: none; }
.password-row .eye.is-on .eye-off { display: block; }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin: 0.4rem 0 0.8rem; }
.cal-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.cal-tools form { display: flex; gap: 0.35rem; align-items: center; margin: 0; }
.cal-tools input[type="date"] { width: auto; }
.today-line { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.7rem; }
.shift-pill { display: inline-block; border-radius: 8px; padding: 0.28rem 0.4rem; line-height: 1.15; font-weight: 700; font-size: 0.75rem; text-align: center; background: color-mix(in srgb, var(--c, #57534e) 18%, white); color: #1c2414; border: 1px solid color-mix(in srgb, var(--c, #57534e) 55%, #c5cbb8); text-decoration: none; }
.shift-pill small { display: block; font-weight: 600; font-size: 0.68rem; }
a.shift-pill:hover { filter: brightness(0.97); }
.cuad-wrap { overflow: auto; max-height: calc(100vh - 220px); }
.cuad { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; background: #fffdf8; }
.cuad th, .cuad td { border-right: 1px solid #e4e0d4; border-bottom: 1px solid #e4e0d4; text-align: center; padding: 0.15rem; vertical-align: middle; background: transparent; }
.cuad thead th { position: sticky; top: 0; background: #f4f1e6; z-index: 3; font-size: 0.75rem; min-width: 108px; }
.cuad .sticky, .cuad .sticky-right { position: sticky; background: #f7f4ea; z-index: 2; }
.cuad .sticky { left: 0; text-align: left; min-width: 168px; }
.cuad .sticky-right { right: 0; min-width: 72px; }
.cuad thead th.sticky, .cuad thead th.sticky-right { z-index: 4; background: #efeadd; }
.cuad tfoot td { position: sticky; bottom: 0; background: #efeadd; z-index: 2; font-weight: 700; }
.cuad tfoot td.sticky { z-index: 4; }
.worker-cell { padding: 0.4rem 0.5rem !important; }
.worker-cell strong { display: block; }
.worker-cell small { color: #5d6754; font-size: 0.72rem; }
.cell-link { display: flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; color: inherit; }
.cell-link .shift-pill { width: 100%; }
.cuad td.day-weekend { background: rgba(90, 74, 50, 0.05); }
.cuad td.day-today, .cuad th.day-today { background: rgba(173, 186, 94, 0.35); }
.cuad td.is-selected { box-shadow: inset 0 0 0 2px #3f6212; }
.empty-plus { color: #8a917c; font-size: 1.05rem; }
.hours-cell { font-weight: 700; white-space: nowrap; }
.hours-cell small { display: block; color: #5d6754; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.8rem; }
#calendario:fullscreen, #calendario:-webkit-full-screen { background: #f7f4ea; padding: 0.8rem 1rem; overflow: auto; width: 100%; height: 100%; }
#calendario:fullscreen .cuad-wrap, #calendario:-webkit-full-screen .cuad-wrap { max-height: calc(100vh - 140px); }
#calendario:fullscreen .shift-pill, #calendario:-webkit-full-screen .shift-pill { font-size: 0.95rem; padding: 0.4rem 0.3rem; }
.steps { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 0.8rem; }
.steps li { background: rgba(255, 255, 255, 0.72); border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.82rem; }
.steps li.now { background: var(--ball); font-weight: 700; }
.preview { white-space: pre-wrap; background: white; border-radius: 12px; padding: 0.8rem 1rem; border: 1px solid var(--line); width: 100%; }
.thread { border-left: 3px solid var(--ball); margin: 0.7rem 0; padding-left: 0.75rem; }
.point-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.55rem; }
.point-row input[type="text"] { flex: 1 1 220px; }
.person { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.point-fold { margin: 0.55rem 0; padding: 0.55rem 0.75rem; background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: 12px; }
.point-fold > summary { gap: 0.6rem; }
.point-fold-title { flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--olive-deep); }
.point-fold[open] { background: #fffdf8; box-shadow: 0 4px 12px rgba(47, 90, 108, 0.06); }
.point-fold .field:last-child { margin-bottom: 0.15rem; }

.cloud-spaces a.on { background: var(--ball); color: var(--olive-deep); border-radius: 999px; padding: 0.28rem 0.7rem; font-weight: 700; text-decoration: none; }
.cloud-spaces a:not(.on) { text-decoration: none; padding: 0.28rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.55); color: var(--olive-deep); }
.cloud-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0 0 0.85rem; padding: 0.45rem 0.75rem; background: rgba(247,244,234,0.92); border-radius: 12px; border: 1px solid var(--line); font-size: 0.92rem; }
.cloud-crumb a { color: var(--link); text-decoration: none; font-weight: 600; }
.cloud-crumb a:hover { text-decoration: underline; }
.cloud-sep { color: #7a846c; margin: 0 0.1rem; }
.cloud-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 1rem; align-items: start; }
.cloud-panel { min-height: 280px; position: relative; }
.cloud-drop-hint { margin: 0 0 0.75rem; font-size: 0.86rem; }
.cloud-panel.cloud-drop.is-dragover {
  outline: 2px dashed var(--ball);
  outline-offset: -6px;
  background: color-mix(in srgb, var(--ball) 18%, var(--cream-2));
}
.cloud-tile.folder.is-drop-target,
.cloud-tile.folder.is-dragover {
  outline: 2px solid var(--olive-deep);
  background: color-mix(in srgb, var(--ball) 35%, #fffdf8);
  transform: translateY(-2px) scale(1.02);
  z-index: 2;
}
.cloud-drop-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0.55rem;
  border-radius: 12px;
  border: 2px dashed var(--olive-deep);
  background: rgba(173, 186, 94, 0.28);
  display: grid;
  place-items: center;
  z-index: 3;
}
.cloud-panel.is-dragover > .cloud-drop-overlay { display: grid; }
.cloud-panel:not(.is-dragover) > .cloud-drop-overlay { display: none; }
.cloud-drop-overlay-text {
  background: var(--olive-deep);
  color: var(--cream);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
}
.cloud-file-drop {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  padding: 0.85rem 0.75rem;
  border: 1.5px dashed #a8b48c;
  border-radius: 12px;
  background: #fffdf8;
  cursor: pointer;
  margin-bottom: 0.7rem;
  text-align: center;
}
.cloud-file-drop.is-dragover {
  border-color: var(--olive-deep);
  background: color-mix(in srgb, var(--ball) 25%, #fffdf8);
}
.cloud-file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.cloud-file-drop { position: relative; }
.cloud-file-drop-label { font-weight: 700; color: var(--olive-deep); font-size: 0.92rem; }
.cloud-file-drop-name { font-size: 0.8rem; word-break: break-all; }
.cloud-upload-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--olive-deep);
  color: var(--cream);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.cloud-upload-toast.is-error { background: var(--danger); }
body.cloud-dragging { cursor: copy; }
.cloud-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.cloud-up { margin: 0 0 0.75rem; }
.cloud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.7rem; }
.cloud-tile { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.85rem 0.75rem; border-radius: 14px; border: 1px solid var(--line); background: #fffdf8; text-decoration: none; color: var(--ink); box-shadow: 0 4px 12px rgba(47, 90, 108, 0.06); transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease; min-height: 118px; }
.cloud-tile:hover { transform: translateY(-2px); border-color: var(--ball); box-shadow: var(--shadow); }
.cloud-tile.folder { background: linear-gradient(165deg, #f7f4ea, #eef3d8); }
.cloud-ico { width: 2.4rem; height: 1.9rem; display: block; margin-bottom: 0.15rem; border-radius: 4px; position: relative; }
.cloud-ico-folder { background: linear-gradient(180deg, #c9d98a, var(--ball)); box-shadow: inset 0 -2px 0 rgba(79,98,64,0.15); }
.cloud-ico-folder::before { content: ""; position: absolute; left: 0; top: -0.35rem; width: 0.95rem; height: 0.4rem; background: #b6c86f; border-radius: 3px 3px 0 0; }
.cloud-ico-pdf { background: #c45c4a; }
.cloud-ico-image { background: linear-gradient(135deg, #65AAC2, #3f6a82); }
.cloud-ico-sheet { background: #4f7a45; }
.cloud-ico-doc { background: #3d6ea5; }
.cloud-ico-text { background: #8a8f78; }
.cloud-ico-file { background: #6d7564; }
.cloud-ico-pdf::after, .cloud-ico-image::after, .cloud-ico-sheet::after, .cloud-ico-doc::after, .cloud-ico-text::after, .cloud-ico-file::after {
  content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 0.55rem 0.55rem 0; border-color: transparent #fffdf8 transparent transparent; opacity: 0.85;
}
.cloud-name { font-weight: 700; color: var(--olive-deep); word-break: break-word; font-size: 0.95rem; }
.cloud-meta { font-size: 0.75rem; line-height: 1.25; }
.cloud-empty { margin: 1rem 0 0; }
.cloud-side { display: flex; flex-direction: column; gap: 0; }
.cloud-viewer { min-height: 420px; display: flex; flex-direction: column; }
.cloud-frame { width: 100%; flex: 1; min-height: 62vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cloud-frame-text { background: #fffdf8; }
.cloud-image-wrap { display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; min-height: 50vh; }
.cloud-image { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: 6px; }
.cloud-no-preview { padding: 1.5rem 0.5rem; text-align: center; }

@media (max-width: 900px) {
  .cloud-layout { grid-template-columns: 1fr; }
  .cloud-frame { min-height: 50vh; }
}
@media (max-width: 720px) {
  .top, .nav { padding-left: 0.8rem; padding-right: 0.8rem; }
  table:not(.cuad) { display: block; overflow-x: auto; }
}

/* ===== Identidad corporativa RSTG (escudo e imagen de rstgranada.es) ===== */
:root { --rst-green: #1d4a33; --rst-green-2: #2b5f43; --rst-gold: #c8b07a; --rst-gold-2: #e3d3a6; }
.court .scene { opacity: .55; }
.court .club-photo { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(16,46,31,.80) 0%, rgba(29,74,51,.55) 45%, rgba(16,46,31,.85) 100%), url("../img/club-instalaciones.jpg") center/cover no-repeat;
  mix-blend-mode: multiply; }
.court .club-photo + .scene, .court .scene { position: absolute; z-index: 0; }
.top { background: linear-gradient(90deg, var(--rst-green), var(--rst-green-2)); border-bottom: 3px solid var(--rst-gold); }
.brand { color: var(--rst-gold-2); }
.brand::before { display: none; }
.brand .crest { height: 2.6rem; width: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rst-gold); font-family: system-ui, sans-serif; }
.nav { background: rgba(29,74,51,.92); }
.nav a:hover, .nav a.on { background: var(--rst-gold); color: var(--rst-green); }
button, .btn { background: var(--rst-gold); color: var(--rst-green); }
button:hover, .btn:hover { background: var(--rst-gold-2); }
.btn.quiet { background: var(--rst-green-2); color: var(--cream); }
h1, h2, h3 { color: var(--rst-green); }
.card.login { border-top: 4px solid var(--rst-gold); background: rgba(246,245,238,.96); }
.login-crest { text-align: center; margin: -.2rem 0 .6rem; }
.login-crest img { height: 110px; width: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.login-crest p { margin: .35rem 0 0; font-family: Palatino, Georgia, serif; color: var(--rst-green); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.card.login h1 { text-align: center; }
.login-crest .login-title { display:block; margin-top:.4rem; font-family: Palatino, Georgia, serif; font-size:1.5rem; color: var(--rst-green); } .login-crest p { color: var(--rst-gold); font-family: system-ui, sans-serif; font-size:.72rem; letter-spacing:.12em; }

/* ===== Login en móvil: pantalla completa sin scroll y sin barra verde superior (17/10/2026) ===== */
@media (max-width: 768px) {
  body.page-login { min-height: 100vh; min-height: 100dvh; }
  body.page-login header.top { display: none; }
  body.page-login main.wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: .6rem .75rem; }
  body.page-login .card.login { margin: 0 auto; max-width: 440px; padding: .75rem 1rem .7rem; }
  body.page-login .login-crest { margin: 0 0 .35rem; }
  body.page-login .login-crest img { height: 68px; }
  body.page-login .login-crest .login-title { margin-top: .2rem; font-size: 1.2rem; }
  body.page-login .login-crest p { margin-top: .15rem; font-size: .66rem; }
  body.page-login .card.login h1 { font-size: 1.35rem; margin: .2rem 0 .25rem; }
  body.page-login .card.login > p.muted { margin: 0 0 .5rem; font-size: .85rem; text-align: center; line-height: 1.3; }
  body.page-login .card.login > p { margin: .45rem 0 0; font-size: .85rem; text-align: center; }
  body.page-login label.field { margin-bottom: .45rem; gap: .15rem; font-size: .88rem; }
  body.page-login .card.login input:not([type="checkbox"]) { padding: .45rem .6rem; font-size: 16px; }
  body.page-login .captcha-row img { height: 40px; }
  body.page-login .card.login label:has(input[type="checkbox"]) { margin: .15rem 0; font-size: .88rem; }
  body.page-login .login form > p { margin-top: .3rem; }
  body.page-login .login form > p button { padding: .55rem .95rem; }
  body.page-login .errors, body.page-login .flash, body.page-login .warnbox { margin: 0 auto .5rem; max-width: 440px; width: 100%; padding: .45rem .7rem; font-size: .85rem; }
}
@media (max-width: 768px) and (max-height: 600px) {
  body.page-login .card.login > p.muted { display: none; }
  body.page-login .login-crest img { height: 52px; }
}

/* ===== Páginas de acceso limpias (login, recuperar y elegir contraseña) · foto del club, sin dibujos (17/10/2026) ===== */
body.page-bare { background: #0b3d2e; min-height: 100vh; min-height: 100dvh; }
.acceso-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-color: #0b3d2e;
  background-image:
    linear-gradient(180deg, rgba(11,61,46,.55) 0%, rgba(11,61,46,.38) 40%, rgba(11,61,46,.70) 100%),
    linear-gradient(120deg, rgba(200,176,122,.18) 0%, rgba(200,176,122,0) 45%),
    url("../img/acceso/acceso-club-1920.jpg");
  background-image:
    linear-gradient(180deg, rgba(11,61,46,.55) 0%, rgba(11,61,46,.38) 40%, rgba(11,61,46,.70) 100%),
    linear-gradient(120deg, rgba(200,176,122,.18) 0%, rgba(200,176,122,0) 45%),
    image-set(url("../img/acceso/acceso-club-1920.webp") type("image/webp"), url("../img/acceso/acceso-club-1920.jpg") type("image/jpeg"));
  background-size: cover; background-position: center 60%; background-repeat: no-repeat; }
.acceso-bg::after { content: ""; position: absolute; right: 3vw; bottom: 3vh; width: min(30vw, 300px); aspect-ratio: 1; background: url("../img/escudo-rstg.png") center/contain no-repeat; opacity: .07; filter: grayscale(1) brightness(2); }
@media (max-width: 768px) {
  .acceso-bg { background-image:
    linear-gradient(180deg, rgba(11,61,46,.60) 0%, rgba(11,61,46,.45) 45%, rgba(11,61,46,.75) 100%),
    url("../img/acceso/acceso-club-movil.jpg");
    background-image:
    linear-gradient(180deg, rgba(11,61,46,.60) 0%, rgba(11,61,46,.45) 45%, rgba(11,61,46,.75) 100%),
    image-set(url("../img/acceso/acceso-club-movil.webp") type("image/webp"), url("../img/acceso/acceso-club-movil.jpg") type("image/jpeg"));
    background-position: center; }
  .acceso-bg::after { display: none; }
}
body.page-bare main.wrap { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; box-sizing: border-box; padding: 1.5rem 1rem; }
body.page-bare .card.login { margin: 0 auto; width: 100%; max-width: 440px; box-sizing: border-box; background: rgba(250,248,242,.97); box-shadow: 0 18px 48px rgba(0,0,0,.35); border-top: 4px solid var(--rst-gold); }
body.page-bare .errors, body.page-bare .flash, body.page-bare .warnbox { margin: 0 auto .6rem; max-width: 440px; width: 100%; box-sizing: border-box; }
.acceso-legal { margin: .9rem auto 0; max-width: 440px; width: 100%; box-sizing: border-box; padding: .5rem .75rem; font: 400 .74rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #f4efe2; text-align: center; background: rgba(11,61,46,.72); border-radius: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.acceso-legal a { color: #e3d3a6; font-weight: 600; }
/* Requisitos de contraseña (se marcan en verde al cumplirse) */
.pw-rules { list-style: none; margin: -.1rem 0 .6rem; padding: .45rem .65rem; border: 1px solid #ddd5c2; border-radius: 8px; background: #fbfaf5; display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .7rem; font: 400 .8rem/1.35 system-ui, sans-serif; color: #6b6355; }
.pw-rules li { position: relative; padding-left: 1.15rem; }
.pw-rules li::before { content: "○"; position: absolute; left: 0; top: 0; color: #a39a87; font-weight: 700; }
.pw-rules li.ok { color: #1d6b3a; font-weight: 600; }
.pw-rules li.ok::before { content: "✓"; color: #1d8a45; }
button:disabled, button[disabled] { opacity: .55; cursor: not-allowed; }
@media (max-width: 768px) {
  body.page-bare main.wrap { padding: .5rem .75rem; }
  .acceso-legal { margin-top: .45rem; padding: .35rem .6rem; font-size: .66rem; line-height: 1.35; }
  .pw-rules { font-size: .76rem; padding: .35rem .55rem; }
}
@media (max-width: 768px) and (max-height: 700px) {
  body.page-login .login-crest p { display: none; }
  body.page-login .login-crest img { height: 50px; }
  body.page-login .login-crest .login-title { font-size: 1.05rem; margin-top: .1rem; }
  body.page-login .card.login h1 { font-size: 1.2rem; margin: .1rem 0 .2rem; }
  body.page-login label.field { margin-bottom: .35rem; }
  .acceso-legal { font-size: .62rem; }
}

/* Filtro Día + Deporte en horizontal (Reservar pista) · 18/10/2026 */
.reservas-filtro { width: fit-content; max-width: 100%; box-sizing: border-box; margin-bottom: 1rem; }
.reservas-filtro .reservas-filtro-row { flex-wrap: nowrap; align-items: flex-end; gap: .85rem; margin: 0; }
.reservas-filtro .reservas-filtro-row label.field { flex: 1 1 0; min-width: 9.5rem; margin-bottom: 0; }
.reservas-filtro .reservas-filtro-row label.field input,
.reservas-filtro .reservas-filtro-row label.field select { width: 100%; box-sizing: border-box; }
.reservas-filtro > .help { margin: .55rem 0 0; }
@media (max-width: 520px) {
  .reservas-filtro { width: 100%; }
  .reservas-filtro .reservas-filtro-row { flex-wrap: wrap; }
  .reservas-filtro .reservas-filtro-row label.field { flex: 1 1 100%; min-width: 0; }
}

/* ===== Vista de socio (Mi espacio / Mi cuenta): fondos claros opacos y buen contraste ===== */
body.vista-socio .card { background: #fbfaf5; color: #1f2a22; }
body.vista-socio .tbl-wrap { background: #fff; border: 1px solid #e2dfd2; border-radius: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.18); margin-bottom: 1rem; }
body.vista-socio table { background: #fff; color: #1f2a22; }
body.vista-socio th { background: #efeadd; color: #1d4a33; }
body.vista-socio td { background: #fff; color: #1f2a22; }
body.vista-socio tr[style*="background"] td { background: #eef6ee; }
body.vista-socio .muted, body.vista-socio td .muted, body.vista-socio .card .muted { color: #4a5446; }
body.vista-socio main.wrap > p, body.vista-socio main.wrap > p.muted { background: #fbfaf5; color: #2c3a30; padding: .55rem .85rem; border-radius: 12px; }
.mm-back-gestion { font-weight: 600; }
@media (min-width: 769px) and (max-height: 860px) {
  body.page-bare main.wrap { padding: .8rem 1rem; }
  body.page-bare .login-crest { margin: 0 0 .3rem; }
  body.page-bare .login-crest img { height: 64px; }
  body.page-bare .login-crest .login-title { font-size: 1.25rem; margin-top: .2rem; }
  body.page-bare .card.login { padding: .8rem 1.1rem .8rem; }
  body.page-bare .card.login h1 { margin: .2rem 0 .35rem; font-size: 1.5rem; }
  body.page-bare label.field { margin-bottom: .45rem; }
  body.page-bare .acceso-legal { margin-top: .6rem; }
}

/* ===== Fondo aleatorio con fotos del club (ERP, Mi espacio y acceso) · 17/10/2026 ===== */
body { background: #0b3d2e; }
.club-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #0b3d2e !important; }
.club-bg::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  background-image: linear-gradient(180deg, rgba(11,61,46,.62) 0%, rgba(11,61,46,.48) 40%, rgba(11,61,46,.78) 100%), linear-gradient(120deg, rgba(200,176,122,.16) 0%, rgba(200,176,122,0) 45%), var(--fondo, none);
  background-size: cover; background-position: center 60%; background-repeat: no-repeat; }
body.page-bare .club-bg::before { background-image: linear-gradient(180deg, rgba(11,61,46,.55) 0%, rgba(11,61,46,.38) 40%, rgba(11,61,46,.70) 100%), linear-gradient(120deg, rgba(200,176,122,.18) 0%, rgba(200,176,122,0) 45%), var(--fondo, none); }
.club-bg.is-ready::before { opacity: 1; }
.club-bg::after { z-index: 1; }
body:not(.page-bare) .club-bg::after { display: none; }
@media (max-width: 768px) { .club-bg::before { background-position: center; } }
@media (prefers-reduced-motion: reduce) { .club-bg::before { transition: none; } }
@media print { .club-bg { display: none !important; } }
