﻿/* Global */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Background + subtle texture */
.account-page-wrapper {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.88) 0%, rgba(233, 236, 239, 0.90) 100%), url('/images/background_loginpage.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px 20px 20px;
    position: relative;
}

    .account-page-wrapper::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.02) 1px, transparent 0);
        background-size: 20px 20px;
        pointer-events: none;
    }

/* White card shell */
.account-wrapper {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    min-height: 500px;
    position: relative;
}

/* Branding panel (left) */
.branding-panel {
    background: linear-gradient(135deg, #a61e1e 0%, #8b1538 100%);
    flex: 1;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    color: white;
    position: relative;
    overflow: hidden; /* contain EKG */
}
    /* soft animated glow */
    .branding-panel::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 20% 80%, rgba(255,0,0,0.20) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,0,0,0.15) 0%, transparent 50%);
        animation: emergency-glow 4s ease-in-out infinite alternate;
    }

@keyframes emergency-glow {
    0% {
        opacity: .3;
    }

    100% {
        opacity: .7;
    }
}

/* Place the EKG ABOVE the logo, aligned with the panel padding, and
   make sure it doesn't push content down (absolute positioning). */
.ekg-wrap {
    position: absolute;
    top: 5%; /* move higher/lower: smaller = higher */
    left: 48px; /* match .branding-panel { padding: 48px } */
    right: 48px; /* keep the same value as left so it’s even on both sides */
    height: 90px; /* band height; adjust if you want it thinner/taller */
    pointer-events: none;
    z-index: 1; /* below the text (brand text is z-index:2) */
    max-width: none;
    transform: none; /* IMPORTANT: remove any translateX centering */
    /* no margins here */
}

    /* Kill the wrapper vignette so you don't get the dark columns */
    .ekg-wrap::after {
        display: none !important;
    }

/* The SVG still fills the wrapper */
.ekg--scroll {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.9;
}

/* (Optional) tweak on small screens */
@media (max-width: 768px) {
    .ekg-wrap {
        top: 8%;
        left: 24px;
        right: 24px;
        height: 80px;
    }
}


/* Tile width = 200px; we place the spike near the right edge of that tile */
.ekg-track {
    transform: translateX(0);
    animation: ekg-scroll-left 7.5s linear infinite;
}

.ekg-track--2 {
    transform: translateX(200px);
    animation: ekg-scroll-left 7.5s linear infinite;
}

.ekg-track--3 {
    transform: translateX(400px);
    animation: ekg-scroll-left 7.5s linear infinite;
}

@keyframes ekg-scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-200px);
    }
    /* RIGHT → LEFT */
}

.ekg-line {
    fill: none;
    stroke: #34d399; /* emerald-400 */
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.7));
}

/* Sweeping bar moves RIGHT → LEFT to match the trace direction */
.ekg-scan {
    fill: #6ee7b7; /* emerald-300 */
    opacity: 0.9;
    animation: ekg-scan-rtl 2.8s linear infinite;
}

@keyframes ekg-scan-rtl {
    0% {
        transform: translateX(105%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        opacity: 0.9;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateX(-10%);
        opacity: 0;
    }
}

/* Fade edges so the trace doesn’t hard-cut across the wrapper bounds */
.ekg-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.25), transparent 12%, transparent 88%, rgba(0,0,0,0.25));
    pointer-events: none;
}

/* Remove any old pulse remnants if markup still exists */
.emergency-indicators, .status-light, .medical-pulse, .heartbeat-line {
    display: none !important;
}

/* Branding text */
.brand-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    z-index: 2;
    position: relative;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}

    .brand-logo .tm {
        font-size: 1.2rem;
        vertical-align: super;
        opacity: .8;
    }

.brand-tagline {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: .95;
    text-align: center;
    line-height: 1.5;
    z-index: 2;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.brand-subtitle {
    font-size: .95rem;
    opacity: .85;
    margin-top: 24px;
    text-align: center;
    z-index: 2;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Right content panel */
.content-panel {
    flex: 1;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #ffffff;
    min-height: 500px;
    overflow: visible;
}

/* Headings */
.page-header {
    margin: 0 0 24px;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    user-select: none;
}

.page-subtitle {
    color: #718096;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .form-label.email-label::before, .form-label.password-label::before {
        font-size: 1.1rem;
        opacity: .7;
    }

    .form-label.email-label::before {
        content: "📧";
    }

    .form-label.password-label::before {
        content: "🔒";
    }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 4px 14px rgba(49,130,206,.3);
    margin-bottom: 16px;
    text-align: center;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(49,130,206,.4);
        background: linear-gradient(135deg, #2c5aa0, #2a5298);
    }

/* Syncfusion input polish (optional) */
.e-input-group.e-control-wrapper {
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    transition: all .3s ease !important;
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.05) !important;
}

    .e-input-group.e-control-wrapper:focus-within {
        border-color: #3182ce !important;
        box-shadow: 0 0 0 3px rgba(49,130,206,.1), 0 4px 12px rgba(49,130,206,.15) !important;
        transform: translateY(-1px);
    }

    .e-input-group.e-control-wrapper:hover {
        border-color: #cbd5e0 !important;
        box-shadow: 0 4px 8px rgba(0,0,0,.08) !important;
    }

.e-float-input.e-control-wrapper .e-float-line::before,
.e-float-input.e-control-wrapper .e-float-line::after {
    background: #3182ce !important;
}

.e-float-input.e-control-wrapper .e-float-text {
    color: #4a5568 !important;
    font-weight: 500 !important;
}

.e-input {
    padding: 18px 24px !important;
    font-size: 1rem !important;
    color: #2d3748 !important;
    background: transparent !important;
    border: none !important;
}

    .e-input::placeholder {
        color: #a0aec0 !important;
    }

/* Links (forgot password, etc.) */
.account-links {
    margin: 16px 0;
}

    .account-links a {
        color: #3182ce;
        text-decoration: none;
        font-size: .9rem;
        transition: color .3s ease;
        display: block;
        margin-bottom: 8px;
    }

        .account-links a:hover {
            color: #2c5aa0;
            text-decoration: underline;
        }

/* Notice */
.notice {
    padding: 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    border-left: 4px solid #a61e1e;
    margin-top: 16px;
}

.notice-text {
    font-size: .8rem;
    color: #4a5568;
    line-height: 1.4;
}

/* Validation */
.validation-message {
    color: #e53e3e;
    font-size: .8rem;
    margin-top: 4px;
}

.text-danger {
    color: #e53e3e !important;
}

/* Responsive */
@media (max-width: 768px) {
    .account-page-wrapper {
        padding: 20px 10px;
        align-items: flex-start;
    }

    .account-wrapper {
        flex-direction: column;
        max-width: 100%;
        margin-top: 0;
    }

    .branding-panel {
        min-height: 180px;
        padding: 24px;
    }

    .content-panel {
        padding: 24px;
        min-height: auto;
    }

    .brand-logo {
        font-size: 2.2rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: .85rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ekg-track, .ekg-scan, .branding-panel::before {
        animation: none !important;
    }

    .ekg--scroll {
        opacity: .6;
    }
}
/* Page heading */
.login-title {
    margin: 0 0 16px;
    font-weight: 700;
    font-size: 1.75rem;
    color: #1f2937;
}

/* Card-ish container so the form feels anchored */
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 6px 28px rgba(0,0,0,.08);
    border: 1px solid rgba(0,0,0,.06);
}

/* Elevated input look (works with Bootstrap .form-floating) */
.input-elevated {
    position: relative;
}

    .input-elevated > .form-control {
        padding-left: 2.6rem; /* room for left icon */
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 6px rgba(0,0,0,.04);
        transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
    }

    /* Keep label aligned with icon when floating */
    .input-elevated > label {
        padding-left: 2.6rem;
        color: #4a5568;
    }

    /* Focus state: thicker glow + color change */
    .input-elevated > .form-control:focus {
        border-color: #3182ce; /* blue */
        box-shadow: 0 0 0 4px rgba(49,130,206,.12), 0 10px 24px rgba(49,130,206,.12);
        background: #ffffff;
    }

/* Icon inside floating group */
.float-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #64748b; /* slate-500 */
    pointer-events: none;
}

/* Right-side action (eye toggle) */
.input-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.05rem;
    padding: 6px;
    border-radius: 8px;
}

    .input-action:hover {
        color: #1f2937;
        background: rgba(0,0,0,.04);
    }

/* Make validation hints compact */
.small {
    font-size: .85rem;
}

/* Links */
.links a {
    text-decoration: none;
}

    .links a:hover {
        text-decoration: underline;
    }

/* Optional: make the switch look a touch nicer */
.form-check-input {
    width: 2.6em;
    height: 1.4em;
}

    .form-check-input:focus {
        box-shadow: 0 0 0 .25rem rgba(49,130,206,.25);
    }

    .form-check-input:checked {
        background-color: #3182ce;
        border-color: #3182ce;
    }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .input-elevated > .form-control:focus {
        box-shadow: 0 0 0 4px rgba(49,130,206,.12);
    }
}
/* ----- Fix: floating label cuts off left icons in .form-floating ----- */

/* Ensure nothing in the group clips the icon */
.form-floating.input-elevated {
    position: relative;
    overflow: visible;
}

    /* Give the input more vertical space and room for the label + icon */
    .form-floating.input-elevated > .form-control {
        /* Bootstrap default height is calc(3.5rem + 2px); lift it a bit */
        height: calc(3.75rem + 2px);
        padding-top: 1.25rem; /* room for the floated label */
        padding-bottom: 0.625rem; /* keep balance */
        padding-left: 2.75rem; /* room for the left icon */
    }

    /* Physically move the label box to the right of the icon area */
    .form-floating.input-elevated > label {
        left: 1.5rem; /* align with input's left padding */
        width: calc(100% - 1.5rem); /* keep proper width */
        pointer-events: none; /* don’t steal clicks */
        z-index: 1; /* stay under the icon */
    }

/* Keep the icon a hair lower so it never looks clipped by the top edge */
.float-icon {
    top: 50%;
    transform: translateY(-45%); /* slightly lower than -50% */
    z-index: 3; /* above input & label */
}

/* If you still see crowding on very small screens, ease the numbers a bit */
@media (max-width: 480px) {
    .form-floating.input-elevated > .form-control {
        height: calc(3.6rem + 2px);
        padding-top: 1.15rem;
    }
}
