/* 学习计划三步创建流程 */

/* 覆盖默认 modal 宽度（适配左右分栏） */
#createPlanModal .modal-content { width: 1000px; max-width: 95vw; height: 800px; max-height: 90vh; overflow-y: auto; }

/* 步骤指示器 */
.pc-steps {
    display: flex; justify-content: center; gap: 8px; margin-bottom: 24px;
}
.pc-step {
    display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
    font-size: 13px; background: #22262e; color: #949a9f; border: 2px solid #333;
    transition: all .2s;
}
.pc-step.active { background: rgba(0,255,157,.15); color: #00ff9d; border-color: #00ff9d; }
.pc-step.done { background: #2a2d35; color: #00ff9d; border-color: #00ff9d; }
.pc-step-num { font-weight: bold; }
.pc-step-label { font-size: 12px; }
.pc-step-line { width: 40px; height: 2px; background: #333; align-self: center; }
.pc-step-line.done { background: #00ff9d; }

/* 面板容器 */
.pc-panel { display: none; }
.pc-panel.active { display: block; }

/* ── 步骤1：日历 ── */
.pc-cal-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; justify-items: center; }
.pc-cal-month { width: 100%; max-width: 380px; }
.pc-cal-title {
    text-align: center; font-size: 14px; font-weight: bold; margin-bottom: 8px; color: #e0e6ed;
}
.pc-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; user-select: none; }
.pc-cal-hdr { text-align: center; font-size: 11px; color: #949a9f; padding: 4px 0; }
.pc-cal-day {
    text-align: center; padding: 6px 2px; border-radius: 6px; cursor: pointer;
    font-size: 13px; color: #e0e6ed; transition: all .15s; user-select: none;
}
.pc-cal-day:hover { background: #2a2d35; }
.pc-cal-day.selected { background: rgba(0,255,157,.2); color: #00ff9d; font-weight: bold; }
.pc-cal-day.rest-day { background: rgba(255,165,2,.15); color: #ffa502; text-decoration: line-through; }
.pc-cal-day.disabled { color: #555; cursor: default; pointer-events: none; }
.pc-cal-day.empty { cursor: default; pointer-events: none; }
.pc-cal-day.today { border: 1px solid #00ff9d; }
.pc-rest-hint { text-align: center; font-size: 12px; color: #949a9f; margin-top: 8px; }
.pc-date-range-bar {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 12px; padding: 10px 16px; background: #22262e; border-radius: 8px;
}
.pc-date-range-bar label { font-size: 13px; color: #949a9f; }
.pc-date-range-bar .pc-stl-date { width: 140px; }
.pc-date-sep { color: #949a9f; font-size: 14px; }
.pc-btn-set-range {
    padding: 6px 14px; border: none; border-radius: 6px; cursor: pointer;
    background: #00ff9d; color: #1a1d23; font-size: 13px; font-weight: bold;
    transition: opacity .15s;
}
.pc-btn-set-range:hover { opacity: .85; }
.pc-date-summary {
    text-align: center; margin-top: 12px; font-size: 13px; color: #e0e6ed;
    background: #22262e; padding: 8px 12px; border-radius: 8px;
}

/* 步骤天数高亮 */
.pc-step-days { color: #00ff9d; font-weight: bold; }

/* ── 步骤2：左右分栏布局 ── */
.pc-split-layout { display: flex; gap: 12px; min-height: 500px; }
.pc-tree-panel {
    width: 260px; flex-shrink: 0; overflow-y: auto; max-height: 600px;
    background: #1a1d23; border-radius: 10px; padding: 12px;
}
.pc-settlement-panel {
    flex: 1; background: #22262e; border-radius: 10px; padding: 16px; overflow-y: auto; max-height: 600px;
}

/* 目录树 */
.pc-tree-title { font-size: 14px; font-weight: bold; color: #e0e6ed; margin-bottom: 10px; }
.pc-tree-group { margin-bottom: 6px; }
.pc-tree-arrow { font-size: 10px; color: #949a9f; transition: transform .15s; display: inline-block; width: 12px; }
.pc-tree-group-header {
    display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 6px;
    font-size: 13px; color: #e0e6ed; cursor: pointer; user-select: none;
}
.pc-tree-group-header:hover { background: #22262e; }
.pc-tree-count {
    margin-left: auto; font-size: 11px; background: #333; padding: 1px 6px;
    border-radius: 10px; color: #949a9f;
}
.pc-tree-items { padding-left: 8px; }
.pc-tree-item {
    display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 6px;
    font-size: 12px; color: #c0c6cd; cursor: pointer; transition: all .15s; margin-bottom: 2px;
}
.pc-tree-item:hover { background: #22262e; color: #e0e6ed; }
.pc-tree-item.selected { background: rgba(0,255,157,.12); color: #00ff9d; font-weight: bold; }
.pc-tree-total { margin-left: auto; font-size: 11px; color: #949a9f; }
.pc-tree-dup { margin-left: 4px; font-size: 11px; }

/* 结算面板 */
.pc-settlement-empty {
    display: flex; align-items: center; justify-content: center; height: 100%;
    font-size: 14px; color: #949a9f;
}
.pc-settlement-title { font-size: 15px; font-weight: bold; color: #e0e6ed; margin-bottom: 14px; }
.pc-dup-warn {
    background: rgba(255,165,2,.12); border: 1px solid rgba(255,165,2,.3); border-radius: 8px;
    padding: 8px 12px; font-size: 12px; color: #ffa502; margin-bottom: 12px;
}
.pc-stl-section { margin-bottom: 16px; }
.pc-stl-label { font-size: 14px; font-weight: bold; color: #e0e6ed; margin-bottom: 10px; }
.pc-stl-info { font-size: 12px; color: #949a9f; margin-bottom: 8px; }
.pc-stl-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: #c0c6cd;
}
.pc-stl-row label { min-width: 70px; color: #949a9f; }
.pc-stl-input {
    width: 70px; padding: 6px 8px; background: #1a1d23; border: 1px solid #444;
    border-radius: 6px; color: #e0e6ed; font-size: 13px; text-align: center;
}
.pc-stl-input:focus { border-color: #00ff9d; outline: none; }
.pc-stl-input-wide { width: 180px; text-align: left; }
.pc-stl-sep { color: #949a9f; }
.pc-stl-estimate {
    margin-top: 12px; padding: 8px 12px; background: rgba(0,255,157,.08); border-radius: 8px;
    font-size: 13px; color: #e0e6ed;
}
.pc-stl-estimate strong { color: #00ff9d; }

/* select 下拉框 */
.pc-stl-input select, select.pc-stl-input {
    appearance: auto; text-align: left; width: auto; min-width: 120px;
}
.pc-stl-select { width: auto; min-width: 130px; text-align: left; }
.pc-stl-hint { font-size: 11px; color: #949a9f; margin-bottom: 8px; }

/* Segmented Control（三段式单选） */
.pc-seg-control {
    display: flex; gap: 0; margin: 14px 0 12px; border-radius: 8px; overflow: hidden;
    border: 1px solid #333; background: #1a1d23;
}
.pc-seg-item {
    flex: 1; padding: 8px 0; text-align: center; font-size: 13px; color: #949a9f;
    cursor: pointer; transition: all .15s; border-right: 1px solid #333; user-select: none;
}
.pc-seg-item:last-child { border-right: none; }
.pc-seg-item:hover:not(.disabled) { color: #e0e6ed; background: #22262e; }
.pc-seg-item.active { background: rgba(0,255,157,.12); color: #00ff9d; font-weight: bold; }
.pc-seg-item.disabled { color: #555; cursor: not-allowed; opacity: .5; }
.pc-mode-hint { font-size: 12px; color: #8a8a8a; padding: 6px 0 2px; }
.pc-mode-config { min-height: 60px; }

/* ── 步骤3：确认预览 ── */
.pc-confirm-card {
    background: #22262e; border-radius: 10px; padding: 16px; margin-bottom: 12px;
}
.pc-confirm-row {
    display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0;
    border-bottom: 1px solid #2a2d35;
}
.pc-confirm-row:last-child { border-bottom: none; }
.pc-confirm-label { color: #949a9f; }
.pc-confirm-value { color: #e0e6ed; font-weight: bold; }
.pc-confirm-note {
    margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
    background: rgba(0,255,157,.08); border: 1px solid rgba(0,255,157,.18);
    color: #b8f5dd; font-size: 13px; line-height: 1.6;
}
.pc-schedule-preview {
    margin-top: 14px; background: #22262e; border-radius: 10px; padding: 14px 16px;
}
.pc-schedule-title {
    font-size: 14px; font-weight: bold; color: #e0e6ed; margin-bottom: 10px;
}
.pc-schedule-day { margin-bottom: 10px; }
.pc-schedule-day:last-child { margin-bottom: 0; }
.pc-schedule-date {
    font-size: 12px; color: #949a9f; margin-bottom: 6px;
}
.pc-schedule-items {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.pc-schedule-chip {
    display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
    background: #1a1d23; border: 1px solid #333; color: #e0e6ed; font-size: 12px;
}

/* ── 底部操作栏 ── */
.pc-actions {
    display: flex; justify-content: space-between; margin-top: 20px; gap: 12px;
}
.pc-btn-prev, .pc-btn-next {
    padding: 10px 24px; border-radius: 8px; border: none; font-size: 14px;
    font-weight: bold; cursor: pointer; transition: all .15s;
}
.pc-btn-prev { background: #2a2d35; color: #949a9f; border: 1px solid #444; }
.pc-btn-prev:hover { color: #e0e6ed; border-color: #666; }
.pc-btn-next { background: #00ff9d; color: #000; }
.pc-btn-next:hover { opacity: .85; }

/* ── 树形勾选器 ── */
.pc-tree-container { margin-bottom: 8px; }
.pc-tree-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.pc-tree-btn {
    padding: 4px 12px; font-size: 12px; background: #2a2d35; color: #949a9f;
    border: 1px solid #444; border-radius: 6px; cursor: pointer; transition: all .15s;
}
.pc-tree-btn:hover { color: #e0e6ed; border-color: #666; }
.pc-tree-body {
    max-height: 400px; overflow-y: auto; background: #1a1d23;
    border-radius: 8px; padding: 8px 10px;
}
.pc-tree-part { margin-bottom: 4px; }
.pc-tree-section { padding-left: 20px; }
.pc-tree-lesson { padding-left: 40px; }
.pc-tree-chapter { padding-left: 20px; }
.pc-tree-label {
    display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 4px;
    font-size: 13px; color: #c0c6cd; cursor: pointer; transition: background .15s;
}
.pc-tree-label:hover { background: #22262e; }
.pc-tree-label input[type="checkbox"] {
    accent-color: #00ff9d; width: 15px; height: 15px; cursor: pointer; flex-shrink: 0;
}
input[type="checkbox"]:indeterminate { opacity: .7; }

/* ── 列表勾选器 ── */
.pc-list-container { margin-bottom: 8px; }
.pc-list-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.pc-list-body {
    max-height: 400px; overflow-y: auto; background: #1a1d23;
    border-radius: 8px; padding: 8px 10px;
}
.pc-list-item {
    display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 4px;
    font-size: 13px; color: #c0c6cd; cursor: pointer; transition: background .15s;
}
.pc-list-item:hover { background: #22262e; }
.pc-list-item input[type="checkbox"] {
    accent-color: #00ff9d; width: 15px; height: 15px; cursor: pointer; flex-shrink: 0;
}
.pc-list-count { font-size: 11px; color: #949a9f; }
.pc-list-row { display: flex; align-items: center; gap: 4px; }
.pc-list-row .pc-list-item { flex: 1; min-width: 0; }
.pc-list-num {
    width: 42px; padding: 2px 4px; margin-left: auto; background: #1a1d23; border: 1px solid #444;
    border-radius: 4px; color: #e0e6ed; font-size: 12px; text-align: center;
}
.pc-list-num:focus { border-color: #00ff9d; outline: none; }
.pc-list-num:disabled { opacity: .3; cursor: not-allowed; }

/* ── 加载指示器 ── */
.pc-stl-loading { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #949a9f; padding: 6px 0; }
.pc-stl-spinner {
    display: inline-block; width: 16px; height: 16px; border: 2px solid #444;
    border-top-color: #00ff9d; border-radius: 50%; animation: pcSpin .6s linear infinite;
}
@keyframes pcSpin { to { transform: rotate(360deg); } }

/* ── 日期输入框 ── */
.pc-stl-date {
    width: 150px; padding: 6px 8px; background: #1a1d23; border: 1px solid #444;
    border-radius: 6px; color: #e0e6ed; font-size: 13px;
    color-scheme: dark;
}
.pc-stl-date:focus { border-color: #00ff9d; outline: none; }

/* ── 快速创建模式 ── */
.pc-quick-form { padding: 8px 0; }
.pc-quick-form .pc-stl-row { margin-bottom: 14px; }
.pc-quick-form input[type="date"] {
    width: 180px; padding: 6px 8px; background: #1a1d23; border: 1px solid #444;
    border-radius: 6px; color: #e0e6ed; font-size: 13px; color-scheme: dark;
}
.pc-quick-form input[type="date"]:focus { border-color: #00ff9d; outline: none; }
.pc-rest-days-wrap { display: flex; gap: 6px; }
.pc-rest-day-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: #1a1d23; border: 1px solid #444; border-radius: 6px;
    color: #949a9f; font-size: 13px; cursor: pointer; transition: all .15s;
}
.pc-rest-day-btn:hover { border-color: #666; color: #e0e6ed; }
.pc-rest-day-btn.active { background: #00ff9d22; border-color: #00ff9d; color: #00ff9d; }
.pc-switch-mode {
    text-align: center; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid #2a2d35;
}
.pc-switch-mode a {
    color: #949a9f; font-size: 13px; text-decoration: none; transition: color .15s;
}
.pc-switch-mode a:hover { color: #00ff9d; }

/* ── 已加入任务摘要区 ── */
.pc-added-summary {
    background: #1a1d23; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
    border: 1px solid #333;
}
.pc-added-title { font-size: 13px; font-weight: bold; color: #00ff9d; margin-bottom: 8px; }
.pc-added-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
    background: #22262e; margin-bottom: 4px;
}
.pc-added-name { font-size: 13px; color: #e0e6ed; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-added-info { font-size: 11px; color: #949a9f; white-space: nowrap; }
.pc-added-remove { cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; transition: background .15s; }
.pc-added-remove:hover { background: rgba(255,77,77,.2); }

/* ── 目录树已加入标识 ── */
.pc-tree-item.added { color: #949a9f; }
.pc-tree-added { margin-right: 4px; font-size: 12px; }

/* ── 加入任务按钮 ── */
.pc-add-task-wrap { margin-top: 16px; text-align: center; }
.pc-btn-add-task {
    padding: 10px 32px; border-radius: 8px; border: none; font-size: 14px;
    font-weight: bold; cursor: pointer; background: #00ff9d; color: #000; transition: opacity .15s;
}
.pc-btn-add-task:hover { opacity: .85; }

/* ── 步骤3：任务组确认 ── */
.pc-confirm-group {
    background: #22262e; border-radius: 8px; padding: 12px 14px; margin-bottom: 8px;
    border-left: 3px solid #00ff9d;
}
.pc-confirm-group-title { font-size: 14px; font-weight: bold; color: #e0e6ed; }
.pc-confirm-group-info { font-size: 12px; color: #949a9f; margin-top: 4px; }

/* ── 步骤指示器任务数 badge ── */
.pc-step-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%; background: #00ff9d; color: #000;
    font-size: 11px; font-weight: bold; margin-left: 4px; vertical-align: middle;
}

/* ── 目录树已加入序号 badge ── */
.pc-tree-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; background: #00ff9d; color: #000;
    font-size: 10px; font-weight: bold; margin-right: 4px; flex-shrink: 0;
}

/* ── 已加入资料的移除按钮 ── */
.pc-btn-remove-task {
    padding: 6px 16px; border-radius: 6px; border: 1px solid rgba(255,77,77,.4);
    background: transparent; color: #ff4d4d; font-size: 13px; cursor: pointer;
    transition: all .15s; margin-top: 4px;
}
.pc-btn-remove-task:hover { background: rgba(255,77,77,.15); }

/* ── 底部操作栏中间按钮（派生状态） ── */
.pc-btn-action {
    padding: 10px 24px; border-radius: 8px; border: none; font-size: 14px;
    font-weight: bold; cursor: pointer; transition: all .15s;
}
.pc-btn-action:disabled { opacity: .4; cursor: not-allowed; }
.pc-action-add { background: #00ff9d; color: #000; }
.pc-action-add:hover { opacity: .85; }
.pc-action-replace { background: #ffa502; color: #000; }
.pc-action-replace:hover { opacity: .85; }
.pc-action-remove { background: transparent; color: #ff4d4d; border: 1px solid rgba(255,77,77,.4); }
.pc-action-remove:hover { background: rgba(255,77,77,.15); }
.pc-action-idle { background: #2a2d35; color: #949a9f; }
