@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* EDP auth Persian font enforcement */
html,
body,
input,
button,
textarea,
select,
.edp-auth-body,
.edp-auth-card,
.edp-auth-card *,
.edp-auth-intro,
.edp-auth-intro * {
    font-family: Vazirmatn, Tahoma, Arial, sans-serif !important;
}
:root {
    --edp-auth-bg: #f8fafc;
    --edp-auth-text: #0f172a;
    --edp-auth-muted: #64748b;
    --edp-auth-border: #e5e7eb;
    --edp-auth-blue: #2563eb;
    --edp-auth-blue-dark: #1d4ed8;
    --edp-auth-card: #ffffff;
}

* {
    box-sizing: border-box;
}

body.edp-auth-body {
    margin: 0;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.13), transparent 30%),
        radial-gradient(circle at bottom left, rgba(15,23,42,.08), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    color: var(--edp-auth-text);
    min-height: 100vh;
}

.edp-auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.edp-auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 22px;
    align-items: stretch;
}

.edp-auth-intro {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border-radius: 36px;
    padding: 34px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255,255,255,.20), transparent 27%),
        radial-gradient(circle at 80% 75%, rgba(96,165,250,.24), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.edp-auth-intro::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 70px;
    transform: rotate(18deg);
    left: -70px;
    bottom: -70px;
}

.edp-auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.edp-auth-logo {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.edp-auth-logo img {
    max-width: 82%;
    max-height: 82%;
    object-fit: contain;
}

.edp-auth-brand-text strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.4px;
}

.edp-auth-brand-text span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,.76);
}

.edp-auth-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.edp-auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.86);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.edp-auth-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.55;
    letter-spacing: -1.5px;
}

.edp-auth-copy p {
    margin: 0;
    color: rgba(255,255,255,.78);
    line-height: 2.15;
    font-size: 14px;
}

.edp-auth-steps {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.edp-auth-step {
    min-height: 108px;
    border-radius: 22px;
    padding: 14px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(12px);
}

.edp-auth-step b {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.edp-auth-step small {
    display: block;
    color: rgba(255,255,255,.72);
    line-height: 1.8;
    font-size: 11px;
}

.edp-auth-card-wrap {
    min-height: 620px;
    border-radius: 36px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(226,232,240,.95);
    box-shadow: 0 28px 80px rgba(15, 23, 42, .10);
    backdrop-filter: blur(20px);
    padding: 24px;
    display: grid;
    align-items: center;
}

.edp-auth-card {
    background: var(--edp-auth-card);
    border: 1px solid var(--edp-auth-border);
    border-radius: 30px;
    padding: 28px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .07);
}

.edp-auth-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.6;
    color: #0f172a;
    letter-spacing: -.7px;
}

.edp-auth-card > p {
    margin: 0 0 22px;
    color: var(--edp-auth-muted);
    line-height: 2;
    font-size: 13px;
}

.edp-auth-alert {
    border-radius: 18px;
    padding: 13px 14px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 2;
}

.edp-auth-alert.success {
    background: #dcfce7;
    color: #166534;
}

.edp-auth-alert.danger {
    background: #fee2e2;
    color: #991b1b;
}

.edp-auth-errors {
    margin: 0;
    padding-right: 18px;
}

.edp-auth-form {
    display: grid;
    gap: 14px;
}

.edp-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.edp-auth-field {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.edp-auth-field input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    padding: 0 14px;
    font: inherit;
    outline: none;
    transition: .18s ease;
}

.edp-auth-field input:focus {
    border-color: rgba(37,99,235,.55);
    box-shadow: 0 0 0 4px rgba(37,99,235,.09);
}

.edp-auth-field small {
    color: #64748b;
    font-weight: 400;
    line-height: 1.8;
}

.edp-auth-checkline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
}

.edp-auth-checkline label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.edp-auth-checkline a,
.edp-auth-link {
    color: var(--edp-auth-blue-dark);
    text-decoration: none;
    font-weight: 800;
}

.edp-auth-submit {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37,99,235,.24);
}

.edp-auth-submit.secondary {
    background: #0f172a;
    box-shadow: 0 16px 34px rgba(15,23,42,.18);
}

.edp-auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    color: #94a3b8;
    font-size: 12px;
    margin: 5px 0;
}

.edp-auth-divider::before,
.edp-auth-divider::after {
    content: "";
    height: 1px;
    background: #e5e7eb;
}

.edp-auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.edp-auth-action-link {
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.edp-auth-footer-note {
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
    line-height: 2;
    text-align: center;
}

.edp-auth-footer-note a {
    color: #1d4ed8;
    font-weight: 900;
    text-decoration: none;
}

.edp-auth-otp-code {
    letter-spacing: 8px;
    text-align: center;
    direction: ltr;
    font-size: 24px !important;
    font-weight: 900 !important;
}

@media (max-width: 980px) {
    .edp-auth-shell {
        grid-template-columns: 1fr;
    }

    .edp-auth-intro,
    .edp-auth-card-wrap {
        min-height: auto;
    }

    .edp-auth-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .edp-auth-page {
        padding: 14px;
    }

    .edp-auth-intro,
    .edp-auth-card-wrap,
    .edp-auth-card {
        border-radius: 24px;
        padding: 20px;
    }

    .edp-auth-grid {
        grid-template-columns: 1fr;
    }

    .edp-auth-checkline {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* EDP OTP timer */
.edp-auth-timer {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(37, 99, 235, .08);
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.edp-auth-timer strong {
    font-size: 16px;
    color: #2563eb;
}

.edp-auth-timer-muted {
    background: rgba(100, 116, 139, .10);
    color: #475569;
}

.edp-auth-timer .is-expired {
    color: #dc2626;
}

/* Auth top-right logo badge */
.edp-auth-side-brand-logo,
.edp-auth-side-logo img,
.edp-auth-brand-badge img,
.edp-auth-side-panel img[src*="ehsami-auth-badge.png"] {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* اگر لوگو داخل یک باکس گرد/مربعی کوچک است */
.edp-auth-side-logo,
.edp-auth-brand-badge,
.edp-auth-side-panel .brand-badge,
.edp-auth-side-panel .logo-badge {
    width: 88px !important;
    height: 88px !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

/* اگر تگ img مستقیم داخل هدر باکس سمت راست است */
.edp-auth-hero-top img[src*="ehsami-auth-badge.png"],
.edp-auth-side-panel-top img[src*="ehsami-auth-badge.png"] {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain !important;
}


/* EDP auth badge logo replacement */
.edp-auth-side img[src*="ehsami-auth-badge.png"],
.edp-auth-panel img[src*="ehsami-auth-badge.png"],
.edp-auth-brand img[src*="ehsami-auth-badge.png"],
.edp-auth-layout img[src*="ehsami-auth-badge.png"],
img[src*="ehsami-auth-badge.png"] {
    width: 78px !important;
    height: 78px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Auth logo badge box */
.edp-auth-side .edp-auth-logo,
.edp-auth-panel .edp-auth-logo,
.edp-auth-brand-badge,
.edp-auth-logo {
    width: 120px !important;
    height: 120px !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.16) !important;
}

/* Bigger auth badge */
.edp-auth-side img[src*="ehsami-auth-badge.png"],
.edp-auth-panel img[src*="ehsami-auth-badge.png"],
.edp-auth-brand img[src*="ehsami-auth-badge.png"],
.edp-auth-layout img[src*="ehsami-auth-badge.png"],
img[src*="ehsami-auth-badge.png"] {
    width: 78px !important;
    height: 78px !important;
    object-fit: contain !important;
    display: block !important;
}

.edp-auth-side .edp-auth-logo,
.edp-auth-panel .edp-auth-logo,
.edp-auth-brand-badge,
.edp-auth-logo {
    width: 120px !important;
    height: 120px !important;
    border-radius: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.16) !important;
}

/* EDP OTP resend and timer */
.edp-auth-resend-box {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, .9);
}

.edp-auth-timer {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(37, 99, 235, .08);
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.edp-auth-timer strong {
    color: #2563eb;
    font-size: 16px;
}

.edp-auth-timer .is-expired {
    color: #dc2626;
}

.edp-auth-resend-form {
    display: grid;
    gap: 8px;
}

.edp-auth-resend-btn {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #fff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: .18s ease;
}

.edp-auth-resend-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.edp-auth-resend-btn:disabled {
    cursor: not-allowed;
    color: #94a3b8;
    background: #f8fafc;
}

.edp-auth-resend-form small {
    display: block;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
}
