/* SaaS Campus — halaman error (404, 500, 503, dll.) */

.sc-error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Figtree', sans-serif;
    color: #09171b;
    background: #f4f7fb;
    position: relative;
    overflow: hidden;
}

.sc-error-page__bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.sc-error-page__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--theme-primary, #ff0a54) 12%, transparent) 0%, transparent 42%),
        radial-gradient(circle at 88% 82%, color-mix(in srgb, var(--theme-primary, #ff0a54) 8%, #fff) 0%, transparent 38%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.sc-error-page__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
}

.sc-error-page__orb--1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -60px;
    background: color-mix(in srgb, var(--theme-primary, #ff0a54) 22%, #fff);
}

.sc-error-page__orb--2 {
    width: 220px;
    height: 220px;
    bottom: -70px;
    left: -50px;
    background: rgba(59, 130, 246, 0.18);
}

.sc-error-page__shell {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 24px;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.sc-error-page__header {
    text-align: center;
    margin-bottom: 24px;
}

.sc-error-page__logo {
    height: 56px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.sc-error-page__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(9, 23, 27, 0.06);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sc-error-page__brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-primary, #ff0a54), color-mix(in srgb, var(--theme-primary, #ff0a54) 70%, #3b82f6));
    color: #fff;
    font-size: 18px;
}

.sc-error-page__brand-text {
    text-align: left;
}

.sc-error-page__brand-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: #09171b;
}

.sc-error-page__brand-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: #64748b;
}

.sc-error-page__card {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(9, 23, 27, 0.07);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.sc-error-page__hero {
    position: relative;
    padding: 36px 32px 28px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, color-mix(in srgb, var(--theme-primary, #ff0a54) 35%, #1e293b) 100%);
    color: #fff;
    text-align: center;
}

.sc-error-page__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.12), transparent 45%);
    pointer-events: none;
}

.sc-error-page__code {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 8px 20px;
    border-radius: 16px;
    font-size: clamp(42px, 8vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.sc-error-page__icon {
    position: relative;
    margin: 18px auto 0;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.sc-error-page__title {
    position: relative;
    margin: 16px 0 8px;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    line-height: 1.25;
}

.sc-error-page__desc {
    position: relative;
    margin: 0 auto;
    max-width: 520px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.sc-error-page__body {
    padding: 28px 32px 32px;
}

.sc-error-page__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 22px;
}

.sc-error-page__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.sc-error-page__chip--warn {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.sc-error-page__chip--danger {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.sc-error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sc-error-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sc-error-page__btn:hover {
    transform: translateY(-1px);
}

.sc-error-page__btn--primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--theme-primary, #ff0a54), color-mix(in srgb, var(--theme-primary, #ff0a54) 78%, #000));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-primary, #ff0a54) 28%, transparent);
}

.sc-error-page__btn--ghost {
    color: #334155 !important;
    background: #fff;
    border-color: #cbd5e1;
}

.sc-error-page__btn--ghost:hover {
    background: #f8fafc;
}

.sc-error-page__debug {
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.sc-error-page__debug-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sc-error-page__debug-toggle:hover {
    background: #f1f5f9;
}

.sc-error-page__debug-panel {
    display: none;
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.55;
    overflow: auto;
    max-height: 320px;
}

.sc-error-page__debug-panel.is-open {
    display: block;
}

.sc-error-page__debug-panel pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sc-error-page__footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .sc-error-page__hero,
    .sc-error-page__body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sc-error-page__actions {
        flex-direction: column;
    }

    .sc-error-page__btn {
        width: 100%;
    }
}
