/* ============================================
   COLOR VARIABLES (same as main site)
   ============================================ */
   :root {
    --primary-color: #616e5f;
    --secondary-color: #92a07f;
    --light-accent: #d9d3bf;
    --background-light: #f7f4f0;
    --background-medium: #f1e7d5;
    --text-color: #1a1a1a;
    --border-color: #d9d3bf;
}

/* ============================================
   GLOBAL & PAGE LAYOUT
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body{
    width: 100%;
    min-height: 100vh;
    background-color: var(--background-light);
    font-family: "Lato", Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

/* RTL helper */
body.rtl {
    direction: rtl;
}

/* Wrapper for page content under header */
.login-page {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 15px 20px;
}

/* Page title */
.login-title {
    text-align: center;
    font-size: 42px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

/* ============================================
   DASHBOARD HEADER (HOME + LOGOUT + LANGUAGE)
   ============================================ */

.dashboard-header {
    width: 100%;
    padding: 12px 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-nav-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.top-nav-link:hover {
    background-color: var(--light-accent);
    color: var(--primary-color);
}

.language-selector {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
}

/* RTL: flip header alignment slightly */
body.rtl .dashboard-header {
    flex-direction: row-reverse;
}

body.rtl .header-left {
    text-align: right;
}

/* ============================================
   LOGIN FORM CARD
   ============================================ */

.login-form{
    width: 100%;
    margin: auto;
    max-width: 380px;
    min-height: 520px;
    background: var(--background-medium);
    border-radius: 25px;
    box-shadow: 0 12px 15px 0 rgba(0,0,0,.18), 0 17px 50px 0 rgba(0,0,0,.18);
    padding: 25px 25px 20px;
    display: flex;
    flex-direction: column;
}

/* Top area: social login */
.form1{
    width: 100%;
    border-radius: 15px;
    background-image: linear-gradient(to right, #616e5f, #92a07f);
    box-shadow: 0 8px 8px 0 rgba(0, 0, 0, 0.35), 0 10px 20px 0 rgba(0, 0, 0, 0.18);
    padding: 18px 15px 24px;
    text-align: center;
    margin-bottom: 25px;
}

.form1 h2{
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.icons {
    width: 40px;
    height: 40px;
    padding: 5px;
    margin: 0 8px;
    text-align: center;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icons:hover {
    transform: scale(1.1);
}

.fa-google-plus {
    color: white;
}

a.fa-google-plus:hover {
    color: #dd4b39;
    text-decoration: none;
}

.OR{
    margin-top: 12px;
    color: white;
    font-weight: 600;
}

/* ============================================
   FIELDS
   ============================================ */

.fields{
    margin-bottom: 25px;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.field-row:first-of-type {
    margin-top: 0;
}

/* RTL: reverse field rows icon/input order */
body.rtl .field-row {
    flex-direction: row-reverse;
}

body.rtl .field-row i {
    margin-left: 0;
    margin-right: 0;
}

.field-row i {
    color: var(--primary-color);
}

input{
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.95rem;
    padding: 5px 0;
    color: var(--text-color);
}

input::placeholder {
    color: #999;
}

input:focus{
    border-bottom: 2px solid #616e5f;
}

/* ============================================
   ACTIONS AT THE BOTTOM (LOGIN + REGISTER)
   ============================================ */

.form-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-auth {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-login:hover {
    background-color: #4f5a4d;
}

.btn-register {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-register:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Forgot password */
.forgot{
    text-align: center;
    margin-top: 5px;
}

a.forgotbtn{
    text-decoration: none;
    font-size: 0.8rem;
    color: #616e5f;
    transition: color 0.2s ease;
}

a.forgotbtn:hover{
    color: #3f483b;
}

/* ============================================
   COPYRIGHT
   ============================================ */

.footer-note{
    text-align: center;
    color: #777;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .dashboard-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-left {
        width: 100%;
        text-align: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .login-title {
        font-size: 34px;
    }

    .login-form {
        max-width: 95%;
        min-height: 480px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-auth {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-title {
        font-size: 30px;
    }

    .dashboard-header {
        padding: 10px 12px;
    }

    .top-nav-link {
        font-size: 0.85rem;
        padding: 5px 8px;
    }

    .language-selector {
        font-size: 0.8rem;
        padding: 5px 8px;
    }

    .login-form {
        padding: 20px 18px 18px;
    }
}
