html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================
   全局深色主题表单元素样式
   ============================================ */

/* 深色主题下拉框和输入框样式 */
.dark-select {
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.dark-select option {
    background-color: #1e293b !important;
    color: white !important;
}

.dark-select:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

/* 深色主题输入框样式 */
.dark-input {
    background-color: rgba(30, 41, 59, 0.8) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.dark-input::placeholder {
    color: rgba(156, 163, 175, 0.8) !important;
}

.dark-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

/* 深色主题日期选择器 */
input[type="date"].dark-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* ============================================
   深色背景页面中的表单元素 - 强制覆盖
   ============================================ */

/* 在深色渐变背景页面中，强制所有表单元素使用深色主题 */
.min-h-screen[class*="bg-gradient"] select,
.min-h-screen[class*="from-slate"] select,
.min-h-screen[class*="from-purple"] select,
.min-h-screen[class*="from-blue"] select,
[class*="bg-gradient-to-br"][class*="from-slate"] select,
[class*="bg-gradient-to-br"][class*="from-purple"] select {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.min-h-screen[class*="bg-gradient"] select option,
.min-h-screen[class*="from-slate"] select option,
.min-h-screen[class*="from-purple"] select option,
.min-h-screen[class*="from-blue"] select option,
[class*="bg-gradient-to-br"][class*="from-slate"] select option,
[class*="bg-gradient-to-br"][class*="from-purple"] select option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    padding: 8px 12px;
}

/* 深色背景中的输入框 */
.min-h-screen[class*="bg-gradient"] input[type="text"],
.min-h-screen[class*="bg-gradient"] input[type="number"],
.min-h-screen[class*="bg-gradient"] input[type="email"],
.min-h-screen[class*="bg-gradient"] input[type="password"],
.min-h-screen[class*="bg-gradient"] input[type="date"],
.min-h-screen[class*="bg-gradient"] textarea,
.min-h-screen[class*="from-slate"] input,
.min-h-screen[class*="from-purple"] input,
[class*="bg-gradient-to-br"][class*="from-slate"] input,
[class*="bg-gradient-to-br"][class*="from-purple"] input {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.min-h-screen[class*="bg-gradient"] input::placeholder,
.min-h-screen[class*="from-slate"] input::placeholder,
.min-h-screen[class*="from-purple"] input::placeholder,
[class*="bg-gradient-to-br"][class*="from-slate"] input::placeholder,
[class*="bg-gradient-to-br"][class*="from-purple"] input::placeholder {
    color: rgba(148, 163, 184, 0.8) !important;
}

/* 日期选择器图标在深色背景下反色 */
.min-h-screen[class*="bg-gradient"] input[type="date"]::-webkit-calendar-picker-indicator,
.min-h-screen[class*="from-slate"] input[type="date"]::-webkit-calendar-picker-indicator,
[class*="bg-gradient-to-br"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* ============================================
   使用 Tailwind 类的深色背景元素
   ============================================ */

/* bg-slate-800 类的表单元素 */
.bg-slate-800 select,
select.bg-slate-800 {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.bg-slate-800 select option,
select.bg-slate-800 option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

.bg-slate-800 input,
input.bg-slate-800 {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* bg-white/5 和 bg-white/10 类的表单元素 */
[class*="bg-white\/5"] select,
[class*="bg-white\/10"] select {
    background-color: rgba(51, 65, 85, 0.9) !important;
    color: #f1f5f9 !important;
}

[class*="bg-white\/5"] select option,
[class*="bg-white\/10"] select option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

[class*="bg-white\/5"] input,
[class*="bg-white\/10"] input {
    background-color: rgba(51, 65, 85, 0.9) !important;
    color: #f1f5f9 !important;
}

/* ============================================
   全局 select 下拉框样式（深色主题优先）
   ============================================ */

/* 全局设置 select 的 color-scheme 为 dark */
select {
    color-scheme: dark;
}

/* 带有深色背景类的 select */
select[class*="bg-slate"],
select[class*="bg-white\/"],
select[class*="border-white"] {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #f1f5f9 !important;
}

select[class*="bg-slate"] option,
select[class*="bg-white\/"] option,
select[class*="border-white"] option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    padding: 8px 12px;
}

/* ============================================
   白色背景卡片中的表单元素 - 保持正常颜色
   ============================================ */

.bg-white select,
.bg-white input,
.bg-white textarea {
    background-color: white !important;
    color: #1f2937 !important;
}

.bg-white select option {
    background-color: white !important;
    color: #1f2937 !important;
}

/* ============================================
   特定组件样式覆盖
   ============================================ */

/* 确保 Tailwind 的 text-white 类在 select 中生效 */
select.text-white {
    color: #f1f5f9 !important;
}

select.text-white option {
    color: #f1f5f9 !important;
    background-color: #1e293b !important;
}

/* 带有 border-white/20 的 select */
select[class*="border-white\/"] {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* 焦点状态 */
select:focus,
input:focus,
textarea:focus {
    outline: none;
}

select[class*="bg-slate"]:focus,
select[class*="bg-white\/"]:focus,
input[class*="bg-slate"]:focus,
input[class*="bg-white\/"]:focus {
    border-color: rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
}

/* ============================================
   全局强制深色主题覆盖（最高优先级）
   ============================================ */

/* 在任何带有深色背景的父元素中，强制表单元素使用深色样式 */
[class*="from-slate-900"] select,
[class*="via-purple-900"] select,
[class*="from-indigo-900"] select,
[class*="from-blue-900"] select {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

[class*="from-slate-900"] select option,
[class*="via-purple-900"] select option,
[class*="from-indigo-900"] select option,
[class*="from-blue-900"] select option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

[class*="from-slate-900"] input,
[class*="via-purple-900"] input,
[class*="from-indigo-900"] input,
[class*="from-blue-900"] input {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #f1f5f9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

[class*="from-slate-900"] input::placeholder,
[class*="via-purple-900"] input::placeholder,
[class*="from-indigo-900"] input::placeholder,
[class*="from-blue-900"] input::placeholder {
    color: rgba(148, 163, 184, 0.8) !important;
}

/* 日期输入框图标 */
[class*="from-slate-900"] input[type="date"]::-webkit-calendar-picker-indicator,
[class*="via-purple-900"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
