/* ============================================================
   趣打卡 FunDaka — 运营端页面样式（核销台 / 数据大屏 / 分享页）
   依赖 style.css 的设计变量
   ============================================================ */

/* ---------- 通用顶栏 ---------- */
.ops-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(25, 22, 39, 0.96); color: #fff;
  backdrop-filter: blur(10px);
}
.ops-header .inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ops-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; }
.ops-brand svg { width: 30px; height: 30px; }
.ops-brand small { display: block; font-size: 8.5px; letter-spacing: 0.26em; color: #FFB28F; font-weight: 700; }
.ops-brand .ops-tag {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.75); letter-spacing: 0;
}
.ops-header .spacer { flex: 1; }
.ops-header select, .ops-header input {
  background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-family: inherit;
}
.ops-header select option { color: #221D2E; }
.ops-header a.ops-link {
  font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, 0.7);
  padding: 7px 12px; border-radius: 9px;
}
.ops-header a.ops-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.ops-main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; }
.ops-main.narrow { max-width: 560px; }

/* ---------- 统计条 ---------- */
.ops-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.ops-stat {
  background: #fff; border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--ring); text-align: center;
}
.ops-stat .n { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.ops-stat .n.green { color: #1E9E63; }
.ops-stat .n.orange { color: var(--primary); }
.ops-stat .l { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------- 核销操作区 ---------- */
.verify-card {
  background: #fff; border-radius: 20px; padding: 24px 22px;
  box-shadow: var(--shadow-md); margin-bottom: 20px;
}
.verify-card h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.verify-card .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.code-input-row { display: flex; gap: 10px; }
.code-input {
  flex: 1; border: 2px solid var(--line); border-radius: 14px; padding: 15px 16px;
  font-size: 17px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  outline: none; font-family: ui-monospace, Menlo, monospace;
}
.code-input:focus { border-color: var(--primary); }

/* ---------- 核销口令 / 工作人员 ---------- */
.staff-row { display: flex; gap: 10px; margin-bottom: 10px; }
.staff-input {
  border: 2px solid var(--line); border-radius: 12px; padding: 11px 14px;
  font-size: 14px; font-weight: 700; outline: none; background: #fff; color: var(--ink);
  min-width: 0;
}
.staff-input#pinInput { flex: 0 0 46%; letter-spacing: 0.18em; font-family: ui-monospace, Menlo, monospace; }
.staff-input#staffInput { flex: 1; }
.staff-input:focus { border-color: var(--primary); }

@media (max-width: 560px) {
  .staff-row { flex-direction: column; gap: 8px; }
  .staff-input#pinInput { flex: none; width: 100%; }
}
.btn-scan {
  border-radius: 14px; padding: 0 18px; background: var(--dark); color: #fff;
  font-size: 13.5px; font-weight: 800; white-space: nowrap;
}
.btn-verify {
  width: 100%; margin-top: 12px; border-radius: 14px; padding: 16px;
  background: var(--primary-grad); color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(255, 90, 31, 0.32);
}
.btn-verify:active { transform: scale(0.99); }

/* 核销结果 */
.verify-result {
  margin-top: 16px; border-radius: 16px; padding: 18px 20px; display: none;
  font-size: 14px; line-height: 1.7;
}
.verify-result.show { display: block; animation: popIn 0.28s ease; }
@keyframes popIn { from { transform: translateY(8px); opacity: 0; } }
.verify-result.ok { background: #E9F8F0; border-left: 5px solid #2FB77C; color: #146A41; }
.verify-result.dup { background: #FDEBEF; border-left: 5px solid #E0335F; color: #A3123B; }
.verify-result.miss { background: #FFF6E0; border-left: 5px solid #FFB547; color: #8A5A00; }
.verify-result .r-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.verify-result .r-code { font-family: ui-monospace, Menlo, monospace; font-weight: 800; letter-spacing: 0.1em; }

/* ---------- 记录列表 ---------- */
.list-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.list-tabs button {
  padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line);
}
.list-tabs button.active { background: var(--primary-grad); color: #fff; box-shadow: none; }
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-item {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--ring); display: flex; align-items: center; gap: 12px;
}
.rec-item .rec-code {
  font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 14.5px;
  letter-spacing: 0.06em;
}
.rec-item .rec-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.rec-item .rec-body { flex: 1; min-width: 0; }
.rec-item .st {
  font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 99px; white-space: nowrap;
}
.rec-item .st.pending { background: var(--primary-soft); color: var(--primary); }
.rec-item .st.used { background: #E9F8F0; color: #146A41; }
.rec-item .rec-undo {
  font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 8px;
}
.rec-item .rec-undo:hover { background: var(--paper-2); color: var(--primary); }
.rec-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.rec-empty .e { font-size: 40px; margin-bottom: 10px; }

/* ---------- 数据大屏 ---------- */
.screen-body { background: #0E0C18; min-height: 100vh; color: #fff; }
.screen-wrap { padding: 22px 28px 40px; max-width: 1680px; margin: 0 auto; }
.screen-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.screen-title h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.screen-title .live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #2FB77C;
  box-shadow: 0 0 0 0 rgba(47, 183, 124, 0.6); animation: livePulse 1.6s infinite;
}
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,183,124,.6); } 60% { box-shadow: 0 0 0 10px rgba(47,183,124,0); } }
.screen-title .live-txt { font-size: 12.5px; font-weight: 700; color: #7FE0A8; }
.screen-title .clock { margin-left: auto; font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi {
  background: linear-gradient(150deg, #1D1930, #14111F); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px; padding: 22px 24px; position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,90,31,0.22), transparent 70%);
}
.kpi .k-label { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 600; }
.kpi .k-value {
  font-size: 44px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi .k-value small { font-size: 16px; color: rgba(255,255,255,0.45); font-weight: 700; margin-left: 4px; }
.kpi .k-delta { font-size: 12.5px; font-weight: 700; color: #7FE0A8; margin-top: 6px; }
.kpi.orange .k-value { color: #FF8A50; }
.kpi.green .k-value { color: #57D9A3; }
.kpi.purple .k-value { color: #B79BFF; }

.screen-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.panel {
  background: linear-gradient(150deg, #1A1729, #131020); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px; padding: 20px 22px;
}
.panel h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.panel .p-sub { font-size: 11.5px; color: rgba(255,255,255,0.4); margin-bottom: 16px; }

.trend { display: flex; align-items: flex-end; gap: 10px; height: 220px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.trend .bar {
  width: 100%; max-width: 46px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #FF8A50, #FF5A1F);
  transition: height 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.trend .col:nth-child(even) .bar { background: linear-gradient(180deg, #C9A6FF, #9B6CF0); }
.trend .lbl { font-size: 10.5px; color: rgba(255,255,255,0.35); font-weight: 700; }

.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-row2 { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.rank-row2 .no {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
}
.rank-row2 .no.top { background: var(--primary-grad); color: #fff; }
.rank-row2 .nm { width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-row2 .bar-bg { flex: 1; height: 9px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.rank-row2 .bar-bg span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FF8A50, #FF5A1F); transition: width 0.8s ease; }
.rank-row2 .val { width: 72px; text-align: right; color: rgba(255,255,255,0.55); font-size: 13px; font-variant-numeric: tabular-nums; }

.feed { display: flex; flex-direction: column; gap: 9px; max-height: 250px; overflow: hidden; }
.feed-item {
  display: flex; align-items: center; gap: 10px; font-size: 13px;
  background: rgba(255,255,255,0.04); border-radius: 11px; padding: 10px 13px;
  animation: feedIn 0.4s ease;
}
@keyframes feedIn { from { transform: translateX(-10px); opacity: 0; } }
.feed-item .em { font-size: 17px; }
.feed-item .who { color: rgba(255,255,255,0.85); font-weight: 600; }
.feed-item .spot { color: #FFB28F; font-weight: 700; }
.feed-item .tm { margin-left: auto; color: rgba(255,255,255,0.35); font-size: 11.5px; font-variant-numeric: tabular-nums; }

.screen-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: rgba(255,255,255,0.28); flex-wrap: wrap; gap: 8px; }
.demo-tag {
  font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 181, 71, 0.14); color: #FFB547;
}

/* ---------- 分享页 ---------- */
.share-body { background: #12101C; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.share-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 28px;
  overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.share-cover {
  padding: 34px 24px 30px; color: #fff; text-align: center; position: relative; overflow: hidden;
}
.share-cover .cv-emoji { font-size: 62px; }
.share-cover h1 { font-size: 23px; font-weight: 800; margin-top: 8px; line-height: 1.35; }
.share-cover .cv-sub { font-size: 12.5px; opacity: 0.9; margin-top: 8px; }
.share-cover .cv-badges { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.share-cover .cv-badges span {
  font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 99px;
  background: rgba(255,255,255,0.22);
}
.share-info { padding: 20px 22px 8px; }
.share-row { display: flex; gap: 10px; font-size: 13.5px; padding: 7px 0; }
.share-row .k { color: var(--muted); width: 62px; flex-shrink: 0; font-weight: 600; }
.share-row .v { font-weight: 700; color: var(--ink); }
.share-qr { display: flex; flex-direction: column; align-items: center; padding: 18px 22px 6px; }
.share-qr .qr-box2 {
  background: #fff; border-radius: 16px; padding: 10px; box-shadow: inset 0 0 0 2px var(--line);
}
.share-qr svg { width: 170px; height: 170px; display: block; }
.share-qr .qr-tip { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; line-height: 1.7; }
.share-actions { padding: 16px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 15px; font-size: 15px; font-weight: 800;
  background: var(--primary-grad); color: #fff; box-shadow: 0 10px 26px rgba(255,90,31,0.32);
}
.share-btn.ghost { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.share-org { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 20px; line-height: 1.8; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .screen-grid { grid-template-columns: 1fr; }
  .kpi .k-value { font-size: 34px; }
}
@media (max-width: 640px) {
  .ops-stats { grid-template-columns: 1fr; }
  .screen-wrap { padding: 16px 14px 30px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .rank-row2 .nm { width: 90px; }
  .ops-header .inner { padding: 12px 14px; }
}
