/* ==========================================================================
   TPW GYM MANAGEMENT SYSTEM — MODERN LOGIN MODULE
   ========================================================================== */

:root {
    --gym-bg-page: #090a0d;
    --gym-bg-card: rgba(18, 19, 24, 0.96);
    --gym-border-card: rgba(255, 255, 255, 0.1);
    --gym-border-focus: #a80b00;
    --gym-glow-focus: rgba(168, 11, 0, 0.28);

    --gym-red: #a80b00;
    --gym-red-hover: #8a0900;

    --gym-text-primary: #FFFFFF;
    --gym-text-secondary: #9497A4;
    --gym-text-muted: #626575;

    --gym-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.auth-body, body {
    font-family: var(--gym-font-body);
    background-color: var(--gym-bg-page);
    color: var(--gym-text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Atmosphere - MUST HAVE pointer-events: none */
body::before, body::after,
body.auth-body::before, body.auth-body::after {
    pointer-events: none !important;
}

body.auth-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 15%, rgba(168, 11, 0, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 10% 85%, rgba(168, 11, 0, 0.10) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(168, 11, 0, 0.10) 0%, transparent 40%),
        #090a0d;
    z-index: 0;
}

body.auth-body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.015) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.015) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.015) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.015) 75%);
    background-size: 16px 16px;
    opacity: 0.5;
    z-index: 1;
}

/* Auth Wrappers - elevated above any overlay */
.auth-wrapper, .gym-auth-wrapper {
    position: relative;
    z-index: 100;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    pointer-events: auto;
}

/* Auth Card */
.gym-auth-card {
    position: relative;
    z-index: 101;
    width: 100%;
    max-width: 440px;
    background: var(--gym-bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--gym-border-card);
    border-radius: 20px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    pointer-events: auto !important;
}

/* Brand Header */
.gym-brand-header {
    margin-bottom: 1.75rem;
}

.gym-logo-frame {
    width: 200px;
    height: 100px;
    margin: 0 auto 1rem auto;
    border-radius: 16px;
    background: #000000;
    border: 2px solid rgba(168, 11, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 6px 20px rgba(168, 11, 0, 0.30);
}

.gym-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.gym-brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.gym-brand-tagline {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gym-text-secondary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0;
}

/* Tab Switcher */
.gym-auth-tabs {
    display: flex;
    background: #0d0e12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 105;
}

.gym-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--gym-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 0.5rem;
    border-radius: 9px;
    cursor: pointer !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
}

.gym-tab-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
}

.gym-tab-btn.active {
    background: var(--gym-red);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(168, 11, 0, 0.40);
}

/* Form Controls */
.gym-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.gym-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.45rem;
}

.gym-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.gym-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--gym-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.gym-input {
    width: 100%;
    height: 48px;
    background: #111217;
    border: 1px solid #232530;
    border-radius: 12px;
    padding: 0.75rem 2.85rem 0.75rem 2.85rem;
    font-size: 0.92rem;
    font-family: var(--gym-font-body);
    color: #FFFFFF;
    outline: none;
    transition: all 0.2s ease;
}

.gym-input:focus {
    border-color: var(--gym-border-focus);
    box-shadow: 0 0 0 3px var(--gym-glow-focus);
    background: #151720;
}

/* Password Toggle Button */
.gym-pwd-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    color: var(--gym-text-secondary);
    padding: 0.5rem 0.75rem;
    cursor: pointer !important;
    font-size: 1rem;
    border-radius: 8px;
    z-index: 10;
    pointer-events: auto !important;
}

.gym-pwd-toggle:hover {
    color: #FFFFFF;
}

/* Links & Buttons */
.gym-link-red {
    color: var(--gym-red) !important;
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.gym-link-red:hover {
    color: #d11204 !important;
    text-decoration: underline;
}

.gym-btn-subtle {
    background: transparent;
    border: none;
    outline: none;
    color: var(--gym-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer !important;
    padding: 0.4rem;
    pointer-events: auto !important;
}

.gym-btn-subtle:hover {
    color: #FFFFFF;
}

/* Primary CTA Button */
.gym-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #a80b00 0%, #8a0900 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer !important;
    outline: none;
    box-shadow: 0 6px 20px rgba(168, 11, 0, 0.40);
    transition: all 0.25s ease;
    pointer-events: auto !important;
}

.gym-btn-primary:hover {
    background: linear-gradient(135deg, #be0d00 0%, #990a00 100%);
    box-shadow: 0 10px 28px rgba(168, 11, 0, 0.55);
    transform: translateY(-2px);
}

/* Alerts */
.gym-alert {
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.gym-alert-danger {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #FFA39E;
}

.gym-alert-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.35);
    color: #86EFAC;
}

.gym-info-note {
    font-size: 0.82rem;
    color: var(--gym-text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.text-brand-red {
    color: var(--gym-red) !important;
}

.gym-verified-badge {
    display: flex;
    align-items: center;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    padding: 0.65rem 0.95rem;
    border-radius: 10px;
    font-size: 0.82rem;
    color: #86EFAC;
}

.gym-btn-inline-change {
    background: transparent;
    border: none;
    color: var(--gym-text-secondary);
    font-size: 0.76rem;
    cursor: pointer !important;
    text-decoration: underline;
    margin-left: auto;
}

input#inputOtpCode {
    letter-spacing: 0.4em;
    font-size: 1.2rem;
    text-align: center;
}

.gym-auth-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gym-security-note {
    font-size: 0.78rem;
    color: var(--gym-text-muted);
}

.gym-copyright {
    font-size: 0.72rem;
    color: #4b4e5d;
}

