@import url("/assets/css/iranyekan-font-face.css");

:root {
    --betanic-dark: #080a3c;
    --betanic-orange: #ed6d57;
    --betanic-bg: #fbfbf9;
    --betanic-white: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border-color: #e0e4f0;
    --danger-color: #dc3545;
}

* { box-sizing: border-box; font-family: "iranyekan", Tahoma, sans-serif; }

body.betanic-auth-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1100px 600px at 12% -10%, rgba(237, 109, 87, 0.28), transparent 60%),
        radial-gradient(900px 700px at 110% 120%, rgba(20, 26, 94, 0.65), transparent 55%),
        linear-gradient(135deg, var(--betanic-dark) 0%, #10154a 60%, #1b2270 100%);
    padding: 24px;
    direction: rtl;
}

/* ===== پوستهٔ دو‌ستونه ===== */
.auth-shell {
    width: 100%;
    max-width: 1080px;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 460px) 1fr;
    background: var(--betanic-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(8, 10, 60, 0.55);
}

/* ===== ستون فرم (سمت راست) ===== */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 40px;
    overflow-y: auto;
    max-height: 100vh;
}
.auth-panel-inner {
    width: 100%;
    max-width: 340px;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}
.auth-logo img { height: 84px; width: auto; }
.auth-logo .brand-fallback {
    font-size: 22px;
    font-weight: 700;
    color: var(--betanic-dark);
    letter-spacing: 1px;
}
.auth-logo span.tagline { color: var(--text-muted); font-size: 13px; }

.auth-title { font-size: 21px; font-weight: 700; color: var(--betanic-dark); margin: 0 0 6px; text-align: center; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin: 0 0 26px; line-height: 1.7; }

.betanic-field { margin-bottom: 16px; }
.betanic-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.betanic-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    font-size: 14px;
    background: var(--betanic-bg);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.betanic-field input:focus {
    outline: none;
    border-color: var(--betanic-orange);
    box-shadow: 0 0 0 3px rgba(237, 109, 87, .15);
    background: var(--betanic-white);
}
.betanic-field .error-text { color: var(--danger-color); font-size: 12px; margin-top: 6px; }

/* علامتِ چشم برای نمایش/مخفی‌کردن رمز عبور */
.password-field { position: relative; }
.password-field input { padding-left: 42px; }
.password-toggle {
    position: absolute; top: 50%; left: 6px; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: none; background: none; cursor: pointer;
    color: var(--text-muted); font-size: 18px; border-radius: 8px;
}
.password-toggle:hover { color: var(--betanic-dark); background: var(--betanic-bg); }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 13px; }
.auth-row a { color: var(--betanic-orange); text-decoration: none; }
.auth-row label { display: flex; align-items: center; gap: 6px; color: var(--text-muted); cursor: pointer; }

.btn-auth-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--betanic-orange), #e2593f);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(237, 109, 87, 0.6);
    transition: opacity .15s, transform .15s, box-shadow .15s;
}
.btn-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(237, 109, 87, 0.7); }

.auth-alert {
    background: #fdeceb;
    border: 1px solid #f6c9c2;
    color: #a13327;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
}
.auth-alert.success { background: #eaf7ee; border-color: #c6e9cf; color: #1e7a37; }

.auth-footer-link { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 14px; }
.auth-footer-link a { color: var(--betanic-dark); font-weight: 700; text-decoration: none; }

.role-hint {
    display: flex;
    gap: 8px;
    background: var(--betanic-bg);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    align-items: flex-start;
}
.role-hint i { color: var(--betanic-orange); font-size: 16px; }

/* ===== ستون بصری / اسلایدر پوستر (سمت چپ) ===== */
.auth-visual {
    position: relative;
    background: var(--betanic-dark);
    overflow: hidden;
    min-height: 100%;
}

.auth-slider { position: absolute; inset: 0; }
.auth-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .9s ease, transform 6s ease;
    pointer-events: none;
}
.auth-slide.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }
.auth-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-slide-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 60, 0.15) 0%, rgba(8, 10, 60, 0.05) 45%, rgba(8, 10, 60, 0.82) 100%);
}
.auth-slide-caption {
    position: absolute;
    right: 34px;
    left: 34px;
    bottom: 54px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.auth-slide-caption strong { font-size: 22px; font-weight: 700; line-height: 1.5; }
.auth-slide-caption span { font-size: 14px; line-height: 1.9; opacity: 0.92; }

.auth-visual-brand {
    position: absolute;
    top: 26px;
    right: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.auth-visual-brand i { font-size: 20px; color: var(--betanic-orange); }

.auth-slider-dots {
    position: absolute;
    bottom: 24px;
    right: 34px;
    display: flex;
    gap: 8px;
    z-index: 3;
}
.auth-slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background .2s, width .2s;
}
.auth-slider-dot.is-active { background: var(--betanic-orange); width: 26px; border-radius: 5px; }

/* حالت پیش‌فرض بدون پوستر */
.auth-visual-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
        radial-gradient(600px 400px at 80% 10%, rgba(237, 109, 87, 0.35), transparent 60%),
        linear-gradient(160deg, #0a0d45, #161d64);
    overflow: hidden;
}
.avf-content { position: relative; z-index: 2; color: #fff; max-width: 340px; text-align: center; }
.avf-mark {
    width: 64px; height: 64px;
    margin: 0 auto 22px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 32px; color: var(--betanic-orange);
}
.avf-content h2 { margin: 0 0 12px; font-size: 24px; font-weight: 700; }
.avf-content p { margin: 0; font-size: 14px; line-height: 2; opacity: 0.85; }
.avf-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0.5;
}
.avf-shape-1 { width: 240px; height: 240px; background: rgba(237, 109, 87, 0.4); top: -70px; left: -70px; }
.avf-shape-2 { width: 300px; height: 300px; border: 40px solid rgba(255, 255, 255, 0.06); background: transparent; bottom: -120px; right: -110px; filter: none; }

/* ===== واکنش‌گرا ===== */
@media (max-width: 860px) {
    body.betanic-auth-body { padding: 0; align-items: stretch; }
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        max-width: 520px;
        border-radius: 0;
    }
    .auth-visual { display: none; }
    .auth-panel { padding: 40px 26px; }
}

@media (min-width: 861px) and (max-width: 980px) {
    .auth-shell { grid-template-columns: minmax(0, 400px) 1fr; }
}
