/* ======= 基础 & 主题 ======= */
:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #666;
  --border: #e0e0e0;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --red: #ef4444;
  --orange: #f59e0b;
  --green: #22c55e;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --chat-bg: #f8f9fc;
  --chat-bubble-user: #6366f1;
  --chat-bubble-bot: #ffffff;
  --nav-bg: #ffffff;
  --header-height: 56px;
}

[data-theme="dark"] {
  --bg: #0f0f23;
  --card: #1a1a2e;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: #2d2d44;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --chat-bg: #15152b;
  --chat-bubble-bot: #1e1e3a;
  --nav-bg: #1a1a2e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ======= Header ======= */
header {
  display: flex; align-items: center; padding: 0 20px;
  height: var(--header-height); background: var(--card);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50; gap: 16px;
}
.logo { font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.header-nav {
  display: flex; gap: 2px; overflow-x: auto; flex: 1;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  background: none; border: none; padding: 8px 14px; cursor: pointer;
  font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap;
  border-radius: 8px; transition: all 0.2s;
}
.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.active { background: var(--accent); color: white; }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; }
.icon-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 8px; cursor: pointer; font-size: 1rem; color: var(--text);
}
.icon-btn:hover { background: var(--border); }

/* ======= 左右布局 ======= */
.layout { display: flex; height: calc(100vh - var(--header-height)); }

/* ======= Tab 切换 ======= */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ======= Dashboard Grid ======= */
.dashboard {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
  padding: 16px; overflow-y: auto; max-height: 100%;
}

/* ======= Widget ======= */
.widget {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: all 0.3s;
}
.widget-full { grid-column: 1 / -1; }
.hidden { display: none !important; }
.widget-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; font-weight: 600; font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.widget-close { background: none; border: none; cursor: pointer; color: var(--text-secondary); font-size: 0.8rem; padding: 2px 6px; border-radius: 4px; }
.widget-close:hover { background: var(--border); }

/* ======= 页面头部 ======= */
.page-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.page-header h2 { font-size: 1.2rem; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-actions input, .page-actions select {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--text); font-size: 0.85rem; outline: none;
}
.page-actions input:focus, .page-actions select:focus { border-color: var(--accent); }

.btn-primary {
  padding: 7px 16px; border: none; border-radius: 8px; background: var(--accent);
  color: white; cursor: pointer; font-weight: 500; font-size: 0.85rem;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { padding: 7px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; font-size: 0.85rem; }
.btn-secondary:hover { background: var(--bg); }

/* ======= 时钟 ======= */
.clock-body { padding: 16px; text-align: center; }
.clock-time { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.clock-date { margin-top: 4px; font-size: 0.85rem; color: var(--text-secondary); }

/* ======= 天气 ======= */
.weather-body { padding: 14px; text-align: center; min-height: 50px; }
.weather-loading, .status-loading, .plans-loading { color: var(--text-secondary); padding: 30px; text-align: center; }
.weather-error { color: var(--red); font-size: 0.85rem; }
.weather-info { display: flex; align-items: center; justify-content: center; gap: 12px; }
.weather-temp { font-size: 1.5rem; font-weight: 700; }
.weather-desc { color: var(--text-secondary); font-size: 0.85rem; }
.weather-city { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }

/* ======= 服务器状态 ======= */
.status-body { padding: 14px; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-item { padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.status-item .label { font-size: 0.7rem; color: var(--text-secondary); }
.status-item .value { font-size: 1rem; font-weight: 600; }
.bar-bg { height: 5px; background: var(--border); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.bar-good { background: var(--green); }
.bar-warn { background: var(--orange); }
.bar-bad { background: var(--red); }

/* ======= 进度统计 ======= */
.chart-body { padding: 14px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.chart-item { padding: 10px; border-radius: 8px; background: var(--bg); }
.chart-item .num { font-size: 1.5rem; font-weight: 700; }
.chart-item .lbl { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* ======= 日历 ======= */
.calendar-body { padding: 14px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.calendar-header button { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; color: var(--text); }
.calendar-header button:hover { background: var(--bg); }
.calendar-header .month { font-weight: 600; font-size: 0.95rem; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }
.calendar-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.calendar-days span {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.8rem; cursor: pointer;
}
.calendar-days span:hover { background: var(--bg); }
.calendar-days span.today { background: var(--accent); color: white; font-weight: 600; }
.calendar-days span.has-plan { font-weight: 700; position: relative; }
.calendar-days span.has-plan::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.calendar-days span.other-month { color: var(--text-secondary); opacity: 0.4; }

/* ======= 计划列表 ======= */
.plans-body {  }
.plan-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 20px; border-bottom: 1px solid var(--border); transition: background 0.2s;
}
.plan-card:hover { background: var(--bg); }
.plan-card:last-child { border-bottom: none; }
.plan-check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer; margin-top: 2px;
  background: none; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.plan-check:hover { border-color: var(--green); }
.plan-check.done { background: var(--green); border-color: var(--green); color: white; }
.plan-info { flex: 1; min-width: 0; cursor: pointer; }
.plan-title { font-weight: 500; font-size: 0.9rem; }
.plan-title.done-text { text-decoration: line-through; color: var(--text-secondary); }
.plan-content { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; white-space: pre-wrap; }
.plan-meta { display: flex; gap: 6px; margin-top: 3px; font-size: 0.7rem; flex-wrap: wrap; }
.plan-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.plan-tag { padding: 1px 6px; border-radius: 6px; background: var(--bg); font-size: 0.65rem; }
.priority-badge { padding: 1px 6px; border-radius: 8px; font-size: 0.65rem; font-weight: 600; }
.priority-high { background: #fef2f2; color: var(--red); }
.priority-medium { background: #fffbeb; color: var(--orange); }
.priority-low { background: #f0fdf4; color: var(--green); }
[data-theme="dark"] .priority-high { background: #450a0a; }
[data-theme="dark"] .priority-medium { background: #451a03; }
[data-theme="dark"] .priority-low { background: #052e16; }
.plan-actions { flex-shrink: 0; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.plan-card:hover .plan-actions { opacity: 1; }
.plan-actions button { background: none; border: none; cursor: pointer; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; color: var(--text-secondary); }
.plan-actions button:hover { background: var(--border); color: var(--text); }
.plan-empty { padding: 40px 20px; text-align: center; color: var(--text-secondary); }
.plan-in-progress { border-left: 3px solid var(--orange); }
.plan-done-card { opacity: 0.6; }

/* ======= 笔记 ======= */
.notes-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px; padding: 20px;
}
.note-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow);
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.note-card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.note-card-preview { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-meta { font-size: 0.7rem; color: var(--text-secondary); margin-top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.note-card-actions { display: flex; gap: 4px; margin-top: 8px; }
.note-card-actions button { background: none; border: none; cursor: pointer; font-size: 0.8rem; color: var(--text-secondary); padding: 2px 6px; border-radius: 4px; }
.note-card-actions button:hover { background: var(--bg); color: var(--text); }

/* ======= 便签 ======= */
.sticky-board { padding: 20px; display: flex; gap: 14px; flex-wrap: wrap; }
.sticky-card {
  width: 220px; min-height: 160px; border-radius: var(--radius);
  padding: 14px; position: relative; cursor: pointer; box-shadow: var(--shadow);
  font-size: 0.85rem; line-height: 1.5; transition: transform 0.2s;
  word-break: break-word; white-space: pre-wrap;
}
.sticky-card:hover { transform: rotate(-1deg); }
.sticky-card .sticky-del {
  position: absolute; top: 6px; right: 8px; background: none; border: none;
  cursor: pointer; opacity: 0; transition: opacity 0.2s; font-size: 0.85rem;
}
.sticky-card:hover .sticky-del { opacity: 1; }
.sticky-card textarea {
  width: 100%; min-height: 100px; border: none; background: transparent;
  resize: none; outline: none; font-size: 0.85rem; line-height: 1.5;
  font-family: inherit; color: inherit;
}
.sticky-color-picker { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.sticky-color { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.sticky-color.active { border-color: var(--text); }

.sticky-mini { padding: 10px; }
.sticky-mini-item { padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; font-size: 0.8rem; word-break: break-word; }

/* ======= 番茄钟 ======= */
.pomo-container { display: flex; gap: 30px; padding: 30px; max-width: 700px; margin: 0 auto; }
.pomo-main { text-align: center; flex: 1; }
.pomo-main h2 { margin-bottom: 16px; }
.pomo-timer { font-size: 4rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 4px; margin: 16px 0; }
.pomo-controls { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.pomo-presets { display: flex; gap: 8px; justify-content: center; }
.pomo-preset {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--card); cursor: pointer; font-size: 0.8rem; color: var(--text);
}
.pomo-preset.active { background: var(--accent); color: white; border-color: var(--accent); }
.pomo-stats { flex: 1; }
.pomo-stats h3 { margin-bottom: 12px; }
.pomo-stat-card { padding: 12px; border-radius: 8px; background: var(--bg); margin-bottom: 8px; }
.pomo-stat-card .num { font-size: 1.5rem; font-weight: 700; }
.pomo-stat-card .lbl { font-size: 0.8rem; color: var(--text-secondary); }

.pomo-mini { padding: 14px; text-align: center; }
.pomo-mini .num { font-size: 1.5rem; font-weight: 700; }
.pomo-mini .lbl { font-size: 0.8rem; color: var(--text-secondary); }

/* ======= 甘特图 ======= */
.gantt-container { padding: 20px; overflow-x: auto; }
.gantt-chart { min-width: 600px; position: relative; }
.gantt-header { display: flex; border-bottom: 2px solid var(--border); padding-bottom: 6px; margin-bottom: 6px; }
.gantt-day { flex: 1; text-align: center; font-size: 0.7rem; color: var(--text-secondary); }
.gantt-day.today { color: var(--accent); font-weight: 600; }
.gantt-row { display: flex; align-items: center; margin-bottom: 4px; min-height: 28px; }
.gantt-label { width: 140px; font-size: 0.8rem; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.gantt-bar-wrap { flex: 1; position: relative; height: 28px; }
.gantt-bar {
  position: absolute; height: 22px; border-radius: 6px; top: 3px;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 0.7rem; color: white; font-weight: 500;
  overflow: hidden; white-space: nowrap;
  cursor: pointer; transition: opacity 0.2s;
}
.gantt-bar:hover { opacity: 0.8; }

/* ======= 模板 ======= */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 20px; }
.template-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow);
}
.template-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.template-card .name { font-weight: 600; font-size: 0.95rem; }
.template-card .type { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }

/* ======= 搜索 ======= */
.search-box { padding: 16px 20px; }
.search-box input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--text);
  font-size: 0.95rem; outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-results { padding: 0 20px 20px; }
.search-section { margin-bottom: 20px; }
.search-section h3 { font-size: 0.9rem; margin-bottom: 8px; color: var(--text-secondary); }
.search-item {
  padding: 10px 14px; border-radius: 8px; background: var(--card);
  margin-bottom: 6px; border: 1px solid var(--border); cursor: pointer;
}
.search-item:hover { background: var(--bg); }
.search-item .title { font-weight: 500; }
.search-item .snippet { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.search-empty { padding: 40px; text-align: center; color: var(--text-secondary); }

/* ======= 聊天天面板 ======= */
.chat-panel {
  width: 360px; min-width: 360px; background: var(--chat-bg);
  border-left: 1px solid var(--border); display: flex; flex-direction: column;
  transition: width 0.3s, min-width 0.3s; overflow: hidden;
}
.chat-panel.collapsed { width: 48px; min-width: 48px; }
.chat-panel.collapsed .chat-messages, .chat-panel.collapsed .chat-input-area,
.chat-panel.collapsed .chat-header span { display: none; }
.chat-panel.collapsed .chat-toggle { transform: rotate(180deg); }

.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--border);
  background: var(--card);
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 10px; display: flex;
  flex-direction: column; gap: 8px;
}
.chat-msg { display: flex; gap: 6px; align-items: flex-start; max-width: 90%; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-bot { align-self: flex-start; }
.chat-avatar { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--border); font-size: 0.85rem; }
.chat-bubble {
  padding: 8px 12px; border-radius: 10px; font-size: 0.85rem;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.chat-msg-user .chat-bubble { background: var(--chat-bubble-user); color: white; border-bottom-right-radius: 4px; }
.chat-msg-bot .chat-bubble { background: var(--chat-bubble-bot); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg-status .chat-bubble { background: transparent; color: var(--text-secondary); font-size: 0.78rem; border: none; padding: 2px 12px; }
.chat-input-area { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); background: var(--card); }
.chat-input-area input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 0.85rem; outline: none; }
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area button { padding: 8px 14px; border: none; border-radius: 8px; background: var(--accent); color: white; cursor: pointer; font-weight: 500; font-size: 0.85rem; }
.chat-input-area button:hover { background: var(--accent-hover); }

/* ======= Modal ======= */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.modal-content {
  position: relative; background: var(--card); border-radius: var(--radius);
  padding: 24px; width: 90%; max-width: 460px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-wide { max-width: 700px; }
.modal-content h3 { margin-bottom: 14px; }
.modal-content input[type="text"], .modal-content textarea { width: 100%; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 0.9rem; outline: none; }
.modal-content textarea { resize: vertical; font-family: inherit; }
.modal-content input:focus, .modal-content textarea:focus { border-color: var(--accent); }
.modal-row { display: flex; gap: 8px; margin-bottom: 14px; }
.modal-row select, .modal-row input { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions button { padding: 8px 20px; border-radius: 8px; border: none; cursor: pointer; background: var(--accent); color: white; font-weight: 500; }
.modal-actions button:hover { background: var(--accent-hover); }

/* ======= 设置 ======= */
.settings-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; max-width: 400px; }
.settings-body label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; padding: 8px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); }
.settings-body input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ======= 代理面板 ======= */
#proxyPanel {
  padding: 16px 20px;
  overflow-y: auto;
  height: calc(100vh - var(--header-height) - 60px);
}

.proxy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.proxy-card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.proxy-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.proxy-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.proxy-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.proxy-btn-start {
  background: #4ade80;
  color: #0f0f0f;
}
.proxy-btn-start:hover:not(:disabled) { background: #22c55e; }

.proxy-btn-stop {
  background: #f87171;
  color: #0f0f0f;
}
.proxy-btn-stop:hover:not(:disabled) { background: #ef4444; }

.proxy-btn-secondary {
  background: var(--border);
  color: var(--text);
}
.proxy-btn-secondary:hover:not(:disabled) { background: var(--text-secondary); color: white; }

.proxy-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
}

.proxy-status-dot.running {
  background: #4ade80;
  box-shadow: 0 0 8px #4ade8044;
}

.proxy-status-dot.stopped {
  background: #f87171;
  box-shadow: 0 0 8px #f8717144;
}

.proxy-info-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 13px;
  line-height: 1.8;
}

.proxy-info-box .proxy-label {
  color: var(--text-secondary);
}

.proxy-info-box .proxy-val {
  color: #38bdf8;
}

.proxy-exit-ip {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: auto;
}

.proxy-search-box {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

.proxy-search-box:focus {
  border-color: var(--accent);
}

.proxy-node-list {
  max-height: 500px;
  overflow-y: auto;
}

.proxy-node-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.proxy-node-item:hover {
  background: var(--bg);
}

.proxy-node-item.active {
  background: var(--border);
  border-color: var(--accent);
}

.proxy-node-idx {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.proxy-node-item.active .proxy-node-idx {
  background: var(--accent);
  color: white;
}

.proxy-node-info {
  margin-left: 12px;
  flex: 1;
}

.proxy-node-name {
  font-size: 14px;
}

.proxy-node-addr {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.proxy-node-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-secondary);
}

.proxy-toast {
  position: fixed;
  top: 70px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  transition: all .3s;
  transform: translateX(120%);
  opacity: 0;
}

.proxy-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.proxy-toast.success {
  background: #166534;
  color: #bbf7d0;
}

.proxy-toast.error {
  background: #7f1d1d;
  color: #fecaca;
}

/* ======= 响应式 ======= */
@media (max-width: 1024px) {
  .layout { flex-direction: column; height: auto; }
  .dashboard { grid-template-columns: 1fr 1fr; max-width: 100%; }
  .chat-panel { width: 100%; min-width: 100%; height: 380px; border-left: none; border-top: 1px solid var(--border); }
  .chat-panel.collapsed { height: 48px; }
  .pomo-container { flex-direction: column; }
  header { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .header-nav { width: 100%; }
}

@media (max-width: 768px) {
  .dashboard { grid-template-columns: 1fr; padding: 10px; }
  .notes-grid { grid-template-columns: 1fr; }
  .templates-grid { grid-template-columns: 1fr; }
  .clock-time { font-size: 1.6rem; }
  .plan-actions { opacity: 1; }
  .chat-panel { height: 320px; }
}
