/* Reset and global styles */
:root {
    --primary-blue: #162446;
    --dark-blue: #0A1128;
    --text-dark: #2d3748;
    --text-light: #a0aec0;
    --bg-white: #ffffff;
    --input-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-white) !important;
}

/* Hide the injected element from layout to allow full viewport */
body > .col-md-4.col-md-offset-4.marg {
    display: none !important;
}

/* Allow the parent container to take 100vh if possible, or just force fixed positioned covering wrapper */
.login-page-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    z-index: 1000; /* Ensure it covers everything */
    background: var(--bg-white);
}

.login-left-pane {
    position: relative;
    width: 45%;
    background: radial-gradient(circle at 80% 20%, #202b46, #0d1222, #040810);
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    padding: 2rem 4rem;
    box-sizing: border-box;
}

.login-left-pane::after {
    /* Subtle glow on the dark background */
    content: '';
    position: absolute;
    top: 30%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.05), transparent 70%);
    pointer-events: none;
}

/* Wavy separator between panes */
.wavy-separator {
    position: absolute;
    right: -100px;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 10;
    pointer-events: none;
}

.wavy-separator path {
    fill: var(--bg-white);
    filter: drop-shadow(-8px 0px 10px rgba(0,0,0,0.3));
}

.login-right-pane {
    position: relative;
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-white);
    z-index: 1;
}

/* Stream Medical Logo */
.brand {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-icon-layers {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
}
.brand-icon-layer {
    width: 18px;
    height: 5px;
    background: white;
    transform: skewX(-20deg);
}
.brand-icon-layer:nth-child(2) { width: 22px; }
.brand-icon-layer:nth-child(3) { width: 14px; }

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.brand-name span {
    font-weight: 300;
    color: #a0aec0;
}

/* Left Content */
.illustration-wrapper {
    margin-bottom: 50px;
    text-align: left;
}
.illustration-wrapper img, .illustration-wrapper svg {
    max-width: 100%;
    width: 380px;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
}

.left-text h1 {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.left-text p {
    font-size: 16px;
    color: var(--text-light);
    margin: 0;
    font-weight: 300;
}

/* Right Content */
.form-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.machakos-logo {
    display: block;
    margin: 0 auto 50px auto;
    width: 250px;
}

.alert-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid;
}
.alert-error {
    background-color: #fff5f5;
    color: #c53030;
    border-left-color: #c53030;
}
.alert-success {
    background-color: #f0fff4;
    color: #2f855a;
    border-left-color: #2f855a;
}

.input-container {
    margin-bottom: 20px;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: #a0aec0;
    box-shadow: 0 0 0 3px rgba(160, 174, 192, 0.1);
}

.instructions {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
    margin-bottom: 25px;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 25px;
    color: var(--text-light);
}

.options-row a {
    color: var(--text-light);
    text-decoration: none;
}
.options-row a:hover {
    color: var(--text-dark);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background-color: #e2e8f0;
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-submit.active {
    background-color: #1a202c;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.terms-text {
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 30px;
}

/* Responsiveness */
@media (max-width: 900px) {
    .login-left-pane { display: none; }
    .login-right-pane { width: 100%; justify-content: flex-start; padding-top: 10vh; }
}
