/* =========================================================================
   KAAYA GLOW — LOGIN PAGE, V2 ("LG" DESIGN SYSTEM)
   A self-contained layer for login.php's card only. Reuses sitewide tokens
   (--kaaya-*, --kg-*, .kg-container, .kg-eyebrow) for brand consistency.

   IMPORTANT: .kg-auth-card / .form-group / .register-link are shared with
   register.php (and .kg-auth-card with book-appointment.php too) — this
   file never touches those selectors. login.php's card below uses entirely
   new "lg-" markup/classes instead. .hero-banner above the card is shared
   sitewide and is also left untouched.
   ========================================================================= */

.lg-section {
    position: relative;
    background-color: var(--kaaya-ivory);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 110px 0 150px;
    overflow: hidden;
}
.lg-section-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(5,31,32,0.82) 0%, rgba(5,31,32,0.62) 45%, rgba(5,31,32,0.82) 100%);
}

/* ================= CARD: clip-path "opening" reveal =================
   The animated clip-path lives on .lg-card (inner), not on .lg-card-wrap
   (outer, the IntersectionObserver target) — an element with its own
   active clip-path does not reliably re-fire IntersectionObserver
   callbacks on subsequent scroll in some browsers, so the two are kept
   on separate elements. */
.lg-card-wrap { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; }

.lg-card {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    background: var(--kaaya-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 60px 110px -40px rgba(5, 31, 32, 0.32);
    clip-path: inset(46% 0 46% 0 round 0);
    opacity: 0.4;
    transform: scale(0.985);
    transition: clip-path 1.15s var(--kg-ease), opacity 0.9s ease, transform 1.15s var(--kg-ease);
}
.lg-card-wrap.is-in .lg-card { clip-path: inset(0 0 0 0 round 0); opacity: 1; transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
    .lg-card { clip-path: inset(0 round 0); opacity: 1; transform: none; transition: none; }
    .lg-brand-leaf, .lg-brand-badge { animation: none !important; }
}

/* ---- Left: brand panel (dark, with a clipped top-right corner notch) ---- */
.lg-panel-brand {
    position: relative;
    background: var(--kaaya-black);
    padding: 52px 42px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
}
.lg-brand-leaf {
    position: absolute; top: -24px; right: 4px;
    width: 110px; height: 110px;
    color: var(--kaaya-gold);
    opacity: 0.12;
    display: inline-flex;
    animation: lgLeafFloat 8s ease-in-out infinite;
}
.lg-brand-leaf svg { width: 100%; height: 100%; display: block; }
@keyframes lgLeafFloat { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(6px, -8px) rotate(6deg); } }

.lg-brand-badge {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(142, 182, 155, 0.16);
    color: var(--kaaya-gold);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    animation: lgBadgePulse 4s ease-in-out infinite;
}
.lg-brand-badge svg { width: 20px; height: 20px; }
@keyframes lgBadgePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(142, 182, 155, 0.35); } 50% { box-shadow: 0 0 0 10px rgba(142, 182, 155, 0); } }

.lg-brand-eyebrow { font-family: var(--kg-body-font); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--kaaya-taupe); }
.lg-brand-heading { font-family: var(--kg-heading-font); font-weight: 600; font-size: 33px; color: var(--kaaya-white); margin: 12px 0 14px; line-height: 1.15; }
.lg-brand-desc { font-family: var(--kg-body-font); font-size: 14.5px; line-height: 1.75; color: var(--kaaya-taupe); margin: 0 0 auto 0; padding-bottom: 30px; }

.lg-features { list-style: none; margin: 0; padding-top: 24px; border-top: 1px solid rgba(218, 241, 222, 0.14); display: flex; flex-direction: column; gap: 16px; }
.lg-features li { display: flex; align-items: center; gap: 13px; }
.lg-feature-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(218, 241, 222, 0.06);
    border: 1px solid rgba(218, 241, 222, 0.16);
    color: var(--kaaya-gold);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lg-feature-icon svg { width: 15px; height: 15px; }
.lg-features span { font-family: var(--kg-body-font); font-size: 13.5px; color: var(--kaaya-beige); }

/* ---- Right: form panel ---- */
.lg-panel-form { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.lg-form-eyebrow { display: block; margin-bottom: 4px; }
.lg-form-heading { font-family: var(--kg-heading-font); font-weight: 600; font-size: 28px; color: var(--kaaya-black); margin: 10px 0 8px; }
.lg-form-desc { font-family: var(--kg-body-font); font-size: 14px; line-height: 1.6; color: var(--kaaya-moss); margin: 0 0 28px; }

.lg-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.lg-field label { font-family: var(--kg-body-font); font-size: 12.5px; font-weight: 600; color: var(--kaaya-black); }
.lg-field-input-wrap { position: relative; }
.lg-field-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--kaaya-moss);
    pointer-events: none;
    transition: color 0.3s ease;
}
.lg-field-icon svg { width: 100%; height: 100%; display: block; }
.lg-field-input-wrap:focus-within .lg-field-icon { color: var(--kaaya-gold); }
.lg-field input {
    width: 100%;
    font-family: var(--kg-body-font);
    font-size: 14.5px;
    color: var(--kaaya-black);
    background: var(--kaaya-ivory);
    border: 1.5px solid var(--kaaya-beige);
    border-radius: 12px;
    padding: 14px 44px;
    transition: border-color 0.35s var(--kg-ease), box-shadow 0.35s var(--kg-ease), background 0.35s var(--kg-ease);
}
.lg-field input::placeholder { color: var(--kaaya-sage); opacity: 0.75; }
.lg-field input:focus {
    outline: none;
    border-color: var(--kaaya-gold);
    background: var(--kaaya-white);
    box-shadow: 0 0 0 4px rgba(142, 182, 155, 0.2);
}
.lg-password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px;
    background: none; border: none; cursor: pointer;
    color: var(--kaaya-moss);
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
}
.lg-password-toggle svg { width: 17px; height: 17px; }
.lg-password-toggle:hover { color: var(--kaaya-olive); background: rgba(35, 83, 71, 0.08); }

.lg-options-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 26px; flex-wrap: wrap; }
.lg-checkbox { display: flex; align-items: center; gap: 9px; font-family: var(--kg-body-font); font-size: 13px; color: var(--kaaya-charcoal); cursor: pointer; user-select: none; }
.lg-checkbox input {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--kaaya-beige);
    border-radius: 5px;
    background: var(--kaaya-ivory);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.lg-checkbox input:checked { background: var(--kaaya-black); border-color: var(--kaaya-black); }
.lg-checkbox input:checked::after {
    content: '';
    position: absolute; left: 5px; top: 1px;
    width: 5px; height: 9px;
    border: solid var(--kaaya-gold);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.lg-forgot { font-family: var(--kg-body-font); font-size: 13px; font-weight: 600; color: var(--kaaya-olive); text-decoration: none; }
.lg-forgot:hover { color: var(--kaaya-gold); }

.lg-submit {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: var(--kaaya-black);
    color: var(--kaaya-white);
    font-family: var(--kg-body-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.4s ease;
}
.lg-submit::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(142, 182, 155, 0.55) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--kg-ease);
}
.lg-submit:hover::before { transform: translateX(120%); }
.lg-submit:hover { background: var(--kaaya-olive); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(35, 83, 71, 0.5); }
.lg-submit svg { width: 15px; height: 15px; transition: transform 0.4s ease; position: relative; z-index: 1; }
.lg-submit:hover svg { transform: translate(3px, -3px); }
.lg-submit-label { position: relative; z-index: 1; }
.lg-submit:disabled { opacity: 0.8; cursor: default; transform: none; }
.lg-spinner {
    display: none;
    width: 15px; height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lgSpin 0.7s linear infinite;
    position: relative; z-index: 1;
}
.lg-submit.is-sending .lg-spinner { display: inline-block; }
.lg-submit.is-sending .lg-submit-icon { display: none; }
@keyframes lgSpin { to { transform: rotate(360deg); } }

.lg-register-row { text-align: center; margin-top: 26px; font-family: var(--kg-body-font); font-size: 13.5px; color: var(--kaaya-moss); }
.lg-register-row a { color: var(--kaaya-olive); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lg-register-row a:hover { color: var(--kaaya-gold); }

/* ---- Demo / dummy login access ---- */
.lg-demo-box {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(142,182,155,0.1);
    border: 1px dashed rgba(35,83,71,0.35);
    text-align: center;
}
.lg-demo-box-label {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--kg-body-font);
    font-size: 12.5px; font-weight: 600;
    color: var(--kaaya-moss);
    margin-bottom: 8px;
}
.lg-demo-box-label svg { width: 14px; height: 14px; }
.lg-demo-box-creds {
    display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
    font-family: var(--kg-body-font);
    font-size: 12.5px;
    color: var(--kaaya-charcoal);
    margin-bottom: 12px;
}
.lg-demo-box-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 18px;
    border-radius: 30px;
    border: 1px solid var(--kaaya-moss);
    background: transparent;
    color: var(--kaaya-moss);
    font-family: var(--kg-body-font);
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
    transition: background var(--kg-speed-fast) var(--kg-ease), color var(--kg-speed-fast) var(--kg-ease);
}
.lg-demo-box-btn:hover { background: var(--kaaya-moss); color: var(--kaaya-white); }

.lg-alert {
    font-family: var(--kg-body-font);
    font-size: 13.5px;
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex; align-items: center; gap: 10px;
    animation: lgAlertIn 0.5s var(--kg-ease);
}
.lg-alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.lg-alert-success { background: rgba(35, 83, 71, 0.12); color: var(--kaaya-moss); border: 1px solid rgba(35, 83, 71, 0.3); }
.lg-alert-error { background: rgba(178, 58, 58, 0.1); color: #8f3232; border: 1px solid rgba(178, 58, 58, 0.3); }
@keyframes lgAlertIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .lg-section { padding: 60px 0 90px; }
    .lg-card { grid-template-columns: 1fr; }
    .lg-panel-brand { clip-path: none; padding: 40px 32px; }
    .lg-brand-desc { padding-bottom: 24px; }
    .lg-panel-form { padding: 40px 32px; }
}
@media (max-width: 480px) {
    .lg-panel-brand { padding: 32px 24px; }
    .lg-panel-form { padding: 32px 24px; }
    .lg-options-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}
