﻿/* =========================================================================
   امپراطوری برق — استایل مدرن صفحه ورود/ثبت‌نام
   تم: سفید + قرمز تیره + طوسی
   نکته مهم: این فایل فقط ظاهر صفحه را تغییر می‌دهد.
   هیچ کلاس، آیدی یا ساختار HTML که در جاوااسکریپت استفاده شده لمس نشده است.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
    /* --- پالت رنگی --- */
    --red-900: #4d0c13;
    --red-800: #611019;
    --red-700: #7a1220;
    --gray-600: #5f6672;
    --gray-400: #9aa0aa;
    --gray-100: #eef0f2;
    --paper: #ffffff;
    --mist: #f5f5f6;
    --ink: #23262b;
    --ink-soft: #82868f;
    --line: #e6e6e8;
    --danger: #d64545;
    --danger-bg: #fdecec;
    /* --- تایپوگرافی --- */
    --font-main: 'Vazirmatn', Tahoma, sans-serif;
    /* --- ابعاد --- */
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 30px 60px -20px rgba(77,12,19,.35), 0 10px 20px -10px rgba(77,12,19,.15);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at 85% 10%, rgba(122,18,32,.07), transparent 40%), radial-gradient(circle at 15% 90%, rgba(95,102,114,.06), transparent 45%), var(--mist);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* هر فرم (log / plog / mlog) یک صفحه‌ی تمام‌قد است که وسط‌چین می‌شود */
form {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* =========================================================================
   کارت اصلی
   ========================================================================= */
.box-root-login {
    position: relative;
    width: 100%;
    max-width: 920px;
    min-height: 600px;
    background: var(--paper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

    /* پنل رنگی — سمت چپ (برعکسِ نسخه‌ی الکتروچمنی که راست بود)
   الگو: حلقه‌های متحدالمرکز + درخشش شعاعی به‌جای هاشور مورب */
    .box-root-login::before {
        content: "";
        position: absolute;
        inset-block: 0;
        inset-inline-end: 0;
        width: 38%;
        background: radial-gradient(circle at 75% 12%, rgba(255, 255, 255, .10), transparent 55%), linear-gradient(200deg, var(--red-700), var(--red-900));
    }

    /* موج‌های افقی الهام‌گرفته از لوگو (سه قله‌ی موجی تودرتو) */
    .box-root-login::after {
        content: "";
        position: absolute;
        inset-inline-end: 0;
        inset-block-start: 0;
        width: 38%;
        height: 100%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 700' preserveAspectRatio='none'%3E%3Cpath d='M-20 90 C 60 40, 110 40, 170 100 C 230 160, 280 160, 340 100 C 380 60, 410 55, 430 75' fill='none' stroke='rgba(255,255,255,0.16)' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M-20 190 C 60 130, 120 130, 180 200 C 240 270, 290 270, 350 200 C 390 155, 410 150, 430 170' fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M-20 470 C 60 420, 110 420, 170 480 C 230 540, 280 540, 340 480 C 380 440, 410 435, 430 455' fill='none' stroke='rgba(255,255,255,0.10)' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M-20 580 C 60 530, 120 530, 180 600 C 240 670, 290 670, 350 600 C 390 555, 410 550, 430 570' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100% 100%;
        opacity: 1;
        pointer-events: none;
    }


@media (max-width:820px) {
    .box-root-login::before,
    .box-root-login::after {
        display: none;
    }
}

/* =========================================================================
   محتوای فرم (کارت سفید) — سمت راست کارت
   ========================================================================= */
.box-Parent {
    position: relative;
    z-index: 1;
    width: 62%;
    margin-inline-end: 38%;
    padding: 52px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (max-width:820px) {
    .box-Parent {
        width: 100%;
        margin-inline-end: 0;
        padding: 40px 24px;
    }
}

@media (max-width:480px) {
    .box-Parent {
        padding: 32px 18px;
    }
}

.box-logo {
    margin-bottom: 18px;
}

    .box-logo img {
        display: block;
        max-width: 140px;
        max-height: 140px;
        object-fit: contain;
        margin: 0 auto;
    }

.box-title {
    margin-bottom: 28px;
}

    .box-title span {
        font-size: 23px;
        font-weight: 800;
        color: var(--red-900);
        position: relative;
        padding-bottom: 12px;
        display: inline-block;
    }

        .box-title span::after {
            content: "";
            position: absolute;
            bottom: 0;
            right: 50%;
            transform: translateX(50%);
            width: 46px;
            height: 3px;
            border-radius: 3px;
            background: linear-gradient(90deg, var(--red-700), var(--gray-600));
        }

.box-data {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
}

.tit, .tit-pass {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 10px;
    text-align: right;
}

    /* عنوان‌های کد تایید که به‌صورت پویا نمایش/مخفی می‌شوند */
    .tit.tilco, .tit.tilac {
        background: var(--mist);
        border: 1px dashed var(--line);
        border-radius: var(--radius-sm);
        padding: 10px 14px;
        text-align: center;
        color: var(--red-800);
        font-weight: 500;
    }

/* =========================================================================
   فیلدهای ورودی
   ========================================================================= */
.box-text {
    position: relative;
    margin-bottom: 18px;
    text-align: right;
}

    .box-text input {
        width: 100%;
        height: 52px;
        border-radius: var(--radius-md);
        border: 1.5px solid var(--line);
        background: var(--mist);
        padding: 0 18px;
        font-family: var(--font-main);
        font-size: 15px;
        color: var(--ink);
        text-align: right;
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    }

        .box-text input::placeholder {
            color: var(--ink-soft);
        }

        .box-text input:focus {
            outline: none;
            border-color: var(--red-700);
            background: var(--paper);
            box-shadow: 0 0 0 4px rgba(122,18,32,.13);
        }

    /* متن راهنما/برچسب کنار اینپوت (span داخل box-text در فرم کد تایید) */
    .box-text > span:not([id]) {
        display: block;
        margin-top: 6px;
        font-size: 12.5px;
        color: var(--ink-soft);
    }

    /* حالت خطا روی فیلد */
    .box-text.error input {
        border-color: var(--danger);
        background: var(--danger-bg);
        animation: shake .32s ease;
    }

    .box-text.error > span:not([id]) {
        color: var(--danger);
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* پیام‌های خطای سرور (#err و #err2) */
#err, #err2 {
    display: block;
    font-size: 13px;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid rgba(214,69,69,.25);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 14px;
    text-align: center;
}

    #err:empty, #err2:empty {
        display: none;
        padding: 0;
        margin: 0;
        border: none;
        background: none;
    }

/* =========================================================================
   دکمه اصلی
   ========================================================================= */
.box-btn {
    margin-top: 6px;
    margin-bottom: 16px;
}

    .box-btn button {
        width: 100%;
        height: 52px;
        border: none;
        border-radius: var(--radius-md);
        background: linear-gradient(135deg, var(--red-800), var(--red-900));
        color: var(--gray-100);
        font-family: var(--font-main);
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        transition: transform .18s ease, box-shadow .18s ease;
        box-shadow: 0 14px 26px -12px rgba(77,12,19,.55);
    }

        /* افکت درخشش ظریف روی دکمه */
        .box-btn button::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, transparent 25%, rgba(255,255,255,.16) 50%, transparent 75%);
            opacity: 0;
            transition: opacity .25s ease;
            pointer-events: none;
        }

        .box-btn button:hover {
            transform: translateY(-2px);
            box-shadow: 0 22px 40px -14px rgba(77,12,19,.6), 0 10px 22px -8px rgba(95,102,114,.3);
        }

            .box-btn button:hover::after {
                opacity: 1;
            }

        .box-btn button:active {
            transform: translateY(0);
            box-shadow: 0 10px 18px -10px rgba(77,12,19,.5);
        }

/* =========================================================================
   لینک‌های کمکی (دریافت کد یک‌بارمصرف / ورود با رمز)
   ========================================================================= */
.link-other {
    margin-bottom: 10px;
}

    .link-other a {
        color: var(--red-800);
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1.5px solid var(--gray-400);
        padding-bottom: 2px;
        cursor: pointer;
        transition: color .15s ease, border-color .15s ease;
    }

        .link-other a:hover {
            color: var(--red-700);
            border-color: var(--red-800);
        }

/* =========================================================================
   لینک‌های اضافه: فراموشی رمز عبور / ثبت‌نام
   ========================================================================= */
.box-extra-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.forgot-pass-link {
    color: var(--red-800);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid var(--gray-400);
    padding-bottom: 2px;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

    .forgot-pass-link:hover {
        color: var(--red-700);
        border-color: var(--red-800);
    }

.signup-hint {
    font-size: 13.5px;
    color: var(--ink-soft);
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

    .signup-hint a {
        color: var(--red-800);
        font-weight: 700;
        text-decoration: none;
        border-bottom: 1.5px solid var(--gray-400);
        padding-bottom: 1px;
        cursor: pointer;
        transition: color .15s ease, border-color .15s ease;
    }

        .signup-hint a:hover {
            color: var(--red-700);
            border-color: var(--red-800);
        }

/* =========================================================================
   متن قوانین و حریم خصوصی
   ========================================================================= */
.box-gh {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 2;
    margin-top: 10px;
}

    .box-gh a {
        color: var(--red-800);
        font-weight: 600;
        text-decoration: none;
        margin: 0 2px;
    }

        .box-gh a:hover {
            color: var(--red-700);
        }

/* =========================================================================
   واکنش‌گرا برای موبایل
   ========================================================================= */
@media (max-width:480px) {
    .box-root-login {
        min-height: auto;
        border-radius: 20px;
    }

    .box-title span {
        font-size: 20px;
    }

    .box-btn button {
        height: 48px;
        font-size: 15px;
    }
}
/* ریست قطعی هر نوع border/shadow اضافه روی کارت‌ها */
.box-root-login,
.box-Parent,
.box-root-login::before,
.box-root-login::after {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
