/* ================================================================
   GymNivo — Login Page CSS  (Fully Responsive)
   ================================================================ */

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

body.auth-page {
    min-height: 100vh;
    background: #06080d;
    color: #f4f4f4;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.login-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Scene ─────────────────────────────────────────────────── */
.login-scene {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(5,7,11,.55), rgba(5,7,11,.15)),
        url("/assets/images/auth/background-image.jpg") center center / cover no-repeat;
}

.scene-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4,5,8,.62) 0%, rgba(4,5,8,.22) 38%, rgba(4,5,8,.14) 58%, rgba(4,5,8,.58) 100%),
        linear-gradient(180deg, rgba(4,5,8,.22) 0%, rgba(4,5,8,.08) 40%, rgba(4,5,8,.46) 100%);
    pointer-events: none;
}

.scene-beam {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,205,102,.68), transparent);
    filter: drop-shadow(0 0 8px rgba(255,194,74,.45));
    pointer-events: none;
}

.scene-beam-top    { top:0; right:-120px; width:46%; transform:rotate(-37deg); }
.scene-beam-bottom { bottom:92px; right:-130px; width:34%; transform:rotate(-37deg); }

/* ── Brand Panel ────────────────────────────────────────────── */
.brand-panel {
    flex: 1;
    min-height: 100vh;
    padding: 78px 68px 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.015), transparent 22%);
    pointer-events: none;
}

.brand-content { position:relative; z-index:1; display:none; }

/* ── Auth Panel ─────────────────────────────────────────────── */
.auth-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    min-height: 100vh;
    padding: 32px 80px 32px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* ── Auth Shell (card) ──────────────────────────────────────── */
.auth-shell {
    width: 100%;
    max-width: 480px;
    padding: 36px 32px 34px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(12,14,21,.97), rgba(10,11,18,.97));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow:
        inset 0 0 0 1px rgba(255,210,116,.08),
        0 0 0 1px rgba(255,198,79,.14),
        0 0 28px rgba(255,188,68,.12),
        0 32px 60px rgba(0,0,0,.32);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Shield ─────────────────────────────────────────────────── */
.shield-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    margin: 0 auto 8px;
}

.shield {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,200,100,.15) 0%, transparent 70%);
    display: grid;
    place-items: center;
    position: relative;
}

.shield::before {
    content: "";
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.shield svg { width:38px; height:38px; filter:drop-shadow(0 0 8px rgba(255,200,100,.6)); }

/* ── Heading ─────────────────────────────────────────────────── */
.auth-heading { text-align:center; margin-bottom:24px; }
.auth-heading h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.15;
    color: #f5f5f6;
}
.auth-heading span  { color: #ffc94f; }
.auth-heading p     { margin:8px 0 0; color:#a9afb9; font-size:14px; }

/* ── Alert ───────────────────────────────────────────────────── */
.auth-alert {
    background: rgba(111,23,11,.22);
    border: 1px solid rgba(232,127,106,.35);
    border-radius: 10px;
    color: #ffd8d1;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 4px;
}

/* ── Form ────────────────────────────────────────────────────── */
.login-form { display:grid; gap:16px; }

.field-group { display:grid; gap:8px; }
.field-group label { display:none; }

.field-wrap { position:relative; display:flex; align-items:center; }

.field-icon {
    position: absolute;
    left: 16px;
    color: #d1d4db;
    opacity: .92;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    pointer-events: none;
    transition: color .2s, opacity .2s;
}

.field-icon svg,
.password-toggle svg,
.login-button svg,
.divider-badge svg {
    width: 20px; height: 20px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.field-wrap input {
    width: 100%;
    height: 54px;
    padding: 0 54px 0 50px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.02);
    color: #f5f5f6;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    -webkit-appearance: none;
}

.field-wrap input::placeholder { color: #888e9b; }

.field-wrap input:focus {
    border-color: rgba(255,198,79,.56);
    box-shadow: 0 0 0 4px rgba(255,198,79,.11);
    transform: translateY(-1px);
}

/* Autofill fix */
.field-wrap input:-webkit-autofill,
.field-wrap input:-webkit-autofill:hover,
.field-wrap input:-webkit-autofill:focus,
.field-wrap input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 9999px #0e1120 inset;
    box-shadow: 0 0 0 9999px #0e1120 inset;
    -webkit-text-fill-color: #f5f5f6;
    caret-color: #f5f5f6;
    border-color: rgba(255,198,79,.56);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    width: 38px; height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #bfc3cc;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    opacity: .92;
}

.password-toggle .icon-hide               { display:none; }
.password-toggle.is-visible .icon-show    { display:none; }
.password-toggle.is-visible .icon-hide    { display:block; }

/* Form meta */
.form-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.auth-meta-note { color:#c8b17a; font-size:12px; }

/* Login button */
.login-button {
    margin-top: 4px;
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #171717;
    background: linear-gradient(135deg, #ffe08c 0%, #ffc94f 48%, #e1a517 100%);
    box-shadow: 0 16px 36px rgba(224,164,20,.24), inset 0 1px 0 rgba(255,255,255,.45);
    transition: transform .2s, box-shadow .2s;
    -webkit-appearance: none;
}

.login-button:hover  { transform:translateY(-2px); box-shadow:0 20px 40px rgba(224,164,20,.32), inset 0 1px 0 rgba(255,255,255,.45); }
.login-button:active { transform:translateY(0); }
.login-button svg    { width:18px; height:18px; }

/* Divider */
.auth-divider {
    margin: 28px 0 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-divider span {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,.09);
}

.divider-badge {
    width: 22px; height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,198,79,.04);
    border: 1px solid rgba(255,198,79,.14);
    color: #a0a6b1;
}
.divider-badge svg { width:12px; height:12px; }

/* Security card */
.security-card { text-align:center; padding:0 14px; }
.security-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #ffc94f;
}
.security-card p { margin:0; color:#8d94a0; font-size:12px; }

/* Icon golden states */
.field-wrap:focus-within .field-icon { color:#ffc94f; opacity:1; }
.field-icon.is-focused,
.field-icon.is-filled { color:#ffc94f; opacity:1; }
.field-wrap.is-focused input { border-color:rgba(255,198,79,.56); box-shadow:0 0 0 4px rgba(255,198,79,.11); transform:translateY(-1px); }
.field-wrap.is-filled  input { border-color:rgba(255,198,79,.28); }

@keyframes pulse {
    0%   { box-shadow:0 0 20px rgba(255,200,100,.2); }
    50%  { box-shadow:0 0 40px rgba(255,200,100,.5); }
    100% { box-shadow:0 0 20px rgba(255,200,100,.2); }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

/* Tablet landscape */
@media (max-width:1150px) {
    .login-scene    { flex-direction:column; }
    .brand-panel    { min-height:30vh; padding:40px 40px 20px; justify-content:flex-end; }
    .auth-panel     { width:100%; min-height:auto; padding:16px 28px 36px; justify-content:center; }
    .auth-shell     { max-width:480px; margin:0 auto; }
    .scene-beam-top, .scene-beam-bottom { display:none; }
}

/* Tablet portrait */
@media (max-width:768px) {
    .brand-panel    { min-height:22vh; padding:28px 24px 16px; }
    .auth-panel     { padding:12px 20px 32px; }
    .auth-shell     { padding:28px 24px 28px; border-radius:22px; }
    .auth-heading h2 { font-size:26px; }
    .auth-heading p  { font-size:13px; }
    .field-wrap input { height:50px; font-size:15px; }
    .login-button   { height:52px; font-size:15px; }
    .shield-wrapper { height:80px; }
    .shield         { width:66px; height:66px; }
    .shield svg     { width:32px; height:32px; }
}

/* Mobile */
@media (max-width:480px) {
    .brand-panel    { min-height:15vh; padding:20px 16px 10px; }
    .auth-panel     { padding:8px 14px 24px; }
    .auth-shell     { padding:24px 18px 24px; border-radius:18px; max-width:100%; }
    .auth-heading   { margin-bottom:18px; }
    .auth-heading h2 { font-size:22px; }
    .shield-wrapper { height:70px; }
    .shield         { width:58px; height:58px; }
    .shield svg     { width:28px; height:28px; }
    .field-wrap input { height:48px; padding-left:46px; font-size:14px; }
    .field-icon     { left:14px; }
    .login-button   { height:50px; font-size:14px; gap:10px; }
    .auth-divider   { margin:20px 0 14px; }
    .security-card  { padding:0 8px; }
    .security-card strong { font-size:13px; }
    .security-card p { font-size:11px; }
}

/* Very small screens */
@media (max-width:360px) {
    .auth-shell     { padding:20px 14px; border-radius:16px; }
    .auth-heading h2 { font-size:20px; }
    .field-wrap input { height:46px; }
    .login-button   { height:48px; font-size:13px; }
}

/* Landscape mobile */
@media (max-height:600px) and (orientation:landscape) {
    .login-scene    { flex-direction:row; }
    .brand-panel    { min-height:100vh; padding:20px; display:none; }
    .auth-panel     { width:100%; min-height:100vh; padding:10px 16px; overflow-y:auto; }
    .auth-shell     { padding:20px 24px; max-width:420px; margin:0 auto; }
    .shield-wrapper { height:60px; }
    .shield         { width:50px; height:50px; }
    .shield svg     { width:24px; height:24px; }
    .auth-heading   { margin-bottom:14px; }
    .auth-heading h2 { font-size:20px; }
    .login-form     { gap:12px; }
    .field-wrap input { height:44px; }
    .login-button   { height:46px; margin-top:2px; }
    .auth-divider   { margin:14px 0 10px; }
}

/* High DPI / Retina */
@media (-webkit-min-device-pixel-ratio:2), (min-resolution:192dpi) {
    .login-scene { background-size:cover; }
}