/* ============================================================
 * 胖鑫的装修万事屋 · 视觉增强层
 * 叠加在 style.css 之上,专做"美感"提升:渐变/景深/动效
 * ========================================================= */

/* ---- 背景:深空 radial 渐变,而非纯色 ---- */
body {
  background:
    radial-gradient(1200px 700px at 12% 0%, rgba(245,158,11,0.06), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(20,184,166,0.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- Logo:渐变 + 柔光 ---- */
.brand-logo {
  box-shadow:
    0 6px 24px rgba(245,158,11,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.18);
  transition: transform .25s ease, box-shadow .25s ease;
}
.brand-logo:hover {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 10px 30px rgba(245,158,11,0.55), inset 0 -2px 0 rgba(0,0,0,0.18);
}

/* ---- 侧栏导航:active 左侧竖条 + 滑入 ---- */
.nav-item {
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 0; top: 14%; bottom: 14%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--amber);
  transform: scaleY(0);
  transition: transform .2s ease;
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item:hover { transform: translateX(2px); transition: transform .15s; }

/* ---- 统计卡:顶边变渐变线,加阴影,加 hover 抬升 ---- */
.stat-card {
  border-top: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 30%),
    var(--card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--amber), var(--coral));
}
.stat-card.c-coral::before { background: linear-gradient(90deg, var(--coral), #ec4899); }
.stat-card.c-teal::before  { background: linear-gradient(90deg, var(--teal),  #22d3ee); }
.stat-card.c-indigo::before{ background: linear-gradient(90deg, var(--indigo),#a78bfa); }
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.32), 0 0 0 1px var(--border-strong);
}
.stat-value {
  background: linear-gradient(180deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- 面板:细分高光 + 内描边 ---- */
.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 24%),
    var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 4px 16px rgba(0,0,0,0.18);
  transition: box-shadow .2s ease;
}
.panel:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.26);
}

/* ---- 阶段行:hover 高亮带渐变 ---- */
.stage-row {
  border-radius: 10px;
  transition: background .15s, transform .15s;
}
.stage-row:hover {
  background: linear-gradient(90deg, rgba(245,158,11,0.10), transparent);
  transform: translateX(2px);
}

/* ---- Stage Tab:active 加发光 ---- */
.stage-tab {
  transition: all .18s ease;
}
.stage-tab:hover {
  transform: translateY(-1px);
}
.stage-tab.active {
  box-shadow: 0 6px 18px rgba(245,158,11,0.35);
}

/* ---- 任务勾选卡:勾完轻微下沉 ---- */
.task { transition: opacity .18s; }
.task-done { opacity: 0.65; }
.task-done .task-note { opacity: .6; }

/* ---- 按钮:主按钮加渐变 ---- */
.btn-primary {
  background: linear-gradient(135deg, var(--amber), #fb923c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245,158,11,0.30);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #fff;
  box-shadow: 0 8px 22px rgba(245,158,11,0.45);
  transform: translateY(-1px);
}

/* ---- Notice 横幅:更强的渐变玻璃 ---- */
.notice {
  background:
    linear-gradient(135deg, rgba(20,184,166,0.16), rgba(245,158,11,0.10));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(20,184,166,0.30);
  position: relative;
  overflow: hidden;
}
.notice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 80px at 30% -10%, rgba(255,255,255,0.10), transparent 60%);
  pointer-events: none;
}

/* ---- 页面切换:fade + 上推动画 ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-section.active {
  animation: fadeUp .25s ease both;
}

/* ---- 页头:滚动后加浮影 ---- */
.page-header {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(15,20,25,0.85);
}

/* ---- 页脚 ---- */
.page-footer {
  padding: 22px 28px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  margin-top: 30px;
}

/* ---- 滚动条:暗色细滑 ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--card-hover);
  border-radius: 4px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* ---- Stat-icon 小图标加渐变背景 ---- */
.stat-card .stat-icon {
  background: linear-gradient(135deg, rgba(245,158,11,0.22), rgba(245,158,11,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.stat-card.c-coral .stat-icon  { background: linear-gradient(135deg, rgba(251,113,133,0.22), rgba(251,113,133,0.08)); }
.stat-card.c-teal  .stat-icon  { background: linear-gradient(135deg, rgba(20,184,166,0.22), rgba(20,184,166,0.08)); }
.stat-card.c-indigo .stat-icon { background: linear-gradient(135deg, rgba(129,140,248,0.22), rgba(129,140,248,0.08)); }

/* ---- 表单元素:统一暗色 + 焦点 ---- */
input[type=text], input[type=number], input[type=tel], input[type=date], select, textarea {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  transition: border-color .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
input::placeholder { color: var(--text-dim); }

/* ---- 表格 ---- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th, .tbl td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.tbl th { color: var(--text-muted); font-weight: 500; font-size: 12px; background: var(--bg-elevated); }
.tbl tr:hover td { background: rgba(245,158,11,0.04); }

/* ---- Chart 容器 ---- */
.chart-box {
  position: relative;
  height: 240px;
}

/* ---- Filter chip 行 ---- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { color: var(--text); background: var(--card-hover); }
.chip.active {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: var(--amber);
  font-weight: 600;
}

/* ---- Grid 工人卡片 ---- */
.worker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* ---- 赏码 modal ---- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 1000;
  animation: fadeUp .25s ease both;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background:
    linear-gradient(180deg, rgba(245,158,11,0.08), transparent 30%),
    var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  display: grid; place-items: center;
  transition: all .15s;
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }
.modal-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.modal-emoji {
  font-size: 38px;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--coral));
  box-shadow: 0 8px 24px rgba(245,158,11,0.35);
}
.modal-title { font-size: 19px; font-weight: 700; }
.modal-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.donate-pane {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.donate-pane-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.donate-qr-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
}
.donate-qr-box img { width: 100%; height: 100%; object-fit: contain; display: block; }
.donate-qr-fallback {
  width: 100%; height: 100%;
  place-items: center;
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: center;
  border-radius: 4px;
  padding: 10px;
}
.donate-qr-fallback code { color: var(--amber); font-size: 10.5px; }
.donate-pane-foot { font-size: 11.5px; color: var(--text-muted); }
.modal-foot {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
}
@media (max-width: 540px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 20px; }
}

/* ---- 推荐资源卡片 ---- */
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.res-card {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.res-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-elevated);
}
.res-cover-empty {
  display: grid;
  place-items: center;
  font-size: 56px;
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(20,184,166,0.12));
  color: var(--text);
}
.res-body { padding: 16px 18px 18px; flex: 1; }
.res-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.res-name { font-size: 15px; font-weight: 700; line-height: 1.4; }
.res-tag { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 12px; }
.res-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.res-stars {
  color: var(--amber);
  font-size: 13px;
  letter-spacing: 1px;
}
.res-price { font-size: 12px; color: var(--coral); font-weight: 600; }
.res-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.res-pros, .res-cons {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.res-label { color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.res-pros ul, .res-cons ul { padding-left: 18px; color: var(--text); }
.res-pros li { color: var(--teal); }
.res-cons li { color: var(--rose); }
.res-note {
  margin-top: 12px;
  padding: 8px 10px;
  background: rgba(245,158,11,0.06);
  border-left: 2px solid var(--amber);
  font-size: 11.5px;
  color: var(--text-muted);
  border-radius: 4px;
}

/* ---- 三态按钮(验收用) ---- */
.tristate { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-strong); }
.tristate button {
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  transition: all .15s;
}
.tristate button + button { border-left: 1px solid var(--border); }
.tristate button.on-pass { background: rgba(20,184,166,0.22); color: var(--teal); }
.tristate button.on-fail { background: rgba(244,63,94,0.22);  color: var(--rose); }
.tristate button.on-pend { background: var(--amber-soft);     color: var(--amber); }

/* ============================================================
 * 奶油风浅色修正层(覆盖原暗色写死的冷色)
 * ========================================================= */

/* 背景:奶油底 + 暖色柔光 */
body {
  background:
    radial-gradient(1100px 650px at 10% 0%, rgba(210,125,62,0.08), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(138,164,123,0.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* 统计卡:大数字改暖深棕实色(原来是白→灰渐变,浅底看不见) */
.stat-value {
  background: none;
  -webkit-text-fill-color: var(--text);
  color: var(--text);
}
/* 统计卡顶边渐变:全部换暖色系 */
.stat-card::before        { background: linear-gradient(90deg, var(--amber), #E8A26A); }
.stat-card.c-coral::before{ background: linear-gradient(90deg, var(--coral), #EBA98C); }
.stat-card.c-teal::before { background: linear-gradient(90deg, var(--teal),  #AEC79A); }
.stat-card.c-indigo::before{ background: linear-gradient(90deg, var(--indigo), #D7AEA8); }
/* 阴影:全部改暖棕低透明,浅底更柔和 */
.stat-card { box-shadow: 0 4px 16px rgba(150,115,70,0.09); }
.stat-card:hover { box-shadow: 0 12px 26px rgba(150,115,70,0.16), 0 0 0 1px var(--border-strong); }
.panel { box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 4px 16px rgba(150,115,70,0.07); }
.panel:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 8px 22px rgba(150,115,70,0.12); }
/* 卡片细高光在浅底用白 */
.panel, .stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent 26%), var(--card);
}

/* stat-icon 暖色底 */
.stat-card .stat-icon        { background: linear-gradient(135deg, rgba(210,125,62,0.18), rgba(210,125,62,0.07)); box-shadow:none; }
.stat-card.c-coral .stat-icon { background: linear-gradient(135deg, rgba(221,129,99,0.18), rgba(221,129,99,0.07)); }
.stat-card.c-teal  .stat-icon { background: linear-gradient(135deg, rgba(138,164,123,0.20), rgba(138,164,123,0.08)); }
.stat-card.c-indigo .stat-icon{ background: linear-gradient(135deg, rgba(188,138,132,0.18), rgba(188,138,132,0.08)); }

/* 页头:奶油半透明 */
.page-header {
  background: rgba(251,246,238,0.88);
  border-bottom: 1px solid var(--border);
}

/* Notice 横幅:暖色玻璃 */
.notice {
  background: linear-gradient(135deg, rgba(138,164,123,0.16), rgba(210,125,62,0.10));
  border: 1px solid rgba(210,125,62,0.22);
}

/* 按钮主色:焦糖渐变 */
.btn-primary {
  background: linear-gradient(135deg, var(--amber), #E89A55);
  color: #fff;
  box-shadow: 0 4px 14px rgba(210,125,62,0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #DD8A4A, #E0913F);
  color: #fff;
  box-shadow: 0 8px 20px rgba(210,125,62,0.4);
}

/* Logo 暖色光晕 */
.brand-logo { box-shadow: 0 6px 20px rgba(210,125,62,0.30), inset 0 -2px 0 rgba(0,0,0,0.08); }
.brand-logo:hover { box-shadow: 0 10px 28px rgba(210,125,62,0.45), inset 0 -2px 0 rgba(0,0,0,0.08); }

/* 隐私标:暖绿 */
.privacy-tag { background: rgba(138,164,123,0.14); color: #6F8A60; }

/* 滚动条:暖色 */
::-webkit-scrollbar-thumb { background: #E2D5C2; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* 三态按钮:换暖色 */
.tristate button.on-pass { background: rgba(138,164,123,0.24); color: #6F8A60; }
.tristate button.on-fail { background: rgba(207,99,83,0.20);   color: var(--rose); }
.tristate button.on-pend { background: var(--amber-soft);      color: var(--amber); }

/* 资源备注块暖底 */
.res-note { background: rgba(210,125,62,0.07); }
.res-pros li { color: #6F8A60; }

/* 输入框聚焦暖色环 */
input:focus, select:focus, textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(210,125,62,0.16);
}

/* 表格表头奶油底 */
.tbl th { background: #F3EADD; color: var(--text-muted); }
.tbl tr:hover td { background: rgba(210,125,62,0.05); }

/* 弹窗卡片浅底 */
.modal-card {
  background: linear-gradient(180deg, rgba(210,125,62,0.06), transparent 30%), var(--card);
  box-shadow: 0 30px 80px rgba(80,60,40,0.28);
}
.modal-emoji { box-shadow: 0 8px 24px rgba(210,125,62,0.32); }
