@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSans.ttf') format('truetype');
    font-display: swap;
}

:root {
    --auth-ink: #123047;
    --auth-muted: #687b8b;
    --auth-line: #dbe6ec;
    --auth-primary: #087f8c;
    --auth-primary-dark: #075978;
    --auth-danger: #a53434;
    --auth-success: #176b50;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body {
    min-height: 100vh;
    font-family: 'IRANSans', Tahoma, sans-serif;
    color: var(--auth-ink);
    background: #0c4660;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(4, 45, 67, .92), rgba(5, 102, 112, .75)),
        var(--auth-background) center/cover no-repeat;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    inset: -190px auto auto -130px;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 28px 80px rgba(0, 28, 45, .35);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--auth-line);
}

.auth-brand img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(9, 103, 116, .18);
}

.auth-brand strong { display: block; font-size: 16px; line-height: 1.8; }
.auth-brand small { color: var(--auth-muted); font-size: 11px; }

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 26px;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--auth-primary-dark);
    background: #e9f6f6;
    font-size: 11px;
}

.auth-card h1 { margin: 13px 0 8px; font-size: 27px; line-height: 1.6; }
.auth-intro { margin: 0 0 25px; color: var(--auth-muted); font-size: 13px; line-height: 2; }
.auth-label { display: block; margin: 0 0 9px; font-size: 12px; font-weight: 700; }
.auth-field-group { margin-bottom: 17px; }

.auth-input {
    width: 100%;
    height: 56px;
    border: 1px solid #cddce4;
    border-radius: 14px;
    outline: none;
    padding: 0 16px;
    color: var(--auth-ink);
    background: #f9fbfc;
    font: 13px 'IRANSans', Tahoma, sans-serif;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 127, 140, .13);
}

.auth-code-input {
    font-family: Tahoma, sans-serif;
    font-size: 25px;
    letter-spacing: 8px;
    text-align: center;
    direction: ltr;
}

.auth-captcha {
    padding: 12px;
    border: 1px solid #d8e4ea;
    border-radius: 14px;
    background: #f7fafb;
}

.auth-captcha input[type='text'] {
    width: 100% !important;
    height: 46px !important;
    margin-top: 10px !important;
    border: 1px solid #cddce4 !important;
    border-radius: 10px !important;
    outline: 0;
    background: #fff !important;
    font: 18px Tahoma, sans-serif !important;
    text-align: center;
}

.auth-captcha img { max-width: 100%; height: auto !important; border-radius: 9px; }

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 18px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(110deg, var(--auth-primary-dark), var(--auth-primary));
    box-shadow: 0 12px 25px rgba(7, 89, 120, .22);
    font: 700 13px 'IRANSans', Tahoma, sans-serif;
    cursor: pointer;
}

.auth-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(8, 127, 140, .25); outline-offset: 3px; }

.auth-alert {
    display: block;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.8;
}

.auth-alert-error { border: 1px solid #f0caca; color: var(--auth-danger); background: #fff4f4; }
.auth-alert-success { border: 1px solid #bde2d2; color: var(--auth-success); background: #f0fbf6; }

.auth-note {
    display: flex;
    gap: 10px;
    margin: 20px 0 0;
    padding: 14px;
    border-radius: 12px;
    color: #567080;
    background: #f4f8fa;
    font-size: 11px;
    line-height: 1.9;
}

.auth-note i { color: var(--auth-primary); margin-top: 4px; }
.auth-back { display: block; margin-top: 20px; color: var(--auth-primary-dark); text-align: center; font-size: 12px; text-decoration: none; }
.auth-back:hover { text-decoration: underline; }
.auth-back:focus-visible { outline: 3px solid rgba(8, 127, 140, .25); outline-offset: 5px; border-radius: 4px; }

.auth-submit:disabled,
.auth-submit[aria-disabled='true'] {
    cursor: not-allowed;
    filter: grayscale(.2);
    opacity: .68;
    transform: none;
}

@media (max-width: 540px) {
    .auth-page { padding: 0; place-items: stretch; background: #f6fafb; }
    .auth-card { width: 100%; min-height: 100vh; padding: 28px 18px; border: 0; border-radius: 0; box-shadow: none; }
    .auth-card h1 { font-size: 23px; }
}

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