* { margin: 0; padding: 0; box-sizing: border-box; }

body, body * {
  -webkit-user-select: text;
  user-select: text;
}

:root {
  --primary: #7b6b5b;
  --primary-hover: #6b5b4b;
  --bg: #e8e0d4;
  --sidebar-bg: #3a2a1a;
  --sidebar-text: #c9bda8;
  --card-bg: #f5f0e8;
  --text: #3a2a1a;
  --text-secondary: #9b8b7b;
  --border: #c9bda8;
  --danger: #c0392b;
  --income-color: #27ae60;
  --expense-color: #c0392b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ========== 密码锁界面 ========== */
.lock-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a3a2a 0%, #3a2a1a 50%, #2a1a0a 100%);
}

.lock-card {
  background: linear-gradient(180deg, rgba(245,240,232,0.08), rgba(232,220,200,0.05));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201,189,168,0.2);
  border-radius: 20px;
  padding: 48px 40px;
  width: 380px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

.lock-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.lock-title {
  color: #e8dcc8;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  font-family: 'Georgia', 'Noto Serif SC', serif;
}

.lock-desc {
  color: rgba(201,189,168,0.6);
  font-size: 14px;
  margin: 0 0 28px;
}

.lock-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1px solid rgba(201,189,168,0.25);
  border-radius: 10px;
  background: rgba(245,240,232,0.08);
  color: #e8dcc8;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  text-align: center;
  letter-spacing: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.lock-input-wrap {
  position: relative;
  margin-bottom: 10px;
}

.eye-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.eye-toggle:hover {
  opacity: 1;
}

.eye-toggle svg {
  stroke: #c9bda8;
}

.lock-input:focus {
  border-color: rgba(201,189,168,0.5);
}

.lock-input::placeholder {
  color: rgba(201,189,168,0.35);
  letter-spacing: 0;
}

.lock-input::-ms-reveal,
.lock-input::-ms-clear {
  display: none;
}
.lock-input::-webkit-credentials-auto-fill-button,
.lock-input::-webkit-textfield-decoration-container > button {
  display: none !important;
}

.lock-error {
  color: #c0392b;
  font-size: 13px;
  margin: 10px 0 0;
}

.lock-btn {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  border: 1px solid rgba(201,189,168,0.3);
  border-radius: 10px;
  background: linear-gradient(180deg, #7b6b5b, #6b5b4b);
  color: #e8dcc8;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

.lock-btn:hover {
  background: linear-gradient(180deg, #8b7b6b, #7b6b5b);
}

.lock-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 主布局 ========== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #4a3a2a 0%, #3a2a1a 100%);
  color: var(--sidebar-text);
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}

.logo {
  padding: 0 20px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(201,189,168,0.15);
  margin-bottom: 12px;
}

.logo-icon { font-size: 28px; }
.logo-text { font-size: 18px; font-weight: 700; color: #e8dcc8; letter-spacing: 1px; }

.nav-menu { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s;
}

.nav-item:hover { background: rgba(201,189,168,0.1); }
.nav-item.active {
  background: rgba(0,0,0,0.2);
  color: #f0e8dc;
  font-weight: 600;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4), inset 0 0 1px rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-icon { font-size: 18px; }

/* 侧边栏底部用户信息 */
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(201,189,168,0.15);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.user-avatar {
  font-size: 24px;
}
.user-name {
  color: #e8dcc8;
  font-size: 14px;
  font-weight: 500;
}
.logout-btn {
  width: 100%;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(201,189,168,0.2);
  border-radius: 6px;
  color: #c9bda8;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.logout-btn:hover {
  background: rgba(220,100,100,0.3);
  border-color: rgba(220,100,100,0.4);
  color: #fff;
}

.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 32px 40px;
}

.page-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-header .page-title { margin-bottom: 0; }

.header-right { display: flex; gap: 12px; align-items: center; }

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card { text-align: center; }
.stat-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-value.income { color: var(--income-color); }
.stat-value.expense { color: var(--expense-color); }
.stat-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #f0e8dc, #e0d4c4);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn:hover { background: linear-gradient(180deg, #f5ede2, #e8dccf); }
.btn-primary { background: linear-gradient(180deg, #7b6b5b, #6b5b4b); color: #fff; border-color: #5a4a3a; }
.btn-primary:hover { background: linear-gradient(180deg, #8b7b6b, #7b6b5b); }
.btn-danger { color: #fff; border-color: #922b21; background: linear-gradient(180deg, #c0392b, #a93226); }
.btn-danger:hover { background: linear-gradient(180deg, #d44637, #c0392b); }
.btn-sm { padding: 4px 12px; font-size: 12px; }

.input, .textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
  background: #faf6f0;
  color: var(--text);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.input:focus, .textarea:focus { border-color: var(--primary); }
.textarea { resize: none; font-family: inherit; }

.form-card { margin-bottom: 20px; }
.form-card .input, .form-card .textarea { margin-bottom: 12px; }

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.form-row .input { flex: 1; margin-bottom: 0; }

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(139,123,107,0.12);
  color: var(--primary);
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid rgba(139,123,107,0.2);
}

/* ========== 双栏布局 ========== */
.work-page-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.work-left { flex: 1; min-width: 0; }
.work-right { width: 340px; flex-shrink: 0; position: sticky; top: 20px; }
.date-label {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

/* ========== 右栏上部 ========== */
.right-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

/* ========== 倒计时板块 ========== */
.countdown-card {
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
}
.countdown-row {}
.countdown-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.countdown-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.countdown-value {
  font-family: 'Courier New', 'SF Mono', monospace;
  font-weight: 700;
  letter-spacing: 1px;
}
.day-countdown {
  font-size: 20px;
  color: #c0392b;
}
.cd-unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 1px;
}
.cd-ms {
  font-size: 13px;
  color: rgba(192,57,43,0.5);
  margin-left: 2px;
}
.year-countdown {
  font-size: 18px;
  color: #27ae60;
}
.cd-big {
  font-size: 24px;
  margin-right: 2px;
}
.countdown-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.countdown-bar-wrap {
  flex: 1;
  height: 10px;
  background: rgba(0,0,0,0.06);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.countdown-bar {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}
.day-bar { background: linear-gradient(90deg, #c0392b, #a93226); }
.year-bar { background: linear-gradient(90deg, #27ae60, #1e8449); }
.countdown-pct {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.countdown-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
  opacity: 0.5;
}

/* ========== 日历 + 统计并排 ========== */
.right-top-inner {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 12px;
}

/* ========== 日历 ========== */
.calendar-card { padding: 14px; }
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-title { font-size: 14px; font-weight: 700; }
.btn-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #f0e8dc, #e0d4c4);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-icon:hover { background: linear-gradient(180deg, #f5ede2, #e8dccf); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-icon-xs { width: 24px; height: 24px; font-size: 16px; border-radius: 6px; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
}
.cal-cell:hover { background: rgba(139,123,107,0.1); }
.cal-cell.other-month { opacity: 0.3; cursor: default; }
.cal-cell.other-month:hover { background: transparent; }
.cal-cell.is-today .cal-day {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.cal-cell.is-selected {
  background: rgba(139,123,107,0.15);
}
.cal-day { font-size: 12px; line-height: 1; }
.cal-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  bottom: 2px;
}
.cal-dot.dot-done { background: #27ae60; }

/* ========== 统计卡片 ========== */
.stats-card {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.stat-item { text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
.stat-lbl { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.done-num { color: #27ae60; }
.rate-num { color: var(--primary); }
.pending-num { color: #d4a853; }

/* ========== 详情卡片 ========== */
.detail-card { padding: 16px; }
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.detail-title { font-size: 14px; font-weight: 600; }
.detail-count { font-size: 12px; color: var(--text-secondary); }
.detail-list { display: flex; flex-direction: column; gap: 8px; }
.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(201,189,168,0.3);
}
.detail-item:last-child { border-bottom: none; }
.detail-done { opacity: 0.5; }
.detail-dot-status {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ok { background: #27ae60; }
.dot-ing { background: #d4a853; }
.detail-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-sub-count { font-size: 11px; color: var(--text-secondary); flex-shrink: 0; }
.detail-sub { padding-left: 18px; opacity: 0.85; }
.sub-dot { width: 6px !important; height: 6px !important; }
.sub-detail-text { font-size: 12px; }
.detail-empty { text-align: center; color: var(--text-secondary); font-size: 13px; padding: 20px 0; }

/* ========== 任务卡片 ========== */
.task-list { display: flex; flex-direction: column; gap: 0; }
.task-item-wrap { margin-bottom: 8px; }
.task-card { padding: 16px 20px; transition: opacity 0.3s; }
.task-card.task-completed { opacity: 0.55; }
.task-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.task-content-area { flex: 1; min-width: 0; }
.task-text {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.task-text.done {
  text-decoration: line-through;
  color: var(--text-secondary);
}
.task-meta { display: flex; gap: 8px; margin-top: 4px; }
.task-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

/* ========== Checkbox自定义 ========== */
.task-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.task-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.checkmark {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
  position: relative;
}
.task-checkbox input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.task-checkbox input:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.task-checkbox.disabled { cursor: not-allowed; opacity: 0.5; }
.task-checkbox.disabled .checkmark { border-color: var(--border); background: rgba(0,0,0,0.04); }

/* ========== 小项 ========== */
.subtask-list {
  margin-left: 34px;
  margin-top: 8px;
  border-left: 2px solid var(--border);
  padding-left: 12px;
}
.subtask-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  transition: opacity 0.3s;
}
.subtask-item.task-completed { opacity: 0.55; }
.sub-check { width: 18px; height: 18px; margin-top: 0; }
.sub-check .checkmark { width: 16px; height: 16px; }
.sub-check input:checked + .checkmark::after { left: 4px; top: 0; width: 5px; height: 9px; }
.sub-text { font-size: 14px; flex: 1; }
.btn-icon-sm {
  width: 20px; height: 20px;
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-icon-sm:hover { background: rgba(0,0,0,0.06); }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: rgba(192,57,43,0.08); }

/* ========== 备注功能 ========== */
.btn-note { color: #d4a853; border-color: #d4a853; background: var(--card-bg); }
.btn-note:hover { background: rgba(212,168,83,0.08); }
.btn-note-text { color: #d4a853; font-size: 14px; }
.btn-note-text:hover { background: rgba(212,168,83,0.08); }
.task-note-display {
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.task-note-display:hover { background: rgba(0,0,0,0.07); }
.note-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.sub-note { margin-left: 0; }
.note-edit-area {
  margin-top: 8px;
  padding: 0 0 0 34px;
}
.sub-note-edit { padding-left: 26px; }
.note-input { font-size: 13px; padding: 8px 10px; min-height: 48px; }
.note-edit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
}
.subtask-item-wrap { margin-bottom: 2px; }
.sub-content-area { flex: 1; min-width: 0; }
.sub-actions { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }

/* ========== 小项添加区域 ========== */
.subtask-add { margin-left: 34px; margin-top: 8px; }
.sub-input { font-size: 13px; padding: 8px 10px; overflow: hidden; }
.sub-add-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
}

/* ========== 新增任务卡片 ========== */
.add-task-card { margin-bottom: 16px; }
.task-input {
  font-size: 14px;
  overflow: hidden;
  min-height: 40px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  outline: none;
}
.task-input:focus { box-shadow: none; }
.add-task-card {
  margin-bottom: 16px;
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.2s;
}
.add-task-card:focus-within { border-color: var(--primary); }
.char-count { font-size: 12px; color: var(--text-secondary); margin-right: auto; }

/* ========== 标签 ========== */
.tag-pending {
  background: rgba(212,168,83,0.15);
  color: #8b6914;
}
.tag-progress {
  background: rgba(139,123,107,0.12);
  color: var(--primary);
}

.summary-bar {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 15px;
}
.summary-bar .income { color: var(--income-color); font-weight: 600; }
.summary-bar .expense { color: var(--expense-color); font-weight: 600; }

.record-card { display: flex; justify-content: space-between; align-items: center; }
.record-info { display: flex; align-items: center; gap: 12px; }
.record-right { display: flex; align-items: center; gap: 16px; }
.record-amount { font-weight: 700; font-size: 16px; }
.record-amount.income { color: var(--income-color); }
.record-amount.expense { color: var(--expense-color); }
.record-date { font-size: 12px; color: var(--text-secondary); }

.calorie-bar { font-size: 16px; text-align: center; }
.calorie-bar strong { color: var(--primary); font-size: 20px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.member-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.member-role { color: var(--primary); font-size: 14px; margin-bottom: 8px; }
.member-contact { font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.member-notes { font-size: 13px; color: var(--text-secondary); margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.member-actions { margin-top: 12px; text-align: right; }

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ========== PP食谱页面 ========== */
.recipe-page-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.recipe-left { flex: 1; min-width: 0; }
.recipe-right { width: 340px; flex-shrink: 0; position: sticky; top: 20px; }

/* 抽取按钮 */
.btn-draw {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
}

/* 食谱列表表格 */
.menu-table { padding: 0; overflow: hidden; }
.menu-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201,189,168,0.3);
  font-size: 14px;
}
.menu-row:last-child { border-bottom: none; }
.menu-row-header {
  background: rgba(0,0,0,0.03);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 20px;
}
.menu-col-day { width: 60px; flex-shrink: 0; font-weight: 600; }
.menu-col-cat { width: 70px; flex-shrink: 0; }
.menu-col-name { width: 100px; flex-shrink: 0; font-weight: 600; }
.menu-col-method { flex: 1; color: var(--text-secondary); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-col-link { width: 80px; flex-shrink: 0; text-align: right; }
.no-link { color: var(--text-secondary); font-size: 13px; }

/* 复制提示 */
.copy-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #4a3a2a, #3a2a1a);
  color: #e8dcc8;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 1px solid rgba(201,189,168,0.2);
}
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
.tag-cat {
  background: rgba(212,168,83,0.15);
  color: #8b6914;
  font-size: 11px;
}
.weekly-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}
.weekly-link:hover { text-decoration: underline; }

/* 空状态 */
.empty-menu {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}
.empty-menu-icon { font-size: 48px; margin-bottom: 12px; }
.empty-menu p { font-size: 15px; }

/* 食谱池头部 */
.pool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.pool-title { font-size: 16px; font-weight: 700; }
.pool-count { font-size: 12px; color: var(--text-secondary); flex: 1; }

/* 添加表单 */
.add-recipe-form { padding: 16px; margin-bottom: 12px; }
.form-step { margin-bottom: 12px; }
.form-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }

/* 分类芯片 */
.cat-chips, .cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chip {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  font-family: inherit;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 食谱池列表 */
.recipe-pool-list {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
}
.recipe-pool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(201,189,168,0.3);
  font-size: 13px;
}
.recipe-pool-item:last-child { border-bottom: none; }
.tag-cat-sm {
  background: rgba(39,174,96,0.1);
  color: #1e8449;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pool-recipe-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-link {
  font-size: 11px;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.pool-link:hover { text-decoration: underline; }
.pool-empty {
  text-align: center;
  padding: 30px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ========== 资金统计页面 ========== */
.finance-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.finance-left { flex: 1; min-width: 0; }
.finance-right { flex: 1; min-width: 0; position: sticky; top: 20px; }

.finance-section { padding: 20px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-title { font-size: 16px; font-weight: 700; }
.section-empty {
  text-align: center;
  padding: 30px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 年月切换器 */
.month-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
}
.month-label {
  font-size: 16px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

/* 行内表单 */
.inline-form {
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(201,189,168,0.3);
}

/* 通用表格 */
.finance-table { margin-top: 8px; }
.finance-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(201,189,168,0.3);
  font-size: 14px;
  gap: 8px;
}
.finance-row:last-child { border-bottom: none; }
.finance-row-header {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 2px solid var(--border);
}

/* 行内编辑输入框 */
.input-inline {
  padding: 4px 8px;
  font-size: 13px;
  width: 100%;
}

/* 还款事项列 */
.col-check { width: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.col-repay-name { flex: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-repay-amount { width: 100px; flex-shrink: 0; font-weight: 600; }
.col-repay-day { width: 70px; flex-shrink: 0; }
.col-repay-period { width: 80px; flex-shrink: 0; }
.col-actions { width: 70px; flex-shrink: 0; display: flex; gap: 4px; justify-content: flex-end; }

/* 还款完成态 */
.repay-completed { opacity: 0.5; }
.repay-completed .col-repay-name { text-decoration: line-through; color: var(--text-secondary); }

/* 退款单列 */
.col-seq { width: 40px; flex-shrink: 0; text-align: center; color: var(--text-secondary); }
.col-order { flex: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; font-size: 13px; }
.col-refund-amount { width: 90px; flex-shrink: 0; font-weight: 600; }
.col-customer { width: 70px; flex-shrink: 0; }
.col-account { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-shop { width: 80px; flex-shrink: 0; }

/* 退款单底部 */
.refund-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.refund-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--danger);
}
.refund-note {
  font-size: 12px;
  color: var(--danger);
  opacity: 0.7;
}

/* 总资产列 */
.col-asset-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.col-asset-amount { width: 120px; flex-shrink: 0; font-weight: 600; color: var(--primary); }
.col-asset-remark { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: 13px; }

/* 总资产底部 */
.asset-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--primary);
  text-align: right;
}
.asset-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* 负债 */
.col-liab-amount { color: var(--danger) !important; }
.liab-footer {
  border-top-color: var(--danger);
}
.liab-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

/* 净资产 */
.net-worth-card { padding: 20px; }
.net-worth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.net-worth-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.net-worth-value {
  font-size: 24px;
  font-weight: 700;
}
.net-positive { color: var(--income-color); }
.net-negative { color: var(--danger); }

/* ========== 账号密码页面 ========== */
.vault-layout {
  max-width: 900px;
  margin: 0 auto;
}

.vault-lock-card {
  max-width: 400px;
  margin: 60px auto;
  text-align: center;
}

.vault-lock-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.vault-lock-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.vault-lock-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.vault-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.vault-input {
  text-align: center;
  letter-spacing: 4px;
}

.vault-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
}

.password-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.password-info {
  flex: 1;
  min-width: 0;
}

.password-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.password-account {
  font-size: 13px;
  color: var(--text-secondary);
}

.password-value {
  font-family: monospace;
  font-size: 14px;
  background: rgba(0,0,0,0.04);
  padding: 4px 8px;
  border-radius: 4px;
}

.password-actions {
  display: flex;
  gap: 8px;
}

/* ========== 快速记录页面 ========== */
.notes-layout {
  display: flex;
  gap: 20px;
}

.notes-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.notes-main {
  flex: 1;
  min-width: 0;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.category-item:hover {
  background: rgba(0,0,0,0.04);
}

.category-item.active {
  background: var(--primary);
  color: #fff;
}

.category-name {
  font-size: 14px;
}

.category-count {
  font-size: 12px;
  opacity: 0.7;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-card {
  cursor: pointer;
  transition: all 0.2s;
}

.note-card:hover {
  border-color: var(--primary);
}

.note-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.note-preview {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ========== 项目计划页面 ========== */
.plan-layout {
  display: flex;
  gap: 20px;
}

.plan-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.plan-main {
  flex: 1;
  min-width: 0;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-item {
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.project-item:hover {
  background: rgba(0,0,0,0.04);
}

.project-item.active {
  background: rgba(123,107,91,0.1);
  border-color: var(--primary);
}

.project-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.project-progress {
  height: 4px;
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.project-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}

.task-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.board-task-content {
  flex: 1;
}

.board-task-name {
  font-size: 14px;
}

.board-task-name.completed {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* ========== 数据看板页面 ========== */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dashboard-card {
  text-align: center;
  padding: 24px 16px;
}

.dashboard-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.dashboard-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dashboard-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.chart-card {
  padding: 20px;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ========== H5 移动端适配 ========== */
@media (max-width: 768px) {
  /* 隐藏侧边栏 */
  .sidebar { display: none; }

  /* 主内容区全屏 */
  .main-content {
    margin-left: 0;
    padding: 16px;
  }

  /* 锁屏页面适配 */
  .lock-screen { padding: 16px; }
  .lock-card { width: 100%; max-width: 380px; padding: 32px 24px; }

  /* 工作日志：隐藏右栏，左栏全宽 */
  .work-page-layout {
    flex-direction: column;
  }
  .work-right { display: none; }
  .work-left { width: 100%; }

  /* 标题区紧凑 */
  .page-header { margin-bottom: 16px; }
  .page-title { font-size: 20px; }
  .date-label { font-size: 13px; }

  /* 卡片间距适配 */
  .card { padding: 14px; margin-bottom: 12px; border-radius: 10px; }

  /* 任务操作按钮紧凑 */
  .task-actions { gap: 4px; }
  .task-actions .btn { font-size: 12px; padding: 4px 8px; }

  /* 输入框适配 */
  .task-input { font-size: 15px; }

  /* 食谱页面 */
  .recipe-page-layout { flex-direction: column; }
  .recipe-right { width: 100%; position: static; }

  /* 资金页面 */
  .finance-layout { flex-direction: column; }
  .finance-right { position: static; }

  /* 笔记页面 */
  .notes-layout { flex-direction: column; }
  .notes-sidebar { width: 100%; }

  /* 计划页面 */
  .plan-layout { flex-direction: column; }
  .plan-sidebar { width: 100%; }

  /* 看板页面 */
  .dashboard-row { grid-template-columns: repeat(2, 1fr); }
}
