/* ============================================
   用户收益查询 · 独立外链页样式
   ============================================ */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --border: #e6e8ec;

  --text: #1b1f27;
  --text-secondary: #5b6472;
  --text-muted: #8a93a3;

  --primary: #2f6bff;
  --primary-hover: #255cdd;
  --primary-soft: #eef3ff;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* ---------------- 顶部 ---------------- */
.q-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.q-head__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.q-brand__mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #3d78ff, #2f6bff);
  box-shadow: 0 6px 14px rgba(47, 107, 255, .22);
  color: #fff;
}
.q-brand__mark svg { width: 21px; height: 21px; }
.q-head__title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .2px;
}
.q-head__desc {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------------- 主体 ---------------- */
.q-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px 36px;
}

/* 查询条 */
.q-search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.q-search__field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; max-width: 420px; }
/* 全页斜向平铺水印 */
.app-watermark {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='170'%3E%3Ctext x='130' y='85' fill='%2364748b' fill-opacity='0.09' font-size='22' font-family='-apple-system,Segoe UI,PingFang SC,MicroSoft YaHei,sans-serif' text-anchor='middle' dominant-baseline='middle' transform='rotate(-28 130 85)'%3E恒景云科%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

.q-search__field--vid { flex: 1 1 300px; max-width: 400px; position: relative; }
.q-search__field--vid select { cursor: pointer; }

/* 视频号候选下拉（宽度与输入框对齐） */
.vid-suggest {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  z-index: 60;
  padding: 4px;
}
.vid-suggest__head {
  padding: 4px 8px 5px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  color: #64748b;
  font-size: 11.5px;
}
.vid-suggest__item {
  display: block;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.35;
}
.vid-suggest__item:hover,
.vid-suggest__item.is-active { background: rgba(47, 107, 255, .08); }
.vid-suggest__nick {
  display: block;
  color: #0f172a;
  font-size: 12.5px;
  word-break: break-all; /* 全名称优先完整显示，过长自动换行 */
}
.vid-suggest__vid {
  display: block;
  margin-top: 1px;
  color: #64748b;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vid-suggest__empty {
  padding: 8px;
  font-size: 12.5px;
  color: #64748b;
}
.q-search__field--theater { flex: 1 1 200px; max-width: 280px; }
.q-search__field--theater select { cursor: pointer; }
.q-search__field--date { flex: 1 1 260px; max-width: 340px; }
.q-search__range { display: flex; align-items: center; gap: 6px; }
.q-search__input--date { width: 100%; padding-left: 8px; padding-right: 6px; cursor: pointer; }
.q-search__input--date[readonly] { cursor: pointer; }

/* 自定义日历 */
.q-datepicker {
  position: fixed;
  z-index: 60;
  width: 288px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
  user-select: none;
}
.q-datepicker__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.q-datepicker__title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.q-datepicker__navs { display: flex; gap: 6px; }
.q-datepicker__nav {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background .15s, color .15s, border-color .15s;
}
.q-datepicker__nav:hover { background: #eef3ff; border-color: var(--primary); color: var(--primary); }
.q-datepicker__week, .q-datepicker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.q-datepicker__week { margin-bottom: 4px; }
.q-datepicker__week span { text-align: center; font-size: 11.5px; color: var(--text-muted); padding: 2px 0; }
.q-datepicker__day {
  height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.q-datepicker__day:hover { background: #eef3ff; color: var(--primary); }
.q-datepicker__day--weekend { color: #e0654f; }
.q-datepicker__day:hover.q-datepicker__day--weekend { color: var(--primary); }
.q-datepicker__day.is-outside { color: #c3cad6; cursor: default; }
.q-datepicker__day.is-outside:hover { background: transparent; color: #c3cad6; }
.q-datepicker__day.is-today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.q-datepicker__foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.q-datepicker__clear {
  border: none; background: transparent; padding: 4px 8px;
  font: inherit; font-size: 12.5px; color: var(--text-muted);
  cursor: pointer; border-radius: 6px;
}
.q-datepicker__clear:hover { color: var(--primary); background: #eef3ff; }
.q-search__dash { color: var(--text-muted); font-size: 13px; }
.q-search__label { font-size: 12.5px; color: var(--text-secondary); font-weight: 550; }
.q-search__input {
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.q-search__input::placeholder { color: var(--text-muted); }
.q-search__input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

/* 按钮 */
.q-btn {
  height: 38px;
  padding: 0 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.q-btn:hover { border-color: #c9cfda; color: var(--text); }
.q-btn--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(47, 107, 255, .2);
}
.q-btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.q-btn--ghost { background: transparent; }
.q-btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.q-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 汇总卡片 */
.q-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.q-summary--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.q-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.q-card__label { font-size: 12px; color: var(--text-muted); }
.q-card__value { font-size: 21px; font-weight: 650; letter-spacing: .2px; }
.q-card__value--money { color: var(--primary); }
.q-card__sub { font-size: 12px; color: var(--text-secondary); }

/* 表格面板 */
.q-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.q-panel__head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}
.q-panel__title { font-size: 13px; color: var(--text-secondary); }

.q-table-wrap { overflow-x: auto; }
.q-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  font-size: 13px;
}
.q-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.q-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f3f6;
  color: var(--text-secondary);
  white-space: nowrap;
}
.q-table tbody tr:last-child td { border-bottom: 0; }
.q-table tbody tr:hover td { background: #fbfcfe; }
.q-table th.num, .q-table td.num { text-align: right; }
.q-table td.income-amount { color: var(--primary); font-weight: 600; }

.q-cell-drama { color: var(--text); font-weight: 500; }
.q-more { margin-left: 4px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.q-cell-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  background: #f3f5f8;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.q-cell-id:hover { color: var(--primary, #2f6bff); background: #e8eefb; }
.q-cell-id--copied { color: #fff; background: var(--primary, #2f6bff); }

.q-copy-tip {
  position: fixed;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(30, 34, 45, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  max-width: 80vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-copy-tip.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.q-cell-more { margin-left: 6px; font-size: 11.5px; color: var(--text-muted); }
.q-cell-theater {
  display: inline-block;
  padding: 1px 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f3f5f8;
  border-radius: 20px;
}

/* 空状态 */
.q-empty { padding: 72px 24px; text-align: center; }
.q-empty__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}
.q-empty__icon svg { width: 26px; height: 26px; }
.q-empty__title { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.q-empty__text { margin: 0; font-size: 13px; color: var(--text-muted); }

/* 分页 */
.q-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.q-pager__info { font-size: 12.5px; color: var(--text-muted); }
.q-pager__size { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.q-pager__size-sel {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.q-pager__size-sel:focus { border-color: var(--primary); }

/* 页脚 */
.q-foot {
  padding: 0 24px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .q-head__inner { padding: 14px 16px; }
  .q-main { padding: 16px 14px 28px; }
  .q-summary { grid-template-columns: 1fr; }
  .q-search { padding: 14px; }
  .q-search__field { max-width: none; flex: 1 1 100%; }
  .q-btn { flex: 1 1 auto; }
}

/* ---------------- 团队登录查看收益 ---------------- */

.q-team-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
}
.q-team-entry svg { width: 16px; height: 16px; flex: 0 0 auto; }

.q-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.q-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}
.q-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .18);
  overflow: hidden;
}
.q-modal__dialog--wide { max-width: 1080px; }

.q-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}
.q-modal__title { margin: 0; font-size: 16px; font-weight: 600; }
.q-modal__close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.q-modal__close:hover { background: var(--surface-soft); color: var(--text); }
.q-modal__head-actions { display: flex; align-items: center; gap: 12px; }
.q-link-btn {
  border: none;
  background: transparent;
  padding: 4px 6px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}
.q-link-btn:hover { text-decoration: underline; }

.q-modal__body { padding: 18px 22px 6px; overflow-y: auto; }
.q-modal__body--flush { padding: 16px 22px 20px; }
.q-modal__desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.q-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
}

.q-field { margin-bottom: 14px; }
.q-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.q-req { color: #e5484d; font-style: normal; }
.q-field__input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.q-field__input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.q-field__error {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  color: #e5484d;
}
.q-field__error.is-visible { display: block; }
.q-field__input.is-invalid { border-color: #e5484d; }

.q-team-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.q-team-table {
  max-height: calc(100vh - 380px);
  overflow-y: auto;
  padding: 0;
}
.q-team-table .q-table { min-width: 860px; }

.q-loading {
  padding: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .q-team-entry { margin-left: 0; flex: 1 1 auto; }
  .q-team-summary { grid-template-columns: 1fr; }
  .q-modal { padding: 12px 8px; }
  .q-modal__dialog--wide { max-width: 100%; }
}

/* ---------------- 团队收益查询页（team.html） ---------------- */

.q-team-exit { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; }
.q-team-exit svg { width: 15px; height: 15px; flex: 0 0 auto; }
.q-team-back { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none; }
.q-team-back svg { width: 15px; height: 15px; flex: 0 0 auto; }
.q-team-cred { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.q-team-cred svg { width: 15px; height: 15px; flex: 0 0 auto; }
.q-team-back + .q-team-cred, .q-team-cred + .q-team-exit { margin-left: 10px; }

.t-filter-count {
  margin-left: auto;
  align-self: flex-end;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.t-filter-count strong { color: var(--text); font-weight: 600; }
#tFilterVidError { margin-top: 6px; }

.t-login {
  max-width: 400px;
  margin: 40px auto 0;
  padding: 32px 32px 28px;
}
.t-login__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.t-login__sub {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.t-login__submit {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  font-size: 14px;
}

.q-income { color: var(--primary); font-weight: 600; }

/* 团队收益查询：导出数据按钮 */
.t-export-btn { margin-left: 12px; display: inline-flex; align-items: center; gap: 6px; }
.t-export-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
