/* css/login.css */

/* ========== LOGIN DEĞİŞKENLERİ ========== */
:root{
    --login-bg:#eef2f7;
    --login-panel:#ffffff;
    --login-text:#0f172a;
    --login-muted:#64748b;
    --login-border:rgba(15,23,42,.10);
    --login-shadow:0 24px 60px rgba(15,23,42,.14), 0 3px 12px rgba(15,23,42,.08);

    --login-top-from:#252b31;
    --login-top-to:#11161b;

    --login-red:#d91f2a;
    --login-red-dark:#b71c2b;
    --login-red-soft:rgba(217,31,42,.12);

    --login-field-border:#d7dee8;
    --login-field-focus:rgba(217,31,42,.20);
    --login-field-height:54px;

    --login-card-width:min(520px, 92vw);
    --login-form-width:360px;
}

/* ========== TEMEL ========== */
*{
    box-sizing:border-box;
}

html,
body{
    height:100%;
}

body{
    margin:0;
    color:var(--login-text);
    font-family:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size:14px;
    line-height:1.5;
    background:
            radial-gradient(900px 480px at 50% -10%, rgba(217,31,42,.14) 0%, transparent 68%),
            radial-gradient(720px 440px at 12% 88%, rgba(15,23,42,.12) 0%, transparent 70%),
            linear-gradient(180deg, #eef2f7, #f8fafc 62%, #f1f5f9);
}

/* ========== SAYFA ========== */
.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:38px clamp(18px, 5vw, 60px);
    position:relative;
    overflow:hidden;
}

@supports (height:100svh){
    .login-page{
        min-height:100svh;
    }
}

.login-bg-shape{
    position:absolute;
    border-radius:999px;
    pointer-events:none;
    filter:blur(3px);
    opacity:.85;
}

.login-bg-shape-one{
    width:420px;
    height:420px;
    right:-160px;
    top:-160px;
    background:rgba(217,31,42,.12);
}

.login-bg-shape-two{
    width:360px;
    height:360px;
    left:-140px;
    bottom:-140px;
    background:rgba(15,23,42,.10);
}

.login-bg-grid{
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.34;
    background-image:
            linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
            linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px);
    background-size:42px 42px;
    mask-image:radial-gradient(circle at center, black 0%, transparent 68%);
}

/* ========== KART ========== */
.login-card{
    width:var(--login-card-width);
    min-height:610px;
    background:var(--login-panel);
    border:1px solid var(--login-border);
    border-radius:22px;
    box-shadow:var(--login-shadow);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    position:relative;
    z-index:2;
}

/* ========== ÜST ŞERİT ========== */
.login-titlebar{
    height:82px;
    flex-shrink:0;
    background:
            linear-gradient(135deg, rgba(217,31,42,.18), transparent 42%),
            linear-gradient(180deg, var(--login-top-from), var(--login-top-to));
    color:#ffffff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:0 clamp(16px, 2.5vw, 22px);
    border-bottom:1px solid rgba(255,255,255,.12);
}

.login-brand{
    display:flex;
    align-items:center;
    gap:13px;
    min-width:0;
}

.login-brand-logo{
    width:50px;
    height:50px;
    border-radius:15px;
    background:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:6px;
    box-shadow:
            inset 0 0 0 1px rgba(15,23,42,.08),
            0 10px 18px rgba(0,0,0,.20);
    flex-shrink:0;
}

.login-brand-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

.login-brand-text{
    min-width:0;
    line-height:1.16;
}

.login-brand-name{
    font-weight:900;
    font-size:15px;
    letter-spacing:-.18px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.login-brand-sub{
    margin-top:4px;
    opacity:.84;
    font-size:12px;
    font-weight:500;
    letter-spacing:-.05px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.login-version{
    font-size:11px;
    font-weight:700;
    padding:6px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.22);
    white-space:nowrap;
}

/* ========== İÇERİK ========== */
.login-content{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    padding:28px 24px 48px;
    background:
            radial-gradient(260px 260px at 86% 18%, rgba(239,246,255,.95) 0%, transparent 70%),
            radial-gradient(260px 260px at 12% 88%, rgba(254,242,242,.95) 0%, transparent 70%);
    overflow:auto;
}

.login-logo-area{
    width:var(--login-form-width);
    max-width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 auto 18px;
    padding:12px 18px;
    border-radius:18px;
    background:linear-gradient(180deg, #ffffff, #f8fafc);
    border:1px solid rgba(15,23,42,.08);
    box-shadow:0 8px 20px rgba(15,23,42,.06);
}

.login-main-logo{
    max-width:250px;
    width:100%;
    height:auto;
    max-height:86px;
    object-fit:contain;
    display:block;
}

.login-panel{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.login-headline{
    margin:0 0 8px;
    text-align:center;
    color:#0f172a;
    font-weight:900;
    letter-spacing:-.45px;
    font-size:21px;
}

.login-caption{
    width:var(--login-form-width);
    max-width:100%;
    color:#64748b;
    font-size:13px;
    font-weight:500;
    margin:0 0 18px;
    text-align:center;
}

/* ========== FORM ========== */
.login-form{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.login-field{
    background:#ffffff;
    border:1px solid var(--login-field-border);
    border-radius:13px;
    height:var(--login-field-height);
    display:flex;
    align-items:center;
    padding:0 13px;
    margin:0 auto 12px;
    width:var(--login-form-width);
    max-width:100%;
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.45),
            0 1px 3px rgba(15,23,42,.05);
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.login-field:focus-within{
    border-color:var(--login-red);
    box-shadow:
            0 0 0 4px var(--login-field-focus),
            0 8px 18px rgba(15,23,42,.06);
}

.login-field-icon{
    width:22px;
    color:#94a3b8;
    font-weight:800;
    font-size:14px;
    display:inline-flex;
    justify-content:flex-start;
    flex-shrink:0;
}

.login-field-dot{
    font-size:10px;
}

.login-field input{
    border:0;
    outline:0;
    background:transparent;
    width:100%;
    height:100%;
    font-size:14px;
    font-weight:600;
    color:#111827;
    font-family:inherit;
}

.login-field input::placeholder{
    color:#9ca3af;
    font-weight:500;
}

.login-password-toggle{
    border:0;
    background:transparent;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    color:#64748b;
    user-select:none;
    padding:7px 0 7px 12px;
    white-space:nowrap;
    font-family:inherit;
}

.login-password-toggle:hover{
    color:var(--login-red);
}

/* ========== SATIR ========== */
.login-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    width:var(--login-form-width);
    max-width:100%;
    margin:4px auto 0;
}

.login-remember{
    display:flex;
    align-items:center;
    gap:8px;
    color:#374151;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    user-select:none;
}

.login-remember input{
    width:17px;
    height:17px;
    accent-color:var(--login-red);
}

.login-forgot{
    font-size:13px;
    color:var(--login-red);
    text-decoration:none;
    font-weight:700;
    white-space:nowrap;
}

.login-forgot:hover{
    text-decoration:underline;
}

/* ========== BUTON ========== */
.login-actions{
    width:var(--login-form-width);
    max-width:100%;
    margin:16px auto 0;
}

.login-submit{
    width:100%;
    height:54px;
    border:0;
    border-radius:13px;
    background:linear-gradient(180deg, var(--login-red), var(--login-red-dark));
    color:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:900;
    letter-spacing:.05px;
    cursor:pointer;
    user-select:none;
    box-shadow:
            0 10px 20px rgba(217,31,42,.24),
            0 2px 5px rgba(15,23,42,.12);
    transition:transform .08s ease, filter .16s ease, box-shadow .16s ease;
    font-family:inherit;
}

.login-submit:hover{
    filter:brightness(1.04);
    box-shadow:
            0 14px 24px rgba(217,31,42,.28),
            0 2px 5px rgba(15,23,42,.12);
}

.login-submit:active{
    transform:translateY(1px);
}

/* ========== BİLGİ / HATA ========== */
.login-error{
    width:var(--login-form-width);
    max-width:100%;
    margin-top:12px;
    color:#b91c1c;
    background:#fef2f2;
    border:1px solid #fecaca;
    border-radius:10px;
    padding:10px 12px;
    font-weight:700;
    font-size:13px;
    text-align:center;
}

.login-status{
    width:var(--login-form-width);
    max-width:100%;
    margin-top:12px;
    color:#065f46;
    background:#ecfdf5;
    border:1px solid #a7f3d0;
    border-radius:10px;
    padding:10px 12px;
    font-weight:700;
    font-size:13px;
    text-align:center;
}

.login-info{
    width:var(--login-form-width);
    max-width:100%;
    margin-top:13px;
    color:#64748b;
    font-size:12px;
    font-weight:500;
    text-align:center;
}

/* ========== FOOTER ========== */
.login-footer{
    position:absolute;
    left:0;
    right:0;
    bottom:11px;
    text-align:center;
    font-size:12px;
    font-weight:500;
    color:#64748b;
    padding:0 18px;
}

/* ========== MOBİL ========== */
@media (max-width:520px){
    :root{
        --login-card-width:94vw;
    }

    .login-card{
        min-height:600px;
    }
}

@media (max-width:420px){
    :root{
        --login-form-width:300px;
    }

    .login-page{
        padding:20px 12px;
    }

    .login-titlebar{
        height:74px;
    }

    .login-brand-logo{
        width:44px;
        height:44px;
        border-radius:13px;
    }

    .login-brand-name{
        font-size:14px;
    }

    .login-brand-sub{
        font-size:11px;
    }

    .login-version{
        display:none;
    }

    .login-content{
        padding:24px 18px 46px;
    }

    .login-logo-area{
        padding:10px 14px;
        margin-bottom:16px;
    }

    .login-main-logo{
        max-width:225px;
        max-height:78px;
    }

    .login-headline{
        font-size:19px;
    }

    .login-field,
    .login-submit{
        height:52px;
    }
}

@media (max-width:360px){
    :root{
        --login-form-width:280px;
    }

    .login-field input{
        font-size:14px;
    }

    .login-row{
        align-items:flex-start;
        flex-direction:column;
        gap:8px;
    }
}

@media (max-width:320px){
    :root{
        --login-form-width:262px;
    }

    .login-field,
    .login-submit{
        height:49px;
    }
}