/* ========== 基准变量 & 重置 (完全复制 cd.pdsrz.com 样式) ========== */
:root {
    --bg: #eff2f8;
    --card: #ffffff;
    --line: #d8e1ef;
    --text: #223149;
    --muted: #70809c;
    --primary: #3b5998;
    --primary-hover: #304c8c;
    --shadow: 0 14px 40px rgba(38, 58, 97, .08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at 12% 10%, rgba(59, 89, 152, 0.12), transparent 34%), var(--bg);
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    color: var(--text);
}

/* ========== 双栏布局 ========== */
.dashboard-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* 左侧面板 */
.side-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 20px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #f8faff);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand-panel h1 {
    font-size: 28px;
    margin: 0;
    color: var(--primary);
}
.brand-panel p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.menu-item {
    border: 1px solid #dce6f8;
    background: #f6f9ff;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #2b3f69;
    cursor: default;
    transition: 0.1s;
    text-align: left;
    font-family: inherit;
}
.menu-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 右侧主区域 */
.main-panel {
    padding: 28px 32px;
    overflow-y: auto;
}

/* 顶部栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-name {
    font-size: 28px;
    font-weight: 700;
}

/* 公告卡片 */
.announcement-card {
    background: linear-gradient(105deg, #1c2b4a59, #3b599873), url('https://origin.picgo.net/2026/05/14/announcement-384482a2c43ddb3abc96be.jpg') center/cover;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 28px;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
}
.announcement-card h2 {
    margin: 8px 0 6px;
    font-size: 22px;
}
.announcement-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.4);
}
.announcement-meta {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.status-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #c9d3e7;
    box-shadow: 0 0 0 3px #c9d3e747;
}
.status-dot.status-ok {
    background: #1f9f65;
    box-shadow: 0 0 0 3px #1f9f6533;
}
.announcement-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ffffffe6;
    border: 1px solid rgba(210,220,238,.9);
}
.announcement-status span {
    color: #1f2f4f;
    font-size: 12px;
    font-weight: 700;
}

.announcement-card p {
	margin: 0;
	font-size: 13px
}

.query-total {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(206,219,244,.9);
    background: #f0f5ffe6;
    color: #2b4480;
    font-weight: 700;
    font-size: 12px;
}

/* 核心卡片样式 */
.card {
    background: var(--card);
    border-radius: 24px;
    border: 1px solid var(--line);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* 搜索卡片 */
.search-card {
    overflow: hidden;
}

/* 搜索输入框（完整边框，与表单输入框统一） */
.search-input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 30px 0 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* 聚焦时的高亮效果（与其他输入框一致） */
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #3b599824;
}

/* 选中状态不再保留高亮边框（避免失焦后残留阴影） */
.search-input.filled {
    border-color: var(--line);
    box-shadow: none;
}

/* 下拉列表 */
.spirit-list {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
    display: none;
}
.spirit-list.show {
    display: block;
}
.spirit-item {
    padding: 10px 0;
    border-bottom: 1px solid #eef2f8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.spirit-item:hover {
    color: var(--primary);
}
.spirit-item.selected {
    background: #f0f5ff;
    border-radius: 6px;
    padding-left: 8px;
    padding-right: 8px;
}
.spirit-item.keyboard-hover {
    background: #f0f5ff;
    color: var(--primary);
}
.spirit-name {
    font-weight: 500;
}
.spirit-range {
    font-size: 12px;
    color: var(--muted);
}

/* 选中精灵区域 */
.selected-area {
    background: #f0f5ff;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.field {
    display: grid;
    gap: 5px;
}
.field-full {
    grid-column: 1 / -1;
}
.field span {
    font-size: 13px;
    color: var(--muted);
}

/* 通用输入框与选择框 */
input,
select {
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 0 12px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    font-family: inherit;
}
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #3b599824;
}

/* 按钮区域 */
.actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.primary-btn {
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.primary-btn:hover {
    background: var(--primary-hover);
}

/* 结果卡片 */
.result-card {
    background: #f8faff;
    border-radius: 20px;
    padding: 18px;
    margin-top: 20px;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e8f2;
    font-size: 14px;
}
.type-badge {
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
}
.type-badge.小不点 { background: #fef3e2; color: #c2841a; }
.type-badge.大块头 { background: #ffe6e5; color: #bc4e3c; }
.type-badge.普通 { background: #e6f0e6; color: #2d6a2d; }

.warning-tip {
    margin-top: 12px;
    background: #fff8e7;
    border-radius: 12px;
    padding: 10px;
    font-size: 12px;
    color: #8a6d14;
}

/* 响应式 */
@media (max-width: 860px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
    .side-panel {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .menu-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .main-panel {
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .field-full {
        grid-column: auto;
    }
}

/* 让标签行和结果行样式统一 */
.tags-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e8f2;
}

/* 左侧“🏷️ 标签”文字与上面的 span 样式一致 */
.tags-label {
    font-size: 14px;
    font-weight: 400;
}

/* 右侧标签容器：右对齐 + 弹性换行 */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: 60%;      /* 限制最大宽度，避免挤压左侧 */
}

/* 标签徽章样式（不变，仅保留原有设计） */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f2f5;
    color: #2c3e50;
    white-space: nowrap;  /* 避免标签内文字折行 */
}

/* 各类标签颜色 */
.tag-huge { background: #ffe6e5; color: #bc4e3c; }
.tag-tiny { background: #fef3e2; color: #c2841a; }
.tag-normal { background: #e6f0e6; color: #2d6a2d; }
.tag-min-weight { background: #e3f2fd; color: #0b5e7e; }
.tag-max-weight { background: #fce4ec; color: #b33b4c; }