@font-face {
    font-family: "Artin Persian";
    src: url("/assets/fonts/b-nazanin.ttf") format("truetype");
    font-display: swap;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.artin-login-preview {
    margin: 0;
    background: #8bc6ea;
    color: #111827;
    font-family: "Artin Persian", Tahoma, Arial, sans-serif;
}

.login-scene {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background-color: #a9d8f2;
    background-image: url("/assets/images/login/artin-login-clean-16x9-v1.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-panel {
    position: absolute;
    z-index: 1;
    top: 18%;
    right: 2.5%;
    width: min(29.4vw, 452px);
    min-width: 370px;
    min-height: 61%;
    padding: clamp(28px, 3.1vh, 42px) 31px 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(239,248,255,.55), rgba(245,247,248,.36));
    box-shadow: 0 16px 40px rgba(34, 58, 73, .18), inset 0 1px 1px rgba(255,255,255,.72);
    -webkit-backdrop-filter: blur(16px) saturate(115%);
    backdrop-filter: blur(16px) saturate(115%);
}

.login-logo {
    width: clamp(84px, 7vw, 108px);
    height: clamp(109px, 9.1vw, 140px);
    margin: 0 auto clamp(8px, 1.2vh, 15px);
    object-fit: contain;
}

.login-panel h1 {
    margin: 0 0 clamp(24px, 4vh, 42px);
    text-align: center;
    color: #101820;
    font-size: clamp(23px, 1.95vw, 31px);
    font-weight: 700;
    line-height: 1.4;
}

.login-form { display: grid; gap: 15px; }

.input-shell {
    height: 65px;
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 12px;
    background: #f4f7fb;
    box-shadow: 0 5px 14px rgba(36,53,63,.07);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
    border-color: rgba(20,112,246,.72);
    background: #f4f7fb;
    box-shadow: 0 0 0 3px rgba(20,112,246,.13), 0 7px 18px rgba(36,53,63,.1);
}

.input-shell svg {
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    fill: none;
    stroke: #18212a;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-shell input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #17212c;
    direction: rtl;
    text-align: left;
    font: 22px/1 "Artin Persian", Tahoma, sans-serif;
}

.input-shell input::placeholder { color: #4c5762; opacity: 1; }

.input-shell input:-webkit-autofill,
.input-shell input:-webkit-autofill:hover,
.input-shell input:-webkit-autofill:focus,
.input-shell input:-webkit-autofill:active {
    -webkit-text-fill-color: #17212c;
    caret-color: #17212c;
    background-color: #f4f7fb !important;
    -webkit-box-shadow: 0 0 0 1000px #f4f7fb inset !important;
    box-shadow: 0 0 0 1000px #f4f7fb inset !important;
    transition: background-color 9999s ease-out 0s;
}

.login-form button {
    position: relative;
    height: 66px;
    margin-top: 9px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(105deg, #1888fa, #056cf5);
    box-shadow: 0 12px 24px rgba(0,105,245,.28);
    color: #fff;
    cursor: pointer;
    font: 700 25px/1 "Artin Persian", Tahoma, sans-serif;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.login-form button:hover { filter: brightness(1.06); box-shadow: 0 14px 28px rgba(0,105,245,.34); }
.login-form button:active { transform: translateY(1px); }
.login-form button:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 3px; }

.login-form button svg {
    position: absolute;
    top: 50%;
    right: 42%;
    width: 29px;
    height: 29px;
    transform: translate(72px, -50%);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-error {
    margin: -25px 0 14px;
    padding: 9px 13px;
    border: 1px solid rgba(185,28,28,.2);
    border-radius: 10px;
    background: rgba(254,226,226,.88);
    color: #991b1b;
    text-align: center;
    font-size: 18px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .login-scene { background-position: 39% center; }
    .login-panel {
        top: 50%;
        right: 50%;
        width: min(88vw, 440px);
        min-width: 0;
        min-height: 0;
        max-height: calc(100svh - 24px);
        overflow-y: auto;
        padding: 28px 24px 26px;
        transform: translate(50%, -50%);
        border-radius: 25px;
    }
    .login-panel h1 { margin-bottom: 24px; }
    .login-logo { width: 92px; height: 119px; margin-bottom: 6px; }
    .input-shell { min-height: 48px; }
    .input-shell input { font-size: 16px; }
    .login-form button { min-height: 48px; }
}

@media (max-width: 480px) {
    .login-scene { background-position: 37% center; }
    .login-panel { width: calc(100vw - 20px); padding: 22px 18px 20px; }
    .login-logo { width: 76px; height: 99px; }
    .login-panel h1 { font-size: 22px; margin-bottom: 20px; }
    .input-shell, .login-form button { height: 58px; }
    .input-shell input { font-size: 20px; }
    .login-form button { font-size: 23px; }
}

@media (max-width: 480px) and (max-height: 680px) {
    .login-panel { padding: 14px 16px; }
    .login-logo { width: 58px; height: 75px; margin-bottom: 2px; }
    .login-panel h1 { margin-bottom: 12px; font-size: 20px; }
    .login-form { gap: 10px; }
    .input-shell, .login-form button { height: 51px; }
    .login-form button { margin-top: 3px; }
    .login-error { margin: -7px 0 9px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
