/* ===== Login Page ===== */
.login-page {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    padding: 2rem 1rem;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    color-scheme: light;
}

.login-title {
    font-size: 1.5rem;
    color: var(--dark-bg);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1.5rem;
}

/* Social buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    width: 100%;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-btn-google {
    background: white;
    color: #444;
    border: 1.5px solid #ddd;
}

.social-btn-apple {
    background: #000;
    color: white;
}

.social-btn-facebook {
    background: #1877F2;
    color: white;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #aaa;
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* ===== Login / Register tabs ===== */
.login-tabs {
    display: flex;
    background: var(--light-gray);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.login-tab {
    flex: 1;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.login-tab.active {
    background: white;
    color: var(--dark-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ===== Auth forms (manual login & register) ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

/* ===== Admin toggle ===== */
.admin-login-toggle {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.admin-toggle-link {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.admin-toggle-link:hover {
    color: #555;
}

/* Admin form */
.admin-login-form {
    text-align: left;
    margin-top: 0.75rem;
}

.login-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* ===== Social confirm modal ===== */
.social-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.social-modal-box {
    background: white;
    border-radius: 0 0 16px 16px;
    padding: 1.75rem 1.5rem;
    width: 100%;
    max-width: 480px;
    text-align: left;
    animation: socialSlideDown 0.3s ease;
}

@keyframes socialSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.social-modal-box .form-group input {
    font-size: 16px; /* Prevents zoom on iOS */
}

.social-modal-box h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--dark-bg);
}

.social-modal-sub {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1.25rem;
}

/* ===== Navbar auth ===== */
.nav-login-btn {
    background: var(--primary-cyan);
    color: white !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 20px;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
}

.nav-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nav-logout-btn {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.5);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-logout-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== Profile Modal ===== */
.profile-modal-box {
    max-width: 480px;
}

.profile-modal-title {
    font-size: 1.1rem;
    color: var(--dark-bg);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.profile-tab-btn {
    background: none;
    border: none;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.profile-tab-btn.active {
    background: var(--primary-cyan);
    color: white;
}

.profile-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 55vh;
    overflow-y: auto;
}

.profile-booking-card {
    border-left: 4px solid #ddd;
    background: var(--light-gray);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    font-size: 0.88rem;
}

.profile-booking-card.personal-training { border-left-color: var(--personal-training); }
.profile-booking-card.small-group       { border-left-color: var(--small-group); }
.profile-booking-card.group-class       { border-left-color: var(--group-class); }

.profile-booking-date { font-weight: 700; margin-bottom: 0.15rem; }
.profile-booking-time { color: #555; margin-bottom: 0.15rem; }
.profile-booking-type { font-size: 0.8rem; color: #888; }

.profile-empty {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

/* ── Form fields inside login card ────────────────────────────── */
.login-card .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.login-card .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.login-card .form-group input {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 8px;
    border: 1.5px solid #ddd;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0,174,239,0.12);
}

/* Password show/hide toggle */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    width: 100%;
    padding-right: 5.5rem;
}

.password-toggle {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: #888;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
    transition: color 0.2s;
    white-space: nowrap;
}

.password-toggle:hover {
    color: var(--primary-cyan);
}

.login-card .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: 0.25rem;
}

@media (max-width: 600px) {
    .login-card {
        padding: 1.75rem 1.25rem;
    }

    .profile-modal-box {
        max-width: 100%;
    }
}
