/* Login page implemented directly from the user-provided single-file HTML. */
:root {
    --navy-900: #0b1a3a;
    --navy-800: #0f2050;
    --navy-700: #152b63;
    --blue-accent: #4a72b8;
    --blue-accent-dark: #3a5fa0;
    --blue-light: #8fb1e6;
    --white: #ffffff;
    --field-border: #d7ddec;
    --field-bg: #f4f6fb;
    --placeholder: #8891ab;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background: var(--navy-900);
}

.login-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.photo-panel {
    flex: 1 1 47%;
    max-width: 47%;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-panel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.photo-panel-overlay {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--navy-900);
    opacity: 0.52;
}

.photo-panel-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.brand-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 34rem);
    margin: 0 auto;
    padding: 0 36px;
    color: var(--white);
    text-align: center;
}

.form-panel {
    flex: 1 1 53%;
    max-width: 53%;
    min-height: 100vh;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 60px;
    color: var(--navy-900);
    position: relative;
}

.form-panel-inner,
.form-panel-content {
    width: 100%;
    max-width: 420px;
}

.badge {
    width: 76px;
    height: 86px;
    margin-bottom: 22px;
}

.org-name {
    font-size: clamp(1.2rem, 1.1vw + 0.7rem, 2rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: center;
    margin: 0;
    line-height: 1.15;
    text-transform: uppercase;
    white-space: nowrap;
}

.org-sub {
    font-size: clamp(1.1rem, 0.95vw + 0.6rem, 1.8rem);
    font-weight: 600;
    text-align: center;
    margin: 4px 0 14px 0;
    line-height: 1.15;
}

.system-label {
    font-size: clamp(0.82rem, 0.95vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--blue-light);
    text-transform: uppercase;
    margin: 0 0 14px 0;
}

.welcome {
    font-size: 16px;
    color: #4a5578;
    margin: 0 0 32px 0;
    text-align: center;
}

.login-alert {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid rgba(193, 54, 77, 0.18);
    border-radius: 8px;
    background: rgba(193, 54, 77, 0.08);
    color: #c1364d;
    font-size: 14px;
    line-height: 1.45;
}

.login-form {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    position: relative;
    display: flex;
    align-items: center;
    background: #f4f6fb;
    border: 1px solid #d7ddec;
    border-radius: 8px;
    padding: 0 16px;
    height: 56px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field:focus-within {
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 3px rgba(74, 114, 184, 0.18);
}

.field svg {
    flex-shrink: 0;
    opacity: 0.98;
    color: #4a72b8;
}

.field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--navy-900);
    font-size: 15px;
    padding: 0 12px;
    font-family: inherit;
}

.field input::placeholder {
    color: #8891ab;
}

.field.is-invalid {
    border-color: rgba(193, 54, 77, 0.35);
    box-shadow: 0 0 0 2px rgba(193, 54, 77, 0.08);
}

.toggle-visibility {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    color: #8891ab;
}

.toggle-visibility:hover {
    color: var(--navy-900);
}

.toggle-visibility:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
    border-radius: 6px;
}

.password-icon {
    width: 20px;
    height: 20px;
}

.field-feedback {
    margin-top: 8px;
    font-size: 13px;
    color: #c1364d;
}

.login-btn {
    margin-top: 6px;
    height: 54px;
    border: none;
    border-radius: 8px;
    background: var(--blue-accent);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.login-btn:hover {
    background: var(--blue-accent-dark);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn:focus-visible,
.field:focus-within,
.toggle-visibility:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 2px;
}

@media (max-width: 860px) {
    body {
        overflow-y: auto;
    }

    .login-page {
        flex-direction: column;
    }

    .photo-panel {
        max-width: 100%;
        min-height: 320px;
        flex: 0 0 320px;
        padding: 24px 0;
    }

    .form-panel {
        max-width: 100%;
        padding: 40px 24px;
    }

    .badge {
        width: 56px;
        height: 64px;
        margin-bottom: 14px;
    }

    .org-name,
    .org-sub {
        font-size: 19px;
    }

    .org-name {
        white-space: normal;
    }

    .system-label {
        font-size: 12px;
    }
}
