﻿/* =====================================================================
   Index.css   (ویوی «ورود | پلتفرم امین»)
   جایگزین بلوک <style> داخل ویو

   ساختار بر اساس ترتیب ویو:
   0. Variables / Fonts / Reset / Base
   1. Screen Layout        -> .screen
   2. Image Side           -> .image-side
   3. Form Side + Card     -> .form-side > .card
   4. Brand / Intro        -> .brand, .divider, .welcome-text
   5. Form Fields          -> .field, .field-box
   6. Forgot Link          -> .forgot-link
   7. Submit Button        -> .btn-submit
   ===================================================================== */


/* =====================================================================
   0. VARIABLES / FONTS / RESET / BASE
   ===================================================================== */
@font-face {
    font-family: 'YekanBakh';
    src: url('/fonts/YekanBakh-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('/fonts/YekanBakh-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue-1: #2563eb;
    --blue-2: #38bdf8;
    --ink: #0f172a;
    --muted-2: #64748b;
    --border: #e6e9f0;
    --card-bg: #ffffff;
    --page-bg: #fbfafb;
    --radius-lg: 22px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'YekanBakh', 'Vazirmatn', Tahoma, sans-serif;
    background: var(--page-bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}


/* =====================================================================
   1. SCREEN LAYOUT   (.screen)  دو ستون: تصویر | فرم
   ===================================================================== */
.screen {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

@media (max-width: 860px) {
    .screen {
        flex-direction: column;
    }
}


/* =====================================================================
   2. IMAGE SIDE   (#imageSide.image-side)
   تصویر پس‌زمینه با style داخل ویو ست می‌شود
   ===================================================================== */
.image-side {
    flex: 1 1 33%;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background-color: #eaf1fd;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 860px) {
    .image-side {
        flex: none;
        width: 100%;
        min-height: 400px;
        height: 34vh;
        max-height: 320px;
    }
}

@media (max-width: 420px) {
    .image-side {
        height: 28vh;
        min-height: 310px;
    }
}


/* =====================================================================
   3. FORM SIDE + CARD   (<form class="form-side"> > .card)
   ===================================================================== */
.form-side {
    flex: 1 1 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.card {
    width: 140%;
    max-width: 760px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px -15px rgba(30, 58, 138, 0.12);
    padding: 60px 60px 46px;
}

@media (max-width: 1024px) {
    .card {
        padding: 34px 28px 26px;
    }
}

@media (max-width: 860px) {
    .form-side {
        flex: none;
        width: 100%;
        padding: 24px 16px 32px;
        justify-content: center;
    }

    .card {
        max-width: 760px;
        border-radius: 20px;
        padding: 28px 22px 24px;
        margin-top: -50px;
        position: relative;
        z-index: 2;
        width: 220%;
    }
}

@media (max-width: 420px) {
    .card {
        padding: 24px 18px 20px;
        border-radius: 18px;
        width: 110%;
        margin-right: 0;
    }
}


/* =====================================================================
   4. BRAND / INTRO   (.brand, .divider, .welcome-text)
   ===================================================================== */
.brand {
    text-align: center;
    margin-bottom: 22px;
}

.brand-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 6px;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--muted-2);
    font-weight: 500;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0;
}

.welcome-text {
    font-size: 13.5px;
    color: var(--muted-2);
    line-height: 1.9;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

@media (max-width: 420px) {
    .brand-title {
        font-size: 22px;
    }
}


/* =====================================================================
   5. FORM FIELDS   (.field > .field-label + .field-box)
   نام کاربری، رمز عبور
   ===================================================================== */
.field {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.field-box {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: #fbfcfe;
    padding: 0 16px;
    height: 56px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .field-box:focus-within {
        border-color: var(--blue-1);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
        background: #ffffff;
    }

    .field-box input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-family: inherit;
        font-size: 14px;
        color: var(--ink);
        height: 100%;
        padding: 0 10px;
    }

        .field-box input::placeholder {
            color: #b7bfcc;
            font-weight: 400;
        }

/* آیکون‌ها (کاربر / قفل / چشم نمایش رمز) */
.field-icon {
    color: #9aa4b5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .field-icon.clickable {
        cursor: pointer;
    }

        .field-icon.clickable:hover {
            color: var(--blue-1);
        }

@media (max-width: 420px) {
    .field-box {
        height: 48px;
    }
}


/* =====================================================================
   6. FORGOT LINK   (.forgot-link)  «فراموشی رمز عبور؟»
   ===================================================================== */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--blue-1);
    text-decoration: none;
    font-weight: 600;
}

    .forgot-link:hover {
        text-decoration: underline;
    }


/* =====================================================================
   7. SUBMIT BUTTON   (.btn-submit)  «ورود به حساب کاربری»
   ===================================================================== */
.btn-submit {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--blue-1) 0%, var(--blue-2) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    box-shadow: 0 12px 24px -10px rgba(37, 99, 235, 0.55);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .btn-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 28px -10px rgba(37, 99, 235, 0.6);
    }

    .btn-submit:active {
        transform: translateY(0);
    }

    .btn-submit svg {
        position: absolute;
        left: 20px;
    }

@media (max-width: 420px) {
    .btn-submit {
        height: 50px;
        font-size: 15px;
    }
}
