@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 400;
    src: url("../font/IRANSansWeb.woff2") format("woff2"),
         url("../font/IRANSansWeb.woff") format("woff");
}
@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 500;
    src: url("../font/IRANSansWeb_Medium.woff2") format("woff2"),
         url("../font/IRANSansWeb_Medium.woff") format("woff");
}
@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 700;
    src: url("../font/IRANSansWeb_Bold.woff2") format("woff2"),
         url("../font/IRANSansWeb_Bold.woff") format("woff");
}

:root {
    --ink: #1c2433;
    --muted: #5c677a;
    --line: #d8dee8;
    --paper: #f4f6f9;
    --card: #ffffff;
    --accent: #435ebe;
    --accent-hover: #364b9c;
    --danger: #b42318;
    --danger-bg: #fff5f4;
    --danger-line: #f0b4ae;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: IRANSans, Tahoma, sans-serif;
    color: var(--ink);
    background: var(--paper);
    direction: rtl;
    text-align: right;
}

.gate {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
}

.brand {
    position: relative;
    overflow: hidden;
    background: #1d2744;
    color: #fff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.scene {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    width: 280px;
    height: 280px;
    top: 12%;
    right: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(142, 162, 230, .7) 0%, rgba(142, 162, 230, 0) 70%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-36px, 48px, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
}

.brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mark {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.brand-kicker {
    margin: 0 0 2px;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    font-weight: 500;
}

.brand h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.3;
}

.form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.panel {
    width: min(420px, 100%);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.panel h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.4;
}

.lede {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid var(--danger-line);
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 14px;
    line-height: 1.7;
}

.alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.control {
    position: relative;
}

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}

.field.secret input {
    padding-left: 48px;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(67, 94, 190, .16);
}

.field input.input-validation-error {
    border-color: var(--danger);
}

.field-validation-error {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 13px;
}

.peek {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.peek:hover,
.peek:focus-visible {
    background: #eef1f6;
    color: var(--ink);
    outline: none;
}

.peek svg { display: block; margin: auto; }
.peek .slash { display: none; }
.peek[aria-pressed="true"] .open { display: none; }
.peek[aria-pressed="true"] .slash { display: block; }

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 20px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.remember input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.submit:hover { background: var(--accent-hover); }
.submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 94, 190, .28);
}

.note {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

@media (max-width: 860px) {
    .gate { grid-template-columns: 1fr; }
    .brand {
        min-height: 0;
        padding: 24px 20px;
        justify-content: center;
    }
    .scene { display: none; }
    .brand h1 { font-size: 22px; }
    .mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 18px; border-radius: 12px; }
    .form-side { padding: 28px 20px 40px; align-items: flex-start; }
}
