/* 决策鹅运营后台样式（手写，无任何 CDN 依赖） */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #222;
    background: #f4f6f8;
}

a { color: #1668dc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 200px;
    flex: 0 0 200px;
    background: #1f2733;
    color: #c8d0da;
    padding: 16px 0;
}

.sidebar .brand {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    padding: 0 18px 16px;
    border-bottom: 1px solid #2e3948;
    margin-bottom: 10px;
}
.sidebar .brand span { display: block; font-size: 12px; font-weight: 400; color: #8b97a6; margin-top: 4px; }

.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a {
    color: #c8d0da;
    padding: 10px 18px;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: #283140; color: #fff; text-decoration: none; }
.sidebar nav a.active { background: #283140; color: #fff; border-left-color: #1668dc; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: 54px;
    background: #fff;
    border-bottom: 1px solid #e6e9ee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.topbar-title { font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user .who { color: #555; }

.content { padding: 20px; }

/* ===== 标题 ===== */
.page-title { font-size: 20px; margin: 0 0 16px; }
.section-title { font-size: 16px; margin: 24px 0 10px; }
.muted { color: #8892a0; }
.center { text-align: center; }

/* ===== 卡片 ===== */
.cards { display: flex; flex-wrap: wrap; gap: 14px; }
.card {
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 6px;
    padding: 16px 20px;
    min-width: 150px;
    flex: 1 1 150px;
}
.card-num { font-size: 26px; font-weight: 700; color: #1668dc; }
.card-label { color: #667085; margin-top: 6px; }

/* ===== 表格 ===== */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td {
    border: 1px solid #e6e9ee;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.table th { background: #f7f9fc; font-weight: 600; }
.table tr:hover td { background: #fafcff; }

/* hash/长标识符列：视觉截断避免挤窄其他列（DOM 里仍是完整值，title 悬停可见），配套「复制」按钮 */
.hash-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.hash-cell code {
    min-width: 0;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    font-size: 12px;
    color: #4a5568;
    cursor: text;
}

/* ===== 表单 ===== */
.form { display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.form label { color: #4a5568; }
.form label .req { color: #e11d48; font-weight: 700; }
.form label > input[type=text], .form label > input[type=password], .form label > input[type=number],
.form label > input[type=datetime-local], .form label > input[type=file], .form label > select,
.form label > textarea { display: block; width: 100%; margin-top: 5px; box-sizing: border-box; }
.form input[type=text], .form input[type=password], .form input[type=number],
.form input[type=datetime-local], .form input[type=file], .form select, .form textarea {
    padding: 7px 9px;
    border: 1px solid #cfd6e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form textarea { min-height: 72px; resize: vertical; }
.form input[type=file] { width: auto; max-width: 100%; padding: 5px 4px; }
.form .row { display: flex; gap: 14px; }
.form .row > label { flex: 1; }
.form .checkbox { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #cfd6e0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.5;
}
.btn:hover { background: #f2f5fa; text-decoration: none; }
.btn-primary { background: #1668dc; border-color: #1668dc; color: #fff; }
.btn-primary:hover { background: #0f56b8; }
.btn-danger { background: #fff; border-color: #e05252; color: #d9363e; }
.btn-danger:hover { background: #fff1f0; }
/* 发布按钮：有未发布改动时高亮提醒 */
.btn-warn { background: #fff7e6; border-color: #d48806; color: #ad6800; font-weight: 600; }
.btn-warn:hover { background: #fff1cc; }
.btn-sm { padding: 3px 9px; font-size: 12px; }
.btn-block { width: 100%; }
.inline { display: inline; }

/* ===== 提示 ===== */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.alert-ok { background: #eaf7ee; border: 1px solid #b7e2c3; color: #237a3c; }
.alert-error { background: #fdecec; border: 1px solid #f3bcbc; color: #c0392b; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag-ok { background: #eaf7ee; color: #237a3c; }
.tag-fail { background: #fdecec; color: #c0392b; }
.tag-warn { background: #fff7e6; color: #ad6800; }
.tag-muted { background: #eef1f5; color: #667085; }

/* ===== 分页 ===== */
.pager { display: flex; gap: 8px; align-items: center; margin: 14px 0; }
.pager .cur { color: #667085; }

/* ===== 工具条 ===== */
.toolbar { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; align-items: flex-end; }
.toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #667085; }
.toolbar input, .toolbar select { padding: 6px 8px; border: 1px solid #cfd6e0; border-radius: 4px; }
.spacer { flex: 1; }

/* ===== 登录页 ===== */
.login-body {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; background: #1f2733;
}
.login-card {
    width: 340px; background: #fff; border-radius: 8px; padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.login-brand { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 20px; }
.login-brand span { display: block; font-size: 12px; font-weight: 400; color: #8892a0; margin-top: 4px; }
