:root {
    --navy-950: #07182d;
    --navy-900: #102b4e;
    --navy-700: #1a4a7a;
    --blue-500: #1786d1;
    --blue-100: #e8f5ff;
    --surface: #ffffff;
    --page: #f1f6fa;
    --text: #142335;
    --muted: #68788c;
    --border: #d8e2eb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --danger-border: #ffc9c5;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    background:
        radial-gradient(circle at 10% 10%, rgba(23, 134, 209, 0.15), transparent 34rem),
        linear-gradient(145deg, var(--page), #e5eef5);
    color: var(--text);
}

button,
input { font: inherit; }

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
}

.login-page::before {
    width: 24rem;
    height: 24rem;
    inset: -10rem auto auto -8rem;
    background: rgba(23, 134, 209, 0.09);
}

.login-page::after {
    width: 18rem;
    height: 18rem;
    inset: auto -7rem -8rem auto;
    background: rgba(16, 43, 78, 0.08);
}

.login-card {
    width: min(100%, 28rem);
    padding: 2.25rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1.5rem 4rem rgba(7, 24, 45, 0.14);
    position: relative;
    z-index: 1;
}

.login-header { text-align: center; }

.brand-icon {
    width: 4.5rem;
    height: 4.5rem;
    display: grid;
    place-items: center;
    margin: 0 auto 0.8rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, var(--navy-900), var(--blue-500));
    box-shadow: 0 0.8rem 1.8rem rgba(23, 134, 209, 0.25);
}

.brand-icon img {
    width: 3.1rem;
    height: 3.1rem;
    object-fit: contain;
}

.brand-name {
    margin: 0;
    color: var(--navy-700);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.login-header h1 {
    margin: 0.5rem 0 0;
    font-size: clamp(1.65rem, 4vw, 2rem);
    color: var(--navy-950);
}

.login-intro {
    margin: 0.65rem auto 1.75rem;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.7;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--danger-border);
    border-radius: 0.75rem;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-icon {
    width: 1.45rem;
    height: 1.45rem;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-weight: 800;
}

.login-form {
    display: grid;
    gap: 1.1rem;
}

.field-group {
    display: grid;
    gap: 0.45rem;
}

.field-group label {
    color: var(--navy-950);
    font-size: 0.9rem;
    font-weight: 650;
}

.input-shell {
    height: 3.2rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-shell:focus-within {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 0.22rem var(--blue-100);
}

.input-shell svg {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0 0.95rem;
    fill: #73859a;
}

.input-shell input {
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0 0 0 0.95rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    direction: rtl;
}

.login-button {
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.3rem;
    border: 0;
    border-radius: 0.8rem;
    background: linear-gradient(120deg, var(--navy-900), var(--blue-500));
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 0.65rem 1.35rem rgba(23, 134, 209, 0.23);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.login-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 0.8rem 1.65rem rgba(23, 134, 209, 0.3);
    transform: translateY(-1px);
}

.login-button:active { transform: translateY(0); }

.login-button:focus-visible {
    outline: 0.2rem solid rgba(23, 134, 209, 0.28);
    outline-offset: 0.18rem;
}

.login-button svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.login-footer {
    margin-top: 1.6rem;
    padding-top: 1.15rem;
    border-top: 1px solid #edf1f5;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

@media (max-width: 32rem) {
    .login-page { padding: 1rem; }

    .login-card {
        padding: 1.55rem 1.25rem;
        border-radius: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
