:root {
    --auth-ink: #17212b;
    --auth-muted: #66727f;
    --auth-border: #d7dee5;
    --auth-surface: #ffffff;
    --auth-page: #f3f6f7;
    --auth-brand: #0b6856;
    --auth-brand-hover: #085345;
    --auth-brand-soft: #e7f3ef;
    --auth-accent: #e99a32;
    --auth-danger: #b42318;
    --auth-danger-soft: #fef3f2;
    --auth-success: #137a55;
    --auth-success-soft: #eaf7f1;
    --auth-focus: rgba(11, 104, 86, 0.2);
    --auth-radius-sm: 6px;
    --auth-radius-md: 8px;
    --auth-shadow: 0 18px 48px rgba(24, 42, 51, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--auth-page);
    color: var(--auth-ink);
    font-family: "poppinsregular", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(320px, 42%) minmax(420px, 58%);
    min-height: 100vh;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    overflow: hidden;
    padding: 42px clamp(32px, 5vw, 72px);
    background: #123b36;
    color: #fff;
}

.auth-brand-panel::after {
    position: absolute;
    right: -110px;
    bottom: -100px;
    width: 420px;
    height: 420px;
    border: 70px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    content: "";
}

.auth-project-logo {
    position: relative;
    z-index: 1;
    width: min(270px, 74%);
    height: auto;
    padding: 10px 14px;
    background: #fff;
    border-radius: var(--auth-radius-sm);
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 490px;
    margin: auto 0;
    padding: 64px 0;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    color: #bde6dc;
    font-family: "poppinssemibold", Arial, sans-serif;
    font-size: 13px;
    text-transform: uppercase;
}

.auth-kicker::before {
    width: 28px;
    height: 3px;
    background: var(--auth-accent);
    content: "";
}

.auth-brand-title {
    max-width: 620px;
    margin: 0;
    font-family: "poppinssemibold", Arial, sans-serif;
    font-size: clamp(32px, 4vw, 54px);
    font-weight: normal;
    line-height: 1.12;
}

.auth-brand-text {
    max-width: 480px;
    margin: 24px 0 0;
    color: #d7e8e4;
    font-size: 16px;
    line-height: 1.75;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    color: #b9cfca;
    font-size: 12px;
}

.auth-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 72px 36px 48px;
}

.auth-language {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 3;
}

.auth-language .navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-language .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-surface);
    color: var(--auth-ink);
}

.auth-language .dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: none;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-surface);
    box-shadow: 0 12px 28px rgba(24, 42, 51, 0.14);
}

.auth-language .dropdown-menu.show {
    display: block;
}

.auth-language .dropdown-item {
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    color: var(--auth-ink);
    cursor: pointer;
    text-decoration: none;
}

.auth-language .dropdown-item:hover {
    background: var(--auth-brand-soft);
    color: var(--auth-brand-hover);
}

.auth-card {
    width: min(100%, 470px);
    padding: 40px;
    border: 1px solid #e1e7eb;
    border-radius: var(--auth-radius-md);
    background: var(--auth-surface);
    box-shadow: var(--auth-shadow);
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.auth-mobile-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.auth-mobile-brand strong {
    display: block;
    font-family: "poppinssemibold", Arial, sans-serif;
    font-size: 16px;
    font-weight: normal;
}

.auth-mobile-brand span {
    display: block;
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-brand-soft);
    color: var(--auth-brand);
    font-size: 20px;
}

.auth-icon.is-success {
    background: var(--auth-success-soft);
    color: var(--auth-success);
}

.auth-icon.is-danger {
    background: var(--auth-danger-soft);
    color: var(--auth-danger);
}

.auth-title {
    margin: 0;
    font-family: "poppinssemibold", Arial, sans-serif;
    font-size: 27px;
    font-weight: normal;
    line-height: 1.25;
}

.auth-subtitle {
    margin: 12px 0 30px;
    color: var(--auth-muted);
    line-height: 1.65;
}

.auth-form-group {
    margin-bottom: 22px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-ink);
    font-family: "poppinsmedium", Arial, sans-serif;
    font-size: 14px;
    font-weight: normal;
}

.auth-form-group input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #fff;
    color: var(--auth-ink);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form-group input:hover {
    border-color: #9eabb5;
}

.auth-form-group input:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px var(--auth-focus);
}

.auth-form-group input[aria-invalid="true"],
.auth-form-group input.is-invalid {
    border-color: var(--auth-danger);
}

.auth-password-field {
    position: relative;
}

.auth-password-field input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-password-toggle:hover {
    background: #f2f5f6;
    color: var(--auth-ink);
}

.auth-password-toggle:focus {
    outline: 2px solid var(--auth-brand);
    outline-offset: 1px;
}

.auth-errors,
.auth-field-error {
    color: var(--auth-danger);
    font-size: 13px;
}

.auth-errors {
    margin: 0 0 22px;
    padding: 12px 14px;
    border-left: 3px solid var(--auth-danger);
    border-radius: 0 var(--auth-radius-sm) var(--auth-radius-sm) 0;
    background: var(--auth-danger-soft);
}

.auth-errors ul,
.auth-help ul {
    margin: 0;
    padding-left: 18px;
}

.auth-field-error {
    display: block;
    margin-top: 7px;
}

.auth-help {
    margin-top: 8px;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.55;
}

.auth-submit,
.auth-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid var(--auth-brand);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-brand);
    color: #fff;
    font-family: "poppinssemibold", Arial, sans-serif;
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.auth-submit:hover,
.auth-primary-link:hover {
    border-color: var(--auth-brand-hover);
    background: var(--auth-brand-hover);
    color: #fff;
    text-decoration: none;
}

.auth-submit:focus,
.auth-primary-link:focus {
    outline: 3px solid var(--auth-focus);
    outline-offset: 2px;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--auth-brand);
    font-family: "poppinsmedium", Arial, sans-serif;
    font-size: 14px;
    text-decoration: none;
}

.auth-secondary-link:hover {
    color: var(--auth-brand-hover);
    text-decoration: underline;
}

.auth-link-row {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.auth-note {
    display: flex;
    gap: 11px;
    margin: 24px 0 0;
    padding: 14px;
    border: 1px solid #d9e9e4;
    border-radius: var(--auth-radius-sm);
    background: #f5faf8;
    color: #3e5c54;
    font-size: 13px;
    line-height: 1.55;
}

.auth-note i {
    margin-top: 3px;
    color: var(--auth-brand);
}

.auth-status-actions {
    margin-top: 30px;
}

@media (max-width: 900px) {
    .auth-layout {
        display: block;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
        padding: 76px 24px 36px;
    }

    .auth-mobile-brand {
        display: flex;
    }
}

@media (max-width: 520px) {
    .auth-main {
        align-items: flex-start;
        padding: 70px 16px 24px;
    }

    .auth-language {
        top: 14px;
        right: 16px;
    }

    .auth-card {
        padding: 28px 22px;
        box-shadow: 0 10px 26px rgba(24, 42, 51, 0.09);
    }

    .auth-title {
        font-size: 23px;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
