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

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

body.sbos-error {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #f8fafc;
    background: #022c22;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sbos-error__scene {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
}

.sbos-error__backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.sbos-error__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #064e3b 0%, #022c22 45%, #0f172a 100%);
}

.sbos-error__pattern {
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/login-filigran.png');
    background-size: 500px 500px;
    background-repeat: repeat;
    mix-blend-mode: multiply;
    opacity: 0.68;
}

.sbos-error__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, transparent 0%, transparent 45%, rgba(0, 0, 0, 0.28) 100%);
}

.sbos-error__layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    min-height: 100dvh;
    padding: 1.5rem 1.25rem 2rem;
}

.sbos-error__brand {
    width: 100%;
    max-width: 36rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.sbos-error__brand-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sbos-error__logo-wrap {
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.35));
}

.sbos-error__logo {
    display: block;
    height: clamp(5rem, 18vw, 10rem);
    width: auto;
    max-width: min(100%, 26rem);
    object-fit: contain;
}

.sbos-error__brand-title {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.sbos-error__brand-title span {
    color: #9ac921;
}

.sbos-error__brand-sub {
    margin: 0.5rem 0 0;
    max-width: 22rem;
    font-size: clamp(0.8125rem, 2.2vw, 1rem);
    line-height: 1.5;
    color: rgba(236, 253, 245, 0.88);
}

.sbos-error__content {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sbos-error__card {
    width: 100%;
    padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 1rem;
    background: #fff;
    color: #111827;
    border: 1px solid rgba(6, 78, 59, 0.12);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

.sbos-error__card-head {
    margin-bottom: 0.25rem;
}

.sbos-error__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #047857;
}

.sbos-error__badge i {
    font-size: 0.625rem;
}

.sbos-error__code {
    margin: 0.75rem 0 0;
    font-size: clamp(3.25rem, 12vw, 4.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #047857;
}

.sbos-error__title {
    margin: 0.65rem 0 0;
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
}

.sbos-error__message {
    margin: 0.65rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4b5563;
}

.sbos-error__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.sbos-error__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 9rem;
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sbos-error__btn:active {
    transform: translateY(1px);
}

.sbos-error__btn--primary {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.sbos-error__btn--primary:hover {
    background: linear-gradient(180deg, #047857 0%, #065f46 100%);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.sbos-error__btn--secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.sbos-error__btn--secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.sbos-error__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(16, 185, 129, 0.28);
    font-size: 0.7rem;
    line-height: 1.45;
    color: rgba(236, 253, 245, 0.82);
    text-align: center;
}

.sbos-error__footer p {
    margin: 0;
}

.sbos-error__footer a {
    color: #d1fae5;
    font-weight: 600;
    text-decoration: none;
}

.sbos-error__footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 1024px) {
    .sbos-error__layout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: clamp(3rem, 6vw, 6rem);
        padding: 2rem clamp(2rem, 5vw, 4rem);
    }

    .sbos-error__brand {
        flex: 1 1 0;
        max-width: 36rem;
        padding: 0;
    }

    .sbos-error__brand-inner {
        align-items: flex-start;
        text-align: left;
    }

    .sbos-error__logo-wrap {
        margin-bottom: 2rem;
    }

    .sbos-error__logo {
        height: clamp(10rem, 22vh, 14rem);
    }

    .sbos-error__content {
        flex: 0 1 28rem;
        max-width: 32rem;
    }

    .sbos-error__footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        text-align: left;
        gap: 1.5rem;
    }

    .sbos-error__footer p:last-child {
        text-align: right;
        flex-shrink: 0;
    }
}

@media (max-width: 420px) {
    .sbos-error__actions {
        flex-direction: column;
    }

    .sbos-error__btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-height: 640px) and (min-width: 1024px) {
    .sbos-error__logo {
        height: 7rem;
    }

    .sbos-error__logo-wrap {
        margin-bottom: 1rem;
    }

    .sbos-error__card {
        padding: 1.5rem;
    }

    .sbos-error__code {
        font-size: 3rem;
    }
}
