:root {
    --navy: #101E35;
    --navy-secondary: #17263B;
    --teal: #008F88;
    --teal-dark: #00756F;
    --teal-accent: #00A99D;
    --teal-light: #D7F1F1;
    --pale-blue: #F3F7FA;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --muted: #64748B;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: var(--navy);
    overflow-x: hidden;
}

.login-page {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: var(--pale-blue);
    overflow: hidden;
}

/* ---------- LEFT REGION ---------- */

.login-left {
    position: relative;
    flex: 0 0 51%;
    max-width: 51%;
    background: linear-gradient(160deg, #F3FAFB 0%, #E7F4F5 55%, #DCEFF1 100%);
    /* Reference: left panel is 51% of the page (0-840px of 1648). The diagonal
       runs from the panel's own right edge at the top (840/840=100%) to 700/840
       (~83%) at the bottom - these percentages are relative to THIS element's
       own width, not the viewport. */
    clip-path: polygon(0 0, 100% 0, 83% 100%, 0 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.decor {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.decor-wave-1 {
    width: 60vw;
    height: 60vw;
    left: -14vw;
    top: 42vh;
    background: radial-gradient(circle at 35% 35%, rgba(215, 241, 241, 0.75), rgba(215, 241, 241, 0) 70%);
    border: 1px solid rgba(188, 231, 233, 0.5);
}

.decor-wave-2 {
    width: 46vw;
    height: 46vw;
    left: -10vw;
    top: 50vh;
    background: radial-gradient(circle at 40% 40%, rgba(188, 231, 233, 0.55), rgba(188, 231, 233, 0) 70%);
}

.decor-wave-3 {
    width: 30vw;
    height: 30vw;
    left: 2vw;
    top: 66vh;
    background: radial-gradient(circle at 45% 45%, rgba(244, 250, 252, 0.8), rgba(244, 250, 252, 0) 72%);
}

.decor-ribbon {
    width: 42vw;
    height: 42vw;
    right: -16vw;
    top: -18vw;
    left: auto;
    background: linear-gradient(135deg, rgba(0, 169, 157, 0.14), rgba(0, 169, 157, 0) 60%);
    border-radius: 42% 58% 60% 40% / 45% 40% 60% 55%;
    transform: rotate(18deg);
}

.left-content {
    position: relative;
    z-index: 2;
    padding: clamp(28px, 5.5vw, 54px) clamp(16px, 3vw, 28px) 0 clamp(40px, 8vw, 105px);
    width: 100%;
    max-width: 88%;
}

.brand {
    display: flex;
    align-items: center;
    margin-bottom: clamp(16px, 2.5vw, 28px);
}

.brand-logo {
    width: clamp(160px, 15vw, 280px);
    height: auto;
    display: block;
}

.hero-heading {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.22;
    color: var(--navy);
    margin: 0 0 16px 0;
    max-width: 100%;
    white-space: normal;
}

.hero-tagline {
    font-size: clamp(14px, 1.8vw, 26px);
    font-weight: 400;
    line-height: 1.35;
    color: var(--navy-secondary);
    margin: 0 0 clamp(20px, 3vw, 34px) 0;
}

.features {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.8vw, 20px);
}

.feature {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.6vw, 18px);
}

.feature-icon {
    flex: 0 0 clamp(44px, 4.5vw, 62px);
    width: clamp(44px, 4.5vw, 62px);
    height: clamp(44px, 4.5vw, 62px);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 8px 20px rgba(16, 30, 53, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: clamp(20px, 2vw, 28px);
    height: clamp(20px, 2vw, 28px);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.feature-title {
    font-size: clamp(14px, 1.3vw, 19px);
    font-weight: 700;
    color: var(--navy);
}

.feature-desc {
    font-size: clamp(11px, 1.05vw, 15px);
    font-weight: 400;
    color: var(--muted);
}

.port-image {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44%;
    height: 52%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 55%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

/* ---------- RIGHT REGION ---------- */

.login-right {
    position: relative;
    flex: 1 1 49%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #FBFDFE;
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 682px;
    min-height: 611px;
    background: var(--white);
    border: 1px solid #E7EDF5;
    border-radius: 26px;
    box-shadow: 0 12px 35px rgba(31, 58, 91, 0.08);
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-heading {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 10px 0;
}

.card-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--muted);
    margin: 0 0 36px 0;
}

.login-alerts {
    margin-bottom: 20px;
}

.login-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    margin-bottom: 10px;
}

.login-alert--success {
    background: #E5F6F4;
    color: #0B6B5F;
}

.login-alert--danger {
    background: #FBEAEA;
    color: #B4362E;
}

.login-alert--info {
    background: #EAF3FA;
    color: #1F4E79;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 18px;
    color: #8C98AB;
    font-size: 15px;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    padding: 0 48px;
    font-size: 16px;
    font-family: inherit;
    color: var(--navy);
    transition: border-color 150ms ease;
}

.input-wrap input::placeholder {
    color: #9AA6B8;
}

.input-wrap input:focus {
    outline: none;
    border-color: var(--teal);
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #8C98AB;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--navy-secondary);
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: var(--teal);
    cursor: pointer;
}

.forgot-link {
    font-size: 15px;
    color: var(--teal);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.sign-in-btn {
    width: 100%;
    height: 61px;
    border-radius: 12px;
    border: none;
    background: var(--teal);
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.sign-in-btn:hover {
    background: var(--teal-dark);
}

.demo-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin: 20px 0;
}

.demo-divider::before,
.demo-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.demo-divider span {
    padding: 0 12px;
}

.demo-login-form {
    margin: 0;
}

.demo-login-btn {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    border: 1.5px solid var(--teal);
    background: var(--white);
    color: var(--teal);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.demo-login-btn:hover {
    background: var(--teal-light);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1439px) {
    .hero-heading { font-size: 38px; }
    .hero-tagline { font-size: 23px; }
    .left-content { padding: 44px 36px 0 72px; }
    .login-card { padding: 48px 52px; }
}

@media (max-width: 1023px) {
    .login-left {
        clip-path: polygon(0 0, 58% 0, 48% 100%, 0 100%);
        flex: 0 0 56%;
        max-width: 56%;
    }
    .login-right { flex: 1 1 44%; }
    .left-content { padding: 36px 28px 0 48px; }
    .hero-heading { font-size: 30px; }
    .hero-tagline { font-size: 19px; }
    .feature-title { font-size: 17px; }
    .login-card { padding: 40px 36px; min-height: auto; }
    .card-heading { font-size: 32px; }
}

@media (max-width: 767px) {
    .login-page { flex-direction: column; }
    .login-left {
        clip-path: none;
        flex: none;
        max-width: 100%;
        width: 100%;
        padding-bottom: 32px;
    }
    .login-right { flex: none; width: 100%; padding: 24px 16px 40px; }
    .left-content { padding: 32px 20px 0; max-width: none; }
    .brand-logo { width: 220px; }
    .hero-heading { font-size: 26px; max-width: none; }
    .hero-tagline { font-size: 17px; margin-bottom: 24px; }
    .features { gap: 14px; margin-bottom: 8px; }
    .feature-icon { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; }
    .feature-icon img { width: 22px; height: 22px; }
    .feature-title { font-size: 15px; }
    .feature-desc { font-size: 13px; }
    .port-image { display: none; }
    .login-card { width: 100%; max-width: none; padding: 32px 22px; border-radius: 18px; }
    .card-heading { font-size: 26px; }
    .card-subtitle { font-size: 16px; margin-bottom: 26px; }
    .sign-in-btn { height: 52px; font-size: 17px; }
    .input-wrap input { height: 48px; }
}
