@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:400,700|Roboto:400,500,700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

.auth-required {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    isolation: isolate;
}

.auth-required__shell {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 0;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(26, 4, 3, 0.28),
        0 8px 24px rgba(160, 14, 7, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    animation: authFadeIn 0.35s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-required__brand {
    flex: 1 1 42%;
    background: linear-gradient(145deg, #b5120a 0%, #A00E07 45%, #8a0c06 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-required__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.06) 0%, transparent 45%);
    pointer-events: none;
}

.auth-required__brand-inner {
    position: relative;
    z-index: 1;
}

.auth-required__logo img {
    height: 52px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.auth-required__brand-title {
    margin: 0 0 0.6rem;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-required__brand-text {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 270px;
}

.auth-required__panel {
    flex: 1 1 58%;
    background: #fff;
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-required__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.15rem;
    border-radius: 12px;
    background: #fff5f5;
    border: 1px solid #f0d8d8;
    color: #A00E07;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-required__icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.auth-required__title {
    margin: 0 0 0.45rem;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    width: 100%;
    max-width: 340px;
}

.auth-required__text {
    margin: 0 auto 1.6rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    color: #76777a;
    max-width: 340px;
}

.auth-required__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.auth-required__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.78rem 1.15rem;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.auth-required__btn:active {
    transform: scale(0.99);
}

.auth-required__btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.auth-required__btn--primary {
    background: #A00E07;
    border: 1px solid #A00E07;
    color: #fff;
}

.auth-required__btn--primary:hover {
    background: #8a0c06;
    border-color: #8a0c06;
    color: #fff;
    text-decoration: none;
}

.auth-required__btn--secondary {
    background: #fff;
    border: 1px solid #ddd;
    color: #444;
}

.auth-required__btn--secondary:hover {
    background: #fafafa;
    border-color: #ccc;
    color: #222;
    text-decoration: none;
}

@media (max-width: 767px) {
    .auth-required {
        padding: 1rem;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        align-items: center;
        justify-content: center;
    }

    .auth-required__shell {
        flex-direction: column;
        width: 100%;
        max-width: 420px;
        min-height: 0;
        border: 1px solid rgba(255, 255, 255, 0.8);
        border-radius: 12px;
        overflow: hidden;
        box-shadow:
            0 16px 48px rgba(26, 4, 3, 0.24),
            0 6px 18px rgba(160, 14, 7, 0.1);
    }

    .auth-required__brand {
        flex: none;
        padding: 1.65rem 1.25rem 1.4rem;
        text-align: center;
        align-items: center;
    }

    .auth-required__brand-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .auth-required__logo img {
        height: 44px;
        margin-bottom: 0.85rem;
    }

    .auth-required__brand-title {
        font-size: 1.2rem;
    }

    .auth-required__brand-text {
        font-size: 0.85rem;
        max-width: 280px;
        line-height: 1.55;
    }

    .auth-required__panel {
        flex: none;
        width: 100%;
        padding: 1.5rem 1.25rem 1.65rem;
        padding-bottom: max(1.65rem, env(safe-area-inset-bottom));
        border-radius: 0;
        margin-top: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: none;
    }

    .auth-required__title {
        font-size: 1.2rem;
    }

    .auth-required__text {
        font-size: 0.9rem;
        margin-bottom: 1.35rem;
    }

    .auth-required__actions {
        max-width: 100%;
    }

    .auth-required__btn {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-required__shell {
        animation: none;
    }

    .auth-required__btn:active {
        transform: none;
    }
}
