:root {
  --ui-bg: #f6f8fc;
  --ui-bg-2: #eef3f8;
  --ui-surface: #ffffff;
  --ui-surface-2: #f8fafc;
  --ui-surface-3: #eef5ff;
  --ui-border: #dbe4f0;
  --ui-border-strong: #c7d4e5;
  --ui-text: #142033;
  --ui-text-soft: #334155;
  --ui-muted: #64748b;
  --ui-muted-2: #94a3b8;
  --ui-primary: #2563eb;
  --ui-primary-2: #0ea5e9;
  --ui-green: #059669;
  --ui-amber: #d97706;
  --ui-orange: #ea580c;
  --ui-red: #dc2626;
  --ui-purple: #7c3aed;
  --ui-radius: 8px;
  --ui-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --card: #ffffff;
  --border: #dbe4f0;
  --border2: #c7d4e5;
  --text: #142033;
  --text2: #475569;
  --text3: #64748b;
  --muted: #64748b;
  --muted2: #475569;
  --accent: #2563eb;
  --accent2: #1d4ed8;
  --row-hover: #f0f6ff;
  --red: #dc2626;
}

html {
  color-scheme: light;
  font-size: 16px !important;
}

body {
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
  letter-spacing: 0 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

body,
input,
select,
textarea,
button {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif !important;
}

* {
  box-sizing: border-box !important;
}

p,
div,
span,
label,
td,
th,
li {
  line-height: 1.5;
}

body > .border-b,
body > div[style*="border-bottom"],
.topbar,
.status-bar,
.bg-gray-900,
.bg-gray-950,
.bg-slate-900 {
  background: rgba(255, 255, 255, .88) !important;
  border-color: var(--ui-border) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .05);
  backdrop-filter: blur(12px);
}

.card,
.tool-card,
.log-modal,
.detail-panel,
.schema-panel,
.glow,
.card-inner,
.modal-box,
.status-bar,
.inline-note,
.bg-gray-800,
.bg-slate-800,
[style*="background:#1a1d2e"],
[style*="background: #1a1d2e"],
[style*="background:#0d1020"],
[style*="background: #0d1020"],
[style*="background:#151827"],
[style*="background: #151827"],
[style*="background:#111827"],
[style*="background: #111827"],
[style*="background:#0b0d14"],
[style*="background: #0b0d14"],
[style*="background:#0f1117"],
[style*="background: #0f1117"],
[style*="background:#13162a"],
[style*="background: #13162a"],
[style*="background:#0f1120"],
[style*="background: #0f1120"],
[style*="background:#12151f"],
[style*="background: #12151f"],
[style*="background:#1a1d30"],
[style*="background: #1a1d30"],
[style*="background:#1e2045"],
[style*="background: #1e2045"],
[style*="background:#252840"],
[style*="background: #252840"] {
  background: var(--ui-surface) !important;
  border-color: var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: var(--ui-shadow) !important;
}

[style*="background:#525659"],
[style*="background: #525659"] {
  background: #e2e8f0 !important;
}

.tool-card:hover,
.card-hover:hover,
.db-table tr:hover td,
.list-table tbody tr:hover,
.table-row:hover {
  background-color: #f0f6ff !important;
  border-color: #9ec5ff !important;
}

.tool-icon,
[class*="rounded"][style*="rgba(99,102,241"],
[style*="background: rgba(99,102,241"] {
  background: #eaf2ff !important;
  color: var(--ui-primary) !important;
  border-radius: var(--ui-radius) !important;
}

input,
select,
textarea,
.ctrl,
.select-dark,
.input-dark,
.df-date,
.pagination-btn,
.filter-btn,
.btn,
.home-btn,
.hbtn,
.list-pager button,
.file-chip {
  background: #fff !important;
  border-color: var(--ui-border-strong) !important;
  color: var(--ui-text-soft) !important;
  border-radius: var(--ui-radius) !important;
  font-size: .9375rem !important;
  min-height: 2.75rem !important;
  line-height: 1.4 !important;
}

textarea,
textarea.input-dark {
  line-height: 1.55 !important;
  padding: .875rem 1rem !important;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8 !important;
}

input:focus,
select:focus,
textarea:focus,
.ctrl:focus {
  outline: none !important;
  border-color: rgba(37, 99, 235, .72) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14) !important;
}

button,
.btn,
.home-btn,
.hbtn,
.pagination-btn,
.filter-btn {
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease !important;
  min-height: 2.75rem !important;
  padding: .625rem 1rem !important;
  font-size: .9375rem !important;
}

button:hover,
.btn:hover,
.home-btn:hover,
.hbtn:hover,
.pagination-btn:hover:not(:disabled),
.filter-btn:hover {
  background: #eef6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.btn-primary,
.btn-p,
button[type="submit"],
.pagination-btn.active,
.filter-btn.active,
.dp.act,
.dstrip .dcell.act,
.list-pager button.act,
.bg-indigo-600,
.hover\:bg-indigo-500:hover {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .22) !important;
}

.dp {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.dp:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.dstrip .dcell,
.dstrip .dnav {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: none !important;
}

.dstrip .dcell .dmonth {
  color: #64748b !important;
}

.dstrip .dcell:hover,
.dstrip .dnav:hover {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

.dstrip .dcell.hasdata {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #075985 !important;
  font-weight: 700 !important;
}

.dstrip .dcell.hasdata .dmonth {
  color: #0369a1 !important;
}

.dstrip .dcell.act {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .24) !important;
}

.dstrip .dcell.act .dmonth {
  color: #dbeafe !important;
}

.db-table th,
.list-table th,
thead,
.bg-gray-700,
.bg-slate-700 {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: var(--ui-border) !important;
}

.db-table td,
.list-table td,
.kv-row,
.log-line,
.border-gray-800,
.border-gray-700,
.border-slate-700 {
  border-color: var(--ui-border) !important;
}

.db-table tr.selected td {
  background: #e8f1ff !important;
}

.text-white,
[style*="color:white"],
[style*="color: white"],
[style*="color:#fff"],
[style*="color: #fff"] {
  color: var(--ui-text) !important;
}

.text-gray-700,
.text-gray-600,
.text-gray-500,
.text-gray-400,
[style*="color:#374151"],
[style*="color: #374151"],
[style*="color:#4b5563"],
[style*="color: #4b5563"],
[style*="color:#6b7280"],
[style*="color: #6b7280"],
[style*="color:#64748b"],
[style*="color: #64748b"] {
  color: var(--ui-muted) !important;
}

.text-gray-800,
.text-gray-900 {
  color: var(--ui-text) !important;
}

[style*="color:#e2e8f0"],
[style*="color: #e2e8f0"],
[style*="color:#d1d5db"],
[style*="color: #d1d5db"],
[style*="color:#c4cdd6"],
[style*="color: #c4cdd6"],
[style*="color:#9ca3af"],
[style*="color: #9ca3af"],
[style*="color:#a5b4fc"],
[style*="color: #a5b4fc"],
[style*="color:#c7d2fe"],
[style*="color: #c7d2fe"],
[style*="color:#818cf8"],
[style*="color: #818cf8"],
[style*="color:#4b5563"],
[style*="color: #4b5563"],
[style*="color:#6b7280"],
[style*="color: #6b7280"],
[style*="color:#8b95a8"],
[style*="color: #8b95a8"] {
  color: var(--ui-text-soft) !important;
}

.col-null,
.kv-val-null {
  color: var(--ui-muted-2) !important;
}

.col-name,
.mono,
.text-indigo-400,
.text-blue-400,
[style*="color:#60a5fa"],
[style*="color: #60a5fa"],
[style*="color:#93c5fd"],
[style*="color: #93c5fd"] {
  color: #2563eb !important;
}

.text-red-400,
.badge-unqualified,
.b-unqualified {
  color: var(--ui-red) !important;
}

.btn-green,
.badge-qualified,
.b-qualified,
.text-green-400 {
  color: var(--ui-green) !important;
}

.btn-amber,
.text-yellow-400,
.text-amber-400 {
  color: var(--ui-amber) !important;
}

.badge,
.ftag,
.stat-chip {
  border-radius: 999px !important;
  box-shadow: none !important;
}

.modal-bg,
.modal-overlay {
  background: rgba(15, 23, 42, .38) !important;
  backdrop-filter: blur(8px);
}

.code-editor,
pre,
code {
  background: #f8fafc !important;
  color: #1e293b !important;
}

#logSection .sh,
.log-header,
[id*="logModalTitle"] {
  color: #1e3a8a !important;
}

#logContent,
.log-body,
.log-modal .log-body {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 22px rgba(15,23,42,.06) !important;
  line-height: 1.75 !important;
}

#logContent {
  font-size: 12px !important;
  padding: 12px 14px !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

.log-line {
  color: #334155 !important;
  border-bottom-color: #e2e8f0 !important;
}

.log-line.ll-start {
  color: #1d4ed8 !important;
}

.log-line.ll-ai {
  color: #047857 !important;
}

.log-line.ll-err {
  color: #b91c1c !important;
}

.log-line.ll-warn {
  color: #b45309 !important;
}

.log-line.ll-db {
  color: #0369a1 !important;
}

.preview-frame {
  background: #fff !important;
  border-radius: var(--ui-radius) !important;
}

.text-xs,
[class*="!text-xs"],
.section-label,
.stat-lbl,
.stat-sub,
.inline-note,
.badge,
.ftag,
.type-tag,
.node-legend,
.log-line,
.modal-pre,
[style*="font-size:10px"],
[style*="font-size: 10px"],
[style*="font-size:11px"],
[style*="font-size: 11px"],
[style*="font-size:12px"],
[style*="font-size: 12px"] {
  font-size: .875rem !important;
}

.text-sm,
.btn,
.ctrl,
.input-dark,
.select-dark,
.df-date,
.report-text,
[style*="font-size:13px"],
[style*="font-size: 13px"],
[style*="font-size:14px"],
[style*="font-size: 14px"] {
  font-size: .9375rem !important;
}

h1,
.text-2xl,
.text-xl {
  font-size: 1.5rem !important;
  line-height: 1.25 !important;
}

h2,
.text-lg {
  font-size: 1.25rem !important;
  line-height: 1.3 !important;
}

.stat-val,
.text-3xl {
  font-size: 1.875rem !important;
}

.section-label {
  color: #1d4ed8 !important;
}

.section-label::after {
  background: var(--ui-border) !important;
}

.btn-run,
.btn-primary,
.btn-p {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #1d4ed8 !important;
}

.btn-run:hover:not(:disabled),
.btn-primary:hover:not(:disabled),
.btn-p:hover:not(:disabled) {
  background: #1d4ed8 !important;
  color: #fff !important;
}

.status-bar.idle,
.status-bar.active,
.status-bar.closed,
.inline-note.info,
.inline-note.warn,
.inline-note.error {
  background: #f8fafc !important;
  border-color: var(--ui-border) !important;
  color: var(--ui-text-soft) !important;
}

.switch {
  width: 3rem !important;
  height: 1.75rem !important;
}

.switch-slider {
  background: #cbd5e1 !important;
  border-color: #94a3b8 !important;
}

.switch-slider::before {
  width: 1.125rem !important;
  height: 1.125rem !important;
  background: #64748b !important;
}

.switch input:checked + .switch-slider {
  background: #bbf7d0 !important;
  border-color: #16a34a !important;
}

.switch input:checked + .switch-slider::before {
  background: #16a34a !important;
}

.step-dot {
  width: 1.75rem !important;
  height: 1.75rem !important;
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #075985 !important;
  font-size: .875rem !important;
}

[class*="bg-[#"],
[class*="border-[#"] {
  background: #ffffff !important;
  border-color: var(--ui-border) !important;
  color: var(--ui-text-soft) !important;
}

[class*="hover:bg-gray"]:hover,
[class*="hover:bg-slate"]:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.\!text-xs,
.topbar-back {
  font-size: .875rem !important;
}

.\!py-0\.5,
.\!py-1\.5 {
  padding-top: .625rem !important;
  padding-bottom: .625rem !important;
}

.\!px-2,
.\!px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* Unified admin visual refresh, React-ready design foundation. */
:root {
  --ui-bg: #f3f6fb;
  --ui-bg-2: #eaf0f8;
  --ui-surface: #ffffff;
  --ui-surface-2: #f8fafc;
  --ui-surface-3: #eef6ff;
  --ui-border: #cfd9e8;
  --ui-border-strong: #aebed2;
  --ui-text: #0f1f33;
  --ui-text-soft: #24364d;
  --ui-muted: #52657d;
  --ui-muted-2: #71839a;
  --ui-primary: #1d5fd6;
  --ui-primary-2: #0284c7;
  --ui-green: #087f5b;
  --ui-amber: #b45309;
  --ui-red: #c81e1e;
  --ui-purple: #6d28d9;
  --ui-radius: 8px;
  --ui-shadow: 0 10px 24px rgba(15, 31, 51, .08);
}

html,
body {
  background: linear-gradient(180deg, #f8fbff 0%, var(--ui-bg) 100%) !important;
  color: var(--ui-text) !important;
}

body,
button,
input,
select,
textarea,
td,
th {
  color: var(--ui-text) !important;
  letter-spacing: 0 !important;
}

.card,
.tool-card,
.panel,
.metric,
.detail-panel,
.drawer,
.dialog-box,
.log-modal,
.schema-panel,
.inline-note,
[class*="bg-gray-800"],
[class*="bg-gray-900"],
[class*="bg-slate-800"],
[class*="bg-slate-900"] {
  background: var(--ui-surface) !important;
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  box-shadow: var(--ui-shadow) !important;
}

.tool-card,
.card,
.panel,
.metric {
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease !important;
}

.tool-card:hover,
.card:hover,
.panel:hover {
  border-color: #9ab8e6 !important;
  box-shadow: 0 14px 30px rgba(29, 95, 214, .12) !important;
}

body > .border-b,
.topbar,
.toolbar,
.status-bar,
.df-bar,
[style*="border-bottom"] {
  background: rgba(255,255,255,.92) !important;
  border-color: var(--ui-border) !important;
  color: var(--ui-text) !important;
}

h1,
h2,
h3,
.font-bold,
.font-semibold,
.topbar-title,
.drawer-title,
.section-label {
  color: var(--ui-text) !important;
}

p,
label,
.hint,
.helper-text,
.muted,
.text-gray-400,
.text-gray-500,
.text-gray-600,
.text-gray-700,
.stat-sub,
.kv-label {
  color: var(--ui-muted) !important;
}

input,
select,
textarea,
.ctrl,
.filter,
.df-date {
  background: #ffffff !important;
  border: 1px solid var(--ui-border-strong) !important;
  color: var(--ui-text) !important;
  border-radius: var(--ui-radius) !important;
  min-height: 40px !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus,
.ctrl:focus,
.df-date:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(29, 95, 214, .14) !important;
}

button,
.btn,
.home-btn,
.hbtn,
.filter-btn,
.pagination-btn,
.pg-btn,
.mini-btn {
  border-radius: var(--ui-radius) !important;
  border-color: var(--ui-border-strong) !important;
  color: var(--ui-text-soft) !important;
  background: #ffffff !important;
  font-weight: 650 !important;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled),
.home-btn:hover,
.hbtn:hover,
.filter-btn:hover:not(:disabled),
.pagination-btn:hover:not(:disabled),
.pg-btn:hover:not(:disabled) {
  background: #eef6ff !important;
  border-color: #8ab4f8 !important;
  color: var(--ui-primary) !important;
}

button:disabled,
.btn:disabled,
.mini-btn:disabled {
  background: #f1f5f9 !important;
  border-color: #d6e0ed !important;
  color: #8da0b6 !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

.btn-primary,
.btn-p,
.btn-run,
.btn.primary,
.bg-indigo-600,
.pagination-btn.active,
.filter-btn.active,
.pg-btn.active {
  background: linear-gradient(135deg, var(--ui-primary), var(--ui-primary-2)) !important;
  border-color: var(--ui-primary) !important;
  color: #ffffff !important;
}

.btn-danger,
.btn.danger,
.text-red-400,
.text-red-500,
.badge-unqualified,
.b-unqualified {
  color: var(--ui-red) !important;
}

.btn.danger,
.btn-danger {
  background: #fff5f5 !important;
  border-color: #f3b4b4 !important;
}

.status-ok,
.text-green-400,
.badge-qualified,
.b-qualified {
  color: var(--ui-green) !important;
}

.status-off,
.text-yellow-400,
.text-amber-400,
.badge-error,
.badge-pending {
  color: var(--ui-amber) !important;
}

table,
.db-table,
.list-table,
.process-table {
  background: #ffffff !important;
  color: var(--ui-text) !important;
}

thead th,
.db-table th,
.list-table th,
.process-table th {
  background: #eef3f9 !important;
  color: var(--ui-text-soft) !important;
  border-bottom: 1px solid var(--ui-border-strong) !important;
  font-weight: 750 !important;
}

td,
.db-table td,
.list-table td,
.process-table td,
.kv-row {
  border-color: var(--ui-border) !important;
  color: var(--ui-text) !important;
}

tbody tr:hover td,
.db-table tr:hover td,
.list-table tbody tr:hover td {
  background: #f0f7ff !important;
}

.badge,
.tag,
.tag-item,
.stat-chip,
.type-tag,
.ftag {
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, .28) !important;
  color: var(--ui-text-soft) !important;
  background: #f1f6ff !important;
}

.codebox,
pre,
code,
.mono,
.log-body,
#logContent {
  background: #0f172a !important;
  color: #e5eefb !important;
  border-color: #26354f !important;
}

.modal-overlay,
.modal-bg {
  background: rgba(15, 31, 51, .45) !important;
  backdrop-filter: blur(10px) !important;
}

.tool-icon,
.brand-mark,
[style*="rgba(99,102,241"] {
  background: #e8f1ff !important;
  color: var(--ui-primary) !important;
  border: 1px solid #c8dcff !important;
}

body.management-home {
  min-height: 100vh !important;
  background:
    linear-gradient(90deg, rgba(29, 95, 214, .10) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fb 48%, #f5f7fb 100%) !important;
  background-size: 44px 44px, auto !important;
}

body.management-home > .border-b {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid #cfd9e8 !important;
  box-shadow: 0 6px 18px rgba(15, 31, 51, .06) !important;
  backdrop-filter: blur(12px) !important;
}

body.management-home .max-w-5xl {
  max-width: 1180px !important;
}

body.management-home .tool-card {
  min-height: 210px !important;
  padding: 24px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border: 1px solid #cbd8eb !important;
  border-left: 5px solid var(--ui-primary) !important;
  box-shadow: 0 14px 30px rgba(15, 31, 51, .09) !important;
}

body.management-home .tool-card:hover {
  background: #ffffff !important;
  border-color: #8eb3ef !important;
  border-left-color: var(--ui-primary-2) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 18px 36px rgba(29, 95, 214, .16) !important;
}

body.management-home .tool-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 8px !important;
  background: #e7f0ff !important;
  color: var(--ui-primary) !important;
  box-shadow: inset 0 0 0 1px #c8dcff !important;
}

body.management-home h2 {
  font-size: 1.625rem !important;
}

body.management-home .grid {
  gap: 20px !important;
}

body.management-home #pwdModal > div {
  background: #ffffff !important;
  border: 1px solid #cbd8eb !important;
  box-shadow: 0 24px 60px rgba(15, 31, 51, .22) !important;
}

hr {
  border-color: var(--ui-border) !important;
}

::-webkit-scrollbar {
  width: 7px !important;
  height: 7px !important;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 999px !important;
}

::-webkit-scrollbar-track {
  background: transparent !important;
}

@media (max-width: 768px) {
  .tool-card,
  .card {
    border-radius: var(--ui-radius) !important;
  }
}

/* Responsive repair layer for legacy static pages. */
body {
  overflow-x: auto;
}

.max-w-5xl,
.max-w-6xl,
.max-w-7xl {
  width: min(100% - 2rem, 88rem) !important;
  max-width: 88rem !important;
}

.grid {
  min-width: 0 !important;
}

.grid > *,
.flex > * {
  min-width: 0;
}

.table-wrap,
.db-wrap,
.scroll-area,
.log-body,
#logContent {
  scrollbar-width: auto !important;
}

.modal-box {
  width: min(100vw - 2rem, 56rem) !important;
  max-height: calc(100dvh - 2rem) !important;
}

body:has(#promptText) {
  overflow-x: auto !important;
  min-height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
}

body:has(#promptText) > .flex,
body:has(#promptText) .grid {
  gap: 1.25rem !important;
}

body:has(#promptText) > .grid.grid-cols-1.xl\:grid-cols-12 {
  --pane-left: 1fr;
  --pane-mid: 1fr;
  --pane-right: 1fr;
  grid-template-columns: minmax(22rem, var(--pane-left)) .5rem minmax(22rem, var(--pane-mid)) .5rem minmax(22rem, var(--pane-right)) !important;
  align-items: stretch !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: calc(100dvh - 5rem) !important;
  padding-bottom: 1rem !important;
}

body:has(#promptText) > .grid.grid-cols-1.xl\:grid-cols-12 > .xl\:col-span-4 {
  grid-column: auto !important;
  min-height: 0 !important;
  height: 100% !important;
}

body:has(#promptText) .pane-resizer {
  width: .5rem !important;
  min-width: .5rem !important;
  height: 100% !important;
  border-radius: 999px !important;
  background: transparent !important;
  cursor: col-resize !important;
  position: relative !important;
  box-shadow: none !important;
}

body:has(#promptText) .pane-resizer::before {
  content: "" !important;
  position: absolute !important;
  top: .5rem !important;
  bottom: .5rem !important;
  left: 50% !important;
  width: 2px !important;
  transform: translateX(-50%) !important;
  border-radius: 999px !important;
  background: #cbd5e1 !important;
}

body:has(#promptText) .pane-resizer:hover::before,
body.resizing-panes:has(#promptText) .pane-resizer::before {
  width: 4px !important;
  background: #2563eb !important;
}

body.resizing-panes {
  cursor: col-resize !important;
  user-select: none !important;
}

body:has(#promptText) textarea,
body:has(#workOrderText),
body:has(#resultRaw) textarea {
  min-height: 0 !important;
}

body:has(#promptText) .card,
body:has(#promptText) .card-inner {
  padding: 1.25rem !important;
}

body:has(#promptText) > .grid.grid-cols-1.xl\:grid-cols-12 > .card {
  overflow: hidden !important;
}

body:has(#promptText) #promptText,
body:has(#promptText) #workOrderText,
body:has(#promptText) #resultRaw {
  flex: 1 1 auto !important;
  min-height: 12rem !important;
  height: auto !important;
}

body:has(#promptText) #promptText {
  min-height: 18rem !important;
}

body:has(#promptText) #workOrderText,
body:has(#promptText) #resultRaw {
  min-height: 20rem !important;
}

body:has(#promptText) [style*="width:130px"] {
  width: 10rem !important;
}

body:has(#drawioFrame),
body:has(#mxGraphFrame) {
  min-width: 62rem !important;
}

.schema-panel {
  width: min(22rem, 92vw) !important;
  top: 4rem !important;
  bottom: 3rem !important;
}

@media (max-width: 900px) {
  html {
    font-size: 15px !important;
  }

  body:has(#promptText) > .grid.grid-cols-1.xl\:grid-cols-12 {
    grid-template-columns: minmax(22rem, var(--pane-left)) .5rem minmax(22rem, var(--pane-mid)) .5rem minmax(22rem, var(--pane-right)) !important;
    min-width: 72rem !important;
    overflow: visible !important;
  }

  body:has(#promptText) > .grid.grid-cols-1.xl\:grid-cols-12 > .xl\:col-span-4 {
    grid-column: auto !important;
  }

  body:has(#promptText) {
    min-width: 72rem !important;
  }

  .toolbar,
  body > .border-b,
  body > div[style*="border-bottom"] {
    flex-wrap: wrap !important;
    gap: .75rem !important;
  }

  input,
  select,
  textarea,
  .ctrl,
  .input-dark,
  .select-dark {
    max-width: 100% !important;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 14px !important;
  }

  body {
    min-width: 0 !important;
  }

  .max-w-5xl,
  .max-w-6xl,
  .max-w-7xl {
    width: calc(100% - 1rem) !important;
  }

  button,
  .btn,
  .home-btn,
  .hbtn,
  .pagination-btn,
  .filter-btn {
    min-height: 2.75rem !important;
  }
}

/* ── Checker page badge / stat overrides ── */
.b-pending    { background: #fef9c3 !important; color: #a16207 !important; border: 1px solid #fde047 !important; }
.b-processing { background: #e0f2fe !important; color: #0369a1 !important; border: 1px solid #7dd3fc !important; }
.b-retrying   { background: #fff7ed !important; color: #c2410c !important; border: 1px solid #fdba74 !important; }
.b-qualified  { background: #ecfdf5 !important; color: #047857 !important; border: 1px solid #6ee7b7 !important; }
.b-unqualified{ background: #fef2f2 !important; color: #b91c1c !important; border: 1px solid #fca5a5 !important; }
.b-failed     { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; }

.t-REP { background: #dbeafe !important; color: #1d4ed8 !important; }
.t-MAT { background: #d1fae5 !important; color: #047857 !important; }
.t-INS { background: #fef3c7 !important; color: #a16207 !important; }
.t-FCO { background: #ede9fe !important; color: #6d28d9 !important; }
.t-SPB { background: #ccfbf1 !important; color: #0f766e !important; }
.t-OTH { background: #f1f5f9 !important; color: #475569 !important; }
