/* 404 page */

.error-404-main {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5.5rem 1rem 3.5rem;
    background: var(--bg-light, #f1f4f8);
}

.error-404-section {
    width: 100%;
    max-width: 560px;
}

.error-404-state {
    max-width: 100%;
    margin: 0 auto;
    padding: 2.75rem 2rem 2.5rem;
    background: #fff;
    border: 1px solid #e8edf4;
    border-radius: 20px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.error-404-state .empty-state-icon {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color, #4361ee);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.35rem;
    font-size: 1.65rem;
    line-height: 1;
    border: 1px solid rgba(67, 97, 238, 0.12);
}

.error-404-state .empty-state-icon i,
.error-404-state .empty-state-icon svg,
.error-404-state .empty-state-icon .lucide {
    width: 1.65rem;
    height: 1.65rem;
    display: block;
    stroke: currentColor;
    flex-shrink: 0;
}

.error-404-title {
    font-size: clamp(3.5rem, 10vw, 5.25rem);
    font-weight: 800;
    color: var(--primary-color, #4361ee);
    margin: 0 0 0.55rem;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.error-404-state h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.error-404-message,
.error-404-state p {
    font-size: 1.02rem;
    color: #64748b;
    margin: 0 0 1.75rem;
    max-width: 26rem;
    line-height: 1.55;
}

.error-404-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
}

.error-404-actions .btn-primary,
.error-404-support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    height: 48px;
    padding: 0 1.35rem;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: none;
    transform: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.error-404-actions .btn-primary {
    background: var(--primary-color, #4361ee);
    color: #fff;
    border: 1px solid transparent;
    min-width: 11.5rem;
}

.error-404-actions .btn-primary:hover {
    background: #3651d4;
    box-shadow: none;
    transform: none;
}

.error-404-actions .btn-primary i,
.error-404-actions .btn-primary svg,
.error-404-actions .btn-primary .lucide {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    stroke: currentColor;
    color: inherit;
}

.error-404-support-link {
    min-width: 11.5rem;
    background: #fff;
    color: #1e293b;
    border: 1px solid #dbe2ea;
}

.error-404-support-link:hover {
    background: #f8fafc;
    border-color: #c5ced9;
    color: #0f172a;
}

.error-404-support-link .brand-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    display: block;
    /* Telegram SVG ships with fill #111 — tint to match label */
    filter: none;
}

.error-404-support-link span {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .error-404-main {
        padding: 4.5rem 0.85rem 2.5rem;
    }

    .error-404-state {
        padding: 2.15rem 1.25rem 1.85rem;
        border-radius: 16px;
    }

    .error-404-state .empty-state-icon {
        width: 3.6rem;
        height: 3.6rem;
        margin-bottom: 1.1rem;
    }

    .error-404-state h3 {
        font-size: 1.25rem;
    }

    .error-404-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-404-actions .btn-primary,
    .error-404-support-link {
        width: 100%;
        min-width: 0;
    }
}

html[dir="rtl"] .error-404-main,
html[dir="rtl"] .error-404-state,
html[dir="rtl"] .error-404-state h1,
html[dir="rtl"] .error-404-state h3,
html[dir="rtl"] .error-404-state p {
    text-align: center;
}

html[dir="rtl"] .error-404-actions .btn-primary,
html[dir="rtl"] .error-404-support-link {
    flex-direction: row;
}
