/* صفحه‌ی ورود سامانه (app/views/adminto/auth/login.tpl).

   صفحه‌ی مستقلی است و به core.css و bootstrap وابسته نیست؛ فقط فونت ایران‌سنس
   تم adminto را برمی‌دارد. دو ستون: فرم ورود، و ستونی تیره برای کسی که
   اشتباهی به اینجا رسیده (مشتری‌ای که دنبال استعلام گارانتی است) یا برای ورود
   کمک لازم دارد. زیر ۹۰۰ پیکسل ستون دوم زیر فرم می‌رود. */

@font-face {
    font-family: ntfiran;
    font-style: normal;
    font-display: swap;
    src: url('../fonts/IRANSansWeb.woff2') format('woff2'),
         url('../fonts/IRANSansWeb.woff') format('woff'),
         url('../fonts/IRANSansWeb.ttf') format('truetype');
}

.ntf-login {
    --blue: #2f5cff;
    --blue-dark: #1b3fd4;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --field: #f8fafc;
    --bg: #f1f5f9;
    --panel: #0b1226;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --ok: #047857;
    --ok-bg: #ecfdf5;
}

.ntf-login *,
.ntf-login *::before,
.ntf-login *::after {
    box-sizing: border-box;
}

html,
body.ntf-login {
    height: 100%;
}

body.ntf-login {
    margin: 0;
    font-family: ntfiran, Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.ntf-login a {
    color: var(--blue);
    text-decoration: none;
}

.ntf-login a:hover {
    text-decoration: underline;
}

.ntf-login .ltr {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ---------- چیدمان ---------- */

.lg-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    min-height: 100vh;
}

.lg-main {
    display: flex;
    flex-direction: column;
    padding: 28px 40px;
}

.lg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lg-top img {
    display: block;
    height: 48px;
    width: auto;
}

.lg-top-link {
    font-size: 13px;
    color: var(--muted) !important;
}

.lg-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.lg-card {
    width: 100%;
    max-width: 400px;
}

.lg-card h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}

.lg-sub {
    margin: 0 0 28px;
    color: var(--muted);
}

.lg-foot {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- پیام‌ها ---------- */

.lg-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 13px;
}

.lg-alert svg {
    flex: none;
    margin-top: 3px;
}

.lg-alert p {
    margin: 0;
}

.lg-alert--error {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #fecaca;
}

.lg-alert--ok {
    color: var(--ok);
    background: var(--ok-bg);
    border-color: #a7f3d0;
}

/* ---------- فیلدها ---------- */

.lg-field {
    margin-bottom: 18px;
}

.lg-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.lg-input {
    position: relative;
}

.lg-input > svg {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.lg-input input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 44px 0 14px;
    font: inherit;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--ink);
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.lg-input input.has-toggle {
    padding-left: 48px;
}

.lg-input input::placeholder {
    color: #b6c0cd;
    letter-spacing: 0;
}

.lg-input input:focus {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47, 92, 255, 0.18);
}

.lg-input input[aria-invalid="true"] {
    border-color: #f87171;
}

.lg-toggle {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #64748b;
    background: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.lg-toggle:hover {
    color: var(--ink);
    background: #eef2f7;
}

.lg-toggle:focus-visible {
    outline: 2px solid var(--blue);
}

.lg-toggle .i-hide,
.lg-toggle[aria-pressed="true"] .i-show {
    display: none;
}

.lg-toggle[aria-pressed="true"] .i-hide {
    display: block;
}

.lg-hint {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #b45309;
}

.lg-hint.is-on {
    display: block;
}

.lg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 24px;
}

.lg-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.lg-check input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--blue);
}

.lg-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--blue);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.lg-submit:hover {
    background: var(--blue-dark);
}

.lg-submit:focus-visible {
    outline: 3px solid rgba(47, 92, 255, 0.35);
    outline-offset: 2px;
}

.lg-submit[disabled] {
    cursor: progress;
    opacity: 0.85;
}

.lg-spin {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lg-spin 0.7s linear infinite;
}

.lg-submit[disabled] .lg-spin {
    display: block;
}

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

/* ---------- ستون کناری ---------- */

.lg-side {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 40px 36px;
    color: #cbd5e1;
    background: var(--panel);
}

.lg-side h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.lg-side p {
    margin: 0;
    font-size: 13px;
}

.lg-side-block + .lg-side-block {
    padding-top: 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.lg-side-intro {
    margin-top: auto;
}

.lg-side-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    transition: background 0.15s, border-color 0.15s;
}

.lg-side-btn:hover {
    text-decoration: none !important;
    background: var(--blue);
    border-color: var(--blue);
}

.lg-contact {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.lg-contact li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.lg-contact li:last-child {
    border-bottom: 0;
}

.lg-contact a {
    color: #fff !important;
    font-weight: 700;
}

.lg-side-last {
    margin-bottom: auto;
}

/* ---------- موبایل ---------- */

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

    .lg-main {
        padding: 20px 16px;
        min-height: auto;
    }

    .lg-center {
        padding: 24px 0 32px;
    }

    .lg-foot {
        display: none;
    }

    .lg-side {
        padding: 28px 16px;
    }

    .lg-side-intro {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ntf-login * {
        transition: none !important;
        animation-duration: 0s !important;
    }
}

/* نشانی بلند است؛ برچسب بالا و متن زیرش */
.lg-contact li.lg-contact-addr {
    flex-direction: column;
    gap: 2px;
}

.lg-contact-addr span + span {
    color: #fff;
}
