:root {
    --auth-brand-color: #e73537;
    --auth-brand-glow: rgba(231, 53, 55, 0.5);
    --auth-text-main: #111111;
    --auth-text-muted: #6c757d;
}

body.auth-page {
    font-family: "Ubuntu", sans-serif;
    background-image: url("/img/auth-cover.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    margin: 0;
    padding: 15px;
}

@keyframes auth-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes auth-fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes auth-pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 53, 55, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(231, 53, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 53, 55, 0);
    }
}

.auth-demo-badge {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-demo-badge .icon-box {
    width: 28px;
    height: 28px;
    background: var(--auth-brand-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 10px rgba(231, 53, 55, 0.6);
    animation: auth-pulse-red 2s infinite;
}

.auth-demo-badge .icon-box i {
    font-size: 16px;
}

.auth-demo-badge:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--auth-brand-color);
    transform: translateY(-3px);
}

.auth-logo-area {
    margin-bottom: 35px;
    animation: auth-fadeInScale 0.8s ease-out;
    z-index: 10;
    margin-top: 20px;
}

.auth-logo-img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.auth-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: auth-fadeInScale 0.8s ease-out 0.2s backwards;
}

.auth-card-wrapper.register {
    max-width: 500px;
    margin-bottom: 30px;
}

.auth-card-wrapper::before {
    content: "";
    position: absolute;
    width: 250%;
    height: 250%;
    background: conic-gradient(
            transparent,
            transparent,
            transparent,
            var(--auth-brand-color)
    );
    animation: auth-rotate 4s linear infinite;
}

.auth-card {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    width: 100%;
    border-radius: 22px;
    padding: 40px;
    z-index: 1;
}

.auth-card.register {
    padding: 35px;
}

.auth-page-title {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--auth-text-main);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-page-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-feature-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.auth-feature-badge {
    background: rgba(231, 53, 55, 0.08);
    color: var(--auth-brand-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(231, 53, 55, 0.1);
}

.auth-feature-badge i {
    font-size: 0.9rem;
}

.auth-joined-inputs {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-joined-inputs:focus-within {
    border-color: var(--auth-brand-color);
    box-shadow: 0 0 0 4px rgba(231, 53, 55, 0.15);
    background: #fff;
}

.auth-joined-inputs .input-group:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.auth-joined-inputs .input-group-text {
    background-color: transparent;
    border: none;
    color: #b0b0b0;
    padding-left: 20px;
    min-width: 50px;
}

.auth-joined-inputs .input-group-text i {
    font-size: 1.3rem;
    line-height: 1;
}

.auth-joined-inputs .form-control {
    background-color: transparent;
    border: none;
    padding: 18px 5px;
    font-size: 0.95rem;
    color: var(--auth-text-main);
    font-weight: 500;
}

.auth-joined-inputs .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.auth-joined-inputs .input-group:focus-within .input-group-text {
    color: var(--auth-brand-color);
}

.auth-password-toggle {
    cursor: pointer;
    padding-right: 20px;
}

.auth-password-toggle:hover i {
    color: var(--auth-text-main);
}

.auth-fixed-prefix {
    font-weight: 600;
    color: #666;
    padding-right: 5px;
    display: flex;
    align-items: center;
    border-right: 1px solid #e9ecef;
    margin-right: 10px;
    height: 60%;
    align-self: center;
    transition: color 0.3s;
}

.auth-joined-inputs .input-group:focus-within .auth-fixed-prefix {
    color: var(--auth-brand-color);
    border-color: var(--auth-brand-color);
}

.auth-btn-brand {
    background: linear-gradient(
            135deg,
            var(--auth-brand-color) 0%,
            #ff5b5d 100%
    );
    border: none;
    color: white;
    font-weight: 600;
    padding: 16px;
    border-radius: 50px;
    font-size: 1rem;
    width: 100%;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(231, 53, 55, 0.4);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn-brand:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(231, 53, 55, 0.5);
    background: linear-gradient(135deg, #c92a2c 0%, #ff4d4f 100%);
    color: white;
}

.auth-btn-brand:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(231, 53, 55, 0.3);
}

.auth-btn-brand:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-create-account-link {
    color: var(--auth-text-main);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.auth-create-account-link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--auth-brand-color);
    transition: width 0.3s ease-in-out;
}

.auth-create-account-link:hover {
    color: var(--auth-brand-color);
}

.auth-create-account-link:hover::after {
    width: 100%;
}

.auth-page .form-check-input:checked {
    background-color: var(--auth-brand-color);
    border-color: var(--auth-brand-color);
}

.auth-forgot-pass-link {
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot-pass-link:hover {
    color: var(--auth-brand-color);
}

.auth-footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    animation: auth-fadeInScale 0.8s ease-out 0.4s backwards;
}

.auth-footer a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
}

.auth-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

.auth-divider {
    color: #adb5bd;
    margin: 25px 0;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e7333c38;
}

.auth-divider::before {
    margin-right: 15px;
}

.auth-divider::after {
    margin-left: 15px;
}

.auth-modal-trigger-link {
    color: var(--auth-text-main);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-modal-trigger-link:hover {
    color: var(--auth-brand-color);
}

.auth-trust-divider {
    margin: 30px 0 20px 0;
    border-top: 1px solid #e9ecef;
    position: relative;
    text-align: center;
}

.auth-trust-divider span {
    background: rgba(255, 255, 255, 0.85);
    padding: 0 15px;
    position: relative;
    top: -12px;
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 10px;
}

.auth-logo-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
            to right,
            transparent,
            black 15%,
            black 85%,
            transparent
    );
    -webkit-mask-image: linear-gradient(
            to right,
            transparent,
            black 15%,
            black 85%,
            transparent
    );
}

.auth-logo-track {
    display: flex;
    gap: 40px;
    width: max-content;
    align-items: center;
    animation: auth-scroll 20s linear infinite;
}

.auth-logo-track:hover {
    animation-play-state: paused;
}

.auth-trust-logo-item {
    height: 30px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.auth-trust-logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes auth-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.auth-page .modal-content {
    border-radius: 20px;
    border: none;
}

.auth-page .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
}

.auth-page .modal-title {
    font-weight: 700;
    color: var(--auth-text-main);
    font-size: 1.1rem;
}

.auth-page .modal-body {
    padding: 25px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    max-height: 60vh;
    overflow-y: auto;
}

.auth-page .btn-close:focus {
    box-shadow: none;
}

.auth-page .form-check {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.auth-page .form-check-input {
    margin-top: 4px;
    cursor: pointer;
    border-color: #adb5bd;
}

.auth-page .form-check-label {
    font-size: 0.85rem;
    color: #666;
    margin-left: 8px;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .auth-demo-badge {
        top: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        white-space: nowrap;
        padding: 8px 16px;
        font-size: 0.85rem;
        background: rgba(0, 0, 0, 0.6);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .auth-demo-badge:hover {
        transform: translateX(-50%) translateY(0);
    }

    .auth-logo-area {
        margin-top: 60px;
        margin-bottom: 25px;
    }

    .auth-logo-img {
        height: 45px;
    }

    .auth-card-wrapper {
        max-width: 100%;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .auth-page-title {
        font-size: 1.5rem;
    }

    .auth-page-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .auth-joined-inputs .form-control {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .auth-trust-logo-item {
        height: 20px;
    }
}
