:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --teal-med: #0d9488;
    --teal-dark: #0f766e;
    --emerald: #10b981;
    --bg-dark: #091e2b;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #091e2b 0%, #0c2d37 40%, #0d383b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Medical Lighting */
.bg-glow-1 {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    left: -100px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
}

.bg-glow-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.2) 0%, rgba(0,0,0,0) 70%);
    bottom: -120px;
    right: -120px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
}

/* Pulse / ECG Line Graphic */
.ecg-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    opacity: 0.12;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 L200,60 L220,20 L240,100 L260,30 L275,75 L290,60 L600,60 L620,10 L640,110 L660,20 L675,80 L690,60 L1200,60' fill='none' stroke='%2338bdf8' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 1000px 100%;
    background-repeat: repeat-x;
    animation: pulseWave 18s linear infinite;
}

@keyframes pulseWave {
    0% { background-position: 0 0; }
    100% { background-position: 1000px 0; }
}

/* Main Container Card */
.login-wrapper {
    width: 100%;
    max-width: 960px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    position: relative;
    z-index: 10;
    animation: cardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left Side: Medical Hero Showcase */
.login-hero {
    flex: 1.1;
    background: linear-gradient(145deg, #0b2a3a 0%, #0d3b44 50%, #092329 100%);
    color: #ffffff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: rgba(13, 148, 136, 0.25);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5eead4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: fit-content;
}

.hero-badge i {
    font-size: 1rem;
}

.hero-content {
    margin: 2.5rem 0;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero-title span {
    background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: #e2e8f0;
}

.feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.hero-footer {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Right Side: Login Form */
.login-form-side {
    flex: 1;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.brand-logo-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.brand-logo-img {
    max-height: 46px;
    width: auto;
    object-fit: contain;
}

.form-heading h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.form-heading p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1.15rem;
    pointer-events: none;
    transition: color 0.2s;
}

.form-control-custom {
    width: 100%;
    padding: 0.82rem 1rem 0.82rem 2.85rem;
    font-size: 0.92rem;
    color: var(--text-dark);
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.form-control-custom:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-dark);
}

.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    font-size: 0.84rem;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-checkbox input {
    accent-color: var(--teal-med);
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-medical-submit {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.btn-medical-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

.btn-medical-submit:active {
    transform: translateY(0);
}

.error-msg {
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.35rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
}

.login-footer code {
    font-weight: 600;
    color: var(--teal-dark);
    background: #f0fdfa;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    border: 1px solid #ccfbf1;
}

/* Mobile Responsive */
@media (max-width: 860px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 460px;
    }

    .login-hero {
        padding: 2.25rem 2rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .login-form-side {
        padding: 2.25rem 2rem;
    }
}