/* =============================================
   LIQUID GLASS LOGIN PAGE  — login.css
   ============================================= */

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

:root {
    --green-1:   #22c55e;
    --green-2:   #16a34a;
    --teal-1:    #06b6d4;
    --teal-2:    #0891b2;
    --violet-1:  #8b5cf6;
    --violet-2:  #7c3aed;
    --amber-1:   #f59e0b;
    --glass-bg:  rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.38);
    --glass-shadow: rgba(0, 0, 0, 0.18);
    --text-dark:  #1a2e1a;
    --text-mid:   #2d4a2d;
    --text-light: rgba(255,255,255,0.82);
    --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
    --font: 'Inter', sans-serif;
}

/* ---- PAGE ---- */
body.login-page {
    font-family: var(--font);
    min-height: 100vh;
    overflow: hidden;
    background:
        url('../images/login_bg.png') center center / cover no-repeat fixed;
    position: relative;
}

/* Tinted overlay so text reads cleanly */
body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(6, 182, 212, 0.22) 0%,
            rgba(34, 197, 94, 0.18) 40%,
            rgba(139, 92, 246, 0.20) 100%);
    backdrop-filter: blur(2px);
    z-index: 0;
}

/* ---- ANIMATED COLOR BLOBS ---- */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: blobFloat 12s ease-in-out infinite alternate;
    z-index: 1;
    pointer-events: none;
}
.blob-1 {
    width: 420px; height: 420px;
    top: -80px; left: -80px;
    background: radial-gradient(circle, #22c55e 0%, #06b6d4 100%);
    animation-duration: 14s;
}
.blob-2 {
    width: 340px; height: 340px;
    bottom: -60px; right: -60px;
    background: radial-gradient(circle, #8b5cf6 0%, #f59e0b 100%);
    animation-duration: 11s;
    animation-delay: -4s;
}
.blob-3 {
    width: 260px; height: 260px;
    top: 50%; right: 25%;
    background: radial-gradient(circle, #06b6d4 0%, #22c55e 100%);
    animation-duration: 17s;
    animation-delay: -8s;
}

@keyframes blobFloat {
    0%   { transform: translate(0,    0)    scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.07); }
    66%  { transform: translate(-20px, 25px) scale(0.95); }
    100% { transform: translate(15px, -20px) scale(1.03); }
}

/* ---- FLOATING PARTICLES ---- */
.particles {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -20px;
    width: 10px; height: 10px;
    border-radius: 50%;
    opacity: 0;
    animation: rise 10s ease-in infinite;
}

.particle:nth-child(1)  { left:  8%; width: 8px;  height: 8px;  background: rgba(34,197,94,0.6);   animation-duration:  9s; animation-delay:  0s; }
.particle:nth-child(2)  { left: 18%; width: 5px;  height: 5px;  background: rgba(6,182,212,0.7);   animation-duration: 12s; animation-delay:  2s; }
.particle:nth-child(3)  { left: 33%; width: 12px; height: 12px; background: rgba(139,92,246,0.5);  animation-duration:  8s; animation-delay:  4s; }
.particle:nth-child(4)  { left: 52%; width: 6px;  height: 6px;  background: rgba(245,158,11,0.6);  animation-duration: 14s; animation-delay:  1s; }
.particle:nth-child(5)  { left: 67%; width: 9px;  height: 9px;  background: rgba(34,197,94,0.55);  animation-duration: 10s; animation-delay:  5s; }
.particle:nth-child(6)  { left: 78%; width: 7px;  height: 7px;  background: rgba(6,182,212,0.65);  animation-duration: 13s; animation-delay:  3s; }
.particle:nth-child(7)  { left: 88%; width: 11px; height: 11px; background: rgba(139,92,246,0.6);  animation-duration:  9s; animation-delay:  7s; }
.particle:nth-child(8)  { left: 42%; width: 5px;  height: 5px;  background: rgba(245,158,11,0.7);  animation-duration: 11s; animation-delay:  6s; }

@keyframes rise {
    0%   { transform: translateY(0)    scale(1);    opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-100vh) scale(0.6); opacity: 0; }
}

/* ---- SCENE WRAPPER ---- */
.login-scene {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* ---- LIQUID GLASS CARD ---- */
.glass-card {
    width: min(420px, 100%);
    padding: 2.6rem 2.4rem 2rem;
    border-radius: 28px;

    /* Liquid glass layers */
    background:
        linear-gradient(145deg,
            rgba(255,255,255,0.32) 0%,
            rgba(255,255,255,0.10) 50%,
            rgba(255,255,255,0.22) 100%);
    border: 1.5px solid rgba(255,255,255,0.55);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.18),
        0 2px 8px  rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.65),
        inset 0 -1px 0 rgba(0,0,0,0.06);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);

    animation: cardPop 0.7s var(--ease-out) both;
}

@keyframes cardPop {
    from { opacity: 0; transform: translateY(36px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Subtle shimmer pseudo-element */
.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.45) 0%,
        transparent 35%,
        transparent 65%,
        rgba(255,255,255,0.20) 100%
    );
    pointer-events: none;
}

/* ---- BRAND ICON ---- */
.brand-icon {
    width: 80px; height: 80px;
    border-radius: 22px;
    margin: 0 auto 1.2rem;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    box-shadow:
        0 8px 28px rgba(34,197,94,0.30),
        0 2px 8px rgba(0,0,0,0.10),
        inset 0 1px 0 rgba(255,255,255,0.9);
    overflow: hidden;
    animation: iconBounce 0.9s var(--ease-out) 0.2s both;
}

.brand-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 16px;
}

@keyframes iconBounce {
    0%   { opacity: 0; transform: scale(0.5) rotate(-15deg); }
    70%  { transform: scale(1.1) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ---- HEADINGS ---- */
.login-title {
    font-size: 1.7rem;
    font-weight: 700;
    text-align: center;
    color: #0f3a1f;
    text-shadow: 0 1px 4px rgba(255,255,255,0.4);
    margin-bottom: 0.3rem;
}

.login-subtitle {
    font-size: 0.875rem;
    text-align: center;
    color: #1a5c2e;
    margin-bottom: 1.8rem;
    font-weight: 500;
}

/* ---- ERROR ALERT ---- */
.alert-error {
    background: rgba(239,68,68,0.18);
    border: 1px solid rgba(239,68,68,0.4);
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---- FORM ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Floating label field */
.field-group {
    position: relative;
}

.field-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 0.95rem;
    font-family: var(--font);
    font-weight: 500;
    color: #0f2d18;
    background: rgba(255,255,255,0.45);
    border: 1.5px solid rgba(255,255,255,0.55);
    border-radius: 14px;
    outline: none;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
    backdrop-filter: blur(8px);
}

.field-group input::placeholder {
    color: rgba(30, 80, 40, 0.55);
    font-weight: 400;
}

.field-group input:focus {
    background: rgba(255,255,255,0.20);
    border-color: rgba(255,255,255,0.70);
    box-shadow: 0 0 0 3px rgba(34,197,94,0.25),
                0 4px 16px rgba(0,0,0,0.12);
}

.field-group label {
    position: absolute;
    top: -9px; left: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f3a1f;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    padding: 1px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.55);
}

.field-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #1a5c2e;
    display: flex;
    align-items: center;
    pointer-events: none;
}

/* ---- FORM OPTIONS ROW ---- */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f3a1f;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.remember-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px; height: 18px;
    border-radius: 6px;
    border: 1.5px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.12);
    display: grid;
    place-items: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checkmark::after {
    content: '✓';
    font-size: 0.7rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.remember-label input:checked + .checkmark {
    background: linear-gradient(135deg, var(--green-1), var(--teal-1));
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
}

.remember-label input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #0f3a1f;
    text-decoration: underline;
}

/* ---- SUBMIT BUTTON ---- */
.login-btn {
    position: relative;
    width: 100%;
    padding: 0.95rem 1rem;
    margin-top: 0.4rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;

    /* Colorful multi-stop gradient */
    background: linear-gradient(90deg,
        #22c55e 0%,
        #06b6d4 35%,
        #8b5cf6 70%,
        #f59e0b 100%);
    background-size: 200% 100%;
    background-position: 0% 50%;

    box-shadow:
        0 6px 24px rgba(34,197,94,0.35),
        0 2px 8px  rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.30);

    transition: background-position 0.6s var(--ease-out),
                transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow:
        0 10px 32px rgba(34,197,94,0.45),
        0 4px 12px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.40);
}

.login-btn:active {
    transform: translateY(0);
}

/* Shine sweep on hover */
.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,0.28),
        transparent);
    transform: skewX(-20deg);
    transition: left 0.6s var(--ease-out);
    pointer-events: none;
}

.login-btn:hover .btn-shine {
    left: 160%;
}

/* ---- FOOTER TEXT ---- */
.card-footer {
    text-align: center;
    font-size: 0.75rem;
    color: #1a5c2e;
    margin-top: 1.5rem;
    font-weight: 500;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
    .glass-card {
        padding: 2rem 1.4rem 1.6rem;
        border-radius: 22px;
    }
    .login-title { font-size: 1.45rem; }
    .brand-icon  { width: 58px; height: 58px; }
}
