/* 旧页面统一皮肤：只做"字体 / 背景 / 表单 / 表格"这类通用元素的温和覆盖，
   不改布局、不加 !important，保证老页面结构不被打乱，观感向新版 UI 靠拢。 */
:root {
    --bg: #f5f7fa;
    --card: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e6eaf0;
    --brand: #2563eb;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.65;
}

h1, h2, h3, h4 {
    color: var(--ink);
    letter-spacing: .2px;
}

a {
    color: var(--brand);
}

input, select, textarea, button {
    font-family: inherit;
    font-size: 13px;
}

input[type=text], input[type=search], input[type=number], input[type=password],
input[type=email], input[type=url], select, textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

input[type=text]:focus, input[type=search]:focus, input[type=number]:focus,
input[type=password]:focus, select:focus, textarea:focus {
    border-color: #b9cdf0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

button, input[type=submit], input[type=button] {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 6px 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

button:hover, input[type=submit]:hover, input[type=button]:hover {
    background: #f1f5fb;
    border-color: #c7d3e3;
}

table {
    background: var(--card);
    border-radius: 10px;
    border-color: var(--line);
}

th {
    background: #eef2f7;
    color: #334155;
    font-weight: 600;
    padding: 8px;
    border-bottom: 1px solid var(--line);
}

td {
    padding: 7px 8px;
    border-bottom: 1px solid #f1f4f8;
}

/* 旧页面常见的浅蓝工具条，统一成新版的浅灰蓝 */
#toolbar, .toolbar {
    background: #eef2f7 !important;
    border: 1px solid var(--line);
    border-radius: 10px;
}

pre, .console, textarea[readonly] {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

/* ---------- 桥接层：老页面的容器、表格、按钮统一到新版浅色卡片风格 ---------- */
body {
    padding-bottom: 28px;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    font-size: 13px;
    overflow: hidden;
}

table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 12.5px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

table td {
    padding: 9px 12px;
    border-bottom: 1px solid #eff2f6;
    color: var(--ink);
}

table tr:last-child td {
    border-bottom: 0;
}

table tbody tr:hover {
    background: #fbfcfe;
}

/* 标题层级与新版对齐 */
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; margin: 14px 0 10px; }
h2 { font-size: 18px; font-weight: 700; margin: 12px 0 8px; }
h3 { font-size: 15px; font-weight: 600; margin: 10px 0 6px; }

/* 老页面里裸用的链接/按钮，统一到新版主色与圆角 */
a:not(.btn):hover { color: #1d4ed8; }

.form-control,
input[type=text],
input[type=password],
input[type=search],
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { background: #f4f7fc; border-color: #cfd8e6; }

/* 老页面里写死的浅灰/米色底块，统一成更轻的卡片底 */
table[bgcolor],
[bgcolor="#eeeeee"],
[bgcolor="#EEEEEE"] {
    background: #fff !important;
}
