﻿:root {
    --forest: #16442E;
    --forest-deep: #0E301F;
    --emerald: #2F6B4F;
    --navy: #1B3A5C;
    --gold: #C99A3C;
    --gold-light: #E4C371;
    --crimson: #8C2F39;
    --paper: #F7F4EC;
    --paper-dim: #EFEAdb;
    --ink: #1C2321;
    --ink-soft: #5B645E;
    --line: #DDD6C4;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: var(--paper);
}

body {
    min-height: 100vh;
}

#form1 {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------- LEFT: BRAND PANEL ---------- */
.brand-panel {
    position: relative;
    flex: 0 0 65%;
    min-width: 380px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 52px;
    color: #fff;
}

    .brand-panel::before {
        content: "";
        position: absolute;
        inset: 0;
        /*background-image: url('<%= ResolveUrl("~/Images/SSI-School.jpg") %>');*/
        background-size: cover;
        background-position: center;
        filter: saturate(0.9);
        z-index: 0;
    }

    .brand-panel::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(160deg, rgba(22,68,46,0.72) 0%, rgba(20,60,52,0.65) 38%, rgba(27,58,92,0.68) 78%, rgba(19,43,71,0.75) 100%);
        /*background: linear-gradient(160deg, rgba(22,68,46,0.94) 0%, rgba(20,60,52,0.88) 38%, rgba(27,58,92,0.90) 78%, rgba(19,43,71,0.95) 100%);*/
        z-index: 1;
    }

.brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.crest-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .crest-row img {
        width: 80px;
        height: auto;
        border-radius: 50%;
    }

.crest-text {
    line-height: 1.15;
}

    .crest-text .name {
        font-family: 'Fraunces', serif;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .crest-text .place {
        font-size: 13px;
        color: rgba(255,255,255,0.7);
        margin-top: 2px;
    }

.brand-middle {
    margin: auto 0;
    padding: 60px 0;
}

.shift-word {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-style: italic;
    font-size: 15px;
    color: var(--gold-light);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.brand-headline {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.12;
    max-width: 560px;
    margin: 0 0 20px;
}

.shift-word {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-style: italic;
    font-size: 20px;
    color: var(--gold-light);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.brand-sub {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(255,255,255,0.8);
    max-width: 560px;
}

.arrow-line {
    margin-top: 34px;
    width: 190px;
    height: 46px;
}

    .arrow-line path {
        stroke-dasharray: 260;
        stroke-dashoffset: 260;
        animation: draw 1.6s ease-out 0.4s forwards;
    }

    .arrow-line polygon {
        opacity: 0;
        animation: fadeIn 0.4s ease-out 1.9s forwards;
    }

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.brand-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 13px;
    color: rgba(255,255,255,0.62);
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-top: 18px;
}

    .brand-footer .sy {
        font-family: 'Fraunces', serif;
        font-style: italic;
        color: rgba(255,255,255,0.85);
    }

/* ---------- RIGHT: FORM PANEL ---------- */
.form-panel {
    flex: 0 0 35%;
    overflow: hidden;
    padding: 0;
    background: var(--paper);
    position: relative;
}

.slider-container {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}

.slide-panel {
    width: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
    order: 5; /* default: out of view, reassigned dynamically */
}

.form-wrap {
    width: 100%;
    max-width: 460px;
}

.form-eyebrow {
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.form-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 32px;
    margin: 0 0 8px;
    color: var(--forest-deep);
}

.form-desc {
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: 32px;
    line-height: 1.55;
}

.field {
    margin-bottom: 18px;
}

    .field label {
        display: block;
        font-size: 13px;
        color: var(--ink);
        margin-bottom: 7px;
    }

    .field input {
        width: 100%;
        padding: 13px 14px;
        border: 1.4px solid var(--line);
        border-radius: 12px;
        background: #fff;
        font-family: 'Inter', sans-serif;
        font-size: 14.5px;
        color: var(--ink);
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

        .field input::placeholder {
            color: #A9A296;
        }

        .field input:focus {
            outline: none;
            border-color: var(--forest);
            box-shadow: 0 0 0 3px rgba(22,68,46,0.12);
        }

.field-pass-wrap {
    position: relative;
}

.float-field {
    position: relative;
    margin-bottom: 18px;
}

    .float-field input {
        width: 100%;
        padding: 22px 14px 8px;
        border: 1.4px solid var(--line);
        border-radius: 12px;
        background: #fff;
        font-family: 'Inter', sans-serif;
        font-size: 14.5px;
        color: var(--ink);
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
    }

        .float-field input.input-error {
            border-color: var(--crimson);
            box-shadow: 0 0 0 3px rgba(140,47,57,0.10);
        }

            .float-field input.input-error:focus {
                border-color: var(--crimson);
                box-shadow: 0 0 0 3px rgba(140,47,57,0.14);
            }

            .float-field input.input-error + label {
                color: var(--crimson) !important;
                ;
            }

.field-error-msg {
    display: none;
    color: var(--crimson);
    font-size: 12.5px;
    margin-top: 6px;
}

    .field-error-msg.show {
        display: block;
    }

/* optional: subtle shake for feedback, like Facebook's */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.float-field.shake {
    animation: shake 0.35s ease;
}

.field-pass-wrap.float-field input {
    padding-right: 60px;
}

.float-field label {
    position: absolute;
    left: 14px;
    top: 16px;
    font-size: 14.5px;
    color: #A9A296;
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.15s ease, color 0.15s ease, top 0.15s ease;
}

.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label {
    top: 8px;
    transform: scale(0.78);
    color: var(--forest);
}

.float-field input:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(22,68,46,0.12);
}

.field-pass-wrap .toggle-pass {
    position: absolute;
    right: 13px;
    top: 13px;
    font-size: 12.5px;
    color: var(--ink-soft);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-family: 'Inter', sans-serif;
}

    .field-pass-wrap .toggle-pass:hover {
        color: var(--forest);
    }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -4px 0 26px;
    font-size: 13.5px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
}

    .remember input {
        width: 15px;
        height: 15px;
        accent-color: var(--forest);
    }

.row-between a {
    color: var(--forest);
    text-decoration: none;
    font-weight: 600;
}

    .row-between a:hover {
        text-decoration: underline;
    }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0;
    color: var(--ink-soft);
    font-size: 13px;
}

    .divider::before, .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #B8B0A0;
    }

.btn-microsoft {
    width: 100%;
    padding: 12px;
    border: 1.4px solid var(--line);
    border-radius: 24px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

    .btn-microsoft:hover {
        border-color: var(--paper-dim);
        background: var(--paper-dim);
    }

.form-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-soft);
}

    .form-footer a {
        color: var(--forest);
        font-weight: 600;
        text-decoration: none;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

.field-error {
    color: var(--crimson);
    font-size: 12.5px;
    margin-top: 6px;
    display: block;
}

.login-error {
    background: #FBEAEC;
    border: 1px solid var(--crimson);
    color: var(--crimson);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 18px;
}

.otp-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 4px;
}

.otp-box {
    width: 48px;
    height: 56px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    background: #fff;
    border: 1.4px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

    .otp-box:focus {
        border-color: var(--forest);
        box-shadow: 0 0 0 3px rgba(22,68,46,0.14);
    }

    .otp-box.filled {
        border-color: var(--forest);
        background: var(--paper-dim);
    }

    .otp-box.input-error {
        border-color: var(--crimson);
        box-shadow: 0 0 0 3px rgba(140,47,57,0.10);
    }

.otp-group.shake {
    animation: shake 0.35s ease;
}

@media (max-width: 420px) {
    .otp-box {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
}

.otp-resend-line {
    text-align: center;
    font-size: 13.5px;
    color: var(--ink-soft);
    margin-top: 18px;
}

.back-link {
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
}

    .back-link:hover {
        color: var(--forest);
        text-decoration: underline;
    }

.resend-action {
    color: var(--forest);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

    .resend-action:hover {
        text-decoration: underline;
    }

.btn-wrap {
    position: relative;
    width: 100%;
}

    .btn-wrap.dark-spinner .btn-spinner {
        border: 2px solid rgba(22, 68, 46, 0.2);
        border-top-color: var(--forest);
    }

.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 24px;
    background: var(--forest);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 16px -4px rgba(22, 68, 46, 0.45), 0 4px 6px -2px rgba(22, 68, 46, 0.3);
}

    .btn-primary:hover {
        background: var(--forest-deep);
    }

    .btn-primary:active {
        transform: scale(0.99);
    }

    .btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

    .btn-primary.loading {
        color: transparent;
    }

.btn-microsoft.loading svg,
.btn-microsoft.loading .btn-label {
    opacity: 0;
}

.btn-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
}

    .btn-spinner.show {
        display: block;
    }

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 860px) {
    #form1 {
        flex-direction: column;
    }

    .brand-panel {
        min-width: 0;
        padding: 36px 28px;
    }

    .brand-middle {
        padding: 30px 0;
    }

    .brand-headline {
        font-size: 28px;
    }

    .form-panel {
        padding: 36px 24px 56px;
    }
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .arrow-line path, .arrow-line polygon {
        animation: none;
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

.login-ok {
    background: #E8F3EC;
    border: 1px solid var(--emerald);
    color: var(--forest);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 18px;
}

.rs-msg {
    margin-top: -14px; /* sits closer to the description above it */
}