:root {
    --blue: #4078BC;
    --blue-dark: #3a7bc8;
    --blue-btn: #88BDFF;
    --white: #ffffff;
    --white-dim: rgba(255, 255, 255, 0.6);
    --white-muted: rgba(255, 255, 255, 0.15);
    --white-border: rgba(255, 255, 255, 0.45);
    --field-background: #5d8cc6;
    --brand-left: #1b3d6e;
    --form-width: 40%;
    --form-min-width: 360px;
    --form-content-width: 75%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #111827;
    overflow: hidden;
}

body {
    display: flex;
    min-height: 100vh;
}

/* -- Card shell ----------------------------------------------------------- */
.page-shell {
    width: 100%;
    display: flex;
}

.login-card {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* -- Brand panel (left) --------------------------------------------------- */
.brand-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.brand-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* -- Form panel (right) --------------------------------------------------- */
.form-panel {
    flex: 0 0 var(--form-width);
    min-width: var(--form-min-width);
    background: var(--blue);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px 28px;
    color: var(--white);
    overflow-y: auto;
    gap: 24px;
}

/* -- Form content wrapper ------------------------------------------------- */
.form-content {
    width: var(--form-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* -- Form brand block ----------------------------------------------------- */
.form-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.form-brand-line1,
.form-brand-line2 {
    margin: 0;
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 32px;
}

/* -- Form fields ----------------------------------------------------------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-group { width: 100%; }

.field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--field-background);
    border: 1px solid var(--white-border);
    border-radius: 8px;
    padding: 0 14px;
    height: 46px;
    gap: 10px;
    transition: border-color 0.2s;
}

.input-wrap:focus-within {
    border-color: var(--white);
    box-shadow: 0 0 0 2px var(--white-muted);
}

.field-icon { width: 18px; height: 18px; flex-shrink: 0; }

.input-wrap input,
.input-wrap select {
    flex: 1 1 0%;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--white);
    caret-color: var(--white);
    font: 400 0.95rem / 1.4 var(--font-base);
    letter-spacing: normal;
    text-align: left;
    box-shadow: none;
    appearance: none;
}

.input-wrap input:focus,
.input-wrap select:focus {
    background: transparent;
    color: var(--white);
}

.input-wrap input::placeholder {
    color: var(--white-dim);
    font: inherit;
    opacity: 1;
}

/* Browsers paint saved credentials independently of the input background. */
.input-wrap input:autofill {
    box-shadow: 0 0 0 1000px var(--field-background) inset;
    -webkit-text-fill-color: var(--white);
    caret-color: var(--white);
}
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus,
.input-wrap input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--field-background) inset;
    -webkit-text-fill-color: var(--white);
    caret-color: var(--white);
}

.input-wrap select { cursor: pointer; }
.input-wrap select:invalid { color: var(--white-dim); }
.input-wrap select option { color: #0a2647; background: var(--white); }
.select-chevron { width: 16px; height: 16px; flex-shrink: 0; pointer-events: none; }
.field-group > .error-msg:empty { display: none; }
.field-group > .error-msg:not(:empty) { margin-top: 6px; }

.account-link {
    margin-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    line-height: 1.5;
}
.account-link a { color: var(--white); font-weight: 700; text-underline-offset: 3px; }
.account-link a:hover { text-decoration: none; }
.account-link a:focus-visible,
.recover-link:focus-visible,
.btn-login:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 4px;
}

/* -- Button --------------------------------------------------------------- */
.btn-login {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    background: var(--blue-btn);
    color: #0a2647;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover { background: #a8d4ff; }

/* -- Error ---------------------------------------------------------------- */
.login-info {
    padding: 10px 12px;
    border: 1px solid var(--white-border);
    border-radius: 8px;
    background: var(--white-muted);
    color: var(--white);
    font-size: 0.85rem;
    text-align: center;
}

.error-msg {
    font-size: 0.85rem;
    color: #ffe08a;
    text-align: center;
}

/* -- Recover link --------------------------------------------------------- */
.recover-link {
    display: block;
    text-align: left;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9rem;
    text-decoration: none;
}

.recover-link:hover { text-decoration: underline; }

/* -- Footer --------------------------------------------------------------- */
.form-footer {
    flex-shrink: 0;
    padding-top: 20px;
    border-top: 1px solid var(--white-muted);
    display: flex;
    justify-content: center;
}

.footer-signature {
    max-width: 100%;
    height: auto;
    max-height: 48px;
    opacity: 0.85;
}

/* -- Outfit ExtraLight 200 ----------------------------------------------- */
.text-outfit-xl {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: 33.44px;
    line-height: 1;
    letter-spacing: 0;
}

/* -- Nunito Regular 400 (approx. LINE Seed JP) --------------------------- */
.text-lineseed-rg {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 14.56px;
    line-height: 1;
    letter-spacing: 0;
}

/* -- Responsive ----------------------------------------------------------- */
@media (max-width: 720px) {
    .brand-panel { display: none; }
    .form-panel  { flex: 1; min-width: 0; padding: 32px 24px 24px; }
    .form-content { width: 100%; max-width: 420px; }
}
