/* 玖诚沙龙档案 · 黑金主题（墨黑底 · 鎏金点 · 高对比） */
:root {
  --gold: #C9A227;
  --gold-lite: #E4C46A;
  --gold-dim: #8C7434;
  --ink: #0B0B0D;
  --navy: #C9A227;          /* 兼容旧类名：主强调色 */
  --navy-deep: #08080A;
  --blue: #E0BE63;          /* 兼容旧类名：亮强调色 */
  --blue-soft: rgba(201, 162, 39, .13);
  --bg: #0D0D0F;
  --card: #17171B;
  --card-2: #1D1D22;
  --line: #2C2C33;
  --text: #EDE9E0;
  --muted: #948E80;
  --ok: #63AE86;
  --ok-soft: rgba(99, 174, 134, .14);
  --warn: #D9A94A;
  --warn-soft: rgba(217, 169, 74, .14);
  --danger: #D06A65;
  --danger-soft: rgba(208, 106, 101, .13);
  --shadow: 0 8px 28px rgba(0, 0, 0, .5);
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--gold-lite); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .3px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(120deg, #050506 0%, #121216 55%, #1B1710 100%);
  color: var(--text);
  padding: 13px 28px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-bottom: 1px solid #33291A;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .6);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: block; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, .35));
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(201, 162, 39, .12);
  border: 1px solid rgba(201, 162, 39, .5);
  color: var(--gold-lite);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: 0;
}
.brand-text b { font-size: 17px; letter-spacing: .5px; display: block; line-height: 1.25; color: #F3EEE2; }
.brand-text span { font-size: 12px; color: #B99B47; letter-spacing: 1.4px; }
.topbar .spacer { flex: 1; }
.topbar .nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar .nav a {
  color: #C9C3B4;
  padding: 7px 14px; border-radius: 9px; font-size: 14px;
  transition: .15s;
}
.topbar .nav a:hover { background: rgba(201, 162, 39, .12); color: var(--gold-lite); }
.topbar .nav a.active { background: rgba(201, 162, 39, .2); color: var(--gold-lite); font-weight: 600; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 24px 60px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-head h3 { font-size: 16px; color: #F0EBDF; }
.card-head .sub { color: var(--muted); font-size: 13px; }
.card-head .spacer { flex: 1; }

/* ---------- 活动横幅 ---------- */
.event-banner {
  background: linear-gradient(120deg, #0A0A0C 0%, #1A1610 60%, #2A2113 100%);
  color: var(--text);
  border: 1px solid #3A2F1C;
  border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 18px;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .55);
}
.event-banner h2 { font-size: 22px; line-height: 1.35; color: #F5F0E4; }
.event-banner .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.event-banner .meta { font-size: 13px; color: #B5A98F; margin-top: 8px; display: flex; gap: 18px; flex-wrap: wrap; }
.event-banner .spacer { flex: 1; }

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gold-lite), var(--gold-dim)); opacity: .95;
}
.stat.ok::after { background: var(--ok); }
.stat.warn::after { background: var(--warn); }
.stat .label { color: var(--muted); font-size: 12.5px; letter-spacing: .5px; }
.stat .value { font-size: 28px; font-weight: 800; line-height: 1.25; margin-top: 2px; color: #F5F0E4; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
  font-family: inherit;
}
.btn:hover { border-color: var(--gold-dim); background: #262620; color: var(--gold-lite); }
.btn.primary { background: linear-gradient(180deg, var(--gold-lite), var(--gold)); border-color: var(--gold); color: #17130A; }
.btn.primary:hover { background: linear-gradient(180deg, #F0D27E, var(--gold-lite)); color: #17130A; }
.btn.dark { background: #0A0A0C; border-color: #3A2F1C; color: var(--gold-lite); }
.btn.dark:hover { background: #17130C; border-color: var(--gold-dim); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--danger); border-color: #4A2A2A; background: transparent; }
.btn.danger:hover { background: var(--danger-soft); color: #E88A85; border-color: #6B3A3A; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 输入 ---------- */
input[type=text], input[type=tel], input[type=number], input[type=datetime-local],
input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; color: var(--text); background: #121216;
  transition: .15s; outline: none;
}
input::placeholder, textarea::placeholder { color: #96907F; }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-dim); background: #16160F;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .14);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.65; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
label.field > span em { color: var(--danger); font-style: normal; margin-left: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=text] { max-width: 260px; }
.toolbar select { max-width: 150px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
thead th {
  background: #14140F; color: var(--gold-lite); text-align: left; font-weight: 700;
  padding: 11px 12px; white-space: nowrap; font-size: 13px; letter-spacing: .4px;
  border-bottom: 1px solid #33291A; position: sticky; top: 0;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid #232329; vertical-align: top; }
tbody tr:hover { background: #1B1B20; }
tbody tr:last-child td { border-bottom: none; }
td.nowrap, th.nowrap { white-space: nowrap; }
td .cell-sub { color: var(--muted); font-size: 12.5px; }
.clamp {
  max-width: 260px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: #7CC79C; }
.badge.wait { background: var(--warn-soft); color: #E0B962; }
.badge.blue { background: var(--blue-soft); color: var(--gold-lite); }
.badge.gray { background: #232329; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .72);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; z-index: 90;
  backdrop-filter: blur(3px);
}
.mask.show { display: flex; }
.modal {
  background: var(--card); border: 1px solid #33291A; border-radius: 16px;
  width: 100%; max-width: 620px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7); overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  background: #131317;
}
.modal-head h3 { font-size: 17px; color: #F0EBDF; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px 22px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line); background: #131317;
  display: flex; gap: 10px; justify-content: flex-end;
}
.icon-btn {
  border: none; background: transparent; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.icon-btn:hover { background: #232329; color: var(--gold-lite); }

/* ---------- 空态 / 提示 ---------- */
.empty { text-align: center; color: var(--muted); padding: 44px 12px; font-size: 14px; }
.empty b { display: block; font-size: 16px; color: #CFC8B8; margin-bottom: 6px; }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: #1C1C21; border: 1px solid #3A2F1C; color: #F0EBDF; padding: 11px 22px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 200;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #3A1A1A; border-color: #6B3A3A; color: #F0B8B5; }

/* ---------- 条形分布 ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .name { color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #232329; border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-dim), var(--gold-lite)); }
.bar-row .num { font-weight: 700; color: var(--gold-lite); }

/* ---------- 页脚 ---------- */
.foot { text-align: center; color: #6F6A5E; font-size: 12.5px; margin-top: 30px; line-height: 1.9; }

/* ---------- 移动端 ---------- */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .wrap { padding: 16px 14px 48px; }
  .grid2 { grid-template-columns: 1fr; }
  .event-banner { padding: 18px; }
  .event-banner h2 { font-size: 19px; }
  .stat .value { font-size: 24px; }
  .brand-text span { display: none; }
  .bar-row { grid-template-columns: 88px 1fr 36px; }
  .hide-sm { display: none !important; }
}

/* ================= v2 档案式布局 ================= */
.layout { display: grid; grid-template-columns: 310px 1fr; gap: 18px; max-width: 1500px; margin: 0 auto; padding: 18px 22px 60px; align-items: start; }
.side { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow-y: auto; padding-right: 2px; }
.main { min-width: 0; }

.ov { background: linear-gradient(140deg, #0A0A0C, #1D1810 70%, #2B2213); color: var(--text);
      border: 1px solid #3A2F1C; border-radius: 14px; padding: 16px 18px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .55); margin-bottom: 16px; }
.ov h4 { font-size: 12px; letter-spacing: 2px; color: var(--gold-dim); font-weight: 700; margin-bottom: 10px; }
.ov .row { display: flex; gap: 10px; }
.ov .cell { flex: 1; }
.ov .cell b { display: block; font-size: 22px; line-height: 1.2; color: var(--gold-lite); }
.ov .cell span { font-size: 11.5px; color: var(--muted); }
.ov .sub { margin-top: 10px; font-size: 12px; color: #A79E88; border-top: 1px solid #33291A; padding-top: 8px; }

.side-title { font-size: 12px; color: var(--muted); letter-spacing: 1.5px; font-weight: 700; margin: 4px 0 10px; display: flex; justify-content: space-between; }

.evcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
          margin-bottom: 10px; cursor: pointer; transition: .15s; position: relative; overflow: hidden; }
.evcard:hover { border-color: var(--gold-dim); background: #1B1B20; }
.evcard.active { border-color: var(--gold); background: #1C1913; box-shadow: 0 0 0 1px rgba(201, 162, 39, .28) inset; }
.evcard.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
                         background: linear-gradient(180deg, var(--gold-lite), var(--gold)); }
.evcard .t { font-weight: 700; font-size: 14px; line-height: 1.4; padding-right: 46px; color: #F0EBDF; }
.evcard .m { color: var(--muted); font-size: 12px; margin-top: 3px; }
.evcard .n { color: #A79E88; font-size: 12px; margin-top: 6px; display: flex; gap: 10px; }
.evcard .badge { position: absolute; top: 10px; right: 10px; }

.ev-head { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; box-shadow: var(--shadow); }
.ev-head h2 { font-size: 20px; line-height: 1.35; color: #F5F0E4; }
.ev-head .meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.ev-head .ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tabs button { border: none; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 14px;
               font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.tabs button:hover { background: #1F1F25; color: var(--text); }
.tabs button.on { background: linear-gradient(180deg, var(--gold-lite), var(--gold)); color: #17130A; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); min-height: 320px; }

.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: #DED8CB; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #232329; color: #C2BBAA; font-size: 12px; margin: 0 6px 6px 0; }

.dropzone { border: 2px dashed #4A3D22; border-radius: 12px; padding: 22px; text-align: center;
            color: var(--muted); font-size: 13.5px; background: #131317; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: #1C1913; color: var(--gold-lite); }

.filerow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #262630; border-radius: 10px; margin-bottom: 8px; }
.filerow .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--blue-soft); color: var(--gold-lite);
               display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.filerow .nm { flex: 1; min-width: 0; font-size: 14px; }
.filerow .nm small { display: block; color: var(--muted); font-size: 12px; }

.complete { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.complete span { font-size: 12.5px; padding: 4px 10px; border-radius: 8px; background: #232329; color: #8E8878; }
.complete span.done { background: var(--ok-soft); color: #7CC79C; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #2C2C33; }
.tlitem { position: relative; padding: 0 0 16px 0; }
.tlitem::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
                  background: var(--card); border: 2px solid var(--gold); }
.tlitem .tm { font-size: 12.5px; color: var(--gold-lite); font-weight: 700; }
.tlitem .ti { font-size: 14.5px; font-weight: 600; margin-top: 2px; color: #EDE9E0; }
.tlitem .de { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.score { font-weight: 800; color: var(--gold-lite); font-size: 22px; }
.stars { color: #E0BE63; letter-spacing: 2px; font-size: 13px; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 14px; }
  .side { position: static; max-height: none; }
  .ev-head h2 { font-size: 18px; }
}

/* ================= 二维码 ================= */
.qrrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 4px; }
.qrcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; text-align: center; background: var(--card); }
.qrcard img { width: 100%; max-width: 170px; aspect-ratio: 1 / 1; image-rendering: pixelated;
              border-radius: 8px; background: #fff; padding: 4px; }
.qrcard .qn { font-size: 13px; font-weight: 700; color: var(--gold-lite); margin: 10px 0 8px; }
.qrcard .qurl { font-size: 11.5px; color: #8E8778; word-break: break-all; margin-bottom: 8px; line-height: 1.45; }
.qrhint { font-size: 12.5px; color: var(--warn); margin: 10px 0 0; line-height: 1.7; }
@media (max-width: 720px) { .qrrow { grid-template-columns: 1fr; } .qrcard img { max-width: 210px; } }

/* 档案卡片上的快速删除 */
.evcard .n { align-items: center; }
.delmini { margin-left: auto; color: #6E6A5F; font-size: 11.5px; cursor: pointer;
           padding: 1px 6px; border-radius: 5px; letter-spacing: 1px; transition: .15s; }
.delmini:hover { color: var(--danger); background: var(--danger-soft); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0F0F12; }
::-webkit-scrollbar-thumb { background: #2E2E36; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }
