/* ========================================
   ASAN HESAB
   LOGIN PAGE
======================================== */

:root {
    --login-primary: #2563eb;
    --login-primary-hover: #1d4ed8;
    --login-background: #f3f6fc;
    --login-card: #ffffff;
    --login-text: #172033;
    --login-muted: #64748b;
    --login-border: #dbe3ef;
    --login-error: #dc2626;
    --login-success: #15803d;
}

/* Reset */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Tahoma, Arial, sans-serif;
    color: var(--login-text);
    background: var(--login-background);
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Page */

.login-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */

.login-header {
    width: 100%;
    min-height: 76px;
    padding: 18px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.login-brand {
    color: var(--login-primary);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Language selector */

.login-language {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    direction: rtl;
    cursor: pointer;

    border: none;
    outline: none;
    box-shadow: none;

    -webkit-tap-highlight-color: transparent;
}

.login-language:focus,
.login-language:focus-within,
.login-language:active {
    border: none;
    outline: none;
    box-shadow: none;
}

.login-language select {
    max-width: 100px;
    padding: 8px 0;
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: var(--login-text);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.login-language select:focus,
.login-language select:focus-visible,
.login-language select:active {
    border: none;
    outline: none;
    box-shadow: none;
}

.login-language-arrow {
    width: 22px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
}

.login-language-arrow svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Main content */

.login-content {
    flex: 1;
    width: 100%;
    padding: 24px 18px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login card */

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 36px 32px;
    border: 1px solid rgba(219, 227, 239, 0.8);
    border-radius: 22px;
    background: var(--login-card);
    box-shadow: 0 12px 40px rgba(35, 62, 110, 0.07);
    text-align: center;
}

/* Z symbol */

.login-symbol {
    width: 64px;
    height: 64px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: var(--login-primary);
    color: #ffffff;
    font-size: 35px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

/* Heading */

.login-card h1 {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.5;
    font-weight: 800;
}

.login-subtitle {
    margin: 0 0 28px;
    color: var(--login-muted);
    font-size: 13px;
    line-height: 2;
}

/* Form */

#loginForm {
    width: 100%;
    text-align: right;
}

.login-field {
    margin-bottom: 19px;
}

.login-field label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}

.login-field input {
    display: block;
    width: 100%;
    min-height: 49px;
    padding: 12px 14px;
    border: 1px solid var(--login-border);
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--login-text);
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input::placeholder {
    color: #94a3b8;
}

.login-field input:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Remember and forgot password */

.login-options {
    margin: 2px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--login-muted);
    cursor: pointer;
}

.login-remember input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--login-primary);
    cursor: pointer;
}

.login-forgot {
    color: var(--login-primary);
    font-weight: 700;
}

.login-forgot:hover {
    text-decoration: underline;
}

/* Status message */

.login-message {
    display: none;
    margin-bottom: 16px;
    padding: 11px 12px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.9;
    text-align: right;
    overflow-wrap: anywhere;
}

.login-message.error {
    display: block;
    color: var(--login-error);
    background: #fef2f2;
}

.login-message.success {
    display: block;
    color: var(--login-success);
    background: #f0fdf4;
}

/* Submit button */

.login-submit {
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--login-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.login-submit:hover {
    background: var(--login-primary-hover);
}

.login-submit:active {
    transform: scale(0.99);
}

.login-submit:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 3px;
}

.login-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Register link */

.login-register {
    margin: 25px 0 0;
    color: var(--login-muted);
    font-size: 12px;
    line-height: 2;
}

.login-register a {
    margin-right: 4px;
    color: var(--login-primary);
    font-weight: 800;
}

.login-register a:hover {
    text-decoration: underline;
}

/* Footer */

.login-footer {
    padding: 18px 15px 24px;
    text-align: center;
    color: var(--login-muted);
    font-size: 11px;
}

.login-footer p {
    margin: 0;
}

/* Mobile */

@media (max-width: 480px) {
    .login-header {
        min-height: 68px;
        padding: 15px 20px;
    }

    .login-brand {
        font-size: 18px;
    }

    .login-content {
        padding: 14px 14px 28px;
        align-items: flex-start;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: 18px;
    }

    .login-symbol {
        width: 58px;
        height: 58px;
        margin-bottom: 18px;
        border-radius: 17px;
        font-size: 31px;
    }

    .login-card h1 {
        font-size: 23px;
    }

    .login-subtitle {
        margin-bottom: 24px;
        font-size: 12px;
    }

    .login-options {
        font-size: 11px;
    }

    .login-footer {
        padding-bottom: 18px;
    }
}

/* English layout */

html[lang="en"] body {
    direction: ltr;
}

html[lang="en"] #loginForm {
    text-align: left;
}

html[lang="en"] .login-options {
    direction: ltr;
}

html[lang="en"] .login-message {
    text-align: left;
}