﻿:root {
    color-scheme: light;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --sky: #0e7490;
    --sun: #f6ad2f;
    --clay: #d94b3d;
    --ink: #14211b;
    --muted: #5f7068;
    --line: #d8e3dc;
    --panel: #ffffff;
    --panel-soft: #f6faf7;
    --bg: #eef5ff;
    --shadow: 0 18px 46px rgba(20, 33, 27, .12);
    --shadow-soft: 0 10px 24px rgba(20, 33, 27, .08);
    --radius: 8px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary: #60a5fa;
    --primary-dark: #bfdbfe;
    --primary-soft: #102a55;
    --sky: #67d1e8;
    --sun: #f8c66f;
    --clay: #fb8074;
    --ink: #edf7ef;
    --muted: #a8b9b0;
    --line: #284133;
    --panel: #0d1712;
    --panel-soft: #111f18;
    --bg: #050b16;
    --shadow: 0 18px 46px rgba(0, 0, 0, .34);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, .28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(238, 245, 239, .6), var(--bg) 42%),
        var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.site-hero {
    min-height: 560px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(8, 22, 50, .92) 0%, rgba(15, 47, 101, .78) 43%, rgba(15, 47, 101, .24) 100%),
        url("hero-cancha.jpg") center / cover no-repeat;
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 110px;
    background: linear-gradient(180deg, rgba(7, 16, 11, 0), var(--bg));
    pointer-events: none;
}

.topbar {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.brand img {
    width: 370px;
    height: 150px;
}

.brand span {
    font-size: 16px;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.top-actions a,
.theme-toggle {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-mark {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f8d66d;
    box-shadow: 0 0 0 3px rgba(248, 214, 109, .22);
}

html[data-theme="dark"] .theme-mark {
    background: transparent;
    box-shadow: inset -4px -3px 0 0 #eaf2ff, 0 0 0 3px rgba(234, 242, 255, .18);
}

.top-actions a:hover,
.theme-toggle:hover,
.btn:hover,
.reserve-btn:hover {
    transform: translateY(-1px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 88px 18px 72px;
    animation: heroReveal .65s ease both;
}

.eyebrow,
.section-kicker,
.court-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid rgba(23, 128, 61, .18);
    border-radius: var(--radius);
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #0f2f65;
    background: rgba(255, 255, 255, .9);
    border-color: rgba(255, 255, 255, .48);
}

.hero-content h1 {
    max-width: 680px;
    margin: 16px 0 0;
    font-size: 56px;
    line-height: .98;
    font-weight: 950;
}

.hero-copy {
    max-width: 620px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: 18px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}


main {
    position: relative;
    z-index: 3;
    max-width: 1240px;
    margin: -34px auto 0;
    padding: 0 18px 44px;
}

.flash,
.system-alert,
.success-card,
.workflow-section,
.home-court-card,
.selected-shell,
.calendar-panel,
.empty-state,
.site-footer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.flash {
    margin-bottom: 14px;
    padding: 14px 16px;
    font-weight: 850;
    animation: rise .42s ease both;
}

.flash.ok {
    background: #e5f8ec;
    color: #14532d;
    border-color: #bcebc9;
}

.flash.error {
    background: #fff0ed;
    color: #842115;
    border-color: #f4b7af;
}

html[data-theme="dark"] .flash.ok {
    background: #0d2d1b;
    color: #bbf7d0;
    border-color: #1f7a42;
}

html[data-theme="dark"] .flash.error {
    background: #321411;
    color: #fecaca;
    border-color: #8f3028;
}

.system-alert,
.success-card,
.workflow-section,
.section-head,
.selected-shell,
.calendar-panel,
.empty-state {
    margin-top: 18px;
    animation: rise .48s ease both;
}

.system-alert,
.success-card {
    padding: 18px;
}

.system-alert {
    display: grid;
    grid-template-columns: 1fr;
    background: linear-gradient(135deg, #eff6ff, var(--panel));
}

html[data-theme="dark"] .system-alert {
    background: linear-gradient(135deg, #0f213d, var(--panel));
}

.system-alert h2,
.success-card h2,
.workflow-section h2,
.section-head h2,
.selected-shell h2,
.calendar-head h2,
.empty-state h2 {
    margin: 10px 0 0;
    font-size: 30px;
    line-height: 1.12;
}

.system-alert p,
.success-card p,
.workflow-section p,
.section-head p,
.selected-shell p,
.calendar-head p,
.empty-state p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.summary,
.request-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.summary div,
.request-summary div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 11px;
}

.summary span,
.request-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.summary b,
.request-summary b {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.notice {
    border-left: 4px solid var(--sun);
    background: var(--panel-soft);
    padding: 12px 14px;
    border-radius: var(--radius);
}

.workflow-section {
    padding: 18px;
}

.section-title {
    max-width: 780px;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.workflow-step {
    min-height: 150px;
    border-top: 3px solid var(--primary);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 14px;
}

.workflow-step:nth-child(2) {
    border-color: var(--sky);
}

.workflow-step:nth-child(3) {
    border-color: var(--sun);
}

.workflow-step:nth-child(4) {
    border-color: var(--clay);
}

.workflow-step b {
    color: var(--muted);
    font-size: 12px;
}

.workflow-step h3 {
    margin: 18px 0 0;
    font-size: 19px;
}

.workflow-step p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.43;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    padding: 22px 0 4px;
}

.home-courts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(530px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.home-court-card {
    padding: 14px;
    overflow: hidden;
}

.home-court-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.home-court-head h3 {
    margin: 10px 0 0;
    font-size: 23px;
    line-height: 1.15;
}

.home-court-head p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.4;
}

.court-price,
.selected-price {
    flex: 0 0 auto;
    min-width: 130px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 11px;
    text-align: right;
}

.court-price strong,
.selected-price strong {
    display: block;
    color: var(--primary-dark);
    font-size: 22px;
}

.court-price span,
.selected-price span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.court-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 13px;
}

.court-actions small {
    color: var(--muted);
    font-weight: 750;
    line-height: 1.35;
}

.compact-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.compact-day {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel-soft);
}

.compact-day.is-today {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(23, 128, 61, .12);
}

.compact-day-head {
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 7px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.day-date {
    display: block;
    width: 100%;
    overflow: visible;
    text-align: center;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--ink);
}

.compact-day-head em {
    position: absolute;
    right: 6px;
    bottom: -10px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    padding: 2px 5px;
    font-size: 9px;
    line-height: 1;
    font-style: normal;
    font-weight: 950;
}

.compact-slots {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 6px 6px;
}

.compact-slot {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px;
    min-width: 0;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.calendar-readonly .compact-slot {
    display: block;
}

.compact-slot:hover {
    transform: translateY(-1px);
}

.compact-slot-info {
    min-width: 0;
    width: 100%;
}

.compact-slot b,
.compact-slot span,
.compact-slot small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-slot b {
    font-size: 12px;
    line-height: 1;
}

.compact-slot span {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.08;
}

.compact-slot small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.1;
}

.compact-slot.free {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.compact-slot.free span {
    color: #1d4ed8;
}

.compact-slot.busy {
    background: #fff8ed;
    border-color: #f3d394;
}

.compact-slot.busy span {
    color: #9a580e;
}

.compact-slot.busy.b-confirmada,
.compact-slot.busy.b-confirmada_manual,
.compact-slot.busy.b-pagada {
    background: #eef8ff;
    border-color: #abd8ee;
}

.compact-slot.busy.b-confirmada span,
.compact-slot.busy.b-confirmada_manual span,
.compact-slot.busy.b-pagada span {
    color: #0e7490;
}

.compact-slot.busy.b-bloqueada {
    background: #fff0ee;
    border-color: #f2bbb5;
}

.compact-slot.busy.b-bloqueada span {
    color: #9f2f25;
}

html[data-theme="dark"] .compact-slot.free {
    background: #0f213d;
    border-color: #1e4f95;
}

html[data-theme="dark"] .compact-slot.free span {
    color: #bfdbfe;
}

html[data-theme="dark"] .compact-slot.busy {
    background: #30230b;
    border-color: #815910;
}

html[data-theme="dark"] .compact-slot.busy span {
    color: #f8c66f;
}

html[data-theme="dark"] .compact-slot.busy.b-confirmada,
html[data-theme="dark"] .compact-slot.busy.b-confirmada_manual,
html[data-theme="dark"] .compact-slot.busy.b-pagada {
    background: #0a2b35;
    border-color: #17687b;
}

html[data-theme="dark"] .compact-slot.busy.b-confirmada span,
html[data-theme="dark"] .compact-slot.busy.b-confirmada_manual span,
html[data-theme="dark"] .compact-slot.busy.b-pagada span {
    color: #67d1e8;
}

html[data-theme="dark"] .compact-slot.busy.b-bloqueada {
    background: #351511;
    border-color: #8b3027;
}

html[data-theme="dark"] .compact-slot.busy.b-bloqueada span {
    color: #ffb4ad;
}

.reserve-btn {
    flex: 0 0 auto;
    border: 0;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 128, 61, .22);
    transition: transform .18s ease, background .18s ease;
}

.reserve-btn:hover {
    background: var(--primary-dark);
}

html[data-theme="dark"] .reserve-btn:hover {
    color: #07152c;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 10px 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 14px 24px rgba(23, 128, 61, .22);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

html[data-theme="dark"] .btn-primary:hover {
    color: #07152c;
}

.btn-light {
    color: #0f2f65;
    background: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .55);
}

.btn-secondary {
    color: var(--ink);
    background: var(--panel-soft);
    border-color: var(--line);
}

.selected-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(29, 78, 216, .96), rgba(14, 116, 144, .9)),
        var(--primary);
    color: #fff;
}

.selected-shell .section-kicker {
    color: #0f2f65;
    background: rgba(255, 255, 255, .9);
}

.selected-shell p {
    color: rgba(255, 255, 255, .86);
}

.selected-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-price {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .28);
    color: #fff;
}

.selected-price strong,
.selected-price span {
    color: #fff;
}

.calendar-panel {
    padding: 16px;
}

.calendar-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.legend {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--muted);
    padding: 7px 9px;
    font-size: 12px;
    font-weight: 850;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
}

.dot.busy {
    background: var(--sun);
}

.dot.lock {
    background: var(--clay);
}

.empty-state {
    padding: 22px;
}

.site-footer {
    margin-top: 26px;
    padding: 13px 16px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    font-weight: 780;
    box-shadow: var(--shadow-soft);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(5, 12, 8, .66);
}

.modal.open {
    display: flex;
}

.modal-card {
    width: min(720px, 100%);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
    animation: modalIn .24s ease both;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 18px;
}

.modal-head h2 {
    margin: 10px 0 0;
    font-size: 28px;
}

.modal-head p {
    margin: 7px 0 0;
    color: var(--muted);
}

.modal-body {
    padding: 18px;
}

.xbtn {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.form-note {
    margin: 14px 0;
    border-left: 4px solid var(--sky);
    border-radius: var(--radius);
    background: var(--panel-soft);
    color: var(--muted);
    padding: 11px 13px;
    line-height: 1.45;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 900;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
    padding: 11px 12px;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 128, 61, .16);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
}

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1040px) {
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-calendar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-courts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-hero {
        min-height: 520px;
        background-position: center right 35%;
    }

    .topbar,
    .home-court-head,
    .selected-shell,
    .calendar-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions,
    .selected-actions,
    .legend {
        justify-content: flex-start;
    }

    .hero-content {
        padding-top: 62px;
        padding-bottom: 58px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-copy {
        font-size: 16px;
    }

    .compact-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .court-price,
    .selected-price {
        text-align: left;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .topbar,
    main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand span {
        display: none;
    }

    .top-actions a,
    .theme-toggle {
        min-height: 38px;
        padding: 8px 9px;
    }

    .hero-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .workflow-grid,
    .compact-calendar {
        grid-template-columns: 1fr;
    }

    .system-alert h2,
    .success-card h2,
    .workflow-section h2,
    .section-head h2,
    .selected-shell h2,
    .calendar-head h2,
    .empty-state h2 {
        font-size: 24px;
    }

    .home-court-card,
    .workflow-section,
    .calendar-panel,
    .selected-shell {
        padding: 12px;
    }

    .modal {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}


/* Ajustes portal solo Estadio */
.btn-pay-big {
    min-height: 58px;
    padding: 16px 24px;
    font-size: 18px;
    border-radius: 16px;
}

.rules-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.rules-list div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 13px;
}

.rules-list b,
.rules-list span {
    display: block;
}

.rules-list span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.compact-slot b {
    font-size: 11px;
}

@media (max-width: 760px) {
    .rules-list { grid-template-columns: 1fr; }
}

/* Opciones de pago dentro del formulario de reserva */
.payment-choice{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:4px}
.payment-option{min-height:76px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;gap:4px;white-space:normal}
.payment-option span{font-weight:900;font-size:15px}
.payment-option small{font-size:12px;line-height:1.35;opacity:.85;font-weight:700}
@media (max-width:680px){.payment-choice{grid-template-columns:1fr}}
