/* PREMIUM LIGHT LOGIN STYLE */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --bg-gradient: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #102a43;
    --text-muted: #486581;
    --input-bg: #ffffff;
    --input-border: #bcccdc;
    --input-text: #334e68;
    --shadow-color: rgba(16, 42, 67, 0.1);
}

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

body.login-page-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px 10px; /* Important for small height screens */
}

/* Background animated shapes */
body.login-page-body::before,
body.login-page-body::after {
    content: '';
    position: absolute;
    width: 50vw; /* Use vw for responsiveness */
    height: 50vw;
    max-width: 400px;
    max-height: 400px;
    border-radius: 50%;
    background: var(--primary-color);
    filter: blur(120px);
    opacity: 0.15;
    animation: float 15s infinite ease-in-out alternate;
    z-index: 0;
}
body.login-page-body::before {
    top: -10%;
    left: -10%;
}
body.login-page-body::after {
    bottom: -10%;
    right: -10%;
    background: #e74a3b;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

.login-container {
    width: 100%;
    max-width: 450px;
    z-index: 1;
    position: relative;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px var(--shadow-color);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.logo-icon img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    max-width: 100%;
    height: auto;
}

.logo-icon img:hover {
    transform: scale(1.05);
}

.login-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Groups */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--input-text);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    background: #fff;
}

/* Captcha specific */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--input-border);
    flex-wrap: wrap; /* Allows wrapping on tiny screens */
}

.captcha-box img {
    border-radius: 6px;
    height: 45px;
    max-width: calc(100% - 55px); /* Ensure room for refresh button */
    object-fit: contain;
    border: 1px solid #e9ecef;
}

.captcha-refresh {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--input-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.captcha-refresh:hover {
    color: var(--primary-color);
    background: #f8f9fa;
    transform: rotate(180deg);
}

/* Button */
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
    margin-top: 10px;
}

.btn-full {
    width: 100%;
    display: block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
    background: var(--primary-dark);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
}

/* Mobile Responsiveness Rules */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: 20px;
    }
    
    .logo-icon img {
        max-height: 70px; /* Slightly smaller logo on mobile */
    }

    .login-header h1 {
        font-size: 1.35rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 14px;
        font-size: 1rem;
    }
    
    .captcha-box img {
        height: 40px;
    }
}

/* Small height screen adjustments (Landscape on mobile) */
@media (max-height: 600px) {
    body.login-page-body {
        align-items: flex-start; /* Prevent top cropping */
        padding-top: 20px;
    }
    
    .login-header {
        margin-bottom: 20px;
    }
    
    .logo-icon img {
        max-height: 60px;
    }
}