@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #00A652;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --input-bg: rgba(240, 240, 240, 0.5);
    --input-border: #e0e0e0;
}

body,
html {
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
}

.login-container {
    background: #f0f2f5 url('../img/login_bg_light.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 0;
}

.glass-card {
    background: #ffffff;
    /* Fallback for transparency */
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.logo-section img {
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    border-radius: 12px;
}

.header-text {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.header-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #999;
}

.form-group input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 166, 82, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 166, 82, 0.2);
}

.btn-login:hover {
    background: #00c763;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 166, 82, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    color: #d32f2f;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1.5rem;
    font-weight: 500;
    padding: 10px;
    background: rgba(211, 47, 47, 0.05);
    border-radius: 8px;
    display: block;
}

.user-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
}

.pass-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 15px center;
}

/* OTP Styles */
.otp-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 2rem;
}

.otp-group input {
    width: 48px !important;
    height: 58px !important;
    padding: 0 !important;
    text-align: center;
    font-size: 1.4rem !important;
    font-weight: 700;
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
}

.secondary-actions {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.secondary-actions a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.secondary-actions a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-4px);
}

/* Mobile optimization */
@media (max-width: 480px) {
    .glass-card {
        padding: 2rem;
        margin: 1rem;
        border-radius: 20px;
    }

    .otp-group {
        gap: 8px;
    }

    .otp-group input {
        width: 42px !important;
        height: 52px !important;
    }
}