html,
body {
    overflow-x: hidden;
}

/* ---------- 变量 ---------- */
:root {
    --base-bg: #f4f6fb;
    --card-bg: #ffffff;
    --primary: #4f7cff;
    --primary-dark: #3b68ef;
    --text-main: #202124;
    --text-second: #5f6368;
    --border: #e8eaf0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, .06);
    --font: 'Inter', sans-serif;
}

/* ---------- 全局 ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);

    color: var(--text-main);
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.wrap {
    width: 100%;
    display: flex;
    gap: 16px;
    padding: 16px;
}

/* ---------- 面板 ---------- */
.panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 80%;
    max-width: 800px;
    /* 可选，根据你设计调整 */
    margin: auto auto;
    /* 水平居中 */
}

.left {
    flex: 1.2
}

.right {
    flex: 1
}

.panel-header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-left: 8px;
}

.icon {
    font-size: 22px;
    color: var(--primary);
}

/* ---------- 表格 ---------- */
.table-wrap {
    flex: 1;
    overflow: auto;
    padding: 12px 24px 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

th {
    text-align: left;
    padding: 10px 0;
    font-weight: 500;
    color: var(--text-second);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

tbody tr:hover {
    background: #fafbfc;
}

button.add {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s;
}

button.add:hover {
    background: var(--primary-dark);
}

/* ---------- 合并区 ---------- */
.merge-area {
    flex: 1;
    margin: 24px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fafbfc;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    overflow: auto;
}

/* ---------- 按钮栏 ---------- */
.btn-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.primary {
    background: var(--primary);
    color: #fff;
}

.primary:hover {
    background: var(--primary-dark);
}

.secondary {
    background: var(--border);
    color: var(--text-main);
}

.secondary:hover {
    background: #dfe1e7;
}

.feedback {
    font-size: 14px;
    color: #2ecc71;
    margin-left: 4px;
}

/* ===== 左侧按钮统一尺寸 ===== */
button.add {
    width: 120px;
    /* 统一宽度，想再宽自己调 */
    height: 42px;
    /* 统一高度 */
    padding: 0;
    /* 去掉左右 padding，让文字完全居中 */
    line-height: 20px;
    /* 文字垂直居中 */
    text-align: center;
    border: none;
    border-radius: 6px;
    background: #4f7cff;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 124, 255, .24);
    transition: all .2s ease;
}

button.add:hover {
    background: #3b68ef;
    box-shadow: 0 4px 10px rgba(79, 124, 255, .34);
}

button.add.selected {
    background: #ff6e2c;
    box-shadow: 0 2px 6px rgba(255, 110, 44, .30);
}