/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sidebar-width: 225px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active: #3b82f6;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --main-bg: #f1f5f9;
    --card-bg: #ffffff;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ========== Sidebar (same as ips_new) ========== */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo svg { width: 28px; height: 28px; color: var(--sidebar-active); flex-shrink: 0; }
.sidebar-logo span { font-size: 15px; font-weight: 700; color: #f1f5f9; line-height: 1.3; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section {
    font-size: 14px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: rgba(148,163,184,0.5);
    padding: 16px 12px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 14px; font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
}
.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.sidebar-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--sidebar-active);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: 14px; font-weight: 600; color: #e2e8f0; }
.sidebar-user-role { font-size: 14px; color: var(--text-muted); }
.nav-item.logout { color: #f87171; }
.nav-item.logout:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* Sub-menu group (non-clickable parent + nested items) */
.nav-group { margin-bottom: 0; }
.nav-group-title {
    font-size: 14px; font-weight: 500;
    color: rgba(148,163,184,0.5);
    padding: 16px 12px 4px;
    cursor: default;
}
.nav-subitem {
    display: flex; align-items: center;
    padding: 10px 12px;
    /* 让二级文字与一级文字对齐：一级=padding12+图标20+gap12=44，故框左缩进 44-12=32 */
    margin-left: 32px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 14px; font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
}
.nav-subitem:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-subitem.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

/* Collapsible nav-group (accordion) */
.nav-group.collapsible .nav-item.nav-group-toggle { cursor: pointer; }
.nav-group.collapsible .nav-chevron {
    margin-left: auto; font-size: 18px; color: var(--text-muted);
    transition: transform .15s ease; flex-shrink: 0;
}
.nav-group.collapsible:not(.collapsed) .nav-chevron { transform: rotate(90deg); }
.nav-group.collapsed .nav-subitem { display: none; }

/* ========== Main Content ========== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 32px;
}

.page-header { margin-bottom: 24px; }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ========== Unified Page Bar ========== */
.page-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 20px;
    min-height: 60px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.page-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.page-bar-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-bar-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 34px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.page-bar-back:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}
.page-bar-back svg { width: 14px; height: 14px; flex-shrink: 0; }
.page-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .page-bar { flex-wrap: nowrap; overflow-x: auto; }
    .page-bar-title { white-space: nowrap; }
}

.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--text-secondary);
    transition: var(--transition);
}
.back-link:hover { color: var(--primary); }
.back-link svg { width: 16px; height: 16px; }

/* ========== Cards ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 16px;
}

.card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 24px; }

/* ========== Progress ========== */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: stretch;
}

/* 柱状图横向滚动：柱子固定宽度，超出卡片时在柱状图内部横向滚动（min-width:0 防止撑破卡片溢出页面） */
.chart-kind, .chart-prof { min-width: 0; }

.chart-scroll { min-width: 0; max-width: 100%; scrollbar-width: thin; }
.chart-scroll::-webkit-scrollbar { height: 8px; }
.chart-scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.chart-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }


.progress-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    min-width: 0;
}

.progress-card-header {
    min-height: 40px;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
    min-width: 0;
}

.progress-subject-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}

.progress-card-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
}

.progress-bar-wrap {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
    min-width: 2px;
}

.progress-text {
    font-size: 14px; color: var(--text-muted);
}

.progress-detail-row {
    display: flex; align-items: center; margin-bottom: 12px;
}
.progress-detail-row:last-child { margin-bottom: 0; }
.progress-label { font-size: 14px; color: var(--text-secondary); white-space: nowrap; min-width: 80px; }
.progress-value { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; min-width: 120px; text-align: right; }

/* ========== Content List ========== */
.content-list { display: flex; flex-direction: column; gap: 12px; }

.content-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    transition: var(--transition);
    border-left: 3px solid transparent;
    display: block;
}
.content-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary);
}

.content-card-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.content-subject-tag {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.content-card-name {
    font-size: 16px; font-weight: 600; color: var(--text-primary);
}

.content-done-badge {
    padding: 2px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.content-card-body { margin-top: 4px; }

.content-node-types {
    display: flex; gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}

.node-type-tag {
    font-size: 14px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.content-progress-row {
    display: flex; align-items: center; gap: 12px;
}

.content-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 100px;
}

/* ========== Task Cards ========== */
.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.task-card:hover { box-shadow: var(--shadow-md); border-left-color: var(--primary); }
.task-card.completed { border-left-color: var(--success); opacity: 0.75; }
.task-card.completed .task-content-name { opacity: 1; }
.task-card.draft { border-left-color: var(--text-muted); }

.task-card-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.task-subject-tag {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.task-content-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    flex: 1;
}

.task-status-badges { display: flex; gap: 4px; }

.task-status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.task-status-badge.done { background: #d1fae5; color: #065f46; }
.task-status-badge.pending { background: #fef3c7; color: #92400e; }
.task-status-badge.draft { background: #f1f5f9; color: var(--text-muted); }

/* ==========================================================
   任务项状态标识（全系统统一，实现见 views/partials/task_status.ejs）
   规范：统一图标 + 彩色文字，无背景框
     待发布   灰 + 圆圈     未完成   红 + 圆圈
     已完成   绿 + 对钩     部分完成 橙 + 对钩
     超额完成 紫 + 对钩
   ========================================================== */
.task-status-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    white-space: nowrap;
}
.task-status-icon svg { width: 18px; height: 18px; }
.task-status-icon.draft   { color: #64748b; }  /* 待发布：灰色 */
.task-status-icon.undone  { color: #ef4444; }  /* 未完成：红色 */
.task-status-icon.done    { color: #10b981; }  /* 已完成：绿色 */
.task-status-icon.partial { color: #f97316; }  /* 部分完成：橙色 */
.task-status-icon.over    { color: #8b5cf6; }  /* 超额完成：紫色 */
.task-status-icon.optional { color: #eab308; }  /* 自选内容：黄色 */

/* ==========================================================
   某日「总任务状态」标识（全系统统一，实现见 views/partials/card_status.ejs）
   规范：浅色背景框 + 彩色文字，无图标
     待生成   灰字 + 浅灰框     待发布   灰字 + 浅灰框
     已发布   蓝字 + 浅蓝框     已提交   绿字 + 浅绿框
     已过期   红字 + 浅红框
   ========================================================== */
.card-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.4;
}
.card-status-badge.generated { background: #f1f5f9; color: #64748b; } /* 待生成：灰 + 浅灰 */
.card-status-badge.draft     { background: #f1f5f9; color: #64748b; } /* 待发布：灰 + 浅灰 */
.card-status-badge.published { background: #dbeafe; color: #1e40af; } /* 已发布：蓝 + 浅蓝 */
.card-status-badge.completed { background: #d1fae5; color: #065f46; } /* 已提交：绿 + 浅绿 */
.card-status-badge.expired   { background: #fee2e2; color: #b91c1c; } /* 已过期：红 + 浅红 */

/* ==========================================================
   科目标识（全系统统一，实现见 views/partials/subject_badge.ejs）
   规范：浅色背景框 + 彩色文字，无图标
     语文   蓝字 + 浅蓝框
     数学   绿字 + 浅绿框
     英语   橙字 + 浅橙框
   ========================================================== */
.subject-badge {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.subject-badge.chinese { background: #dbeafe; color: #1e40af; } /* 语文：蓝 */
.subject-badge.math    { background: #d1fae5; color: #065f46; } /* 数学：绿 */
.subject-badge.english { background: #ffedd5; color: #c2410c; } /* 英语：橙 */
.subject-badge.unknown { background: #f1f5f9; color: #475569; } /* 兜底中性灰 */

.task-desc {
    font-size: 14px; color: var(--text-secondary);
    margin-bottom: 8px;
    padding-right: 1em;
}

.task-complete-btn-wrap { display: flex; justify-content: flex-end; }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    min-height: 30px;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e2e8f0; color: var(--text-secondary); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--success-hover); }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 4px 10px; font-size: 14px; }

/* ========== Forms ========== */
.form-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

/* Field group for page/chapter sections */
.field-group {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafbfc;
}
.field-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.field-group .form-group:last-child {
    margin-bottom: 0;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-control:disabled {
    background: #f1f5f9;
    color: var(--text-secondary);
    border-color: var(--border);
    cursor: not-allowed;
    opacity: 1;
}
.field-value {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #f1f5f9;
    color: var(--text-secondary);
    min-height: 40px;
    display: flex;
    align-items: center;
    word-break: break-word;
}
.empty-text { font-size: 14px; color: var(--text-muted); padding: 8px 0; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ========== Login ========== */
.login-body { background: #0f172a; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { background: rgba(255, 255, 255, 0.6); border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); width: 100%; max-width: 400px; padding: 40px 36px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.login-logo { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; }
.login-logo-img { width: 100%; height: 100%; object-fit: cover; }
.login-title { text-align: center; font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 2px; }
.login-title-sub { text-align: center; font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 28px; }
.login-btn { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 8px; -webkit-appearance: none; appearance: none; line-height: 1; }
.login-btn:hover { background: var(--primary-hover); }
.login-btn svg { width: 18px; height: 18px; }
.login-hint { text-align: center; margin-top: 20px; font-size: 14px; color: #334155; line-height: 1.8; }

/* ========== Alerts ========== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* ========== Badges ========== */
.badge { padding: 2px 8px; border-radius: 4px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-muted { background: #f1f5f9; color: var(--text-muted); }
.badge-warning { background: #ffedd5; color: #c2410c; }

/* ========== Empty State ========== */
.empty-state { text-align: center; padding: 60px 30px; color: var(--text-muted); }
.empty-state svg { width: 56px; height: 56px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; margin-bottom: 8px; }

/* ========== Table ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 40px; padding: 8px 24px; text-align: left; font-size: 14px; font-weight: 600; color: var(--text-secondary); background: #f8fafc; border-bottom: 1px solid var(--border); }
.data-table td { height: 60px; padding: 10px 24px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table th:first-child, .data-table td:first-child { padding-left: 30px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 60px; }

/* 场景列表：内容自适应布局，长表头自动换行、操作列保持完整，避免压盖与横向滚动 */
.scenarios-list { width: 100%; border-collapse: collapse; }
.scenarios-list th,
.scenarios-list td { white-space: normal; word-break: break-word; }
.scenarios-list th,
.scenarios-list td { padding-left: 10px; padding-right: 10px; }
.scenarios-list .action-group { white-space: nowrap; }
/* 场景列表：ID列与操作列表头&内容水平垂直居中 */
.scenarios-list th:nth-child(1), .scenarios-list td:nth-child(1),
.scenarios-list th:nth-child(7), .scenarios-list td:nth-child(7) {
    text-align: center;
    vertical-align: middle;
}


/* ========== Detail Grid ========== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ========== Plan Info ========== */
.plan-info-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.plan-info-row:last-child { border-bottom: none; }
.plan-info-row span { font-size: 14px; color: var(--text-secondary); }
.plan-info-row strong { font-size: 14px; color: var(--text-primary); }

/* ========== Plan Form ========== */
.plan-list { display: flex; flex-direction: column; gap: 16px; }

.plan-card { margin-bottom: 0; }

.plan-card-title { display: flex; align-items: center; gap: 8px; }
.plan-card-title h3 { font-size: 16px; font-weight: 600; }

.plan-form-row {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.plan-form-group { flex: 1; min-width: 120px; }
.plan-form-group label { font-size: 14px; color: var(--text-muted); margin-bottom: 4px; display: block; }
.plan-form-actions { display: flex; justify-content: flex-start; }

/* ========== Switch Toggle ========== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #cbd5e1; transition: var(--transition); border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; transition: var(--transition); border-radius: 50%; }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ========== Admin Actions ========== */
.admin-actions {
    display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}

.admin-action-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    flex: 1; min-width: 280px;
}

.admin-action-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.admin-action-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }

.admin-action-form { display: flex; gap: 8px; align-items: center; }

/* ========== Date Tabs ========== */
.date-tabs {
    display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px;
}

.date-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    white-space: nowrap;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 100px;
}
.date-tab:hover { background: var(--primary); color: white; }
.date-tab.active { background: var(--primary); color: white; }

.date-tab-date { font-size: 14px; font-weight: 600; }
.date-tab-count { font-size: 14px; opacity: 0.8; }

/* ========== Task Detail ========== */
.task-detail-info { display: flex; flex-direction: column; gap: 12px; }
.task-detail-row { display: flex; gap: 12px; align-items: flex-start; }
.detail-label { font-size: 14px; color: var(--text-muted); min-width: 80px; }
.detail-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

/* ========== Mobile Hamburger ========== */
.mobile-toggle {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 101;
    width: 40px; height: 40px;
    background: var(--sidebar-bg); border: none; border-radius: var(--radius-sm);
    cursor: pointer; align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 22px; height: 22px; color: white; }

.mobile-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .mobile-toggle { display: flex; }
    .mobile-overlay.show { display: block; }
    .main-content { margin-left: 0; padding: 64px 16px 32px; }
    .progress-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .plan-form-row { flex-direction: column; gap: 8px; }
    .admin-actions { flex-direction: column; }
    .data-table { font-size: 14px; }
    .data-table th, .data-table td { padding: 8px 12px; }
    .data-table th:first-child, .data-table td:first-child { padding-left: 12px; }
    .data-table th:last-child, .data-table td:last-child { padding-right: 12px; }
    /* 操作列：.content-table 全局有 60px 右内边距，手机端必须覆盖，否则内容区被吃掉、三按钮竖排 */
    .content-table th:last-child, .content-table td:last-child { padding-right: 12px !important; }
    /* 手机端：动作类型等表格给足最小宽度，走横向滚动，避免表头被压缩折行 */
    .move-types-list, .skill-types-list, .ctds-moves-list, .football-stars-list, .scenarios-list, .training-list { min-width: 680px; }
    /* 操作列（最后一列）保底最小宽度：窄列下三按钮保持 2+1，而非每个独占一行竖排 */
    .move-types-list th:last-child, .move-types-list td:last-child,
    .skill-types-list th:last-child, .skill-types-list td:last-child,
    .ctds-moves-list th:last-child, .ctds-moves-list td:last-child,
    .football-stars-list th:last-child, .football-stars-list td:last-child,
    .training-list th:last-child, .training-list td:last-child,
    .scenarios-list th:last-child, .scenarios-list td:last-child { min-width: 160px !important; }
}
/* ========== Page Header Row ========== */
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* ========== Content Card (updated for actions) ========== */
.content-card {
    display: flex;
    flex-direction: column;
}

.content-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ========== Content Card Actions ========== */
.content-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* ========== Card Header Actions ========== */
.card-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ========== Form Row (side-by-side) ========== */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

/* ========== Required Field ========== */
.required {
    color: var(--danger);
    font-weight: 700;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ========== Content Card - Right Side Actions (override) ========== */
.content-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 0;
    padding: 0 !important;
}

.content-card-main {
    flex: 1;
    padding: 20px 24px;
    cursor: pointer;
    min-width: 0;
}

.content-card-main:hover {
    background: #f8fafc;
}

.content-card-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 16px;
    border-left: 1px solid var(--border);
    align-items: stretch;
    justify-content: center;
    min-width: 100px;
    flex-shrink: 0;
}

.content-card-sidebar .btn {
    justify-content: flex-start;
    width: 100%;
}

/* Remove old content-card-actions and content-card-link styles */
.content-card-actions {
    display: none;
}

.content-card-link {
    display: none;
}

/* ========== Node Management Table ========== */
.node-table {
    width: 100%;
}

.node-table .view-cell {
    font-size: 14px;
    color: var(--text-primary);
}

.node-table .node-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    -webkit-appearance: none;
    appearance: none;
}

.node-table .node-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* Edit row form layout */
.node-table tr[id^="row-edit-"] form {
    display: contents;
}

.node-table tr[id^="row-edit-"] td:last-child {
    white-space: nowrap;
}

/* ========== Responsive - Content Card ========== */
@media (max-width: 768px) {
    .content-card {
        flex-direction: column !important;
    }

    .content-card-main {
        padding: 16px 20px;
    }

    .content-card-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 20px;
    }

    .content-card-sidebar .btn {
        flex: 1;
        min-width: 70px;
    }

    .node-table {
        font-size: 14px;
    }

    .node-table th, .node-table td {
        padding: 8px 12px;
    }

    .form-row {
        flex-direction: column;
    }
}
/* ========== Content Table Layout ========== */
.content-table { width: 100%; border-collapse: collapse; }
.content-table th { height: 40px; padding: 8px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; font-weight: 600; color: var(--text-secondary); background: #f8fafc; white-space: nowrap; }
.content-table td { height: 60px; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.content-table tbody tr:last-child td { border-bottom: none; }
.content-table tbody tr:hover { background: #f8fafc; }
.content-table th:first-child, .content-table td:first-child { padding-left: 30px; }
.content-table th:last-child, .content-table td:last-child { padding-right: 60px; }

/* 各列表操作列（最后一列）：重置右侧内边距与左侧对称，并让表头与按钮组水平居中 */
.training-list th:last-child, .training-list td:last-child,
.move-types-list th:last-child, .move-types-list td:last-child,
.skill-types-list th:last-child, .skill-types-list td:last-child,
.ctds-moves-list th:last-child, .ctds-moves-list td:last-child,
.football-stars-list th:last-child, .football-stars-list td:last-child {
    padding-right: 16px;
    text-align: center;
}
.scenarios-list th:last-child, .scenarios-list td:last-child {
    padding-right: 10px;
    text-align: center;
    width: 200px !important;
}

/* 操作列宽度已在各表 th:nth-child(N) 规则中统一设为固定 200px。
   注意：这些列表为 table-layout: fixed，固定布局只认 width、忽略 min-width，
   故必须用 width（而非 min-width）来撑开操作列；200px 可容纳三个 btn-sm 按钮单行居中，
   且不影响其他列之间的百分比相对比例。 */
/* 过人技术列表：训练次数 / 使用次数 / 熟练程度 居中对齐；值黑色字、不加粗；表头沿用默认表头样式（与其他表头一致） */
.training-list th:nth-child(5), .training-list td:nth-child(5),
.training-list th:nth-child(6), .training-list td:nth-child(6),
.training-list th:nth-child(7), .training-list td:nth-child(7) {
    text-align: center;
}
.training-list td:nth-child(5), .training-list td:nth-child(6),
.training-list td:nth-child(7) {
    color: #1a1a1a;
    font-weight: normal;
}

/* 技术动作类型列表：速记词 / 训练次数 / 使用次数 / 操作 横向居中 */
.move-types-list th:nth-child(3), .move-types-list td:nth-child(3),
.move-types-list th:nth-child(4), .move-types-list td:nth-child(4),
.move-types-list th:nth-child(5), .move-types-list td:nth-child(5),
.move-types-list th:nth-child(6), .move-types-list td:nth-child(6) {
    text-align: center;
}

/* 足球技术类型列表：传停带射动作类型 / 训练次数 / 使用次数 / 操作 横向居中 */
.skill-types-list th:nth-child(2), .skill-types-list td:nth-child(2),
.skill-types-list th:nth-child(3), .skill-types-list td:nth-child(3),
.skill-types-list th:nth-child(4), .skill-types-list td:nth-child(4),
.skill-types-list th:nth-child(5), .skill-types-list td:nth-child(5) {
    text-align: center;
}

/* 足球技术类型列表：包含的技术动作类型 列过宽，限制为 1/2 宽度并允许换行 */
.skill-types-list th:nth-child(3), .skill-types-list td:nth-child(3) {
    width: 50%;
    max-width: 50%;
    word-break: break-word;
    white-space: normal;
    vertical-align: top;
}

/* 球星列表：操作列横向居中 */
.football-stars-list th:nth-child(5), .football-stars-list td:nth-child(5) {
    text-align: center;
}

/* 训练场景列表：积分计算系数 / 操作 横向居中 */
.scenarios-list th:nth-child(4), .scenarios-list td:nth-child(4),
.scenarios-list th:nth-child(5), .scenarios-list td:nth-child(5) {
    text-align: center;
}

/* 传停带射技术列表：各列宽度 10% / 15% / 15% / 15% / 15% / 15% / 15%（从左至右） */
.ctds-moves-list {
    table-layout: fixed;
}
.ctds-moves-list th:nth-child(1) { width: 10% !important; }
.ctds-moves-list th:nth-child(2) { width: 20% !important; }
.ctds-moves-list th:nth-child(3) { width: 25% !important; }
.ctds-moves-list th:nth-child(4) { width: 15% !important; }
.ctds-moves-list th:nth-child(5) { width: 15% !important; }
.ctds-moves-list th:nth-child(6) { width: 15% !important; }
.ctds-moves-list th:nth-child(7) { width: 200px !important; }

/* 过人技术列表：各列宽度 9% / 13% / 13% / 13% / 13% / 13% / 13% / 13%（从左至右） */
.training-list {
    table-layout: fixed;
}
.training-list th:nth-child(1) { width: 9% !important; }
.training-list th:nth-child(2) { width: 13% !important; }
.training-list th:nth-child(3) { width: 20% !important; }
.training-list th:nth-child(4) { width: 13% !important; }
.training-list th:nth-child(5) { width: 13% !important; }
.training-list th:nth-child(6) { width: 13% !important; }
.training-list th:nth-child(7) { width: 13% !important; }
.training-list th:nth-child(8) { width: 200px !important; }

/* 过人动作类型列表：各列宽度 10% / 18% / 18% / 18% / 18% / 18%（从左至右） */
.move-types-list {
    table-layout: fixed;
}
.move-types-list th:nth-child(1) { width: 10% !important; }
.move-types-list th:nth-child(2) { width: 18% !important; }
.move-types-list th:nth-child(3) { width: 18% !important; }
.move-types-list th:nth-child(4) { width: 18% !important; }
.move-types-list th:nth-child(5) { width: 18% !important; }
.move-types-list th:nth-child(6) { width: 200px !important; }

/* 传停带射动作类型列表：各列宽度 8% / 22% / 22% / 22% / 22%（从左至右） */
.skill-types-list {
    table-layout: fixed;
}
.skill-types-list th:nth-child(1) { width: 8% !important; }
.skill-types-list th:nth-child(2) { width: 22% !important; }
.skill-types-list th:nth-child(3) { width: 22% !important; }
.skill-types-list th:nth-child(4) { width: 22% !important; }
.skill-types-list th:nth-child(5) { width: 200px !important; }

/* 标志球星列表：各列宽度 8% / 22% / 22% / 22% / 22%（从左至右） */
.football-stars-list {
    table-layout: fixed;
}
.football-stars-list th:nth-child(1) { width: 8% !important; }
.football-stars-list th:nth-child(2) { width: 22% !important; }
.football-stars-list th:nth-child(3) { width: 22% !important; }
.football-stars-list th:nth-child(4) { width: 22% !important; }
.football-stars-list th:nth-child(5) { width: 200px !important; }

/* 传停带射技术列表：传停带射动作类型 / 训练次数 / 使用次数 / 熟练程度 / 操作 横向居中 */
.ctds-moves-list th:nth-child(3), .ctds-moves-list td:nth-child(3),
.ctds-moves-list th:nth-child(4), .ctds-moves-list td:nth-child(4),
.ctds-moves-list th:nth-child(5), .ctds-moves-list td:nth-child(5),
.ctds-moves-list th:nth-child(6), .ctds-moves-list td:nth-child(6),
.ctds-moves-list th:nth-child(7), .ctds-moves-list td:nth-child(7) {
    text-align: center;
}

/* 查看足球技术类型：最下方“包含的技术动作类型”表：表头 30px、内容项 40px（覆盖全局 40/60） */
.sub-type-table th {
    height: 30px;
    padding-top: 0;
    padding-bottom: 0;
}
.sub-type-table td {
    height: 40px;
    padding-top: 0;
    padding-bottom: 0;
}

.subject-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.content-name-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}
.content-name-link:hover {
    color: var(--primary-color, #6366f1);
    text-decoration: underline;
}

.done-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #10b98120;
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.cell-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mini-progress-bar {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
}
.mini-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.cell-progress-label {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 60px;
}
.all-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.all-progress-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.ap-num {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.ap-num strong {
    color: var(--text-primary);
    font-weight: 600;
}
.cell-progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.node-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 14px;
}

/* Mobile */
@media (max-width: 768px) {
    .content-table { font-size: 14px; }
    .content-table th, .content-table td { padding: 10px 8px; }
    .content-table th:first-child, .content-table td:first-child { padding-left: 8px; }
    .content-table th:last-child, .content-table td:last-child { padding-right: 8px; }
    .mini-progress-bar { width: 50px; }
    .cell-progress-text { font-size: 14px; }
    .action-group { flex-wrap: wrap; justify-content: center; }
}
/* ========== Hierarchical Node Management ========== */
.node-tree { display: flex; flex-direction: column; gap: 0; }

.node-l1-container {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.node-l1-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    gap: 8px;
}
.node-l1-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.node-l1-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--primary-color, #6366f1);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.node-l1-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}
.node-l1-page {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    background: #e2e8f0;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.node-l2-list {
    padding: 4px 0 4px 44px;
    border-top: 1px solid var(--border, #e5e7eb);
    background: #fff;
}
.node-l2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 8px;
}
.node-l2-row:last-child { border-bottom: none; }
.node-l2-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.node-l2-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #e2e8f0;
    color: var(--text-secondary, #64748b);
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.node-l2-name {
    font-size: 14px;
    color: var(--text-primary, #1e293b);
}
.node-l2-page {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
}
.node-l2-page::before { content: '·'; margin-right: 6px; color: #cbd5e1; }

.node-l2-empty {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-muted, #94a3b8);
    font-style: italic;
}

/* Inline edit forms */
.inline-edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}
.node-edit-input {
    padding: 6px 10px;
    font-size: 14px;
    max-width: 240px;
}
.node-edit-page {
    max-width: 120px;
}

/* Add node forms */
.node-l2-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-top: 1px dashed #e2e8f0;
    flex-wrap: wrap;
}
.node-add-input {
    padding: 6px 10px;
    font-size: 14px;
}
.node-add-page {
    max-width: 120px;
}

.node-l1-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border, #e5e7eb);
}
.node-l1-add-form .node-add-input {
    flex: 1;
    max-width: 400px;
}

.node-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .node-l1-header { flex-wrap: wrap; padding: 10px 12px; }
    .node-l1-info { flex-wrap: wrap; gap: 8px; }
    .node-l1-name { font-size: 14px; }
    .node-l2-list { padding-left: 28px; }
    .node-l2-row { flex-wrap: wrap; padding: 8px 12px; }
    .node-edit-input { max-width: 100%; }
    .node-l2-add-form { flex-direction: column; align-items: stretch; }
    .node-l2-add-form .node-add-input { max-width: 100%; }
    .node-l1-add-form { flex-direction: column; align-items: stretch; }
    .node-l1-add-form .node-add-input { max-width: 100%; }
}
/* alert-info style for add page hint */
.alert.alert-info {
    background: #e0f2fe;
    border: 1px solid #0284c7;
    color: #075985;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.alert.alert-info svg {
    flex-shrink: 0;
}

/* ========== Announcement Box (user-end) ========== */
.announcement-box {
    background: #fffde7;
    border: 1px solid #f0d85e;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.announcement-icon {
    flex-shrink: 0;
    margin-top: 1px;
}
.announcement-icon svg {
    width: 20px;
    height: 20px;
    color: #d97706;
}
.announcement-content {
    flex: 1;
    min-width: 0;
}
.announcement-title {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 4px;
}
.announcement-text {
    font-size: 14px;
    color: #78350f;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.switch-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* 穿梭框 transfer（标志球星多选） */
.transfer { display: flex; gap: 14px; align-items: stretch; }
.transfer-panel {
  flex: 1;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md, 8px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 260px;
}
.transfer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.transfer-count {
  font-size: 12px; font-weight: 600; color: #fff;
  background: var(--primary); border-radius: 10px; padding: 1px 9px;
}
.transfer-count-green { background: #10b981; }
.transfer-search { padding: 10px 12px 6px; }
.transfer-search input {
  width: 100%; box-sizing: border-box; padding: 7px 10px;
  border: 1px solid #e2e8f0; border-radius: var(--radius-sm, 6px);
  font-size: 13px; color: var(--text-primary); outline: none; font-family: inherit;
}
.transfer-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.transfer-list { list-style: none; margin: 0; padding: 6px 8px; overflow-y: auto; flex: 1; max-height: 220px; }
.transfer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm, 6px);
  cursor: pointer; font-size: 13px; color: var(--text-primary); transition: background .15s;
}
.transfer-item:hover { background: #f1f5f9; }
.transfer-item input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.transfer-actions { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.transfer-btn {
  width: 40px; height: 36px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: var(--radius-sm, 6px);
  cursor: pointer; color: var(--primary); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.transfer-btn:hover:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.transfer-btn:disabled { color: #cbd5e1; cursor: not-allowed; border-color: #eef2f7; }

/* ========== 标志球星：只读单行展示框（点击弹出穿梭框，尺寸对齐 form-control） ========== */
.star-display {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}
.star-clickable { cursor: pointer; }
.star-empty { color: #94a3b8; font-size: 14px; white-space: nowrap; }
.star-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 弹窗 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius, 12px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 20px 22px;
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ========== 招牌动作：只读单行文本框 + 点击弹出多选列表 ========== */
.ddm-input {
  cursor: pointer;
  background: #fff;
  caret-color: transparent;
}
.ddm-input:hover { border-color: var(--primary); }
.ddm-search { margin-bottom: 10px; }
.ddm-search input {
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid #e2e8f0; border-radius: var(--radius-sm, 6px);
  font-size: 13px; color: var(--text-primary); outline: none; font-family: inherit;
}
.ddm-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.ddm-list { list-style: none; margin: 0; padding: 6px 8px; max-height: 280px; overflow-y: auto; }
.ddm-item label {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm, 6px);
  cursor: pointer; font-size: 13px; color: var(--text-primary); transition: background .15s;
}
.ddm-item label:hover { background: #f1f5f9; }
.ddm-item input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }


