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

:root {
    --bg: #f5f3ef;
    --card: #ffffff;
    --ink: #252525;
    --muted: #77736d;
    --line: #e4e0d9;
    --accent: #7c6a52;
    --accent-dark: #62533f;
    --soft: #eeeae2;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

button, input { font: inherit; }

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.brand-panel {
    position: relative;
    overflow: hidden;
    padding: 52px 7vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 20% 25%, rgba(255,255,255,.85), transparent 34%),
        linear-gradient(145deg, #ebe7df 0%, #d9d2c7 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(98,83,63,.15);
    border-radius: 50%;
    left: -150px;
    bottom: -170px;
}

.brand, .mobile-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(98,83,63,.45);
    border-radius: 14px;
    color: var(--accent-dark);
    font-family: Georgia, serif;
    font-size: 25px;
}

.brand-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    letter-spacing: .3px;
}

.brand-subtitle {
    margin-top: 2px;
    direction: ltr;
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: 1.7px;
    color: var(--muted);
}

.brand-message {
    position: relative;
    z-index: 1;
    max-width: 490px;
    margin-bottom: 9vh;
}

.eyebrow {
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--accent-dark);
}

.brand-message h1 {
    margin: 20px 0 15px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.35;
    font-weight: 600;
}

.brand-message p {
    margin: 0;
    max-width: 430px;
    line-height: 2.1;
    color: #666159;
    font-size: 14px;
}

.login-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 7vw 22px;
    background: var(--card);
}

.login-card {
    width: min(100%, 430px);
}

.mobile-brand { display: none; }

.login-heading {
    margin-bottom: 34px;
}

.login-heading span {
    color: var(--accent);
    font-size: 13px;
}

.login-heading h2 {
    margin: 9px 0 8px;
    font-size: 29px;
    font-weight: 600;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

form label:not(.remember) {
    display: block;
    margin: 0 0 9px;
    font-size: 13px;
    font-weight: 500;
}

.input-wrap {
    position: relative;
    margin-bottom: 21px;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    padding: 0 47px 0 80px;
    background: #fcfbf9;
    color: var(--ink);
    transition: .2s ease;
    direction: rtl;
}

.input-wrap input::placeholder { color: #aaa59d; }

.input-wrap input:focus {
    border-color: #b5aa9a;
    box-shadow: 0 0 0 4px rgba(124,106,82,.07);
}

.input-icon {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa39a;
    font-size: 11px;
}

.password-toggle {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 11px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 2px 0 25px;
    font-size: 11px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #77736d;
    cursor: pointer;
}

.remember input { accent-color: var(--accent); }

.form-row a {
    color: var(--accent);
    text-decoration: none;
}

.login-button {
    width: 100%;
    height: 55px;
    border: 0;
    border-radius: 13px;
    background: var(--accent-dark);
    color: white;
    cursor: pointer;
    transition: .2s ease;
    font-size: 14px;
    font-weight: 500;
}

.login-button:hover {
    background: #514433;
    transform: translateY(-1px);
}

.form-message {
    min-height: 20px;
    margin-top: 13px;
    text-align: center;
    font-size: 11px;
    line-height: 1.8;
}

.form-message.error { color: #9a4e4e; }
.form-message.info { color: var(--accent); }

.security-note {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid #eeeae4;
    color: #aaa59d;
    font-size: 10px;
    text-align: center;
}

.login-panel footer {
    margin-top: auto;
    padding-top: 35px;
    color: #b0aba3;
    font-size: 9px;
}

@media (max-width: 850px) {
    .login-page { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .login-panel {
        min-height: 100vh;
        padding: 34px 24px 20px;
    }
    .mobile-brand {
        display: flex;
        margin-bottom: 48px;
        justify-content: center;
    }
    .mobile-brand .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 21px;
    }
    .mobile-brand span {
        font-family: Georgia, serif;
        font-size: 23px;
    }
    .login-card { width: min(100%, 450px); }
}

@media (max-width: 420px) {
    .login-panel { padding-inline: 18px; }
    .login-heading h2 { font-size: 25px; }
    .form-row { font-size: 10px; }
}
