:root {
    --navy-deep: #0e1330;
    --navy-mid: #1c2454;
    --plum: #3a2166;
    --amber: #f2a544;
    --amber-soft: #f7c877;
    --ivory: #f4efe6;
    --ivory-dim: rgba(244, 239, 230, 0.62);
    --glass: rgba(244, 239, 230, 0.07);
    --glass-border: rgba(244, 239, 230, 0.16);
    --danger: #ff8a8a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 15% 20%, rgba(242, 165, 68, 0.14), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(58, 33, 102, 0.55), transparent 50%),
    linear-gradient(160deg, var(--navy-deep), var(--navy-mid) 55%, var(--plum) 130%);
    color: var(--ivory);
    overflow-x: hidden;
    position: relative;
    padding: 24px;
}

/* ambient stars */
.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(1.5px 1.5px at 20% 30%, rgba(244, 239, 230, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 70% 15%, rgba(244, 239, 230, 0.4), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(244, 239, 230, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 55%, rgba(244, 239, 230, 0.35), transparent),
    radial-gradient(1px 1px at 55% 85%, rgba(244, 239, 230, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 10% 90%, rgba(244, 239, 230, 0.3), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(244, 239, 230, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 80% 30%, rgba(244, 239, 230, 0.35), transparent);
    background-size: 600px 600px;
    animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
    from {
        opacity: 0.5;
    }
    to {
        opacity: 1;
    }
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.blob1 {
    width: 380px;
    height: 380px;
    background: var(--amber);
    top: -120px;
    right: -100px;
    animation: float1 14s ease-in-out infinite;
}

.blob2 {
    width: 320px;
    height: 320px;
    background: var(--plum);
    bottom: -140px;
    left: -100px;
    animation: float2 16s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-30px, 30px);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(30px, -25px);
    }
}

.wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns:1.05fr 1fr;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    overflow: hidden;
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

/* left showcase side */
.side {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(200deg, rgba(242, 165, 68, 0.16), rgba(58, 33, 102, 0.35));
    border-left: 1px solid var(--glass-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand .mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--amber), var(--amber-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--navy-deep);
    font-size: 18px;
}

.brand span {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .3px;
}

.side h1 {
    font-size: 28px;
    line-height: 1.6;
    font-weight: 800;
    margin-top: 40px;
    background: linear-gradient(90deg, var(--ivory), var(--amber-soft));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.side p {
    margin-top: 14px;
    color: var(--ivory-dim);
    line-height: 2;
    font-size: 14.5px;
    max-width: 34ch;
}

.phase-track {
    display: flex;
    gap: 8px;
    margin-top: 40px;
}

.phase-track span {
    height: 4px;
    flex: 1;
    border-radius: 99px;
    background: rgba(244, 239, 230, 0.15);
}

.phase-track span.on {
    background: var(--amber);
}

/* right form side */
.panel {
    padding: 48px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 30px;
}

.tabs a {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ivory-dim);
    background: transparent;
    transition: all .25s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.tabs a.active {
    background: linear-gradient(135deg, var(--amber), var(--amber-soft));
    color: var(--navy-deep);
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeUp .4s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--ivory-dim);
    margin-bottom: 7px;
    font-weight: 500;
}

.field .input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color .2s ease, background .2s ease;
}

.field .input-row:focus-within {
    border-color: var(--amber);
    background: rgba(255, 255, 255, 0.08);
}

.field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ivory);
    font-family: inherit;
    font-size: 15px;
    padding: 13px 0;
    direction: ltr;
    text-align: right;
}

.field input::placeholder {
    color: rgba(244, 239, 230, 0.35);
}

.field .icon {
    font-size: 15px;
    opacity: .65;
    flex-shrink: 0;
}

.eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .6;
    transition: opacity .2s ease;
    flex-shrink: 0;
}

.eye-btn:hover {
    opacity: 1;
}

.eye-btn svg {
    width: 19px;
    height: 19px;
    stroke: var(--ivory);
}

.hint {
    font-size: 12px;
    color: var(--ivory-dim);
    margin-top: 6px;
}

.hint.is-error {
    color: var(--danger);
}

.submit {
    margin-top: 8px;
    padding: 14px 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--navy-deep);
    background: linear-gradient(135deg, var(--amber), var(--amber-soft));
    box-shadow: 0 10px 26px rgba(242, 165, 68, 0.28);
    transition: transform .18s ease, box-shadow .18s ease;
    width: 100%;
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(242, 165, 68, 0.38);
}

.submit:active {
    transform: translateY(0);
}

.submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.switch-line {
    text-align: center;
    margin-top: 20px;
    font-size: 13.5px;
    color: var(--ivory-dim);
}

.switch-line a {
    color: var(--amber-soft);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

/* --- additions for OTP / forgot-password / reset-password screens --- */
.eyebrow {
    font-size: 13px;
    color: var(--amber-soft);
    font-weight: 600;
    margin-bottom: 8px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ivory-dim);
    text-decoration: none;
    margin-bottom: 22px;
    width: fit-content;
    transition: color .2s ease;
}

.back-link:hover {
    color: var(--amber-soft);
}

.panel h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--ivory);
}

.panel .desc {
    font-size: 13.5px;
    color: var(--ivory-dim);
    margin-bottom: 26px;
    line-height: 1.9;
}

.otp-input {
    letter-spacing: 10px !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

.messages p {
    font-size: 13px;
    color: var(--ivory-dim);
    margin-bottom: 10px;
}

.alert, .alert-danger {
    font-size: 12.5px;
    color: var(--danger);
    margin-top: 6px;
    background: none;
    padding: 0;
}

.submit.ghost {
    background: transparent;
    color: var(--ivory-dim);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.submit.ghost:not(:disabled):hover {
    color: var(--amber-soft);
    border-color: var(--amber-soft);
    transform: none;
    box-shadow: none;
}

@media (max-width: 780px) {
    body {
        padding: 0;
    }

    .wrap {
        grid-template-columns:1fr;
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .side {
        display: none;
    }

    .panel {
        padding: 36px 24px;
        justify-content: flex-start;
        padding-top: 64px;
    }
}