:root {
    --auth-primary: #6d4aff;
    --auth-primary-dark: #5634f0;
    --auth-primary-line: #d8cbff;
    --auth-primary-soft: #f3edff;
    --auth-bg: #f4f1fb;
    --auth-card: #ffffff;
    --auth-text: #2f3140;
    --auth-text-soft: #75798c;
    --auth-placeholder: #b0b4c0;
    --auth-shadow: 0 24px 50px rgba(109, 74, 255, 0.14);
    --auth-shadow-soft: 0 14px 30px rgba(109, 74, 255, 0.1);
}

* {
    box-sizing: border-box;
}

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

body.auth-screen {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
}

body.auth-screen--admin {
    --auth-primary: #3c9ea3;
    --auth-primary-dark: #2f7f84;
    --auth-primary-line: #c8e6e7;
    --auth-primary-soft: #edf8f8;
    --auth-bg: #f2f8f8;
    --auth-shadow: 0 24px 50px rgba(60, 158, 163, 0.16);
    --auth-shadow-soft: 0 14px 30px rgba(60, 158, 163, 0.12);
}

.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 0 28px;
}

.auth-shell {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-hero {
    position: relative;
    min-height: 274px;
    padding: 34px 10px 0;
}

.auth-hero-content {
    position: relative;
    z-index: 2;
    max-width: 214px;
}

.auth-hero-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--auth-text);
}

.auth-hero-title span {
    color: var(--auth-primary);
}

.auth-hero-title .fa-paw {
    margin-left: 6px;
    font-size: 0.8em;
    color: var(--auth-primary);
    vertical-align: 0.03em;
}

.auth-hero-subtitle {
    margin: 17px 0 0;
    max-width: 206px;
    font-size: 15px;
    line-height: 1.42;
    color: #666a7a;
}

.auth-hero-media {
    position: absolute;
    right: -26px;
    top: 18px;
    width: 278px;
    height: 292px;
}

.auth-hero-media::before {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 22px;
    width: 214px;
    height: 162px;
    border-radius: 999px 999px 26px 26px;
    background: radial-gradient(circle at 50% 35%, #b7a7ff 0%, #a088ff 62%, #8d75ff 100%);
    opacity: 0.95;
}

body.auth-screen--admin .auth-hero-media::before {
    background: radial-gradient(circle at 50% 35%, #a8d9da 0%, #73c0c3 62%, #3c9ea3 100%);
}

.auth-hero-image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
    filter: drop-shadow(0 12px 18px rgba(109, 74, 255, 0.12));
}

body.auth-screen--admin .auth-hero-image {
    filter: drop-shadow(0 12px 18px rgba(60, 158, 163, 0.14));
}

.auth-card {
    position: relative;
    margin-top: -2px;
    padding: 56px 26px 24px;
    background: var(--auth-card);
    border-radius: 30px;
    box-shadow: var(--auth-shadow);
}

.auth-badge {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: #faf8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 2rem;
    box-shadow: var(--auth-shadow-soft);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-card-title {
    margin: 0;
    font-size: 25px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--auth-text);
}

.auth-card-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: #979aa7;
    font-weight: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.auth-field-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #3d3f4e;
}

.auth-field-label i {
    color: var(--auth-primary);
    font-size: 0.95rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon,
.auth-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #b4a4f6;
    font-size: 1rem;
}

.auth-input-icon {
    left: 17px;
    pointer-events: none;
}

.auth-password-toggle {
    right: 14px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #8f73ff;
    outline: none;
}

body.auth-screen--admin .auth-input-icon,
body.auth-screen--admin .auth-password-toggle {
    color: #79afb2;
}

body.auth-screen--admin .auth-password-toggle:hover,
body.auth-screen--admin .auth-password-toggle:focus-visible {
    color: #2f7f84;
}

.auth-input {
    width: 100%;
    height: 44px;
    border: 1.25px solid var(--auth-primary-line);
    border-radius: 13px;
    background: #fcfbff;
    padding: 0 17px 0 48px;
    font-size: 15px;
    font-weight: 550;
    color: var(--auth-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input[data-has-toggle="true"] {
    padding-right: 46px;
}

.auth-input::placeholder {
    color: var(--auth-placeholder);
    font-weight: 500;
}

.auth-input:focus {
    outline: none;
    border-color: #8b6bff;
    box-shadow: 0 0 0 4px rgba(139, 107, 255, 0.14);
}

body.auth-screen--admin .auth-input:focus {
    border-color: #58aeb2;
    box-shadow: 0 0 0 4px rgba(60, 158, 163, 0.16);
}

.auth-primary-btn,
.auth-outline-btn {
    min-height: 54px;
    border-radius: 27px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.auth-primary-btn {
    width: 100%;
    margin-top: 7px;
    border: 0;
    background: linear-gradient(90deg, var(--auth-primary) 0%, #7153ff 48%, #7e64ff 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(109, 74, 255, 0.22);
}

body.auth-screen--admin .auth-primary-btn {
    background: linear-gradient(90deg, #3c9ea3 0%, #4aaeb2 48%, #69c0c2 100%);
    box-shadow: 0 14px 24px rgba(60, 158, 163, 0.24);
}

.auth-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(109, 74, 255, 0.26);
}

body.auth-screen--admin .auth-primary-btn:hover {
    box-shadow: 0 16px 28px rgba(60, 158, 163, 0.3);
}

.auth-primary-btn i {
    margin-left: auto;
    margin-right: 6px;
    font-size: 1rem;
}

.auth-primary-btn span {
    margin-left: auto;
}

.auth-secondary-btn {
    width: 100%;
    min-height: 54px;
    border-radius: 27px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
    border: 1.5px solid #ddd2ff;
    background: #fff;
    color: var(--auth-primary);
}

body.auth-screen--admin .auth-secondary-btn {
    border-color: #bcdedf;
}

.auth-secondary-btn:hover {
    border-color: #bfaeff;
    color: var(--auth-primary-dark);
    transform: translateY(-1px);
}

body.auth-screen--admin .auth-secondary-btn:hover {
    border-color: #7fbfc2;
}

.auth-secondary-btn i {
    font-size: 1rem;
}

.auth-biometrics-toggle {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.auth-toggle-input {
    display: none;
}

.auth-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: #e4e1ef;
    border-radius: 14px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.auth-toggle-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.auth-toggle-input:checked + .auth-toggle-label .auth-toggle-switch {
    background: var(--auth-primary);
}

.auth-toggle-input:checked + .auth-toggle-label .auth-toggle-switch::before {
    transform: translateX(24px);
}

.auth-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-text-soft);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 17px 0;
    color: #b3b5bf;
    font-size: 14px;
    font-weight: 700;
    text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e1ef;
}

.auth-secondary-link,
.auth-outline-btn {
    width: 100%;
    padding: 0 18px;
    border: 1.5px solid #ddd2ff;
    background: #fff;
    color: var(--auth-primary);
}

.auth-secondary-link {
    min-height: 44px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.auth-secondary-link:hover,
.auth-outline-btn:hover {
    border-color: #bfaeff;
    color: var(--auth-primary-dark);
    transform: translateY(-1px);
}

body.auth-screen--admin .auth-secondary-link,
body.auth-screen--admin .auth-outline-btn {
    border-color: #bcdedf;
}

body.auth-screen--admin .auth-secondary-link:hover,
body.auth-screen--admin .auth-outline-btn:hover {
    border-color: #7fbfc2;
}

.auth-info-box {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 18px;
    background: #f6f2ff;
    color: #666a7a;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
}

body.auth-screen--admin .auth-info-box,
body.auth-screen--admin .auth-security {
    background: #eef7f7;
}

.auth-security {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 15px 14px;
    border-radius: 18px;
    background: #f6f2ff;
}

.auth-security-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ece4ff 0%, #e3d8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 1.45rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.auth-screen--admin .auth-security-icon {
    background: linear-gradient(180deg, #e1f1f2 0%, #d1e9ea 100%);
}

.auth-security h2 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: #4a4d5b;
}

.auth-security p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #868897;
    font-weight: 500;
}

.auth-feedback {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.auth-feedback.is-visible {
    display: block;
}

.auth-feedback.is-success {
    background: #ebfff3;
    color: #1f7a44;
    border: 1px solid #bfe8cf;
}

.auth-feedback.is-warning {
    background: #fff8e8;
    color: #9b6a00;
    border: 1px solid #f0da96;
}

.auth-feedback.is-danger,
.auth-feedback.is-error {
    background: #fff1f3;
    color: #c1324c;
    border: 1px solid #f0bac4;
}

.auth-feedback.is-info {
    background: #eef7ff;
    color: #1a5a8a;
    border: 1px solid #b8d8f0;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.auth-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
}

.auth-footer-link:hover {
    color: var(--auth-primary-dark);
}

.auth-empty-state {
    text-align: center;
}

.auth-empty-state-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 20px;
    border-radius: 28px;
    background: #faf8ff;
    color: var(--auth-primary);
    box-shadow: var(--auth-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

body.auth-screen--admin .auth-badge,
body.auth-screen--admin .auth-empty-state-icon {
    background: #f8fcfc;
}

.auth-empty-state .auth-card-subtitle {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .auth-page {
        padding: 24px 0 32px;
    }

    .auth-shell {
        max-width: 448px;
        background: var(--auth-bg);
        border-radius: 34px;
        box-shadow: 0 30px 60px rgba(61, 41, 147, 0.16);
        overflow: hidden;
        padding: 0 20px 26px;
    }

    body.auth-screen--admin .auth-shell {
        box-shadow: 0 30px 60px rgba(41, 101, 111, 0.16);
    }

    .auth-hero {
        min-height: 290px;
    }
}

@media (max-width: 380px) {
    .auth-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-hero {
        min-height: 254px;
        padding-top: 32px;
    }

    .auth-hero-content {
        max-width: 178px;
    }

    .auth-hero-title {
        font-size: 27px;
    }

    .auth-hero-media {
        width: 236px;
        height: 248px;
        right: -18px;
        top: 16px;
    }

    .auth-hero-media::before {
        width: 182px;
        height: 138px;
        right: 18px;
        bottom: 18px;
    }

    .auth-card {
        padding-left: 20px;
        padding-right: 20px;
    }
}
