:root {
    --auth-primary: #711d35;
    --auth-primary-dark: #5f172d;
    --auth-danger: #ff6868;
    --auth-success: #12b85b;
    --auth-text: #242424;
    --auth-muted: #747474;
    --auth-border: #d7d7d7;
    --auth-panel: #ffffff;
}

* {
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

body.auth-page {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--auth-text);
    background:
        linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
        url("../../../images/full-background.png") center center / cover no-repeat fixed,
        #eeeeee;
    display: grid;
    place-items: center;
    padding: 24px 14px;
}

.auth-card {
    width: min(100%, 360px);
    background: var(--auth-panel);
    border: 1px solid #d3d3d3;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.auth-brandbar {
    min-height: 42px;
    background: var(--auth-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 10px 18px;
}

.auth-body {
    padding: 14px 28px 18px;
}

.auth-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 4px 0 10px;
}

.auth-logo {
    width: 108px;
    height: 108px;
    object-fit: contain;
}

.auth-title {
    margin: 0 0 14px;
    text-align: center;
    color: var(--auth-primary);
    font-size: 1rem;
    font-weight: 700;
}

.auth-field {
    margin-bottom: 10px;
}

.auth-input-group {
    display: grid;
    grid-template-columns: 38px 1fr;
    min-height: 39px;
    border: 1px solid var(--auth-border);
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-group:focus-within {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(113, 29, 53, 0.10);
}

.auth-input-icon {
    display: grid;
    place-items: center;
    background: #efefef;
    color: #727272;
    font-size: 17px;
    border-right: 1px solid var(--auth-border);
}

.auth-input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 11px;
    font-size: 13px;
    color: #2b2b2b;
    background: #fff;
}

.auth-input::placeholder {
    color: #c2c2c2;
}

.auth-help {
    margin: 4px 0 12px;
    color: var(--auth-muted);
    font-size: 10.5px;
    line-height: 1.35;
}

.auth-alert {
    border-radius: 0;
    margin: 8px 0 10px;
    padding: 8px 10px;
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.auth-alert-danger {
    background: var(--auth-danger);
}

.auth-alert-success {
    background: var(--auth-success);
}

.auth-alert-info {
    background: #4d84b8;
}

.auth-button {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 4px;
    background: var(--auth-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.08s ease;
}

.auth-button:hover,
.auth-button:focus-visible {
    background: var(--auth-primary-dark);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button-secondary {
    background: #f3f3f3;
    color: var(--auth-primary);
    border: 1px solid #d9d9d9;
}

.auth-button-secondary:hover,
.auth-button-secondary:focus-visible {
    background: #e9e9e9;
}

.auth-link-row {
    text-align: center;
    margin-top: 16px;
}

.auth-link {
    color: #1685c4;
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 700;
}

.auth-link:hover,
.auth-link:focus-visible {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    color: #7b7b7b;
    font-size: 9px;
    line-height: 1.35;
    padding: 0 24px 14px;
}

.auth-code-input {
    font-size: 22px;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 700;
}

.auth-stack {
    display: grid;
    gap: 9px;
}

.auth-stack-spaced {
    margin-top: 10px;
}

.auth-modal[hidden] {
    display: none;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.36);
    padding: 18px;
}

.auth-modal-card {
    width: min(100%, 430px);
    background: #fff;
    border: 1px solid #d0d0d0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.auth-modal-title {
    margin: 0;
    padding: 10px 18px;
    background: var(--auth-primary);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

.auth-modal-success .auth-modal-title {
    background: var(--auth-success);
}

.auth-modal-message {
    margin: 0;
    padding: 18px 20px 10px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.auth-modal-actions {
    display: flex;
    justify-content: center;
    padding: 0 18px 14px;
}

.auth-modal-actions .auth-button {
    width: auto;
    min-width: 130px;
    min-height: 32px;
    padding: 6px 18px;
}

@media (max-width: 560px) {
    body.auth-page {
        padding: 12px;
        background-attachment: scroll;
    }

    .auth-card {
        width: min(100%, 390px);
    }

    .auth-body {
        padding: 12px 20px 18px;
    }

    .auth-logo-wrap {
        min-height: 105px;
    }

    .auth-logo {
        width: 94px;
        height: 94px;
    }
}

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