/*
 * 그누보드7 독립 화면 스타일 — 오류 페이지, 점검 화면, DB 계정 오류 화면, 활성 템플릿이 없을 때의 셸.
 *
 * 이 화면들은 템플릿 CSS 없이 혼자 그려지므로 전역 리셋을 둔다. 템플릿 CSS 와 함께 실리는 화면에는
 * 싣지 않는다(리셋이 템플릿의 여백 유틸리티를 이긴다) — 그쪽은 g7-core.css 다.
 * 엄격한 스타일 정책에서는 <style> 요소가 막히므로 뷰 안에 두지 않고 정적 파일로 둔다.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── 오류 페이지 · 템플릿 없음 안내 ── */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f9fafb;
    padding: 1rem;
}
.error-card {
    max-width: 28rem;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    text-align: center;
}
.error-icon {
    margin-bottom: 1.5rem;
}
.error-icon i {
    font-size: 4rem;
    color: #ef4444;
}
.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}
.error-message {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.625;
}
.error-message--mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.875rem;
}
.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: #ffffff;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s;
}
.error-btn:hover {
    background-color: #2563eb;
}

/* ── 점검 화면 ── */
.maintenance-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f9fafb;
    padding: 1rem;
}
.maintenance-card {
    max-width: 32rem;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 3rem 2rem;
    text-align: center;
}
.maintenance-icon {
    margin-bottom: 1.5rem;
}
.maintenance-icon svg {
    width: 5rem;
    height: 5rem;
    color: #3b82f6;
    animation: spin 3s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.maintenance-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}
.maintenance-message {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    line-height: 1.625;
}
.maintenance-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.625;
}

/* ── DB 계정 오류 화면 ── */
.credential-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f9fafb;
    padding: 1rem;
}
.credential-card {
    max-width: 36rem;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 3rem 2rem;
    text-align: center;
}
.credential-icon {
    margin-bottom: 1.5rem;
}
.credential-icon svg {
    width: 4.5rem;
    height: 4.5rem;
    color: #f59e0b;
}
.credential-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}
.credential-message {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    line-height: 1.625;
}
.credential-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.625;
    margin-bottom: 1.5rem;
}
.credential-reason {
    text-align: left;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.625;
    margin-bottom: 1rem;
}
.credential-recovery {
    text-align: left;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.625;
}

@media (prefers-color-scheme: dark) {
    .error-container {
        background-color: #111827;
    }
    .error-card {
        background-color: #1f2937;
    }
    .error-title {
        color: #ffffff;
    }
    .error-message {
        color: #d1d5db;
    }
    .error-code {
        color: #60a5fa;
    }
    .error-btn {
        background-color: #3b82f6;
    }
    .error-btn:hover {
        background-color: #2563eb;
    }
    .maintenance-container {
        background-color: #111827;
    }
    .maintenance-card {
        background-color: #1f2937;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }
    .maintenance-icon svg {
        color: #60a5fa;
    }
    .maintenance-title {
        color: #ffffff;
    }
    .maintenance-message {
        color: #9ca3af;
    }
    .maintenance-description {
        color: #6b7280;
    }
    .credential-container {
        background-color: #111827;
    }
    .credential-card {
        background-color: #1f2937;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }
    .credential-icon svg {
        color: #fbbf24;
    }
    .credential-title {
        color: #ffffff;
    }
    .credential-message {
        color: #9ca3af;
    }
    .credential-description {
        color: #6b7280;
    }
    .credential-reason {
        background-color: #78350f;
        border-color: #92400e;
        color: #fde68a;
    }
    .credential-recovery {
        background-color: #374151;
        color: #d1d5db;
    }
}
