/* ============================
   Login page – Responsive CSS
   ============================ */


/* Base */

body {
    font-family: 'Vazir', sans-serif;
    margin: 0;
    direction: rtl;
    background-color: #f5f7fa;
}


/* Layout */

.container {
    display: flex;
    min-height: 100dvh;
    /* بهتر از 100vh روی موبایل */
    align-items: stretch;
}


/* Panels */

.left-panel {
    background-color: #2563eb;
    color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    /* خواناتر روی موبایل */
}

.logo {
    max-width: 120px;
    margin-bottom: 1rem;
}

.right-panel {
    background: #fff;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* برای نمایش بهتر روی تبلت/موبایل */
}


/* Form */

form {
    width: 100%;
    max-width: 350px;
}

form h3 {
    margin-bottom: 1rem;
    text-align: center;
}

input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background-color: #1e40af;
}

.footer-links {
    margin-top: .5rem;
    text-align: center;
}

.footer-links a {
    color: #2563eb;
    text-decoration: none;
}

.register-link {
    text-align: center;
    margin-top: 15px;
    font-size: .95rem;
}

.register-link a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    margin-right: 4px;
}

.register-link a:hover {
    text-decoration: underline;
}


/* ============================
     Responsiveness
     ============================ */


/* <= 992px (تبلت و موبایل): پنل‌ها ستونی می‌شوند */

@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    .left-panel {
        min-height: 40vh;
        /* بخش معرفی بالای صفحه */
        padding: 2rem 1.25rem;
    }
    .right-panel {
        min-height: 60vh;
        padding: 2rem 1.25rem;
    }
}


/* <= 768px (موبایل): اندازه‌ها جمع‌وجورتر */

@media (max-width: 768px) {
    .logo {
        max-width: 96px;
    }
    form {
        max-width: 420px;
    }
    /* تمام‌عرض والد، ولی سقف منطقی */
    input {
        padding: 12px;
        font-size: .98rem;
    }
    button {
        padding: 12px;
        font-size: 1rem;
    }
}


/* <= 480px (موبایل کوچک): حاشیه امن نوارها + کاهش فاصله‌ها */

@media (max-width: 480px) {
    .left-panel,
    .right-panel {
        padding: max(1rem, env(safe-area-inset-top)) 1rem;
    }
    form h3 {
        font-size: 1.05rem;
    }
    .register-link {
        font-size: .9rem;
    }
}