/* ============================================================
   Escalando Negócios - Error Pages
   Polished error pages following the Orbyra structural model
   ============================================================ */

.en-error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--en-surface-2);
    padding: 3rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.en-error-page::before,
.en-error-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
}

.en-error-page::before {
    width: 600px;
    height: 600px;
    background: var(--en-accent);
    top: -200px;
    right: -150px;
}

.en-error-page::after {
    width: 400px;
    height: 400px;
    background: var(--en-gold);
    bottom: -100px;
    left: -100px;
}

.en-error-container {
    text-align: center;
    max-width: 580px;
    width: 100%;
    position: relative;
    z-index: 1;
    animation: enErrorFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Icon circle */
.en-error-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
}

.en-error-icon i {
    font-size: 3rem;
    line-height: 1;
}

.en-error-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed;
    opacity: 0.3;
    animation: enErrorIconSpin 20s linear infinite;
}

@keyframes enErrorIconSpin {
    to { transform: rotate(360deg); }
}

/* Color variants */
.en-error-icon--danger {
    background: #FEE2E2;
    color: #DC2626;
}
.en-error-icon--danger::after { border-color: #DC2626; }

.en-error-icon--warning {
    background: #FEF3C7;
    color: var(--en-gold);
}
.en-error-icon--warning::after { border-color: var(--en-gold); }

.en-error-icon--info {
    background: #DBEAFE;
    color: var(--en-accent);
}
.en-error-icon--info::after { border-color: var(--en-accent); }

.en-error-icon--locked {
    background: #EDE9FE;
    color: #6D28D9;
}
.en-error-icon--locked::after { border-color: #6D28D9; }

.en-error-icon--maintenance {
    background: #DBEAFE;
    color: var(--en-accent);
}
.en-error-icon--maintenance::after { border-color: var(--en-accent); }

/* Error code */
.en-error-code {
    font-family: var(--en-font-heading);
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--en-primary), var(--en-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.en-error-code--danger {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.en-error-code--warning {
    background: linear-gradient(135deg, var(--en-gold), #B45309);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.en-error-code--info {
    background: linear-gradient(135deg, var(--en-accent), #1D4ED8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.en-error-code--locked {
    background: linear-gradient(135deg, #6D28D9, #4338CA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.en-error-code--maintenance {
    background: linear-gradient(135deg, var(--en-accent), #1D4ED8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Title & description */
.en-error-title {
    font-family: var(--en-font-heading);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--en-primary);
    margin-bottom: 0.75rem;
}

.en-error-description {
    font-size: 1.05rem;
    color: var(--en-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Tips card */
.en-error-tips {
    text-align: left;
    background: var(--en-surface);
    border: 1px solid var(--en-border);
    border-radius: var(--en-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--en-shadow-sm);
}

.en-error-tips h6 {
    font-family: var(--en-font-heading);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--en-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.en-error-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.en-error-tips li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.75rem;
    font-size: 0.9375rem;
    color: var(--en-text-muted);
    line-height: 1.6;
}

.en-error-tips li::before {
    content: '\F26A'; /* bi-check-circle */
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    top: 0.45rem;
    color: var(--en-accent);
    font-size: 0.95rem;
}

/* Actions */
.en-error-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.en-error-actions .btn {
    padding: 0.75rem 1.75rem;
    border-radius: var(--en-radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--en-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.en-error-actions .en-btn-primary {
    background: var(--en-accent);
    border: 1px solid var(--en-accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.en-error-actions .en-btn-primary:hover {
    background: var(--en-accent-hover);
    border-color: var(--en-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    color: #fff;
}

.en-error-actions .en-btn-outline {
    background: transparent;
    border: 1px solid var(--en-border);
    color: var(--en-text);
}

.en-error-actions .en-btn-outline:hover {
    background: var(--en-surface);
    border-color: var(--en-text-muted);
    transform: translateY(-2px);
    color: var(--en-primary);
}

/* Info card (for request id, technical details) */
.en-error-info {
    background: var(--en-surface);
    border: 1px solid var(--en-border);
    border-radius: var(--en-radius);
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--en-text-muted);
    box-shadow: var(--en-shadow-sm);
}

.en-error-info code {
    background: var(--en-surface-2);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--en-text);
}

/* Pulse animation (maintenance) */
.en-error-pulse {
    animation: enErrorPulse 2s ease-in-out infinite;
}

@keyframes enErrorPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* Dark theme tweaks */
[data-theme="dark"] .en-error-page {
    background: var(--en-surface);
}

[data-theme="dark"] .en-error-tips,
[data-theme="dark"] .en-error-info {
    background: var(--en-surface-2);
    border-color: var(--en-border);
}

[data-theme="dark"] .en-error-icon--danger      { background: rgba(220, 38, 38, 0.15); }
[data-theme="dark"] .en-error-icon--warning     { background: rgba(217, 119, 6, 0.15); }
[data-theme="dark"] .en-error-icon--info        { background: rgba(37, 99, 235, 0.15); }
[data-theme="dark"] .en-error-icon--locked      { background: rgba(109, 40, 217, 0.18); }
[data-theme="dark"] .en-error-icon--maintenance { background: rgba(37, 99, 235, 0.15); }

/* Responsive */
@media (max-width: 576px) {
    .en-error-code  { font-size: 3.5rem; }
    .en-error-title { font-size: 1.5rem; }
    .en-error-icon  { width: 96px; height: 96px; }
    .en-error-icon i { font-size: 2.5rem; }
    .en-error-actions { flex-direction: column; }
    .en-error-actions .btn { width: 100%; justify-content: center; }
}
