/* 春秋大梦计划 · 自定义组件样式（布局配色主要由 Tailwind 承担） */
:root { --grad: linear-gradient(135deg, #7c6cff 0%, #00d2ff 100%); --mut: #7d8aa5; }

/* ---------- 背景极光与网格 ---------- */
.aurora { position: fixed; border-radius: 50%; filter: blur(110px); opacity: .35; pointer-events: none; z-index: 0; }
.a1 { width: 520px; height: 520px; background: #5b3df5; top: -160px; left: -120px; animation: drift1 22s ease-in-out infinite alternate; }
.a2 { width: 460px; height: 460px; background: #00a3ff; top: 30%; right: -160px; animation: drift2 26s ease-in-out infinite alternate; }
.a3 { width: 400px; height: 400px; background: #b34df5; bottom: -140px; left: 28%; opacity: .22; animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(70px, 50px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-60px, -40px) scale(.92); } }
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

/* ---------- 通用 ---------- */
.glass { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); backdrop-filter: blur(18px); }
.btn-grad { background: linear-gradient(135deg, #7c6cff 0%, #00d2ff 100%); box-shadow: 0 4px 18px rgba(94,118,255,.35); }
.vtab-active { background: var(--grad); color: #fff; font-weight: 600; }
.hidden-scroll::-webkit-scrollbar { height: 0; }
input, textarea, select {
  color: #e8ecf4; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 8px 11px; font-size: 13px; outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: rgba(124,108,255,.6); box-shadow: 0 0 0 3px rgba(124,108,255,.15); }
textarea { resize: vertical; line-height: 1.6; font-family: Consolas, monospace; font-size: 12.5px; }
select option { background: #10182b; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 弹窗与提示 ---------- */
.mask { position: fixed; inset: 0; background: rgba(2,5,12,.6); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 40; padding: 16px; }
.mask.show { display: flex; }
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-80px);
  z-index: 50; padding: 10px 20px; font-size: 13px; border-radius: 10px;
  background: rgba(16,24,43,.92); border: 1px solid rgba(255,255,255,.1); color: #e8ecf4;
  transition: transform .25s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(255,71,87,.4); color: #ff9aa3; }

/* ---------- 看板 ---------- */
.col { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 12px; backdrop-filter: blur(16px); min-width: 0; }
.col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; }
.col-head .n { margin-left: auto; font-size: 11px; color: var(--mut); background: rgba(255,255,255,.06); border-radius: 999px; padding: 1px 8px; }
.card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 10px 11px; margin-bottom: 8px; cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s; min-width: 0;
}
.card:last-child { margin-bottom: 0; }
.card:hover { transform: translateY(-2px); border-color: rgba(124,108,255,.55); box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 14px rgba(124,108,255,.18); }
.card .co { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .pos { font-size: 12px; color: var(--mut); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { font-size: 11px; color: var(--mut); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; overflow: hidden; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 999px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.col-empty { font-size: 11px; color: var(--mut); text-align: center; padding: 14px 0; opacity: .6; }
.col-add {
  display: block; width: 100%; padding: 12px 0; font-size: 11.5px; color: var(--mut);
  background: none; border: 1px dashed rgba(255,255,255,.14); border-radius: 10px;
  cursor: pointer; letter-spacing: 1px; transition: all .15s;
}
.col-add:hover { color: #b3a8ff; border-color: rgba(124,108,255,.5); background: rgba(124,108,255,.07); }
.tag.t-city { background: rgba(154,167,189,.14); color: #9aa7bd; }
.tag.tag-dl { background: rgba(255,180,94,.13); color: #ffc98a; }

/* 移动端看板：筛选 chips + 卡片列表 */
.kb-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.kb-chips::-webkit-scrollbar { display: none; }
.kb-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); color: var(--mut); background: rgba(255,255,255,.04);
  transition: all .15s;
}
.kb-chips button i { font-style: normal; font-size: 10.5px; background: rgba(255,255,255,.09); border-radius: 999px; padding: 0 6px; }
.kb-chips button.on { color: #fff; font-weight: 600; border-color: transparent; background: var(--grad); box-shadow: 0 3px 12px rgba(94,118,255,.35); }
.kb-list { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.kb-list .card { margin-bottom: 0; }
svg.pin { width: 11px; height: 11px; fill: currentColor; vertical-align: -1px; margin-right: 2px; }

.s-待投递 { color: #9aa7bd; } .t-待投递 { background: rgba(154,167,189,.15); color: #9aa7bd; }
.s-已投递 { color: #4da3ff; } .t-已投递 { background: rgba(77,163,255,.15); color: #4da3ff; }
.s-测评   { color: #b18cff; } .t-测评   { background: rgba(177,140,255,.15); color: #b18cff; }
.s-笔试   { color: #ffb45e; } .t-笔试   { background: rgba(255,180,94,.15); color: #ffb45e; }
.s-面试   { color: #3ee6c4; } .t-面试   { background: rgba(62,230,196,.15); color: #3ee6c4; }
.s-OC     { color: #6ea8ff; } .t-OC     { background: rgba(110,168,255,.18); color: #6ea8ff; }
.s-offer  { color: #ff5e7d; } .t-offer  { background: rgba(255,94,125,.16); color: #ff5e7d; }
.s-已拒   { color: #66708a; } .t-已拒   { background: rgba(102,112,138,.15); color: #66708a; text-decoration: line-through; }

/* ---------- 截止时间条 ---------- */
.dl-title { font-size: 12px; letter-spacing: 2px; color: var(--mut); white-space: nowrap; }
.dl-chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer;
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,180,94,.1); border: 1px solid rgba(255,180,94,.3); color: #ffc98a;
}
.dl-chip b { font-weight: 600; }
.dl-chip.overdue { background: rgba(255,71,87,.12); border-color: rgba(255,71,87,.35); color: #ff8a93; }
.dl-chip .when { color: var(--mut); font-size: 11px; }

/* ---------- 统计 ---------- */
.frow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.frow .fl { width: 52px; font-size: 12.5px; flex: none; text-align: right; }
.frow .bar-track { flex: 1; height: 20px; background: rgba(255,255,255,.05); border-radius: 6px; overflow: hidden; }
.frow .bar { height: 100%; border-radius: 6px; background: var(--grad); min-width: 2px; transition: width .5s ease; }
.frow .fv { width: 66px; font-size: 12px; color: var(--mut); flex: none; }
.frow .fv b { color: #e8ecf4; }
.weekly-chart { display: flex; align-items: flex-end; gap: 12px; height: 140px; padding-top: 8px; }
.wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.wcol .wbar { width: 100%; max-width: 42px; border-radius: 6px 6px 2px 2px; background: var(--grad); box-shadow: 0 0 12px rgba(0,210,255,.25); transition: height .5s ease; }
.wcol .wn { font-size: 12px; color: #e8ecf4; }
.wcol .wl { font-size: 10.5px; color: var(--mut); }
.empty-stats { color: var(--mut); font-size: 13px; text-align: center; padding: 30px 0; }

/* ---------- 对话消息 ---------- */
.msg {
  max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px;
  line-height: 1.65; word-break: break-word;
  animation: msgin .28s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes msgin { from { opacity: 0; transform: translateY(7px) scale(.985); } }

.sys-note {
  align-self: center; font-size: 10.5px; letter-spacing: 2px; color: var(--mut);
  display: flex; align-items: center; gap: 8px; margin: 4px 0 2px;
  animation: msgin .3s ease both;
}
.sys-note::before, .sys-note::after {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,108,255,.45));
}
.sys-note::after { background: linear-gradient(90deg, rgba(124,108,255,.45), transparent); }
.msg.bot { background: rgba(255,255,255,.07); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--grad); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.user strong { color: #fff; }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin-bottom: 0; }
.msg h3, .msg h4, .msg h5, .msg h6 { margin: 10px 0 6px; letter-spacing: 1px; line-height: 1.4; }
.msg h3 { font-size: 15px; } .msg h4 { font-size: 14px; } .msg h5, .msg h6 { font-size: 13px; }
.msg h3:first-child, .msg h4:first-child { margin-top: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.msg li { font-size: 13.5px; line-height: 1.55; }
.msg code { background: rgba(124,108,255,.16); border: 1px solid rgba(124,108,255,.25); border-radius: 4px; padding: 1px 5px; font-size: 12px; font-family: Consolas, monospace; color: #c9beff; }
.msg pre { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.09); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 6px 0; }
.msg pre code { background: none; border: none; padding: 0; color: #d7e3ff; }
.msg table { border-collapse: collapse; margin: 6px 0; font-size: 12.5px; width: 100%; }
.msg th, .msg td { border: 1px solid rgba(255,255,255,.09); padding: 5px 8px; text-align: left; line-height: 1.4; }
.msg th { background: rgba(124,108,255,.14); font-weight: 600; white-space: nowrap; }
.msg hr { border: none; border-top: 1px solid rgba(255,255,255,.09); margin: 10px 0; }
.msg a { color: #6fd7ff; text-decoration: none; }
.msg a:hover { text-decoration: underline; }
.msg strong { color: #fff; }
.msg-img { display: block; max-width: 220px; max-height: 160px; border-radius: 10px; margin-top: 8px; border: 1px solid rgba(255,255,255,.15); }

/* ---------- 小梦的计划 ---------- */
.plan-item { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; }
.plan-bar { height: 4px; background: rgba(255,255,255,.07); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.plan-bar-fill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .4s ease; }
.plan-step { display: flex; align-items: flex-start; gap: 9px; padding: 5px 2px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.plan-step .plan-check {
  flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.plan-step .plan-check svg { width: 10px; height: 10px; }
.plan-step.done .plan-check { background: var(--grad); border-color: transparent; }
.plan-step.done .plan-desc { color: var(--mut); text-decoration: line-through; }
.plan-desc { word-break: break-word; }

/* 打字机光标 */
.cursor {
  display: inline-block; width: 8px; height: 14px; margin-left: 2px;
  background: #00d2ff; border-radius: 2px; vertical-align: -2px;
  box-shadow: 0 0 8px #00d2ff; animation: blink .9s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* 快捷提问 chips */
#chat-chips button {
  font-size: 11.5px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.1); color: var(--mut); background: rgba(255,255,255,.03);
  cursor: pointer; transition: all .12s;
}
#chat-chips button:hover { border-color: rgba(124,108,255,.5); color: #e8ecf4; }

/* ---------- 时间线 ---------- */
.tl-item { position: relative; padding: 0 0 14px 18px; border-left: 1px solid rgba(124,108,255,.35); }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before {
  content: ""; position: absolute; left: -4.5px; top: 3px;
  width: 8px; height: 8px; border-radius: 50%; background: #00d2ff; box-shadow: 0 0 8px #00d2ff;
}
.tl-item .tl-status { font-size: 13px; font-weight: 600; }
.tl-item .tl-time { font-size: 11px; color: var(--mut); margin-left: 8px; }
.tl-item .tl-note { font-size: 12px; color: var(--mut); margin-top: 2px; }

/* ---------- 身份与记忆 ---------- */
.id-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px; transition: border-color .12s, background .12s;
}
.id-item:hover { background: rgba(255,255,255,.05); }
.id-item.active { border-color: rgba(124,108,255,.6); background: rgba(124,108,255,.1); }
.id-item .id-name { font-weight: 600; font-size: 14px; }
.id-item .id-role { font-size: 11px; color: var(--mut); margin-left: auto; letter-spacing: 1px; }
.mem-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 8px;
  font-size: 13px; line-height: 1.5;
}
.mem-item .m-del { margin-left: auto; flex: none; }

/* ---------- 移动端底部导航与视图 ---------- */
/* 注意：Tailwind 的 .flex 等类由 CDN 运行时注入且排在本文件之后，
   会覆盖同权重的 display 规则，因此这里全部用 !important */
.bottom-nav { display: none; }
@media (max-width: 1023px) {
  .chat-shell, .content-shell { display: none !important; height: 100dvh; }
  body[data-mv="chat"] .chat-shell {
    display: flex !important;
    padding-bottom: calc(58px + env(safe-area-inset-bottom)); /* 避开底部导航 */
  }
  body[data-mv="content"] .content-shell { display: block !important; overflow-y: auto; }
  body[data-mv="me"] .content-shell { display: block !important; overflow-y: auto; }
  body[data-mv="me"] #pane-kanban, body[data-mv="me"] #pane-stats { display: none !important; }
  body[data-mv="me"] #pane-me { display: block !important; }
  #bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(10,14,26,.92); backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 0 7px; color: var(--mut); font-size: 10.5px; background: none; border: none; cursor: pointer;
  }
  #bottom-nav button svg { width: 21px; height: 21px; }
  #bottom-nav button.active { color: #8f9dff; }
  #bottom-nav button.active svg { filter: drop-shadow(0 0 6px rgba(124,108,255,.8)); }
}
@media (min-width: 1024px) {
  .chat-shell { display: flex !important; }
  .content-shell { display: block !important; }
  #pane-me { display: none !important; }
}
