/* Styles extracted from login_page.html */
:root {
    --primary: #2d6be6;
    --primary-dark: #1c4fb8;
    --ink: #1f2a3b;
    --muted: #6f7b8b;
    --card-bg: #fdfefe;
    --field: #f7f9fc;
    --border: #dce4f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #e7eef9;
    color: var(--ink);
}

.wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(18px, 5vw, 56px);
    background: url('/static/images/login-bg1.webp') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

.inner::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 52%;
    z-index: 9;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgb(1 1 1 / 41%), transparent);
    pointer-events: none;
}

.wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(2px);
    z-index: 0;
}

.inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    padding: 20px;
    background: url(/static/images/login-bg1.webp) center / cover no-repeat;
    border-radius: 26px;
    box-shadow: 0 18px 60px rgba(23, 44, 82, 0.2);
}

/* RIGHT CARD */
.card {
    padding: clamp(22px, 4vw, 32px);
    max-width: 390px;
    margin-left: auto;
    width: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    text-align: center;
    flex-direction: column;
}

.logo-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #5aa3ff, #2d6be6);
    box-shadow: 0 14px 28px rgba(45, 107, 230, 0.35);
}

.logo-circle i {
    color: white;
    font-size: 26px;
}

.card h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.2px;
}

.card p {
    margin: 6px 0 18px;
    color: #5c6c80;
    font-weight: 500;
}

.form-box {
    display: grid;
    gap: 14px;
}

.input-shell {
    display: grid;
    grid-template-columns: 22px 1fr 40px;
    align-items: center;
    gap: 10px;
    padding: 0 6px 0 10px;
    border-radius: 12px;
    background: var(--field);
    border: 1px solid var(--border);
}

.input-shell:focus-within {
    border-color: #aac5ff;
    box-shadow: 0 0 0 3px rgba(45, 107, 230, 0.12);
}

.input-shell i {
    color: #7d8aa0;
    font-size: 16px;
}

.input-shell input {
    border: none;
    outline: none;
    width: 100%;
    padding: 12px 14px 14px 0;
    font-size: 14px;
    background: transparent;
    color: var(--ink);
}

.input-shell input::placeholder {
    color: #9aa7ba;
}

.toggle-btn {
    justify-self: end;
    border: none;
    background: none;
    color: #7d8aa0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.forgot {
    text-align: right;
    margin: -4px 0 6px;
}

.forgot button {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 12px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

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

.forgot button:focus-visible {
    outline: 2px solid rgba(45, 107, 230, 0.28);
    outline-offset: 4px;
    border-radius: 8px;
}

.primary-btn,
.outline-btn {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.primary-btn {
    border: none;
    color: #fff;
    background: linear-gradient(90deg, #2d6be6, #7a5cf2);
    box-shadow: 0 14px 30px rgba(45, 107, 230, 0.26);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(45, 107, 230, 0.3);
}

.outline-btn {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid #c8d6ef;
}

.outline-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.or-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    color: #9aa7ba;
    font-size: 12px;
    margin: 10px 0;
}

.or-row span {
    border-top: 1px solid #e1e6f0;
    height: 0;
}

.footer-links {
    text-align: center;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7a90;
}

.footer-links a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.modal-shell {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 18, 36, 0.55);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 1000;
}

.modal-shell.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    width: min(560px, 100%);
    display: block;
    border-radius: 28px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 36px 90px rgba(16, 31, 59, 0.28);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.22s ease;
}

.modal-shell.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 0;
}

.modal-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4ff;
    border: 1px solid #d6e4ff;
    margin-bottom: 8px;
    color: #2d6be6;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.modal-head h3 {
    margin: 8px 0 8px;
    color: #10213d;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.08;
}

.modal-head p {
    margin: 0;
    color: #6e7d92;
    font-size: 13px;
    line-height: 1.7;
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid #d6e0f0;
    border-radius: 14px;
    background: #f7faff;
    color: #35527f;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.modal-close:hover {
    background: #eef4ff;
    border-color: #bdd1f8;
    transform: translateY(-1px);
}

.modal-body {
    padding: 18px 28px 28px;
    display: grid;
    gap: 18px;
}

.step-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.step-chip {
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid #dce6f4;
    background: #f8fbff;
    color: #60728a;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.step-chip.active {
    border-color: #aac4f6;
    background: linear-gradient(180deg, #eef5ff 0%, #e4efff 100%);
    color: #184a99;
    box-shadow: inset 0 0 0 1px rgba(45, 107, 230, 0.08);
}

.step-chip.done {
    border-color: #b8d9c4;
    background: #edf9f1;
    color: #206c3f;
}

.modal-alert {
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
}

.modal-alert.show {
    display: block;
}

.modal-alert.error {
    background: #fff2f2;
    border: 1px solid #f5c7c7;
    color: #bb3b3b;
}

.modal-alert.success {
    background: #edf9f1;
    border: 1px solid #bfe3cb;
    color: #227049;
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: grid;
    gap: 10px;
}

.step-panel label {
    font-size: 13px;
    font-weight: 700;
    color: #21324d;
}

.modal-input-shell {
    grid-template-columns: 22px 1fr;
    gap: 12px;
    padding-right: 12px;
    border-radius: 16px;
    background: #fbfcff;
}

.input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7d8aa0;
}

.modal-note {
    font-size: 12px;
    line-height: 1.6;
    color: #6d7f96;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.secondary-btn {
    min-width: 170px;
    border: none;
    border-radius: 16px;
    padding: 13px 18px;
    background: linear-gradient(135deg, #214f9e 0%, #2d6be6 58%, #69a0ff 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(45, 107, 230, 0.24);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.secondary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(45, 107, 230, 0.28);
}

.secondary-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 1024px) {
    .wrapper {
        padding: 18px;
    }

    .inner {
        padding: 18px;
    }

    .card {
        margin: 0 auto;
    }

    .modal-card {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .modal-aside {
        padding-bottom: 22px;
    }

    .modal-aside-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modal-aside-step {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wrapper {
        padding: 14px;
    }

    .inner {
           padding: 20px;
        background: url(/static/images/login-bg1-m.webp);
                padding-top: 254px;
        background-size: 100%;
        background-position: center top;
    }
.logo-circle{
    display: none;
}
.inner::after{
    display: none;
}

.input-shell{
        grid-template-columns: 20px 1fr 10px;
}
    .card {
        padding: 22px;
    }

    .modal-shell {
        padding: 14px;
    }

    .modal-card {
        border-radius: 24px;
    }

    .modal-aside,
    .modal-head,
    .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-head {
        padding-top: 18px;
    }

    .modal-aside-steps,
    .step-track {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        justify-content: stretch;
    }

    .secondary-btn {
        width: 100%;
    }
}
