/* Authentication surfaces share the application palette and remain independent
   of the signed-in navigation shell. */
.afra-auth-page {
    --auth-canvas: #f5f7f9;
    --auth-surface: #fff;
    --auth-ink: #172b3a;
    --auth-muted: #647685;
    --auth-border: #e3e9ed;
    --auth-soft: #f5f8f9;
    --auth-accent: #087f6d;
    --auth-danger: #a83a3a;
    --auth-danger-soft: #fff3f2;
    --auth-danger-border: #f0d5d3;
    min-width: 0;
    background: var(--auth-canvas);
    color: var(--auth-ink);
}

.afra-auth-page .main-content {
    margin: 0 !important;
}

.afra-auth-page .page-content {
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent;
}

.afra-auth-page .page-content > .container-fluid.app-container {
    padding: 0;
}

.afra-auth-page .area {
    display: none;
}

.afra-auth-page :is(.signin-shell, .afra-auth-flow) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    min-height: 100vh;
    min-height: 100svh;
}

.afra-auth-page .signin-shell {
    padding-block: 32px;
}

.afra-auth-page :is(.signin-shell, .two-step-shell) > .container {
    width: 100%;
    max-width: 1160px;
    padding: 0;
}

.afra-auth-page :is(.signin-card, .two-step-card, .password-change-card) {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 28px !important;
    background: var(--auth-surface) !important;
    box-shadow: 0 24px 64px -30px rgba(23, 43, 58, .23), 0 2px 8px rgba(23, 43, 58, .025) !important;
    margin: 0;
}

.afra-auth-page :is(.signin-panel, .two-step-cover, .two-step-form) {
    padding: 44px;
    height: 100%;
}

.afra-auth-page :is(.signin-hero, .two-step-cover) {
    position: relative;
    isolation: isolate;
    color: #fff;
    background: #0a655b !important;
    background-image: radial-gradient(ellipse at 0 100%, rgba(5, 41, 42, .65), transparent 70%),
        linear-gradient(140deg, rgba(255, 255, 255, .05), transparent 65%) !important;
}

.afra-auth-page :is(.signin-hero, .two-step-cover)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .3;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .065) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, transparent, #000);
}

.afra-auth-page .signin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.afra-auth-page .signin-brand img {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    object-fit: contain;
    padding: 8px;
    background: #fff;
    border-radius: 14px;
}

.afra-auth-page .signin-brand :is(small, strong) {
    display: block;
}

.afra-auth-page .signin-brand small {
    color: #c2dfd8 !important;
    font-size: 11px;
    margin-bottom: 4px;
}

.afra-auth-page .signin-brand strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
}

.afra-auth-page .signin-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c6e5dd;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 18px;
}

.afra-auth-page .signin-kicker > span {
    height: 6px;
    width: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #a6dccb;
    box-shadow: 0 0 0 4px rgba(166, 220, 203, .12);
}

.afra-auth-page .signin-hero h2,
.afra-auth-page .two-step-cover h2 {
    color: #fff !important;
    font-weight: 800;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.65;
    letter-spacing: -.8px;
    margin-bottom: 14px;
}

.afra-auth-page :is(.signin-hero-description, .two-step-cover > p) {
    color: #d0e5e0;
    font-size: 13px;
    line-height: 2;
    max-width: 370px;
    margin-bottom: 24px;
}

.afra-auth-page .signin-workspace-preview {
    padding: 0;
    margin: 26px 0;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 15px 28px rgba(0, 32, 29, .12);
}

.afra-auth-page .signin-preview-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.afra-auth-page .signin-preview-mark {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .14);
    font-size: 15px;
}

.afra-auth-page .signin-preview-dots {
    margin-inline-start: auto;
    letter-spacing: 3px;
    opacity: .65;
}

.afra-auth-page .signin-preview-main {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.afra-auth-page .signin-preview-side {
    display: grid;
    align-content: start;
    gap: 14px;
    padding-top: 4px;
    width: 36px;
    flex-shrink: 0;
}

.afra-auth-page .signin-preview-side span {
    height: 6px;
    background: rgba(255, 255, 255, .13);
    border-radius: 3px;
}

.afra-auth-page .signin-preview-side span:first-child {
    background: #a6dccb;
}

.afra-auth-page .signin-preview-content {
    flex: 1;
    min-width: 0;
}

.afra-auth-page .signin-preview-greeting {
    font-size: 10px;
    margin-bottom: 12px;
}

.afra-auth-page .signin-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.afra-auth-page .signin-preview-stats > div {
    display: grid;
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    font-size: 8px;
}

.afra-auth-page .signin-preview-stats i {
    font-size: 17px;
    color: #b9e9d8;
}

.afra-auth-page .signin-preview-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: #b9e9d8;
    font-size: 12px;
}

.afra-auth-page .signin-preview-line span {
    width: 60%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .22);
}

.afra-auth-page .signin-preview-line b {
    margin-inline-start: auto;
    width: 30px;
    height: 11px;
    border-radius: 4px;
    background: rgba(185, 233, 216, .18);
}

.afra-auth-page .signin-updates {
    border: 0 !important;
    background: transparent !important;
    margin-top: 20px;
    max-height: 190px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #74a99b transparent;
    overscroll-behavior: contain;
}

.afra-auth-page .signin-updates-header {
    color: #e7f5ef;
    font-size: 12px;
    margin-bottom: 12px;
}

.afra-auth-page .signin-updates-header i {
    margin-inline-end: 5px;
    vertical-align: middle;
}

.afra-auth-page .signin-update {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.afra-auth-page .signin-update-date {
    font-size: 10px;
    color: #bed9d2;
    margin-bottom: 4px;
}

.afra-auth-page .signin-update > strong {
    color: #fff;
}

.afra-auth-page .signin-notice-body {
    color: #d0e5e0;
    margin-top: 4px;
    overflow-x: auto;
}

.afra-auth-page .signin-notice-body :is(p, ul, ol) {
    margin-bottom: 6px;
}

.afra-auth-page .signin-notice-body a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.afra-auth-page .signin-notice-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.afra-auth-page .signin-notice-body table {
    max-width: 100%;
    color: inherit;
}

.afra-auth-page .signin-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 36px;
    background: var(--auth-surface) !important;
}

.afra-auth-page .signin-hero {
    padding: 28px 36px;
}

.afra-auth-page .signin-form-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--auth-muted);
    font-size: 12px;
}

.afra-auth-page .signin-form-brand img {
    width: 29px;
    height: 29px;
    object-fit: contain;
}

.afra-auth-page .auth-eyebrow {
    color: var(--auth-accent);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.afra-auth-page :is(.signin-form-panel, .two-step-form, .password-change-card) h1 {
    color: var(--auth-ink);
    font-size: clamp(25px, 2.6vw, 34px);
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: -.65px;
    margin: 0 0 10px;
}

.afra-auth-page :is(.signin-form-panel > p, .two-step-form > p, .password-change-intro) {
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 2;
}

.afra-auth-page .signin-form {
    margin-top: 14px;
}

.afra-auth-page .signin-form .form-label {
    margin-bottom: 6px;
}

.afra-auth-page .form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 9px;
}

.afra-auth-page .text-muted {
    color: var(--auth-muted) !important;
}

.afra-auth-page :is(.signin-form, .two-step-form, .password-change-card) .form-control {
    min-height: 52px;
    border: 1px solid var(--auth-border) !important;
    border-radius: 11px !important;
    background: var(--auth-surface) !important;
    color: var(--auth-ink) !important;
    padding: 12px 15px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(23, 43, 58, .025);
    transition: border-color .16s, box-shadow .16s;
}

.afra-auth-page .form-control::placeholder {
    color: #8a99a4;
    opacity: 1;
    font-size: 12px;
}

.afra-auth-page :is(.signin-form, .two-step-form, .password-change-card) .form-control:focus {
    border-color: var(--auth-accent) !important;
    box-shadow: 0 0 0 4px rgba(8, 127, 109, .1) !important;
}

.afra-auth-page .password-addon {
    min-height: 52px;
    width: 48px;
    font-size: 19px;
    border-radius: 10px;
}

.afra-auth-page .signin-inline-note {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 9px 14px;
    margin: 10px 0 14px;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.9;
}

.afra-auth-page .signin-inline-note > span {
    flex: 1 1 180px;
}

.afra-auth-page .signin-link-btn {
    border: 0;
    background: transparent;
    color: var(--auth-accent);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-height: 32px;
    padding: 3px 0;
}

.afra-auth-page :is(.signin-submit, .two-step-form .btn-primary, .password-change-card .btn-primary) {
    min-height: 52px;
    padding: 12px 20px;
    border: 1px solid #087f6d !important;
    border-radius: 11px !important;
    background: #087f6d !important;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 14px -7px rgba(8, 127, 109, .5);
}

.afra-auth-page :is(.signin-submit, .two-step-form .btn-primary, .password-change-card .btn-primary):hover {
    background: #066b5c !important;
    border-color: #066b5c !important;
}

.afra-auth-page .signin-submit .label-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.afra-auth-page .signin-submit .label-default i {
    font-size: 18px;
}

.afra-auth-page .signin-form :is(.form-control, .password-addon, .signin-submit) {
    min-height: 46px;
}

.afra-auth-page .signin-form :is(.form-control, .signin-submit) {
    padding-block: 8px;
}

.afra-auth-page .signin-busy {
    pointer-events: none;
}

.afra-auth-page .signin-busy .form-control {
    opacity: .65;
}

.afra-auth-page .signin-submit:disabled {
    opacity: .75;
    cursor: progress;
}

.afra-auth-page .signin-status:empty {
    display: none;
}

.afra-auth-page .signin-status {
    margin-top: 16px;
}

.afra-auth-page .alert-danger {
    background: var(--auth-danger-soft) !important;
    border-color: var(--auth-danger-border) !important;
    color: var(--auth-danger) !important;
    font-size: 12px;
    line-height: 1.9;
}

.afra-auth-page .signin-footnote {
    padding-top: 14px;
    margin-top: 16px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.9;
}

.afra-auth-page .signin-footnote > strong {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-ink);
    margin-bottom: 8px;
}

.afra-auth-page .signin-footnote > strong i {
    color: var(--auth-accent);
    font-size: 17px;
}

.afra-auth-page .support-list {
    display: grid;
    gap: 4px;
}

.afra-auth-page .support-list a {
    color: var(--auth-accent);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.afra-auth-page .auth-theme-toggle {
    position: fixed;
    top: 20px;
    left: 24px;
    z-index: 20;
    display: grid;
    place-items: center;
    height: 42px;
    width: 42px;
    padding: 0;
    color: #526775;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(23, 43, 58, .04);
}

.afra-auth-page :is(button, a):focus-visible {
    outline: 3px solid #329e8c;
    outline-offset: 4px;
}

.afra-auth-page .two-step-shell > .container > .row > [class*="col-"] {
    width: 100%;
    max-width: 1010px;
}

.afra-auth-page .two-step-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    margin-bottom: 40px !important;
}

.afra-auth-page .two-step-points {
    display: grid;
    gap: 0;
    margin-top: 28px;
}

.afra-auth-page .two-step-point {
    background: transparent !important;
    border: 0 !important;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, .14) !important;
    font-size: 12px;
    line-height: 1.9;
    color: #d0e5e0;
}

.afra-auth-page .two-step-point strong {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: #fff;
}

.afra-auth-page .two-step-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--auth-surface) !important;
}

.afra-auth-page .two-step-form #txtcode {
    min-height: 64px;
    font-size: 25px;
    letter-spacing: .35em;
    text-align: center;
    direction: ltr;
    font-variant-numeric: tabular-nums;
    padding-inline: 12px;
}

.afra-auth-page .two-step-form #txtcode::placeholder {
    font-size: 25px;
    color: #aab6bd;
}

.afra-auth-page .two-step-form .btn-outline-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 11px;
    border-color: var(--auth-border);
    color: var(--auth-muted);
    font-size: 12px;
    margin-top: 4px;
}

.afra-auth-page .two-step-form .btn-outline-secondary:hover {
    color: var(--auth-ink);
    background: var(--auth-soft);
}

.afra-auth-page .auth-step-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    border: 1px solid rgba(8, 127, 109, .1);
    border-radius: 16px;
    background: #eaf6f1;
    color: var(--auth-accent);
    font-size: 26px;
}

.afra-auth-page .password-change-card {
    max-width: 500px;
}

.afra-auth-page .password-change-card > .card-body {
    padding: 40px;
}

.afra-auth-page .password-change-card h1 {
    font-size: 26px;
}

.afra-auth-page #expired-password-form {
    margin-top: 26px;
}

.afra-auth-page .auth-field-hint {
    color: var(--auth-muted);
    font-size: 11px;
    margin: -7px 0 18px;
}

.afra-auth-page .auth-return-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    margin-top: 14px;
    color: var(--auth-muted);
    font-size: 12px;
}

.afra-auth-page #supportModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.afra-auth-page #supportModal .modal-body {
    font-size: 13px;
    line-height: 2.1;
    overflow-wrap: anywhere;
}

[data-bs-theme="dark"] .afra-auth-page {
    --auth-canvas: #111b25;
    --auth-surface: #192733;
    --auth-ink: #e3ecf1;
    --auth-muted: #a4b6c2;
    --auth-border: #30434e;
    --auth-soft: #21323e;
    --auth-accent: #73d5b9;
    --auth-danger: #ffb5b5;
    --auth-danger-soft: #3c292d;
    --auth-danger-border: #654048;
}

[data-bs-theme="dark"] .afra-auth-page :is(.signin-hero, .two-step-cover) {
    background-color: #0b504a !important;
}

[data-bs-theme="dark"] .afra-auth-page .auth-step-icon {
    background: #1c3c37;
    border-color: #2c5147;
}

@media (max-width: 1199.98px) {
    .afra-auth-page :is(.two-step-cover, .two-step-form) {
        padding: 36px;
    }

    .afra-auth-page .signin-panel {
        padding: 24px 28px;
    }
}

@media (max-width: 991.98px) {
    .afra-auth-page :is(.signin-shell, .afra-auth-flow) {
        padding: 72px 20px 32px;
        align-items: flex-start;
    }

    .afra-auth-page :is(.signin-shell, .two-step-shell) > .container {
        max-width: 620px;
    }

    .afra-auth-page .two-step-cover {
        padding: 30px 36px;
    }

    .afra-auth-page .signin-brand,
    .afra-auth-page .two-step-logo {
        margin-bottom: 24px !important;
    }

    .afra-auth-page .signin-workspace-preview {
        display: none;
    }

    .afra-auth-page .signin-hero-heading br,
    .afra-auth-page .two-step-cover h2 br {
        display: none;
    }

    .afra-auth-page :is(.signin-hero h2, .two-step-cover h2) {
        font-size: 26px;
    }

    .afra-auth-page .signin-updates {
        max-height: 190px;
        margin-top: 16px;
    }

    .afra-auth-page .two-step-cover .two-step-points {
        margin-top: 20px;
    }
}

@media (max-width: 575.98px) {
    .afra-auth-page :is(.signin-shell, .afra-auth-flow) {
        padding: 68px 14px 24px;
    }

    .afra-auth-page :is(.signin-card, .two-step-card, .password-change-card) {
        border-radius: 21px !important;
    }

    .afra-auth-page :is(.signin-panel, .two-step-cover, .two-step-form, .password-change-card > .card-body) {
        padding: 28px 24px;
    }

    .afra-auth-page .signin-panel {
        padding: 22px 20px;
    }

    .afra-auth-page #expired-password-form {
        margin-top: 22px;
    }

    .afra-auth-page :is(.signin-form, .two-step-form, .password-change-card) .form-control {
        font-size: 16px;
    }

    .afra-auth-page .signin-form .form-control {
        font-size: 16px !important;
    }

    .afra-auth-page .auth-theme-toggle {
        top: 16px;
        left: 16px;
        height: 38px;
        width: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .afra-auth-page *, .afra-auth-page *::before, .afra-auth-page *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
