/* Auth pages — sign_in + cooperator_sign_in */

.auth-page {
    --auth-blue: #3b82f6;
    --auth-indigo: #6366f1;
    --auth-purple: #7c3aed;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-line: rgba(148, 163, 184, 0.35);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    font-family: iransans, yekan, Tahoma, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(ellipse 70% 50% at 100% 0%, rgba(99, 102, 241, 0.18), transparent 55%),
        radial-gradient(ellipse 55% 45% at 0% 100%, rgba(59, 130, 246, 0.14), transparent 50%),
        linear-gradient(165deg, #f1f5f9 0%, #eef2ff 45%, #f8fafc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    box-sizing: border-box;
}

.auth-page a { text-decoration: none !important; }

.auth-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: #fff;
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.auth-aside {
    position: relative;
    padding: 40px 32px;
    color: #e2e8f0;
    background:
        radial-gradient(ellipse 80% 70% at 0% 0%, rgba(99, 102, 241, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(59, 130, 246, 0.28), transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #1e1b4b 120%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.auth-aside-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    transition: transform .15s ease, box-shadow .15s ease;
}

.auth-aside-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
}

.auth-aside-logo img {
    display: block;
    max-width: 168px;
    max-height: 52px;
    width: auto;
    height: auto;
}

.auth-aside-brand {
    font-family: yekan, iransans;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.auth-aside-brand span {
    color: #a5b4fc;
}

.auth-aside-title {
    margin: 0 0 10px;
    font-family: yekan, iransans;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

.auth-aside-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #cbd5e1;
}

.auth-aside-list {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.auth-aside-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    color: #e2e8f0;
}

.auth-aside-list i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.25);
    color: #c4b5fd;
    font-size: 12px;
}

.auth-panel {
    padding: 36px 34px 28px;
    background: #fff;
}

.auth-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    font-family: yekan, iransans;
}

.auth-panel-title {
    margin: 0 0 6px;
    font-family: yekan, iransans;
    font-size: 26px;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-panel-sub {
    margin: 0 0 22px;
    font-size: 13px;
    color: var(--auth-muted);
    line-height: 1.8;
}

.auth-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.8;
}

.auth-field {
    margin-bottom: 14px;
}

.auth-label {
    display: block;
    margin-bottom: 6px;
    font-family: yekan, iransans;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-family: arial, iransans, sans-serif;
    font-size: 14px;
    direction: ltr;
    text-align: left;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-input:focus {
    background: #fff;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-error {
    min-height: 18px;
    margin-top: 6px;
    color: #dc2626;
    font-size: 12px;
    direction: rtl;
    text-align: right;
}

.auth-captcha-note {
    margin: 8px 0 8px;
    font-size: 12px;
    color: var(--auth-muted);
    line-height: 1.7;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: yekan, iransans;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 55%, #7c3aed 100%);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
    transition: filter .15s ease, box-shadow .15s ease, transform .12s ease;
}

.auth-submit:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.42);
    color: #fff !important;
}

.auth-submit:active {
    transform: scale(0.985);
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.auth-links a {
    color: #475569 !important;
    font-size: 13px;
    font-family: yekan, iransans;
    transition: color .15s ease;
}

.auth-links a:hover {
    color: #4f46e5 !important;
}

.auth-links a i {
    margin-left: 4px;
    color: #818cf8;
    font-size: 11px;
}

.auth-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #334155;
    font-size: 13px;
    line-height: 1.8;
}

.auth-banner a {
    color: #4338ca !important;
    font-weight: 700;
}

.auth-page .realperson-challenge,
.auth-page .realperson-text,
.auth-page #defaultReal {
    direction: ltr !important;
    unicode-bidi: isolate;
    text-align: left;
}

.auth-page .realperson-challenge {
    margin-bottom: 8px;
}

.auth-page .realperson-regen {
    direction: rtl;
    text-align: right;
    display: inline-block;
    width: 100%;
}

.auth-rules {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--auth-line);
    direction: rtl;
    text-align: right;
    line-height: 1.9;
    font-size: 13px;
    color: #475569;
}

.auth-rules input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.auth-rules input[type="checkbox"] + label {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 4px 0 0;
    border-radius: 7px;
    border: 2px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-rules input[type="checkbox"]:checked + label {
    border-color: transparent;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 55%, #7c3aed 100%);
}

.auth-rules input[type="checkbox"]:checked + label::after {
    content: "";
    width: 6px;
    height: 10px;
    margin-top: -1px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-rules-text {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-rules-text a {
    color: #4338ca !important;
    font-weight: 700;
}

.auth-code-input {
    width: 100%;
    height: 56px;
    padding: 0 12px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-family: arial, iransans, sans-serif;
    font-size: 28px;
    letter-spacing: 10px;
    text-align: center;
    direction: ltr;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-code-input:focus {
    background: #fff;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-timer {
    margin-top: 18px;
    text-align: center;
    direction: ltr;
    font-family: iransans, yekan;
    font-size: 18px;
    color: #334155;
}

.auth-timer #min,
.auth-timer #sec {
    display: inline-block;
    min-width: 22px;
    color: #4f46e5;
    font-weight: 700;
}

.auth-timer-label {
    font-size: 13px;
    color: var(--auth-muted);
    margin-left: 4px;
}

.auth-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(59, 130, 246, 0.12));
    color: #16a34a;
    font-size: 34px;
}

.auth-status-icon.is-warn {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(99, 102, 241, 0.1));
    color: #d97706;
}

.auth-status-icon.is-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(99, 102, 241, 0.08));
    color: #dc2626;
}

.auth-msg {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.9;
    color: #334155;
    text-align: center;
}

.auth-msg.ok {
    color: #15803d;
}

.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

a.auth-submit {
    text-decoration: none !important;
}

.auth-submit.secondary {
    background: #fff;
    color: #4338ca !important;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: none;
}

.auth-submit.secondary:hover {
    background: #eef2ff;
    color: #3730a3 !important;
    filter: none;
}

.auth-note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--auth-line);
    color: #475569;
    font-size: 13px;
    line-height: 1.9;
    text-align: center;
}

@media screen and (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .auth-aside {
        padding: 24px 22px;
        min-height: auto;
    }

    .auth-aside-title {
        font-size: 22px;
    }

    .auth-aside-list {
        display: none;
    }

    .auth-panel {
        padding: 26px 20px 22px;
    }

    .auth-panel-title {
        font-size: 22px;
    }
}
