/* Login-only design tokens. No shared admin or Metronic styles are changed. */
.afn-auth {
    --afn-night: #151c20;
    --afn-surface: #f7f8fa;
    --afn-ink: #182028;
    --afn-muted: #626b75;
    --afn-orange: #f58220;
    --afn-action: #b94e08;
    --afn-border: #8a949f;
    --afn-error: #ab302a;
    margin: 0;
    background: var(--afn-night);
    color: var(--afn-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

.afn-auth *, .afn-auth *::before, .afn-auth *::after { box-sizing: border-box; }
.afn-auth a { text-decoration: none; }
.afn-auth svg { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.afn-auth a:focus-visible, .afn-auth button:focus-visible { outline: 3px solid var(--afn-orange); outline-offset: 5px; }

/* A single official fleet photograph carries the visual identity. */
.afn-auth__backdrop { position: fixed; z-index: -2; inset: 0; display: block; pointer-events: none; }
.afn-auth__backdrop img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 36% 50%; }
.afn-auth__backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, #10171b35 0%, #10171b00 35%, #10171bc9 73%, #10171bf5 100%), linear-gradient(90deg, #10171b35, #10171b05 47%, #10171b80 100%);
}
.afn-auth__shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: clamp(40px, 6vw, 100px);
    min-height: 100vh;
    min-height: 100svh;
    padding: 48px 56px;
}
.afn-auth__brand { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 4px 0 35px; color: #fff; }
.afn-auth__brand-header { display: flex; align-items: center; }
.afn-auth__brand-link { display: inline-flex; padding: 4px; margin: -4px; border-radius: 4px; }
.afn-auth__brand-link img { display: block; width: 142px; height: 63px; object-fit: contain; }
.afn-auth__brand-copy { max-width: 650px; margin-top: 280px; }
.afn-auth__brand-copy h2 { margin: 0; color: #fff; font-size: clamp(48px, 4.5vw, 76px); font-weight: 500; line-height: 1.06; letter-spacing: -2.8px; text-wrap: balance; }
.afn-auth__brand-copy p { max-width: 440px; margin: 25px 0 0; color: #e0e4e7; font-size: 15px; line-height: 1.8; }

/* Solid, quiet form surface: readable independently of the photograph. */
.afn-auth__main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-self: center;
    min-width: 0;
    min-height: 660px;
    padding: 48px 42px 25px;
    border: 1px solid #fff;
    border-radius: 18px;
    background: var(--afn-surface);
    box-shadow: 0 24px 80px #070c122b;
}
.afn-auth__main::before { position: absolute; top: -1px; left: 42px; width: 46px; height: 3px; content: ""; background: var(--afn-orange); }
.afn-auth__form-area { display: flex; flex: 1; align-items: center; padding: 20px 0 48px; }
.afn-auth__form-wrap { width: 100%; }
.afn-auth__welcome { margin-bottom: 38px; }
.afn-auth__form-context { margin: 0 0 20px; color: var(--afn-muted); font-size: 13px; font-weight: 500; }
.afn-auth__welcome h1 { margin: 0 0 14px; color: var(--afn-ink); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -1.25px; }
.afn-auth__welcome > p:last-child { margin: 0; color: var(--afn-muted); font-size: 14px; line-height: 1.65; }
.afn-auth__field { margin-bottom: 24px; }
.afn-auth__label { display: block; margin-bottom: 10px; color: #303942; font-size: 14px; font-weight: 500; line-height: 1.5; }
.afn-auth__input-wrap { position: relative; }
.afn-auth__input-icon { position: absolute; z-index: 1; top: 50%; left: 16px; transform: translateY(-50%); color: #737d89; pointer-events: none; }
.afn-auth .afn-auth__input {
    width: 100%;
    height: 56px;
    padding: 15px 14px 15px 46px;
    border: 1px solid var(--afn-border);
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--afn-ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    transition: border-color 160ms, box-shadow 160ms;
}
.afn-auth .afn-auth__input::placeholder { color: #68727e; font-size: 13px; opacity: 1; }
.afn-auth .afn-auth__input:hover { border-color: #89939f; }
.afn-auth .afn-auth__input:focus { border-color: var(--afn-action); background: #fff; box-shadow: 0 0 0 3px #b94e081c; }
.afn-auth .afn-auth__input--password { padding-right: 54px; }
.afn-auth__password-toggle { position: absolute; top: 6px; right: 5px; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #68727e; cursor: pointer; touch-action: manipulation; transition: background 160ms, color 160ms; }
.afn-auth__password-toggle:hover { background: #eef0f3; color: var(--afn-ink); }
.afn-auth__password-toggle svg { width: 20px; height: 20px; }
.afn-auth__eye-slash { display: none; }
.afn-auth__password-toggle[aria-pressed="true"] .afn-auth__eye-slash { display: block; }
.afn-auth .afn-auth__submit {
    width: 100%;
    min-height: 56px;
    margin-top: 12px;
    padding: 16px 24px !important;
    border: 1px solid var(--afn-action) !important;
    border-radius: 8px;
    background: var(--afn-action) !important;
    color: #fff !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 160ms, box-shadow 160ms;
}
.afn-auth .afn-auth__submit:hover:not(:disabled) { background: #9e4004 !important; box-shadow: 0 4px 12px #b94e0824; }
.afn-auth .afn-auth__submit:active:not(:disabled) { background: #8d3904 !important; box-shadow: inset 0 2px 4px #0002; }
.afn-auth .afn-auth__submit:disabled { opacity: .65; cursor: wait; }
.afn-auth__submit .indicator-label { display: block; }
.afn-auth__submit[data-kt-indicator="on"] .indicator-label { display: none; }
.afn-auth__access-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 23px 0 0; color: var(--afn-muted); font-size: 12px; line-height: 1.7; text-align: center; }
.afn-auth__access-note svg { width: 14px; height: 14px; }
.afn-auth__main-footer { padding-top: 20px; border-top: 1px solid #dfe3e8; color: var(--afn-muted); font-size: 12px; line-height: 1.7; text-align: center; }

.afn-auth__errors, .afn-auth__notice { margin-bottom: 24px; padding: 14px 16px; border: 1px solid #e7bcb8; border-radius: 8px; background: #fff2f0; color: var(--afn-error); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.afn-auth__errors strong { font-weight: 600; }
.afn-auth__errors ul { margin: 6px 0 0; padding-left: 18px; }
.afn-auth__notice { border-color: #b8d9c7; background: #eff8f3; color: #28633f; }
.afn-auth .afn-auth__input.is-invalid, .afn-auth .fv-plugins-bootstrap5-row-invalid .afn-auth__input { border-color: var(--afn-error); background-image: none; }
.afn-auth__field-error, .afn-auth .fv-plugins-message-container { margin-top: 8px; color: var(--afn-error); font-size: 12px; line-height: 1.6; }
.afn-auth .swal2-popup { border-radius: 14px; font-family: inherit; }
.afn-auth .swal2-confirm.btn-primary { border: 0; background: var(--afn-action) !important; color: #fff; }

@media (min-width: 1600px) {
    .afn-auth__shell { grid-template-columns: minmax(0, 1fr) 460px; padding: 64px 80px; }
    .afn-auth__main { padding-right: 48px; padding-left: 48px; }
    .afn-auth__main::before { left: 48px; }
    .afn-auth__brand { padding-bottom: 42px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .afn-auth__shell { grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; padding: 32px; }
    .afn-auth__main { padding-right: 32px; padding-left: 32px; }
    .afn-auth__main::before { left: 32px; }
    .afn-auth__brand-copy h2 { font-size: 48px; letter-spacing: -2px; }
    .afn-auth__desktop-break { display: none; }
}
@media (min-width: 992px) and (max-height: 800px) {
    .afn-auth__shell { padding-top: 28px; padding-bottom: 28px; }
    .afn-auth__main { min-height: 640px; padding-top: 34px; padding-bottom: 22px; }
    .afn-auth__form-area { padding-top: 12px; padding-bottom: 32px; }
    .afn-auth__welcome { margin-bottom: 30px; }
    .afn-auth__brand { padding-bottom: 25px; }
}
@media (max-width: 991px) {
    .afn-auth__backdrop { position: absolute; height: 560px; }
    .afn-auth__backdrop img { object-position: 40% 40%; }
    .afn-auth__backdrop::after { background: linear-gradient(180deg, #10171b55, #10171bb8 35%, #151c2066 70%, var(--afn-night) 100%); }
    .afn-auth__shell { display: flex; flex-direction: column; flex-shrink: 0; align-items: center; gap: 32px; padding: 32px 32px 40px; }
    .afn-auth__brand { flex-shrink: 0; width: 100%; min-height: 250px; padding: 0; }
    .afn-auth__brand-link img { width: 120px; height: auto; }
    .afn-auth__brand-copy { margin-top: 45px; }
    .afn-auth__brand-copy h2 { font-size: 38px; line-height: 1.1; letter-spacing: -1.5px; }
    .afn-auth__brand-copy p { max-width: 400px; margin-top: 16px; font-size: 14px; }
    .afn-auth__desktop-break { display: none; }
    .afn-auth__main { flex-shrink: 0; width: 100%; max-width: 480px; min-height: 590px; padding: 40px 42px 26px; }
    .afn-auth__form-area { padding: 12px 0 40px; }
}
@media (max-width: 575px) {
    .afn-auth__backdrop { height: 380px; }
    .afn-auth__backdrop img { object-position: 37% 35%; }
    .afn-auth__backdrop::after { background: linear-gradient(180deg, #10171b66, #10171bb8 48%, var(--afn-night)); }
    .afn-auth__shell { gap: 24px; padding: 24px 20px; }
    .afn-auth__brand { min-height: 190px; }
    .afn-auth__brand-link img { width: 103px; }
    .afn-auth__brand-copy { margin-top: 32px; }
    .afn-auth__brand-copy h2 { font-size: 32px; letter-spacing: -1.25px; }
    .afn-auth__brand-copy p { display: none; }
    .afn-auth__main { min-height: 0; padding: 32px 25px 23px; border-radius: 14px; }
    .afn-auth__main::before { left: 25px; }
    .afn-auth__form-area { padding: 0 0 28px; }
    .afn-auth__form-context { margin-bottom: 14px; font-size: 12px; }
    .afn-auth__welcome { margin-bottom: 28px; }
    .afn-auth__welcome h1 { font-size: 28px; letter-spacing: -1px; }
    .afn-auth__welcome > p:last-child { font-size: 13px; }
    .afn-auth__field { margin-bottom: 21px; }
    .afn-auth__label { font-size: 13px; }
    .afn-auth .afn-auth__input::placeholder { font-size: 12px; }
    .afn-auth__access-note { gap: 6px; margin-top: 19px; font-size: 11px; }
    .afn-auth__main-footer { padding-top: 17px; }
}
@media (max-width: 359px) {
    .afn-auth__shell { padding-right: 12px; padding-left: 12px; }
    .afn-auth__main { padding-right: 20px; padding-left: 20px; }
    .afn-auth__brand-copy h2 { max-width: 260px; font-size: 30px; }
}
@media (max-height: 500px) and (min-width: 576px) and (max-width: 991px) {
    .afn-auth__shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); align-items: start; gap: 24px; padding: 24px; }
    .afn-auth__brand { min-height: 240px; }
    .afn-auth__brand-copy h2 { font-size: 32px; }
    .afn-auth__brand-copy p { display: none; }
    .afn-auth__main { padding: 30px 26px 24px; }
    .afn-auth__main::before { left: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .afn-auth .afn-auth__input, .afn-auth .afn-auth__submit, .afn-auth__password-toggle { transition: none; }
}
