/* =========================================================
   GYM LOGIN — split hero + form, responsive (desktop/mobile)
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --g-primary: #00a76f;
    --g-primary-d: #007867;
    --g-lime: #5ee0a0;
    --g-ink: #1c252e;
    --g-soft: #637381;
    --g-faint: #919eab;
    --g-line: #e6e9ee;
    --g-danger: #ff5630;
}

html, body { height: 100%; }

body.gym-login {
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--g-ink);
    background: #0a1410;
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}

/* ───────────────── HERO (brand) side ───────────────── */
.login-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 4.5rem;
    color: #fff;
    background:
        radial-gradient(1200px 700px at -10% -10%, rgba(94, 224, 160, 0.35), transparent 55%),
        radial-gradient(900px 600px at 110% 120%, rgba(0, 167, 111, 0.30), transparent 55%),
        linear-gradient(150deg, #0a5f47 0%, #074034 45%, #04231b 100%);
}

/* faint grid texture */
.login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(120% 120% at 30% 20%, #000 35%, transparent 80%);
    pointer-events: none;
}

.login-hero__watermark {
    position: absolute;
    right: -3rem;
    bottom: -3rem;
    font-size: 22rem;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(-20deg);
    pointer-events: none;
}

.login-hero__content { position: relative; z-index: 1; max-width: 460px; }

.login-hero__logo {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.login-hero__logo img { width: 48px; height: 48px; object-fit: contain; }

.login-hero__brand {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.login-hero__tag {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--g-lime);
    letter-spacing: 0.02em;
    margin-bottom: 2.4rem;
}

.login-hero__features { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.login-hero__features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.86);
}
.lhf-ico {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--g-lime);
    font-size: 0.85rem;
}

.login-hero__foot {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 2.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.04em;
}

/* ───────────────── FORM side ───────────────── */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: #ffffff;
}

.login-card {
    width: 100%;
    max-width: 400px;
    animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* brand lockup — hidden on desktop (hero shows it), visible on mobile */
.login-card__brand { display: none; align-items: center; gap: 0.7rem; margin-bottom: 2rem; }
.login-card__logo {
    width: 46px; height: 46px; border-radius: 12px;
    background: var(--g-primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 167, 111, 0.35);
}
.login-card__logo img { width: 30px; height: 30px; object-fit: contain; }
.login-card__name { font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--g-ink); }

.login-card h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}
.login-sub { color: var(--g-soft); font-size: 0.92rem; margin-bottom: 2rem; }

.alert-line {
    display: flex; align-items: center; gap: 0.6rem;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    animation: shake 0.4s ease;
}
.alert-line--error { background: rgba(255, 86, 48, 0.08); border: 1px solid rgba(255, 86, 48, 0.25); color: #b71d18; }
.alert-line--success { background: rgba(0, 167, 111, 0.08); border: 1px solid rgba(0, 167, 111, 0.25); color: var(--g-primary-d); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.field { margin-bottom: 1.15rem; }
.field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--g-faint);
    margin-bottom: 0.5rem;
}

.input-wrap { position: relative; }
.input-ico {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--g-faint);
    font-size: 0.9rem;
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    border: 1px solid var(--g-line);
    border-radius: 11px;
    background: #fff;
    padding: 0.85rem 2.8rem 0.85rem 2.6rem;
    font-size: 0.95rem;
    color: var(--g-ink);
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
}
.input-wrap input::placeholder { color: #c4cdd5; }
.input-wrap input:focus {
    border-color: var(--g-primary);
    box-shadow: 0 0 0 4px rgba(0, 167, 111, 0.12);
}

.toggle-pass {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--g-faint);
    font-size: 0.95rem;
    padding: 0.4rem;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
}
.toggle-pass:hover { color: var(--g-ink); background: #f4f6f8; }

.login-btn {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.9rem;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--g-primary), var(--g-primary-d));
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 24px rgba(0, 167, 111, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.login-btn i { transition: transform 0.2s ease; }
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 167, 111, 0.38); }
.login-btn:hover i { transform: translateX(4px); }
.login-btn:active { transform: translateY(0); }

.login-foot {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.88rem;
    color: var(--g-soft);
}
.login-foot a {
    color: var(--g-primary);
    font-weight: 700;
    text-decoration: none;
}
.login-foot a:hover { text-decoration: underline; }

/* ───────────────── Responsive ───────────────── */
@media (max-width: 991px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { display: none; }

    /* gym gradient behind the card on small screens */
    body.gym-login {
        background:
            radial-gradient(900px 500px at 50% -10%, rgba(94, 224, 160, 0.30), transparent 60%),
            linear-gradient(160deg, #0a5f47 0%, #074034 45%, #04231b 100%);
        background-attachment: fixed;
    }

    .login-form-panel {
        background: transparent;
        min-height: 100vh;
        padding: 1.5rem;
    }

    .login-card {
        background: #fff;
        border-radius: 22px;
        padding: 2rem 1.5rem;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    }

    .login-card__brand { display: flex; }
}

@media (max-width: 420px) {
    .login-card h1 { font-size: 1.55rem; }
    .login-card { padding: 1.75rem 1.25rem; }
}

/* =========================================================
   REGISTER — reuses the login shell + hero, wider form
   ========================================================= */
.login-card.register-card { max-width: 660px; }

/* the form side scrolls for the taller registration form */
body.gym-register .login-form-panel {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.reg-section {
    font-family: 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--g-primary);
    margin: 1.9rem 0 1.1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--g-line);
}
.reg-section:first-of-type { margin-top: 1.4rem; }

.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.05rem 1.1rem;
}
.reg-grid .field { margin-bottom: 0; }
.field--full { grid-column: 1 / -1; }

/* selects / textarea share the login input look */
.input-wrap select,
.input-wrap textarea {
    width: 100%;
    border: 1px solid var(--g-line);
    border-radius: 11px;
    background: #fff;
    padding: 0.85rem 2.4rem 0.85rem 2.6rem;
    font-size: 0.95rem;
    color: var(--g-ink);
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.input-wrap select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23919eab'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}
.input-wrap textarea { padding-left: 1rem; resize: vertical; min-height: 90px; }
.input-wrap select:focus,
.input-wrap textarea:focus {
    border-color: var(--g-primary);
    box-shadow: 0 0 0 4px rgba(0, 167, 111, 0.12);
}
.input-wrap input[type="date"] { padding-right: 1rem; }
.input-wrap input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }

.field .hint { font-size: 0.72rem; color: var(--g-faint); margin-top: 0.35rem; }
.field .err  { font-size: 0.72rem; color: var(--g-danger); margin-top: 0.35rem; }

/* multi-error alert */
.reg-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(255, 86, 48, 0.08);
    border: 1px solid rgba(255, 86, 48, 0.25);
    color: #b71d18;
    border-radius: 10px;
    padding: 0.75rem 0.95rem;
    font-size: 0.84rem;
    margin-bottom: 1.4rem;
}
.reg-alert i { margin-top: 0.15rem; }
.reg-alert ul { margin: 0; padding-left: 1.1rem; }

/* photo upload */
.reg-photo { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 0.5rem 0; }
.reg-photo__preview {
    width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--g-line); display: none;
}
.reg-photo__drop {
    width: 104px; height: 104px; border-radius: 50%;
    border: 2px dashed var(--g-line);
    display: flex; align-items: center; justify-content: center;
    color: var(--g-faint); font-size: 1.7rem;
}
.reg-file {
    width: 100%; max-width: 340px;
    border: 1px solid var(--g-line); border-radius: 11px;
    padding: 0.55rem 0.7rem; font-size: 0.88rem; color: var(--g-soft);
    background: #fff;
}
.reg-file::file-selector-button {
    background: var(--g-primary); color: #fff; border: none;
    border-radius: 8px; padding: 0.45rem 0.9rem; margin-right: 0.8rem;
    font-weight: 600; cursor: pointer;
}

/* terms accordion — green light theme */
.register-card .accordion {
    --bs-accordion-color: var(--g-ink);
    --bs-accordion-bg: #fff;
    --bs-accordion-border-color: var(--g-line);
    --bs-accordion-border-radius: 11px;
    --bs-accordion-inner-border-radius: 11px;
    --bs-accordion-btn-color: var(--g-ink);
    --bs-accordion-btn-bg: #fff;
    --bs-accordion-active-color: var(--g-primary-d);
    --bs-accordion-active-bg: rgba(0, 167, 111, 0.08);
    --bs-accordion-btn-focus-border-color: var(--g-primary);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 4px rgba(0, 167, 111, 0.12);
}
.register-card .accordion-button { font-size: 0.9rem; font-weight: 600; }
.register-card .accordion-body { color: var(--g-soft); font-size: 0.85rem; }

.reg-check { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 1.1rem; font-size: 0.9rem; color: var(--g-ink); }
.reg-check input { width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; accent-color: var(--g-primary); }
.reg-check a { color: var(--g-primary); font-weight: 700; text-decoration: none; }

.login-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

@media (max-width: 560px) {
    .reg-grid { grid-template-columns: 1fr; }
}
