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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0c2340 0%, #0a4275 40%, #1565c0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}


/* Static Decorative Background */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 20%, rgba(66, 165, 245, 0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 80%, rgba(25, 118, 210, 0.2) 0%, transparent 50%), radial-gradient(ellipse at 50% 50%, rgba(13, 71, 161, 0.1) 0%, transparent 70%);
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(8, 27, 57, 0.5) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

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

.login-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
    padding: 45px 30px 35px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ffc107 0%, #ffca28 50%, #ffd54f 100%);
}

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

.logo-wrapper img {
    height: 85px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
    letter-spacing: 0.3px;
}

.login-body {
    padding: 40px 35px 35px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #0d47a1;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid #e3e8ee;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.25s ease;
    background: #f8fafc;
    color: #1e293b;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
}

.form-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #1976d2;
    font-size: 15px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 45px;
}

.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: #64748b;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #1976d2;
    border-radius: 4px;
}

.checkbox-group a {
    color: #1976d2;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.checkbox-group a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(25, 118, 210, 0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #0d47a1 0%, #002171 100%);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.45);
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #1976d2;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #0d47a1;
}

.error-box {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.4s ease-out;
}

.error-box.shake-animation {
    animation: slideDown 0.4s ease-out, shake 0.5s ease-in-out 0.2s;
}

.error-icon {
    font-size: 24px;
    color: #dc2626;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(220, 38, 38, 0.15);
    border-radius: 50%;
}

.error-content h4 {
    color: #991b1b;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.error-content p {
    color: #b91c1c;
    margin: 0;
}

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

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }
    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.footer-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.footer-link a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 700;
}

.footer-link a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}


/* Decorative Elements */

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 4px;
}


/* Success Animation */

@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}


/* Focus animation */

@keyframes focusGlow {
    from {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
    }
    to {
        box-shadow: 0 0 0 8px rgba(25, 118, 210, 0);
    }
}
