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

:root {
    --ink: #1f2933;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --soft: #f4f7fb;
    --brand: #b91c1c;
    --brand-dark: #7f1d1d;
    --accent: #0f766e;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(185, 28, 28, 0.08), rgba(15, 118, 110, 0.1)),
        #f7f8fa;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-panel {
    width: min(940px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr 420px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(31, 41, 51, 0.08);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(31, 41, 51, 0.16);
}

.brand-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 44px;
    color: #fff;
    background:
        linear-gradient(rgba(38, 18, 18, 0.78), rgba(38, 18, 18, 0.86)),
        url('/images/navalmas.jpeg') center / cover no-repeat;
}

.brand-side::after {
    content: "";
    position: absolute;
    inset: auto 44px 44px 44px;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
}

.brand-logo {
    width: 112px;
    height: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-kicker {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 700;
}

.brand-side h1 {
    margin: 0;
    max-width: 360px;
    font-size: 40px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-copy {
    max-width: 380px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.8;
}

.form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 40px;
    background: linear-gradient(180deg, #fff, var(--soft));
}

.form-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.lock-badge {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    color: var(--accent);
    background: #dff4f0;
    border-radius: 8px;
    font-size: 23px;
}

.form-heading h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.form-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
}

.login-form {
    display: grid;
    gap: 10px;
}

.field-label {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.field-control {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-control:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.field-control i {
    color: var(--muted);
    font-size: 19px;
}

.field-control input {
    width: 100%;
    min-width: 0;
    height: 50px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 16px;
}

.field-control input::placeholder {
    color: #9ca3af;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
}

.form-row a {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

.form-row a:hover {
    color: var(--brand-dark);
}

.login-button {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(185, 28, 28, 0.28);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover,
.login-button:focus {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(127, 29, 29, 0.32);
}

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

@media only screen and (max-width: 860px) {
    .login-panel {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .brand-side {
        min-height: 260px;
        padding: 28px;
    }

    .brand-side::after {
        inset: auto 28px 28px 28px;
    }

    .brand-side h1 {
        font-size: 30px;
    }

    .brand-copy {
        font-size: 15px;
    }
}

@media only screen and (max-width: 520px) {
    .login-shell {
        padding: 14px;
    }

    .brand-side {
        min-height: 230px;
        padding: 22px;
    }

    .brand-logo {
        width: 86px;
        height: 86px;
    }

    .form-side {
        padding: 28px 20px;
    }

    .form-heading h2 {
        font-size: 22px;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
