* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #85b9cd 0%, #579baf 100%);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
}

@media (max-height: 800px) {
    body {
        align-items: flex-start;
        padding-top: 40px;
        min-height: auto;
    }
}

/* Abstract Wave Background */
.abstract-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite linear;
}

.wave-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    right: -100px;
    animation-duration: 20s;
    background: rgba(181, 211, 222, 0.15);
}

.wave-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -100px;
    animation-duration: 25s;
    animation-direction: reverse;
    background: rgba(120, 173, 186, 0.1);
}

.wave-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 10%;
    animation-duration: 18s;
    background: rgba(133, 185, 205, 0.2);
}

.wave-4 {
    width: 350px;
    height: 350px;
    bottom: 30%;
    right: 10%;
    animation-duration: 22s;
    animation-direction: reverse;
    background: rgba(87, 155, 175, 0.15);
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, 30px) rotate(90deg); }
    50% { transform: translate(0, 60px) rotate(180deg); }
    75% { transform: translate(-30px, 30px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: 0 20px 50px rgba(87, 155, 175, 0.25);
    margin: 20px auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 0.8s ease-out;
    transition: transform 0.3s ease;
    overflow: visible;
    flex-shrink: 0;
}

/* Allow decorative elements to overflow and sit behind content */
.login-container { overflow: visible; }

.inner-waves {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 160%;
    height: 160px;
    pointer-events: none;
    z-index: 0;
    display: block;
}

/* Ensure header and content sit above the waves */
.login-container .login-header,
.login-container form,
.login-container .divider,
.login-container .social-login,
.login-container .signup-link {
    position: relative;
    z-index: 2;
}

/* Make SVG responsive: scale nicely on small screens */
.inner-waves svg {
    width: 100%;
    height: 100%;
    display: block;
}

.login-container:hover {
    transform: translateY(-5px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 20px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #579baf, #85b9cd);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(87, 155, 175, 0.3);
}

.logo-text {
    font-size: 1.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #579baf, #78adba);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header h1 {
    font-size: 1.9rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #579baf;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 17px 17px 17px 52px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.form-input:focus {
    outline: none;
    border-color: #579baf;
    box-shadow: 0 0 0 4px rgba(87, 155, 175, 0.15);
}

.form-input:focus + .input-icon {
    color: #85b9cd;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
    padding: 5px;
}

.password-toggle:hover {
    color: #579baf;
}

/* Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #4a5568;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.remember-me input {
    display: none;
}

.remember-me input:checked + .checkbox {
    background-color: #579baf;
    border-color: #579baf;
}

.forgot-link {
    color: #579baf;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 5px;
}

.forgot-link:hover {
    color: #78adba;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #579baf, #78adba);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(87, 155, 175, 0.3);
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(87, 155, 175, 0.4);
    background: linear-gradient(135deg, #78adba, #85b9cd);
}

.login-btn:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: #a0aec0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.divider span {
    padding: 0 18px;
    font-size: 0.9rem;
    background: white;
    border-radius: 20px;
    font-weight: 500;
}

/* Social Login */
.social-login {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.social-btn {
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
    font-size: 1.3rem;
}

.social-btn:hover {
    border-color: #85b9cd;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(133, 185, 205, 0.2);
    color: #579baf;
}

/* Signup Link */
.signup-link {
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
}

.signup-link a {
    color: #579baf;
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
    transition: color 0.2s ease;
    position: relative;
}

.signup-link a:hover {
    color: #78adba;
}

.signup-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #85b9cd;
    transition: width 0.3s ease;
}

.signup-link a:hover::after {
    width: 100%;
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .login-container {
        max-width: 90%;
        padding: 40px 30px;
        margin: 20px auto;
    }

    .login-header h1 {
        font-size: 1.7rem;
    }

    .form-input {
        font-size: 1rem;
        padding: 15px 15px 15px 48px;
    }

    .login-btn {
        padding: 16px;
        font-size: 1rem;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 600px) {
    .login-container {
        max-width: 95%;
        padding: 30px 20px;
        margin: 15px auto;
        border-radius: 20px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-header h1 {
        font-size: 1.6rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-input {
        font-size: 1rem;
        padding: 14px 14px 14px 45px;
    }

    .input-icon {
        font-size: 1.1rem;
    }

    .password-toggle {
        font-size: 1.1rem;
    }

    .login-btn {
        padding: 15px;
        font-size: 0.95rem;
    }

    .social-login {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .forgot-link {
        padding: 0;
    }

    .divider {
        margin: 25px 0;
    }

    .divider span {
        font-size: 0.85rem;
        padding: 0 12px;
    }

    .signup-link {
        font-size: 0.9rem;
    }

    .inner-waves {
        top: -50px;
        height: 100px;
        width: 240%;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
        padding: 25px 16px;
        margin: 15px;
        border-radius: 16px;
    }

    .wave-1, .wave-2, .wave-3, .wave-4 {
        opacity: 0.3;
    }

    .logo {
        gap: 10px;
        margin-bottom: 15px;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .logo-text {
        font-size: 1.6rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .form-input {
        font-size: 16px;
        padding: 13px 13px 13px 42px;
        border-radius: 12px;
    }

    .input-container {
        position: relative;
    }

    .input-icon {
        font-size: 1rem;
        left: 14px;
    }

    .password-toggle {
        right: 14px;
        font-size: 1rem;
    }

    .remember-me {
        gap: 8px;
        font-size: 0.8rem;
    }

    .checkbox {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .login-btn {
        padding: 14px;
        font-size: 0.9rem;
        gap: 8px;
        margin-bottom: 20px;
    }

    .divider {
        margin: 20px 0;
    }

    .divider span {
        font-size: 0.8rem;
        padding: 0 10px;
    }

    .social-login {
        gap: 10px;
        margin-bottom: 20px;
    }

    .social-btn {
        padding: 13px;
        font-size: 1.1rem;
    }

    .signup-link {
        font-size: 0.85rem;
    }

    .signup-link a {
        margin-left: 3px;
    }

    .inner-waves {
        top: -40px;
        height: 80px;
        width: 280%;
    }
}

/* Status Messages */
.status-message {
    position: fixed;
    top: 25px;
    right: 25px;
    padding: 16px 22px;
    border-radius: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 350px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.status-success {
    background: #579baf;
    color: white;
    border-left: 5px solid #85b9cd;
}

.status-error {
    background: #fc8181;
    color: white;
    border-left: 5px solid #f56565;
}

.status-info {
    background: #78adba;
    color: white;
    border-left: 5px solid #b5d3de;
}

.status-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 15px;
    line-height: 1;
    opacity: 0.8;
}

.status-close:hover {
    opacity: 1;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
