@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Valerun TMS - Giris Ekrani (v2)
   Sol: canli operasyon sahnesi (canvas)  |  Sag: giris formu
   Marka renkleri logodan alinmistir: #1B4FD8 (mavi) / #0B1020 (siyah)
   ========================================================================== */

:root {
    --brand-900: #0E2F91;
    --brand-700: #1440B8;
    --brand: #1B4FD8;
    --brand-500: #2D63F0;
    --brand-300: #6D93FF;
    --brand-100: #E8EEFF;
    --brand-50: #F4F7FF;
    --ink: #0B1020;
    --ink-700: #232C45;
    --ink-500: #5A6580;
    --ink-400: #8A93AB;
    --line: #E3E8F3;
    --ok: #10B981;
    --danger: #E5484D;
    --radius-xl: 22px;
    --radius: 14px;
    --font: 'Plus Jakarta Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==========================================================================
   SOL - Operasyon Sahnesi
   ========================================================================== */

.stage {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(120% 85% at 18% 8%, #1A2E77 0%, rgba(10, 18, 48, 0) 58%), radial-gradient(90% 75% at 88% 92%, rgba(27, 79, 216, .55) 0%, rgba(10, 18, 48, 0) 55%), linear-gradient(158deg, #070C1E 0%, #0A1234 52%, #05091A 100%);
}

/* ince doku + vinyet */
.stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: radial-gradient(115% 95% at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(3, 6, 16, .62) 100%);
    opacity: .95;
}

.stage__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* ---- Marka basligi ---- */
.stage__brand {
    position: absolute;
    z-index: 5;
    top: clamp(26px, 4vh, 46px);
    left: clamp(28px, 3.4vw, 56px);
    display: flex;
    align-items: center;
    gap: 14px;
}

.stage__mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--brand-500), var(--brand-900));
    box-shadow: 0 12px 30px -10px rgba(45, 99, 240, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.stage__brand h1 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .34em;
    color: #fff;
    text-transform: uppercase;
}

.stage__brand p {
    margin-top: 3px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(190, 208, 255, .68);
}

/* ---- Canli rozeti ---- */
.stage__live {
    position: absolute;
    z-index: 5;
    top: clamp(30px, 4.4vh, 50px);
    right: clamp(28px, 3vw, 48px);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(214, 227, 255, .9);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(140, 172, 255, .18);
    backdrop-filter: blur(8px);
}

.stage__live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38E29B;
    box-shadow: 0 0 0 0 rgba(56, 226, 155, .7);
    animation: pulseDot 1.9s ease-out infinite;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 226, 155, .55);
    }

    70% {
        box-shadow: 0 0 0 11px rgba(56, 226, 155, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 226, 155, 0);
    }
}

/* ---- Alt bilgi blogu ---- */
.stage__hud {
    position: absolute;
    z-index: 5;
    left: clamp(28px, 3.4vw, 56px);
    right: clamp(28px, 3.4vw, 56px);
    bottom: clamp(26px, 4vh, 46px);
}

.hud__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--brand-300);
    margin-bottom: 10px;
}

.hud__eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand-300), transparent);
}

.hud__title {
    font-size: clamp(24px, 2.5vw, 34px);
    line-height: 1.18;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

.hud__desc {
    margin-top: 10px;
    max-width: 46ch;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(196, 210, 244, .74);
}

.hud__text {
    transition: opacity .45s ease, transform .45s ease;
}

.hud__text.is-swapping {
    opacity: 0;
    transform: translateY(10px);
}

/* ---- Istatistik cipleri ---- */
.hud__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.chip {
    flex: 1 1 0;
    min-width: 118px;
    padding: 12px 15px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .028));
    border: 1px solid rgba(139, 170, 255, .16);
    backdrop-filter: blur(10px);
    transition: border-color .4s ease, transform .4s ease;
}

.chip__val {
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    line-height: 1.2;
}

    .chip__val small {
        font-size: 11px;
        font-weight: 600;
        color: rgba(179, 197, 240, .7);
        margin-left: 3px;
    }

.chip__label {
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(163, 182, 228, .62);
}

/* ---- Adim rayi ---- */
.hud__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.step {
    position: relative;
    padding-top: 13px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(158, 176, 220, .45);
    transition: color .45s ease;
}

    .step::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        border-radius: 3px;
        background: rgba(146, 172, 232, .16);
    }

    .step::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: var(--w, 0%);
        height: 3px;
        border-radius: 3px;
        background: linear-gradient(90deg, var(--brand-500), #7FA6FF);
        box-shadow: 0 0 14px rgba(88, 138, 255, .75);
        transition: width .2s linear;
    }

    .step.is-active {
        color: #fff;
    }

    .step.is-done {
        color: rgba(198, 214, 250, .8);
    }

        .step.is-done::after {
            width: 100%;
        }

/* ==========================================================================
   SAG - Giris Formu
   ========================================================================== */

.pane {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 4vh, 46px) clamp(24px, 5vw, 76px);
    overflow-y: auto;
    background: radial-gradient(70% 45% at 100% 0%, rgba(27, 79, 216, .07) 0%, rgba(255, 255, 255, 0) 62%), radial-gradient(60% 40% at 0% 100%, rgba(27, 79, 216, .05) 0%, rgba(255, 255, 255, 0) 60%), #fff;
}

.pane__top {
    display: flex;
    justify-content: flex-end;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-500);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: .22s ease;
}

    .ghost-link:hover {
        color: var(--brand);
        border-color: var(--brand-300);
        background: var(--brand-50);
        transform: translateY(-1px);
    }

.pane__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 424px;
    margin: 0 auto;
    padding: 34px 0;
}

.pane__logo {
    width: 218px;
    max-width: 62%;
    height: auto;
    margin-bottom: 34px;
}

.pane__welcome {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    margin-bottom: 16px;
    align-self: flex-start;
    border-radius: 999px;
    background: var(--brand-50);
    border: 1px solid rgba(27, 79, 216, .12);
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pane__title {
    font-size: clamp(26px, 2.6vw, 33px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.pane__sub {
    margin-top: 9px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-500);
}

/* ---- Alanlar ---- */
.form {
    margin-top: 30px;
}

.field {
    position: relative;
    margin-bottom: 16px;
}

.field__icon {
    position: absolute;
    left: 17px;
    top: 29px;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--ink-400);
    transition: color .22s ease;
    pointer-events: none;
    z-index: 2;
}

.field__input {
    width: 100%;
    height: 58px;
    padding: 22px 17px 8px 48px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    background: #FBFCFE;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

    .field__input::placeholder {
        color: transparent;
    }

.field--pass .field__input {
    padding-right: 52px;
}

.field__label {
    position: absolute;
    left: 48px;
    top: 19px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-400);
    pointer-events: none;
    transform-origin: left top;
    transition: transform .18s ease, color .18s ease;
    z-index: 2;
}

.field__input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(27, 79, 216, .12);
}

    .field__input:focus ~ .field__icon {
        color: var(--brand);
    }

    .field__input:focus ~ .field__label,
    .field__input:not(:placeholder-shown) ~ .field__label {
        transform: translateY(-11px) scale(.76);
        color: var(--brand-700);
    }

    .field__input:-webkit-autofill {
        -webkit-text-fill-color: var(--ink);
        -webkit-box-shadow: 0 0 0 40px #FBFCFE inset;
        transition: background-color 9999s ease-in-out 0s;
    }

.field__toggle {
    position: absolute;
    right: 8px;
    top: 29px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-400);
    font-size: 18px;
    cursor: pointer;
    transition: .2s ease;
    z-index: 3;
}

    .field__toggle:hover {
        color: var(--brand);
        background: var(--brand-50);
    }

/* Parsley durumlari */
.field__input.parsley-error {
    border-color: var(--danger);
    background: #FFF7F7;
    box-shadow: 0 0 0 4px rgba(229, 72, 77, .1);
}

    .field__input.parsley-error ~ .field__icon {
        color: var(--danger);
    }

.parsley-errors-list {
    list-style: none;
    margin: 7px 0 0 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--danger);
}

    .parsley-errors-list li {
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .parsley-errors-list li::before {
            content: "\f06a"; /* fa-exclamation-circle */
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            font-size: 13px;
        }

/* Caps Lock uyarisi */
.caps-hint {
    display: none;
    align-items: center;
    gap: 6px;
    margin: 7px 0 0 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: #B7791F;
}

    .caps-hint.is-on {
        display: flex;
    }

/* ---- Form yardimci satiri ---- */
.form__aux {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 22px;
}

.link {
    color: var(--brand);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

    .link:hover {
        color: var(--brand-900);
        text-decoration: underline;
    }

/* ---- Butonlar ---- */
.btn-primary {
    position: relative;
    width: 100%;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand) 48%, var(--brand-900) 100%);
    box-shadow: 0 16px 34px -14px rgba(27, 79, 216, .78);
    transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
}

    .btn-primary::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .3) 50%, transparent 80%);
        transform: translateX(-120%);
        transition: transform .75s ease;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 22px 40px -14px rgba(27, 79, 216, .9);
    }

        .btn-primary:hover::after {
            transform: translateX(120%);
        }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        cursor: progress;
        filter: saturate(.75) brightness(.96);
        transform: none;
    }

    .btn-primary .spin {
        display: none;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 2.5px solid rgba(255, 255, 255, .35);
        border-top-color: #fff;
        animation: spin .7s linear infinite;
    }

    .btn-primary.is-loading .spin {
        display: block;
    }

    .btn-primary.is-loading .btn-primary__icon {
        display: none;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-secondary {
    width: 100%;
    height: 50px;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: var(--radius);
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink-700);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .22s ease;
}

    .btn-secondary:hover {
        border-color: var(--brand-300);
        color: var(--brand);
        background: var(--brand-50);
    }

/* ---- Ayirici ---- */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 4px;
    color: var(--ink-400);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

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

/* ---- Guvenlik notu / alt bilgi ---- */
.pane__note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 26px;
    padding: 13px 15px;
    border-radius: var(--radius);
    background: var(--brand-50);
    border: 1px solid rgba(27, 79, 216, .1);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-500);
}

    .pane__note i {
        color: var(--brand);
        font-size: 17px;
        line-height: 1.2;
    }

.pane__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ink-400);
}

    .pane__foot a {
        color: var(--ink-500);
        text-decoration: none;
        font-weight: 600;
    }

        .pane__foot a:hover {
            color: var(--brand);
        }

/* ==========================================================================
   Panel gecisleri (Giris / Sifremi Unuttum / SMS Dogrulama)
   ========================================================================== */

.auth-panel {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease;
}

.auth-panel.is-active {
    display: block;
}

.auth-panel.is-active.is-visible {
    opacity: 1;
    transform: none;
}

.panel-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink-500);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

    .panel-back i {
        font-size: 12px;
        transition: transform .2s ease;
    }

    .panel-back:hover {
        color: var(--brand);
    }

        .panel-back:hover i {
            transform: translateX(-3px);
        }

/* ---- OTP (SMS dogrulama) ---- */
.otp-row {
    display: flex;
    justify-content: space-between;
    gap: 9px;
    margin: 28px 0 6px;
}

.otp-cell {
    width: 100%;
    max-width: 56px;
    height: 62px;
    text-align: center;
    font-family: var(--font);
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    background: #FBFCFE;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .15s ease;
}

    .otp-cell:focus {
        background: #fff;
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(27, 79, 216, .12);
    }

    .otp-cell.is-filled {
        border-color: var(--brand-300);
        background: var(--brand-50);
    }

    .otp-cell.is-error {
        border-color: var(--danger);
        background: #FFF7F7;
        animation: shake .42s cubic-bezier(.36, .07, .19, .97);
    }

.otp-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-500);
}

    .otp-meta i {
        color: var(--brand);
        font-size: 12px;
    }

    .otp-meta.is-expired {
        color: var(--danger);
    }

        .otp-meta.is-expired i {
            color: var(--danger);
        }

.resend-row {
    margin-top: 18px;
    font-size: 13px;
    color: var(--ink-500);
    text-align: center;
}

.resend-link {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

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

    .resend-link.is-disabled {
        color: var(--ink-400);
        pointer-events: none;
        text-decoration: none;
    }

@media (max-width: 420px) {
    .otp-row {
        gap: 6px;
    }

    .otp-cell {
        height: 54px;
        font-size: 19px;
    }
}

.shake {
    animation: shake .42s cubic-bezier(.36, .07, .19, .97);
}

@keyframes shake {
    10%, 90% {
        transform: translateX(-2px);
    }

    20%, 80% {
        transform: translateX(4px);
    }

    30%, 50%, 70% {
        transform: translateX(-6px);
    }

    40%, 60% {
        transform: translateX(6px);
    }
}

/* Swal marka uyumu */
.swal2-popup {
    font-family: var(--font) !important;
    border-radius: 18px !important;
}

/* ==========================================================================
   Duyarli (responsive)
   ========================================================================== */

@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: 1fr 1fr;
    }

    .hud__steps {
        display: none;
    }

    .hud__desc {
        display: none;
    }
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: 250px auto;
    }

    .stage__brand {
        top: 20px;
        left: 22px;
    }

    .stage__mark {
        width: 40px;
        height: 40px;
        font-size: 21px;
        border-radius: 11px;
    }

        .stage__brand h1 {
            font-size: 16px;
        }

    .stage__live {
        top: 22px;
        right: 20px;
    }

    .stage__hud {
        left: 22px;
        right: 22px;
        bottom: 18px;
    }

    .hud__eyebrow {
        display: none;
    }

    .hud__title {
        font-size: 17px;
        text-shadow: 0 2px 14px rgba(4, 8, 24, .85);
    }

    .hud__stats {
        display: none;
    }

    .pane {
        padding: 30px 22px 26px;
    }

    .pane__body {
        padding: 22px 0;
    }

    .pane__logo {
        margin-bottom: 24px;
    }
}

@media (max-width: 560px) {
    /* Dar ekranda marka bloguyla cakismamasi icin canli rozeti gizlenir */
    .stage__live {
        display: none;
    }
}

@media (max-width: 420px) {
    .auth-shell {
        grid-template-rows: 220px auto;
    }

    .stage__brand p {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}
