/* ============================================================================
   app.css — 全局基础样式（MudBlazor 接管组件主题，这里只留少量全局补丁）
   离线环境：不引 Google Fonts，用系统字体栈。
   ========================================================================== */

:root {
    /* 与 MudThemeProvider 默认主色一致，少量全局补丁引用 */
    --app-primary: #594AE2;
}

html, body {
    /* Mud 期望 Roboto，离线无 Roboto 时回退系统无衬线字体 */
    font-family: 'Segoe UI', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--mud-palette-background, #f5f5f5);
}

body {
    margin: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--app-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---- 表单校验态（少数原生表单用） ---- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* ---- JSON 详情块（操作日志详情弹窗等） ---- */
.app-json-detail {
    margin: 0;
    padding: 0.75rem;
    max-height: 40vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    background: var(--mud-palette-background-grey, #f5f5f5);
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-radius: 4px;
}

/* ---- blazor 错误页（非交互，纯静态） ---- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
