@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #0F766E;
    --primary-hover: #115E59;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-light: rgba(255, 255, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --error: #EF4444;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body.login-body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Serene Soft Mint Medical Gradient */
    background: radial-gradient(circle at top, #e6f4f1 0%, #d8f3ec 60%, #cbece5 100%);
    overflow: hidden;
}

/* Card Entrance Animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;

    /* Glassmorphism Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    box-shadow: var(--glass-shadow);

    /* Animation trigger */
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin: 20px;
}

/* Header & Logo */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-wrapper {
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover {
    transform: scale(1.05) rotate(3deg);
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15, 118, 110, 0.2);
    object-fit: cover;
}

.login-header h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.login-header p {
    margin: 0;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: rgba(241, 245, 249, 0.8);
    /* Slight gray */
    color: var(--text-main);
    font-weight: 500;
}

.form-input::placeholder {
    color: #94A3B8;
}

.form-input:hover {
    background: #F8FAFC;
}

.form-input:focus {
    background: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
    transform: translateY(-1px);
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 14px 0;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    background: #94A3B8;
    box-shadow: none;
}

/* Loading Spinner (Added dynamically via JS or CSS) */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-loading .spinner {
    display: block;
}

.btn-loading span {
    margin-left: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-container {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #FEF2F2;
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #FECACA;
    display: none;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
    text-align: center;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px;
    }
}