﻿/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    height: 100vh;
    background: #f8f9fa;
    overflow: hidden;
}

/* LAYOUT */
.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* LEFT PANEL */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.left-content {
    max-width: 520px;
    min-width: 450px;
    min-height: 500px;
    padding: 44px;
    color: #fff;
}

.brand-logo {
    width: 180px;
    margin-bottom: 40px;
}

.promo-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.promo-subtitle {
    font-size: 14px;
    opacity: .95;
    margin-bottom: 32px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-item {
    background: rgba(255,255,255,.15);
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
}

/* RIGHT PANEL */
.right-panel {
    width: 480px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: -8px 0 32px rgba(0,0,0,.08);
}

.right-content {
    width: 100%;
    max-width: 420px;
    position: relative;
    min-height: 520px; /* 🔴 KRİTİK */
}

/* LOGIN BOX */
.login-box {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(32px);
    pointer-events: none;
    transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

    .login-box.is-active {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    .login-box.is-left {
        opacity: 0;
        transform: translateX(-32px);
        pointer-events: none;
    }
    

.login-header {
    margin-bottom: 32px;
}

    .login-header h2 {
        font-size: 30px;
        font-weight: 700;
        color: #111827;
    }

    .login-header p {
        font-size: 15px;
        color: #6b7280;
        margin-top: 6px;
    }

/* FORM */
.form-group {
    margin-bottom: 22px;
}

    .form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
    }

    .form-group input {
        width: 100%;
        padding: 14px 16px;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        background: #f9fafb;
        font-size: 15px;
        transition: .25s;
    }

        .form-group input:focus {
            outline: none;
            background: #fff;
            border-color: #667eea;
            box-shadow: 0 0 0 4px rgba(102,126,234,.08);
        }

/* PASSWORD */
.input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    opacity: .6;
}

    .toggle-password:hover {
        opacity: 1;
    }

/* FOOTER */
.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 22px;
}

    .form-footer a {
        font-size: 14px;
        color: #667eea;
        text-decoration: none;
        font-weight: 600;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

/* BUTTON */
.btn-login {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: .3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-login.loading {
        pointer-events: none;
        opacity: 0.85;
    }

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-login.loading .btn-spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.85;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(102,126,234,.35);
    }

    .btn-login:active {
        transform: translateY(0);
    }
.input-wrapper input {
    padding-right: 48px; /* ikon için alan */
}

.toggle-password {
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.login-hint {
    margin-top: 14px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

    .toggle-password:hover {
        background: #f3f4f6;
    }

/* FOOTER TEXT */
.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
}

.toast {
    min-width: 280px;
    max-width: 360px;
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    animation: toast-in 0.35s ease forwards;
}




@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}


@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

/* Back Button */
.btn-back {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: #f9fafb;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-back:hover {
        background: #ffffff;
        border-color: #d1d5db;
        color: #374151;
        transform: translateY(-1px);
    }

    .btn-back:active {
        transform: translateY(0) scale(0.98);
    }
.login-box.error {
    animation: shake 0.4s;

}

.page-footer {
    position: absolute;
    bottom: 24px;
    right: 40px;
    font-size: 13px;
    color: #9ca3af;
}
/* ============================================
   FORGOT PASSWORD - NETISP ADAPTATION
   ============================================ */

#forgotBox {
    animation: boxSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

    /* Header */
    #forgotBox .login-header {
        text-align: center;
        margin-bottom: 32px;
    }

        #forgotBox .login-header h2 {
            font-size: 26px;
            font-weight: 700;
            color: #111827;
        }

        #forgotBox .login-header p {
            font-size: 14px;
            color: #6b7280;
            line-height: 1.5;
        }

    /* Inputs */
    #forgotBox .form-group input {
        width: 100%;
        padding: 14px 16px;
        background: #f9fafb;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

        #forgotBox .form-group input:focus {
            border-color: #667eea;
            background: #fff;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
        }

    /* Submit Button */
    #forgotBox .btn-login {
        margin-top: 8px;
    }

    /* Back Button */
    #forgotBox .btn-back {
        width: 100%;
        margin-top: 14px;
        padding: 14px;
        background: #f9fafb;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        color: #6b7280;
        cursor: pointer;
        transition: all 0.25s ease;
    }

        #forgotBox .btn-back:hover {
            background: #ffffff;
            border-color: #d1d5db;
            color: #374151;
            transform: translateY(-1px);
        }

    /* Success Message */
    #forgotBox .success-message {
        margin-top: 20px;
        padding: 14px 16px;
        background: linear-gradient(135deg, #10b981, #059669);
        border-radius: 12px;
        color: white;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        animation: successSlideIn 0.4s ease;
    }

/* Hide / Show smoothness */
#loginBox,
#forgotBox {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
/* ============================================
   FORGOT PASSWORD - SUCCESS STATE
   ============================================ */

.forgot-success {
    text-align: center;
    animation: successFadeIn 0.5s cubic-bezier(0.4,0,0.2,1);
}

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 36px;
    font-weight: 800;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
    animation: popIn 0.4s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.forgot-success h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.forgot-success p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
}

/* ZORUNLU ŞİFRE DEĞİŞTİRME */
.password-change-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 20% 15%, rgba(102, 126, 234, .25), transparent 34%),
        rgba(17, 24, 39, .72);
    backdrop-filter: blur(10px);
    animation: passwordOverlayIn .25s ease-out;
}

.password-change-modal {
    width: min(100%, 520px);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 24px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 28px 80px rgba(17, 24, 39, .28);
    animation: passwordModalIn .35s cubic-bezier(.22, 1, .36, 1);
}

.password-change-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 12px 26px rgba(102, 126, 234, .3);
}

.password-change-heading {
    margin-bottom: 24px;
}

.security-badge {
    display: inline-flex;
    margin-bottom: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #5b4bc4;
    background: #eeebff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.password-change-heading h2 {
    color: #111827;
    font-size: 27px;
    line-height: 1.2;
}

.password-change-heading p {
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.55;
}

.password-change-error {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 0 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
    background: #fff1f2;
    font-size: 13px;
    font-weight: 600;
}

.password-change-error span {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: #dc2626;
    font-size: 12px;
    font-weight: 800;
}

.password-change-modal .form-group {
    margin-bottom: 16px;
}

.password-change-modal .form-group input {
    padding: 13px 48px 13px 15px;
}

.password-strength {
    margin: -3px 0 19px;
}

.strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 11px;
}

.strength-bars span {
    height: 4px;
    border-radius: 99px;
    background: #e5e7eb;
    transition: background-color .2s ease, transform .2s ease;
}

.strength-bars span.is-active {
    transform: scaleY(1.2);
    background: #f59e0b;
}

.strength-bars span.is-active[data-score="3"] {
    background: #22c55e;
}

.strength-bars span.is-active[data-score="4"] {
    background: #10b981;
}

.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 14px;
}

.password-rules span {
    position: relative;
    padding-left: 20px;
    color: #9ca3af;
    font-size: 12px;
    transition: color .2s ease;
}

.password-rules span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 12px;
    height: 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 50%;
}

.password-rules span.is-valid {
    color: #047857;
}

.password-rules span.is-valid::before {
    content: "\2713";
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #10b981;
    color: #fff;
    background: #10b981;
    font-size: 8px;
    font-weight: 800;
}

.confirm-password-group {
    position: relative;
    padding-bottom: 15px;
}

.password-match-message {
    position: absolute;
    left: 2px;
    bottom: -2px;
    font-size: 11px;
    font-weight: 600;
}

.password-match-message.is-valid {
    color: #059669;
}

.password-match-message.is-invalid {
    color: #dc2626;
}

.password-change-footnote {
    margin-top: 15px;
    color: #9ca3af;
    font-size: 11px;
    text-align: center;
}

/* DARK MODE */
.dark body {
    color: #f4f4f5;
    background: #09090b;
    color-scheme: dark;
}

.dark .right-panel {
    background: #18181b;
    box-shadow: -8px 0 32px rgba(0, 0, 0, .32);
}

.dark :is(.login-header h2, #forgotBox .login-header h2, .forgot-success h3) {
    color: #fafafa;
}

.dark :is(.login-header p, #forgotBox .login-header p, .forgot-success p) {
    color: #a1a1aa;
}

.dark .form-group label {
    color: #e4e4e7;
}

.dark .form-group input,
.dark #forgotBox .form-group input {
    color: #f4f4f5;
    background: #27272a;
    border-color: #3f3f46;
}

.dark .form-group input::placeholder,
.dark #forgotBox .form-group input::placeholder {
    color: #71717a;
}

.dark .form-group input:focus,
.dark #forgotBox .form-group input:focus {
    color: #fafafa;
    background: #18181b;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, .14);
}

.dark .toggle-password {
    color: #d4d4d8;
}

.dark .toggle-password:hover {
    background: #3f3f46;
}

.dark .btn-back,
.dark #forgotBox .btn-back {
    color: #a1a1aa;
    background: #27272a;
    border-color: #3f3f46;
}

.dark .btn-back:hover,
.dark #forgotBox .btn-back:hover {
    color: #f4f4f5;
    background: #3f3f46;
    border-color: #52525b;
}

.dark :is(.login-hint, .login-footer, .page-footer, .password-change-footnote) {
    color: #71717a;
}

.dark .password-change-modal {
    color: #f4f4f5;
    background: rgba(24, 24, 27, .98);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
}

.dark .security-badge {
    color: #c4b5fd;
    background: rgba(139, 92, 246, .18);
}

.dark .password-change-heading h2 {
    color: #fafafa;
}

.dark .password-change-heading p {
    color: #a1a1aa;
}

.dark .password-change-error,
.dark .toast {
    color: #fecaca;
    background: rgba(127, 29, 29, .35);
    border-color: #ef4444;
}

.dark .strength-bars span {
    background: #3f3f46;
}

.dark .password-rules span {
    color: #71717a;
}

.dark .password-rules span.is-valid {
    color: #6ee7b7;
}

@keyframes passwordOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes passwordModalIn {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* RESPONSIVE */
@media (max-width: 1024px) {
    .left-panel {
        display: none;
    }

    .right-panel {
        width: 100%;
        box-shadow: none;
    }
}

@media (max-width: 560px) {
    .password-change-overlay {
        align-items: flex-start;
        padding: 12px;
    }

    .password-change-modal {
        margin: 12px 0;
        padding: 24px 20px;
        border-radius: 20px;
    }

    .password-change-heading h2 {
        font-size: 23px;
    }

    .password-rules {
        grid-template-columns: 1fr;
    }
}
