:root {
    --primary: #287f7a;
    --primary-dark: #206965;
    --accent: #80ceca;
    --text: #193b39;
    --muted: #7b8d8b;
    --border: #e1e9e7;
    --background: #f4f7f6;
}

* {
    box-sizing: border-box;
}

html {
    direction: rtl;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    direction: rtl;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(128, 206, 202, 0.17),
            transparent 34%
        ),
        var(--background);
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 42px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(25, 65, 61, 0.07);
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-logo {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: var(--accent);
    color: #173f3c;
    font-size: 23px;
    letter-spacing: 0;
}

/* Heading */
.heading {
    margin: 37px 0 27px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    font-size: clamp(27px, 6vw, 33px);
    line-height: 1.6;
    letter-spacing: 0;
}

h1 span {
    color: var(--primary);
}

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

/* Form fields */
.field {
    margin-top: 21px;
}

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

input[type="text"],
input[type="password"] {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #fcfdfd;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    direction: rtl;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder {
    color: #a2afad;
    opacity: 1;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(40, 127, 122, 0.12);
}

/* Sign-in button */
button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 49px;
    margin-top: 28px;
    padding: 0 17px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

button span {
    font-size: 20px;
}

button:hover {
    background: var(--primary-dark);
}

button:focus-visible {
    outline: 3px solid rgba(40, 127, 122, 0.3);
    outline-offset: 3px;
}

button:active {
    transform: scale(0.99);
}

/* Login errors */
.error-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #f4d2d0;
    border-radius: 9px;
    background: #fff5f4;
    color: #a93226;
    font-size: 12px;
    line-height: 1.9;
}

/* Security notice */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 27px;
    padding-top: 21px;
    border-top: 1px solid #edf1f0;
    color: var(--muted);
    font-size: 11px;
}

.status-dot {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #48a99a;
}

/* Footer */
.page-footer {
    margin-top: 25px;
    color: #899795;
    text-align: center;
    font-size: 11px;
    line-height: 2;
}

.page-footer span {
    padding: 0 5px;
}

/* Mobile layout */
@media (max-width: 480px) {
    .page {
        padding: 20px 15px;
    }

    .login-card {
        padding: 30px 24px;
        border-radius: 16px;
    }

    .heading {
        margin-top: 30px;
    }
}