/*----------------------------------------
    SIPanDa Glassmorphism Login Page
------------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body.login-glass-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: #0a1f0a;
}

/* ── Background ── */
.login-bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: bgZoom 20s ease-in-out infinite alternate;
}

.login-bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(0, 40, 10, 0.45) 0%,
        rgba(0, 20, 5, 0.25) 50%,
        rgba(0, 50, 15, 0.55) 100%
    );
}

@keyframes bgZoom {
    from { transform: scale(1.05); }
    to   { transform: scale(1.12); }
}

/* ── Decorative dots ── */
.login-dots {
    position: fixed;
    top: 40px;
    right: 60px;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, 8px);
    gap: 10px;
    opacity: 0.5;
}

.login-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: dotPulse 3s ease-in-out infinite;
}

.login-dots span:nth-child(odd)  { animation-delay: 0.5s; }
.login-dots span:nth-child(even) { animation-delay: 1s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.3); }
}

/* ── Branding (top-left) ── */
.login-branding {
    position: fixed;
    top: 40px;
    left: 50px;
    z-index: 10;
    color: #fff;
    animation: fadeSlideDown 0.8s ease forwards;
}

.login-branding h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.login-branding p {
    margin: 4px 0 0;
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.85;
    letter-spacing: 1px;
}

/* ── Main wrapper ── */
.login-wrapper {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
    gap: 0;
}

/* ── Glass card ── */
.glass-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 36px 32px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: fadeSlideUp 0.9s ease forwards;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.glass-card:hover {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Glow ring behind card */
.glass-card-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 125, 50, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.08); }
}

/* ── Card header ── */
.glass-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.glass-card-header h2 {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 600;
    color: #1b3a1b;
}

.glass-card-header .subtitle {
    margin: 0 0 20px;
    font-size: 0.85rem;
    color: rgba(30, 60, 30, 0.75);
    font-weight: 400;
}

.glass-card-header .logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.glass-card-header .logo-wrap img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
}

.glass-card-header .logo-wrap img:hover {
    transform: scale(1.08) rotate(3deg);
}

.glass-card-header .app-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a5c1a;
    letter-spacing: 0.5px;
}

.glass-card-header .app-desc {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(30, 60, 30, 0.65);
    font-weight: 400;
    line-height: 1.4;
    max-width: 280px;
}

/* ── Alerts ── */
.glass-alert {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shakeIn 0.5s ease;
}

.glass-alert.error {
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.glass-alert.success {
    background: rgba(40, 167, 69, 0.85);
    color: #fff;
    border: 1px solid rgba(100, 220, 130, 0.4);
}

.glass-alert .material-icons {
    font-size: 18px;
}

/* ── Input fields ── */
.glass-input-group {
    position: relative;
    margin-bottom: 18px;
}

.glass-input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #2e7d32;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 2;
}

.glass-input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.55);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #1a3a1a;
    outline: none;
    transition: all 0.3s ease;
}

.glass-input-group input::placeholder {
    color: rgba(30, 60, 30, 0.5);
}

.glass-input-group input:focus {
    border-color: #2e7d32;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.15);
}

.glass-input-group input:focus ~ .input-icon {
    color: #1b5e20;
}

.glass-input-group .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(30, 60, 30, 0.5);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    z-index: 2;
}

.glass-input-group .toggle-password:hover {
    color: #2e7d32;
}

.glass-input-group .toggle-password .material-icons {
    font-size: 20px;
}

/* ── Options row ── */
.glass-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 0.82rem;
}

.glass-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: rgba(30, 60, 30, 0.8);
    user-select: none;
}

.glass-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2e7d32;
    cursor: pointer;
}

.glass-options a {
    color: #1b5e20;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.glass-options a:hover {
    color: #0d3d0d;
    text-decoration: underline;
}

/* ── Login button ── */
.glass-btn-login {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 50%, #388e3c 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.35s ease;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.45);
    position: relative;
    overflow: hidden;
}

a.glass-btn-login {
    text-decoration: none;
}

.glass-btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.glass-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(46, 125, 50, 0.55);
}

.glass-btn-login:hover::before {
    opacity: 1;
}

.glass-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.4);
}

.glass-btn-login .material-icons {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.glass-btn-login:hover .material-icons {
    transform: translateX(4px);
}

/* ── Copyright ── */
.glass-copyright {
    text-align: center;
    margin-top: 24px;
    font-size: 0.72rem;
    color: rgba(30, 60, 30, 0.55);
}

/* ── Back link ── */
.glass-back-link {
    text-align: center;
    margin-top: 18px;
    font-size: 0.82rem;
    color: rgba(30, 60, 30, 0.75);
}

.glass-back-link a {
    color: #1b5e20;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.glass-back-link a:hover {
    color: #0d3d0d;
    text-decoration: underline;
}

/* ── Info message ── */
.glass-info-message {
    text-align: center;
    font-size: 0.88rem;
    color: rgba(30, 60, 30, 0.8);
    line-height: 1.6;
    margin-bottom: 24px;
}

.glass-info-message .material-icons {
    font-size: 48px;
    color: #2e7d32;
    display: block;
    margin: 0 auto 12px;
}

/* ── Google sign-in ── */
.glass-google-signin {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

/* ── Animations ── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shakeIn {
    0%   { transform: translateX(-8px); opacity: 0; }
    50%  { transform: translateX(4px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .login-branding {
        top: 24px;
        left: 24px;
    }

    .login-branding h1 {
        font-size: 1.4rem;
    }

    .login-dots {
        display: none;
    }

    .login-wrapper {
        padding: 80px 16px 32px;
    }

    .glass-card {
        padding: 32px 24px 24px;
        max-width: 100%;
    }
}
