/* Member Portal — premium SaaS shell (matches public frontend tokens) */
:root {
    --mp-primary: #39A34B;
    --mp-primary-dark: #136A6C;
    --mp-dark: #082f30;
    --mp-surface: #f4f7f7;
    --mp-card: #ffffff;
    --mp-border: rgba(19, 106, 108, 0.1);
    --mp-text: #0a2829;
    --mp-muted: #557a7b;
    --mp-radius: 1.25rem;
    --mp-shadow: 0 18px 50px rgba(19, 106, 108, 0.12);
    --mp-font: 'Poppins', 'Inter', system-ui, sans-serif;
    --mp-display: 'Space Grotesk', 'Poppins', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.mp-body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--mp-font);
    color: var(--mp-text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(57, 163, 75, 0.16), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(19, 106, 108, 0.14), transparent 50%),
        var(--mp-surface);
    -webkit-font-smoothing: antialiased;
}

body.mp-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        linear-gradient(135deg, rgba(8, 47, 48, 0.88), rgba(19, 106, 108, 0.72)),
        url('../images/auth-fallback.jpg') center/cover no-repeat;
    background-color: #082f30;
}

.mp-auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255,255,255,0.97);
    border-radius: 1.5rem;
    box-shadow: 0 30px 80px rgba(0,0,0,0.28);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.35);
    animation: mpFadeUp 0.45s ease;
}

.mp-auth-card__accent {
    height: 4px;
    background: linear-gradient(90deg, var(--mp-primary-dark), var(--mp-primary));
}

.mp-auth-card__body { padding: 2rem 1.75rem 1.75rem; }

.mp-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}
.mp-brand__logo {
    width: 64px; height: 64px; border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(19,106,108,0.2);
    margin-bottom: 0.85rem;
}
.mp-brand__mark {
    width: 64px; height: 64px; border-radius: 18px;
    margin: 0 auto 0.85rem;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-dark));
    color: #fff; font-size: 1.6rem;
}
.mp-brand h1 {
    font-family: var(--mp-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.25rem;
}
.mp-brand p { margin: 0; color: var(--mp-muted); font-size: 0.88rem; }

.mp-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-muted);
    margin-bottom: 0.4rem;
}
.mp-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.mp-input:focus {
    outline: none;
    border-color: var(--mp-primary);
    box-shadow: 0 0 0 4px rgba(57,163,75,0.15);
}
.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, background .2s;
    text-decoration: none;
}
.mp-btn:active { transform: scale(0.98); }
.mp-btn-primary {
    background: linear-gradient(135deg, var(--mp-primary) 0%, var(--mp-primary-dark) 100%);
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(57,163,75,0.28);
}
.mp-btn-primary:hover { filter: brightness(1.05); color: #fff; }
.mp-btn-ghost {
    background: #fff;
    color: var(--mp-primary-dark);
    border: 1.5px solid var(--mp-border);
}
.mp-btn-block { width: 100%; }
.mp-link {
    color: var(--mp-primary-dark);
    font-weight: 600;
    text-decoration: none;
}
.mp-link:hover { color: var(--mp-primary); }

.mp-alert {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.mp-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.mp-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.mp-alert-info { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

.mp-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.mp-topbar {
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.86);
    border-bottom: 1px solid var(--mp-border);
}
.mp-topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.mp-topbar__brand {
    display: flex; align-items: center; gap: 0.65rem;
    text-decoration: none; color: inherit;
}
.mp-topbar__brand img, .mp-topbar__brand .mark {
    width: 40px; height: 40px; border-radius: 12px; object-fit: cover;
}
.mp-topbar__brand .mark {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--mp-primary), var(--mp-primary-dark));
    color: #fff;
}
.mp-topbar__brand strong {
    font-family: var(--mp-display);
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.mp-nav {
    display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
}
.mp-nav a {
    text-decoration: none;
    color: var(--mp-muted);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    transition: background .2s, color .2s;
}
.mp-nav a:hover, .mp-nav a.active {
    background: rgba(57,163,75,0.12);
    color: var(--mp-primary-dark);
}

.mp-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
}

.mp-hero {
    background: linear-gradient(135deg, var(--mp-primary-dark) 0%, #0f766e 45%, var(--mp-primary) 120%);
    color: #fff;
    border-radius: calc(var(--mp-radius) + 4px);
    padding: 1.6rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--mp-shadow);
    margin-bottom: 1.25rem;
    animation: mpFadeUp 0.4s ease;
}
.mp-hero::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.mp-hero h2 {
    font-family: var(--mp-display);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    position: relative;
}
.mp-hero p { margin: 0; opacity: 0.88; font-size: 0.92rem; position: relative; }

.mp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
    .mp-grid { grid-template-columns: 1fr; }
    .mp-nav { display: none; }
    .mp-nav-mobile { display: flex !important; }
}

.mp-stat {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: 1.15rem 1.2rem;
    box-shadow: 0 8px 24px rgba(19,106,108,0.05);
    animation: mpFadeUp 0.5s ease;
}
.mp-stat__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-muted);
    margin-bottom: 0.35rem;
}
.mp-stat__value {
    font-family: var(--mp-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.mp-card {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: 0 8px 24px rgba(19,106,108,0.05);
    overflow: hidden;
    margin-bottom: 1rem;
}
.mp-card__head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--mp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.mp-card__head h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: var(--mp-display);
}
.mp-card__body { padding: 1.2rem; }

.mp-table { width: 100%; border-collapse: collapse; }
.mp-table th {
    text-align: left;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-muted);
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--mp-border);
}
.mp-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}
.mp-table tr:last-child td { border-bottom: none; }

.mp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.mp-badge-ok { background: #ecfdf5; color: #047857; }
.mp-badge-warn { background: #fff7ed; color: #c2410c; }
.mp-badge-muted { background: #f1f5f9; color: #64748b; }

.mp-grounds { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mp-chip {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    color: var(--mp-muted);
}
.mp-chip.active {
    background: rgba(57,163,75,0.12);
    border-color: var(--mp-primary);
    color: var(--mp-primary-dark);
}

.mp-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.55rem;
}
.mp-slot {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.65rem 0.4rem;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all .15s;
    user-select: none;
}
.mp-slot small { display: block; color: var(--mp-muted); font-size: 0.68rem; margin-top: 0.15rem; }
.mp-slot.available:hover { border-color: var(--mp-primary); }
.mp-slot.selected {
    background: var(--mp-primary);
    border-color: var(--mp-primary);
    color: #fff;
}
.mp-slot.selected small { color: rgba(255,255,255,0.85); }
.mp-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

.mp-nav-mobile {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--mp-border);
    padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
    justify-content: space-around;
}
.mp-nav-mobile a {
    text-decoration: none;
    color: var(--mp-muted);
    font-size: 0.68rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.5rem;
}
.mp-nav-mobile a i { font-size: 1.15rem; }
.mp-nav-mobile a.active { color: var(--mp-primary-dark); }

body.mp-app { padding-bottom: 72px; }
@media (min-width: 769px) {
    body.mp-app { padding-bottom: 0; }
}

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

.mp-hint { font-size: 0.8rem; color: var(--mp-muted); margin-top: 0.35rem; }
.mp-footer-note {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
}
body.mp-app .mp-footer-note { color: var(--mp-muted); }

/* ===== Public-parity booking UI ===== */
.mp-main--wide { max-width: 1140px; }
.mp-book-header {
    border-radius: var(--radius-lg, 1.5rem);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}
.mp-book-header__inner {
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 65%, #136A6C) 100%);
    padding: 1.75rem 1.75rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.mp-book-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 1.5rem);
    box-shadow: var(--shadow-md);
    padding: 1.35rem;
}
.mp-book-summary {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 1.5rem);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: 88px;
}
.mp-book-summary__head {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #136A6C));
    padding: 1.1rem 1.25rem;
    color: #fff;
    font-family: var(--mp-display);
    font-weight: 700;
}
.book-calendar-nav .book-date-strip {
    display: flex; gap: 0.55rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; scrollbar-width: none; padding: 0.2rem 0.15rem 0.65rem;
}
.book-calendar-nav .book-date-strip::-webkit-scrollbar { display: none; }
.book-calendar-nav .book-day-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    border: 2px solid #e8edf2; border-radius: 1.1rem; padding: 0.85rem 0.7rem 0.75rem; min-width: 72px;
    background: #fff; cursor: pointer; flex-shrink: 0; scroll-snap-align: start;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); transition: 0.18s ease; appearance: none;
}
.book-calendar-nav .book-day-card:hover:not(.active) {
    border-color: color-mix(in srgb, var(--primary) 45%, #e8edf2);
    background: var(--primary-light); transform: translateY(-3px);
}
.book-calendar-nav .book-day-card.active {
    background: linear-gradient(145deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 72%, #136A6C) 100%);
    border-color: transparent; color: #fff; box-shadow: 0 10px 28px var(--primary-glow); transform: translateY(-3px);
}
.book-calendar-nav .book-day-name { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.04em; }
.book-calendar-nav .book-day-num { font-size: 1.15rem; font-weight: 800; font-family: var(--mp-display); line-height: 1; color: var(--text-primary); }
.book-calendar-nav .book-day-card.active .book-day-name,
.book-calendar-nav .book-day-card.active .book-day-num { color: rgba(255,255,255,0.95) !important; }
.book-cal-header { display:flex; align-items:center; justify-content:space-between; gap:0.75rem; margin-bottom:0.85rem; }
.book-cal-hint {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, white); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
    padding: 0.28rem 0.65rem; border-radius: 999px;
}
.slot-card {
    border: 1.5px solid #e8edf2; border-radius: 14px; background: #fff; cursor: pointer;
    transition: 0.18s ease; height: 100%;
}
.slot-card:hover:not(.booked):not(.outside) { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15,23,42,0.06); }
.slot-card.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot-card.selected .text-success, .slot-card.selected .status-text, .slot-card.selected .price-text { color: rgba(255,255,255,0.95) !important; }
.slot-card.booked, .slot-card.outside { opacity: 0.45; cursor: not-allowed; background: #f8fafc; }
.mp-ground-pill {
    border: 1.5px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 0.45rem 0.95rem;
    font-weight: 600; font-size: 0.84rem; cursor: pointer; color: var(--text-muted);
}
.mp-ground-pill.active { background: color-mix(in srgb, var(--primary) 12%, #fff); border-color: var(--primary); color: var(--primary-dark); }
.mp-success-icon {
    width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 1.25rem;
    display: grid; place-items: center; font-size: 2.8rem; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 7px solid #fff; box-shadow: 0 16px 40px rgba(57,163,75,0.28);
    animation: mpBounce 1s ease-in-out infinite alternate;
}
@keyframes mpBounce { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@media (max-width: 991px) {
    .mp-book-summary { position: static; margin-top: 1rem; }
}
