/* Customer authentication — one centered task card on a softly faded grid. */
body.vetra-auth {
    --auth-edge-gap: 20px;
    --auth-edge-total: 40px;
    position: relative;
    display: grid;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: #ffffff !important;
}

/* Fine blue/cyan grid. The mask makes the lines dissolve before the edges. */
body.vetra-auth::before,
body.vetra-auth::after {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
}

body.vetra-auth::before {
    background-image:
        linear-gradient(rgba(59, 130, 246, .13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, .11) 1px, transparent 1px);
    background-position: center;
    background-size: 30px 30px;
    opacity: .7;
    -webkit-mask-image: radial-gradient(ellipse 72% 78% at center, #000 0%, rgba(0, 0, 0, .95) 36%, rgba(0, 0, 0, .52) 62%, transparent 91%);
    mask-image: radial-gradient(ellipse 72% 78% at center, #000 0%, rgba(0, 0, 0, .95) 36%, rgba(0, 0, 0, .52) 62%, transparent 91%);
}

/* White vignette keeps the corners quiet and lets the grid fade naturally. */
body.vetra-auth::after {
    background: radial-gradient(ellipse 74% 80% at center, transparent 28%, rgba(255, 255, 255, .12) 50%, rgba(255, 255, 255, .72) 80%, #ffffff 100%);
}

.vetra-auth .auth-wrapper {
    position: fixed !important;
    z-index: 1;
    inset: 0 !important;
    display: grid !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: var(--auth-edge-gap) !important;
    place-items: center !important;
    overflow: hidden;
    background: transparent !important;
}

.vetra-auth .auth-card {
    position: relative;
    width: 424px;
    max-width: 100%;
    max-height: calc(100vh - var(--auth-edge-total));
    max-height: calc(100dvh - var(--auth-edge-total));
    margin: 0 !important;
    align-self: center !important;
    justify-self: center !important;
    padding: 30px !important;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--vt-text);
    border: 1px solid rgba(191, 219, 254, .86) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 20px 55px rgba(30, 64, 175, .10), 0 3px 12px rgba(15, 23, 42, .05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.vetra-auth .brand-header {
    display: flex;
    justify-content: center;
    margin: 0 0 18px;
    text-align: center;
}

.vetra-auth .brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.vetra-auth .brand-icon {
    width: 50px;
    height: 50px;
    border: 1px solid #fafafa;
    border-radius: 14px;
    background: var(--vt-surface-3);
    box-shadow: 0 8px 20px rgba(59, 130, 246, .13);
    object-fit: cover;
}

.vetra-auth .auth-title {
    margin: 0 0 8px;
    color: var(--vt-text-strong);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.035em;
    text-align: center;
}

.vetra-auth .auth-subtitle {
    max-width: 350px;
    margin: 0 auto;
    color: var(--vt-muted) !important;
    font-size: 12px;
    line-height: 1.65;
    text-align: center;
}

.vetra-auth form {
    width: 100%;
}

.vetra-auth form :is(.form-control, .form-select) {
    text-align: left !important;
}

.vetra-auth form button {
    text-align: center !important;
}

.vetra-auth .form-floating {
    position: relative;
}

.vetra-auth .form-floating > .form-control {
    height: 58px;
    min-height: 58px;
    padding: 1rem 12px;
    color: #a6a6a6 !important;
    border: 1px solid rgba(148, 163, 184, .25) !important;
    border-radius: 6px !important;
    background: transparent !important;
    font-size: 16px;
    text-align: left;
    transition:
        color .2s ease,
        padding .2s ease,
        border-color .22s cubic-bezier(.2, .7, .2, 1),
        background-color .22s ease,
        box-shadow .24s cubic-bezier(.2, .7, .2, 1);
}

.vetra-auth .form-floating > .form-control::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

.vetra-auth .form-floating > .form-control:hover {
    border-color: rgba(148, 163, 184, .42) !important;
}

.vetra-auth .form-floating > .form-control:focus {
    border-color: #60a5fa !important;
    padding: 1.625rem 12px .625rem;
    outline: 0 !important;
    background: rgba(239, 246, 255, .32) !important;
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, .12),
        0 7px 18px rgba(59, 130, 246, .06) !important;
}

.vetra-auth .form-floating > .form-control:not(:placeholder-shown) {
    padding: 1.625rem 12px .625rem;
}

.vetra-auth .form-floating > label {
    width: 100%;
    height: 58px;
    padding: 16px 12px;
    color: #a3b2c7 !important;
    font-size: 14px;
    text-align: left;
    transform-origin: 0 0;
    transition:
        color .18s ease,
        opacity .18s ease,
        transform .22s cubic-bezier(.2, .7, .2, 1);
}

.vetra-auth .form-floating > .form-control:focus ~ label,
.vetra-auth .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #a3b2c7 !important;
    opacity: 1;
    transform: translate(.125rem, -.5rem) scale(.85);
}

.vetra-auth .form-floating > label::after {
    display: none !important;
}

/* Stable in-page validation replaces the browser tooltip, which repositions
   while focus styles animate and produces a visible shake. */
.vetra-auth .auth-field--invalid > .form-control,
.vetra-auth .auth-field--invalid > .form-control:focus {
    border-color: rgba(249, 115, 22, .72) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .09) !important;
}

.vetra-auth .auth-validation-tip {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 10px;
    display: inline-flex;
    max-width: calc(100% - 20px);
    min-height: 34px;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    color: #9a3412;
    border: 1px solid rgba(251, 146, 60, .48);
    border-radius: 9px;
    background: #fffaf5;
    box-shadow: 0 10px 26px rgba(124, 45, 18, .10), 0 2px 7px rgba(15, 23, 42, .06);
    font-size: 12px;
    font-weight: 550;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .16s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1);
}

.vetra-auth .auth-validation-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vetra-auth .auth-validation-tip__icon {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    color: #ffffff;
    border-radius: 5px;
    background: #f97316;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.vetra-auth .mb-4 {
    margin-bottom: 13px !important;
}

.vetra-auth form > .d-flex {
    margin-top: 16px !important;
    margin-bottom: 18px !important;
}

.vetra-auth .form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
    padding: 0;
    color: var(--vt-muted);
}

.vetra-auth .form-check input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--vt-border) !important;
    border-radius: 5px;
    background: #ffffff !important;
    box-shadow: none;
    cursor: pointer;
}

.vetra-auth .form-check input[type="checkbox"]:checked {
    border-color: var(--vt-primary) !important;
    background-color: var(--vt-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2 4.8 8.7 9.8 3.5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.vetra-auth .form-check input[type="checkbox"]:checked::after {
    content: none;
}

.vetra-auth .form-check label {
    color: var(--vt-muted);
    font-size: 12px;
    cursor: pointer;
}

.vetra-auth .text-link {
    color: var(--vt-primary) !important;
    font-weight: 650;
    text-underline-offset: 3px;
}

.vetra-auth .text-link:hover {
    color: var(--vt-primary-hover) !important;
    text-decoration: underline;
}

.vetra-auth .d-grid .btn,
.vetra-auth .send-email-code,
.vetra-auth .send-phone-captcha {
    min-height: 46px;
    border-radius: 10px !important;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .01em;
}

.vetra-auth .d-grid .btn {
    margin-top: 5px;
    color: #ffffff !important;
    border-color: var(--vt-primary) !important;
    background: var(--vt-primary) !important;
    box-shadow: 0 8px 18px rgba(59, 130, 246, .18) !important;
}

.vetra-auth .d-grid .btn:hover {
    border-color: var(--vt-primary-hover) !important;
    background: var(--vt-primary-hover) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22) !important;
}

.vetra-auth .row.mb-4 {
    margin-right: -5px;
    margin-left: -5px;
}

.vetra-auth .row.mb-4 > [class*="col-"] {
    padding-inline: 5px;
}

.vetra-auth .send-email-code,
.vetra-auth .send-phone-captcha {
    height: 52px;
    min-height: 52px;
    padding: 0 8px !important;
    white-space: normal;
    line-height: 1.25;
}

.vetra-auth .auth-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.vetra-auth .auth-captcha__field {
    position: relative;
    min-width: 0;
}

.vetra-auth .auth-captcha__field:focus-within {
    z-index: 1;
}

.vetra-auth .auth-captcha__field > .form-control {
    border-right: 1px solid rgba(148, 163, 184, .25) !important;
    border-radius: 6px !important;
}

.vetra-auth .auth-captcha__image {
    display: block;
    width: 94px;
    min-width: 94px;
    max-width: none;
    height: 58px;
    margin: 0;
    padding: 0 2px;
    border: 1px solid rgba(148, 163, 184, .25) !important;
    border-radius: 6px !important;
    outline: 0;
    background: transparent;
    box-shadow: none !important;
    box-sizing: border-box;
    object-fit: contain;
    filter: none;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, transform .18s ease;
}

.vetra-auth .auth-captcha__image:hover {
    border-color: rgba(148, 163, 184, .48) !important;
    background: rgba(248, 250, 252, .72);
}

.vetra-auth .auth-captcha__image:active {
    transform: scale(.98);
}

.vetra-auth .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--vt-subtle) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
}

.vetra-auth .divider::before,
.vetra-auth .divider::after {
    position: static;
    width: auto;
    height: 1px;
    flex: 1;
    content: "";
    background: var(--vt-border-soft);
}

.vetra-auth .auth-card > p.text-center {
    color: var(--vt-muted) !important;
    font-size: 12px;
}

.vetra-auth .auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--vt-muted) !important;
    font-size: 12px;
    line-height: 1.5;
}

.vetra-auth .auth-footer-links__register {
    margin-left: auto;
    text-align: right;
}

.vetra-auth .btn:disabled,
.vetra-auth .btn.disabled {
    opacity: .5;
}

.vetra-auth .toastr,
.vetra-auth .toast,
.vetra-auth #toast-container > div {
    color: var(--vt-text) !important;
    border: 1px solid var(--vt-border) !important;
    border-radius: 10px !important;
    background: var(--vt-surface-2) !important;
    box-shadow: var(--vt-shadow-soft) !important;
}

@media (max-width: 575.98px) {
    body.vetra-auth {
        --auth-edge-gap: 12px;
        --auth-edge-total: 24px;
    }

    .vetra-auth .auth-wrapper {
        padding: var(--auth-edge-gap) !important;
    }

    .vetra-auth .auth-card {
        width: 100%;
        max-height: calc(100vh - var(--auth-edge-total));
        max-height: calc(100dvh - var(--auth-edge-total));
        padding: 24px 20px !important;
        border-radius: 17px !important;
    }

    .vetra-auth .brand-header {
        margin-bottom: 15px;
    }

    .vetra-auth .brand-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .vetra-auth .auth-title {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vetra-auth .auth-validation-tip {
        transform: none;
        transition: opacity .01ms linear;
    }
}

@media (max-height: 700px) and (min-width: 576px) {
    body.vetra-auth {
        --auth-edge-gap: 12px;
        --auth-edge-total: 24px;
    }

    .vetra-auth .auth-card {
        max-height: calc(100vh - var(--auth-edge-total));
        max-height: calc(100dvh - var(--auth-edge-total));
        padding: 23px 27px !important;
    }

    .vetra-auth .brand-header {
        margin-bottom: 12px;
    }

    .vetra-auth .brand-icon {
        width: 44px;
        height: 44px;
    }

    .vetra-auth .auth-title {
        font-size: 26px;
    }
}
