/* ============================================================
   特典券数量统计系统 —— 全局样式
   ========================================================== */

:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #fbfbfe;
  --border: #e9e9f2;
  --border-strong: #dcdcea;
  --text: #17172b;
  --text-2: #4a4a63;
  --muted: #82829c;

  --primary: #6d5efc;
  --primary-dark: #5748e0;
  --primary-soft: #f0edff;
  --accent: #ff5c8a;
  --accent-soft: #ffeef3;

  --success: #16a34a;
  --success-soft: #eafaf0;
  --warn: #d97706;
  --warn-soft: #fff7e8;
  --danger: #e11d48;
  --danger-soft: #fff0f3;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(23, 23, 43, 0.04);
  --shadow: 0 4px 20px -6px rgba(23, 23, 43, 0.1);
  --shadow-lg: 0 24px 60px -20px rgba(23, 23, 43, 0.22);

  --sidebar-w: 236px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: #d5d5e4;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #bfbfd4;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================================================
   登录页
   ========================================================== */

.auth-wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(150deg, #6d5efc 0%, #8b5cf6 42%, #ff5c8a 100%);
}

.auth-brand::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  right: -170px;
  top: -140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.4px;
}

.brand-mark .logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.auth-brand h1 {
  font-size: 38px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.auth-brand p.lead {
  font-size: 15px;
  opacity: 0.92;
  max-width: 380px;
  line-height: 1.75;
}

.brand-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 34px;
}

.brand-points .point {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13.5px;
  opacity: 0.95;
}

.brand-points .point svg {
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.9;
}

.auth-foot {
  font-size: 12.5px;
  opacity: 0.72;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-card h2 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.auth-card .sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
  margin-bottom: 26px;
}

.tabs {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 24px;
}

.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
}

.tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ---------- 表单 ---------- */

.field {
  margin-bottom: 15px;
}

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field .hint {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}

.input,
.select,
textarea.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

textarea.input {
  resize: vertical;
  min-height: 84px;
  line-height: 1.65;
}

.input:focus,
.select:focus,
textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.13);
}

.input::placeholder {
  color: #b3b3c6;
}

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2382829c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-picker .role {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.16s;
  background: var(--surface);
}

.role-picker .role:hover {
  border-color: #c9c4ff;
}

.role-picker .role.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.role-picker .role .t {
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-picker .role .d {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s;
  white-space: nowrap;
  background: var(--surface);
  color: var(--text);
}

.btn:active {
  transform: translateY(0.5px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #6d5efc, #8b5cf6);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(109, 94, 252, 0.6);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text-2);
  background: var(--surface);
}
.btn-ghost:hover {
  background: var(--bg);
  border-color: #cfcfe2;
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.btn-soft:hover {
  background: #e7e3ff;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover {
  background: #ffe2e8;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 12px 18px;
  font-size: 14.5px;
}

.demo-tip {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.85;
}

.demo-tip b {
  color: var(--text-2);
  font-weight: 600;
}

.demo-tip code {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* ============================================================
   应用主框架
   ========================================================== */

/* ---------- 手机端顶部栏（桌面隐藏） ---------- */

.mobile-bar {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-logo .logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6d5efc, #ff5c8a);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.side-logo .info {
  min-width: 0;
}

.side-logo .name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-logo .role {
  font-size: 11.5px;
  color: var(--muted);
}

.nav {
  padding: 14px 11px;
  flex: 1;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #a5a5bd;
  padding: 12px 9px 7px;
  text-transform: uppercase;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.14s;
}

.nav a svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.nav a:hover {
  background: var(--bg);
  color: var(--text);
}

.nav a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}

.nav a.active svg {
  opacity: 1;
}

.side-foot {
  padding: 13px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.side-foot .who {
  flex: 1;
  min-width: 0;
}

.side-foot .who .n {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-foot .who .u {
  font-size: 11.5px;
  color: var(--muted);
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg);
  color: var(--danger);
  border-color: #f6d5dd;
}

/* ---------- 主区域 ---------- */

.main {
  min-width: 0;
  padding: 26px 32px 60px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.35px;
}

.page-head .desc {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.head-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 20px 22px;
}

.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-head h3 {
  font-size: 14.5px;
  font-weight: 700;
}

.card-head .sub {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 1px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

/* ---------- 统计小卡 ---------- */

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 19px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat .k {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}

.stat .v {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}

.stat .m {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.stat .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- 图表 ---------- */

.chart-slot {
  width: 100%;
}

.chart-slot svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 分段控件（图表指标切换） */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: none;
}

.seg button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.seg button.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* 环比徽标 */
.delta {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.delta.none,
.delta.flat {
  color: var(--muted);
  font-weight: 600;
}

.delta.bad {
  opacity: 0.75;
}

/* 迷你条形 */
.mini-bar {
  display: block;
  height: 5px;
  min-width: 46px;
  border-radius: 3px;
  background: #f0f0f7;
  overflow: hidden;
  margin-top: 6px;
}

.mini-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* 环形图 + 图例 */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
}

.donut-box {
  flex: none;
  display: grid;
  place-items: center;
}

.legend {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lg-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-width: 0;
}

.lg-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.lg-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}

.lg-val {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lg-val i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.legend-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 9px 20px;
}

.legend-inline .lg-item {
  font-size: 12.5px;
}

.legend-inline .lg-name {
  flex: none;
}

/* 成员排行 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.rank-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.rank-no {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}

.rank-main {
  flex: 1;
  min-width: 0;
}

.rank-name {
  font-size: 13.5px;
  font-weight: 600;
}

.rank-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

/* 无数据月份 */
table.tb tr.row-empty td {
  color: var(--muted);
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
}

table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.tb th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}

table.tb td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.tb tbody tr:last-child td {
  border-bottom: 0;
}

table.tb tbody tr:hover {
  background: #fcfcfe;
}

table.tb td.num,
table.tb th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.tb tr.total-row td {
  background: var(--surface-2);
  font-weight: 700;
}

/* ---------- 徽标 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}

.badge-purple {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.badge-pink {
  background: var(--accent-soft);
  color: #d63370;
}
.badge-green {
  background: var(--success-soft);
  color: var(--success);
}
.badge-gray {
  background: #f0f0f6;
  color: var(--muted);
}
.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ---------- 演出卡片 ---------- */

.event-list {
  display: grid;
  gap: 14px;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.17s;
  flex-wrap: wrap;
}

.event-card:hover {
  box-shadow: var(--shadow);
  border-color: #ddd9ff;
}

.event-date {
  width: 62px;
  flex-shrink: 0;
  text-align: center;
  border-radius: 11px;
  background: linear-gradient(150deg, #f2efff, #fdf0f5);
  border: 1px solid #ebe6ff;
  padding: 8px 0;
}

.event-date .d {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}

.event-date .m {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.event-main {
  flex: 1;
  min-width: 190px;
}

.event-main .t {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.event-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.event-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ticket-count {
  text-align: right;
  min-width: 76px;
}

.ticket-count .n {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ticket-count .l {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 券种录入行 ---------- */

.entry-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.entry-row:last-child {
  border-bottom: 0;
}

.entry-row .info {
  flex: 1;
  min-width: 170px;
}

.entry-row .info .n {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.entry-row .info .note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

.qty button {
  width: 34px;
  height: 38px;
  border: 0;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1;
  transition: background 0.14s;
}

.qty button:hover {
  background: var(--bg);
  color: var(--primary);
}

.qty input {
  width: 56px;
  height: 38px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  outline: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}

.qty input:focus {
  background: var(--primary-soft);
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.entry-sum {
  font-size: 13.5px;
  color: var(--muted);
}

.entry-sum b {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 空状态 ---------- */

.empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--muted);
}

.empty .ico {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--bg);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: #b6b6cc;
}

.empty .t {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
}

.empty .d {
  font-size: 12.5px;
  margin-top: 4px;
}

/* ---------- 团队信息 ---------- */

/* ---------- 上传的 LOGO ---------- */

.side-logo .logo.has-img,
.mb-logo.has-img,
.brand-mark .logo.has-img {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.side-logo .logo img,
.mb-logo img,
.brand-mark .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 上传控件 */
.logo-up {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}

.logo-up.drag {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.logo-preview {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #6d5efc, #ff5c8a);
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 32px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- 团队页 hero ---------- */

.hero-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-logo {
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 30px;
  font-weight: 700;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-text {
  min-width: 0;
}

.hero {
  border-radius: var(--radius);
  padding: 26px 28px;
  background: linear-gradient(135deg, #6d5efc 0%, #8b5cf6 55%, #ff5c8a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  right: -90px;
  top: -130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero .name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.hero .slogan {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.94;
  max-width: 620px;
  line-height: 1.7;
}

.hero .tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hero .tags span {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}

.prose {
  font-size: 13.8px;
  color: var(--text-2);
  line-height: 1.9;
  white-space: pre-wrap;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.member-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.member-chip .av {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e9e5ff, #ffe6ee);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.member-chip .nm {
  font-weight: 600;
  font-size: 13.5px;
}

.member-chip .rl {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 43, 0.4);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
  animation: fade 0.16s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  background: var(--surface);
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  overflow-y: auto;
  animation: pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.modal-head {
  padding: 20px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-head .sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-foot {
  padding: 0 24px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

/* ---------- Toast ---------- */

.toast-wrap {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 11px;
  padding: 11px 16px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 210px;
  animation: slideIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.toast.ok {
  border-left-color: var(--success);
}
.toast.err {
  border-left-color: var(--danger);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* ---------- 工具类 ---------- */

.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mb-2 {
  margin-bottom: 16px;
}
.grow {
  flex: 1;
}
.center {
  text-align: center;
}
.hidden {
  display: none !important;
}
.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 48px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 响应式 ---------- */

/* ============================================================
   平板 / 手机 —— 移动优先，手机是主要使用场景
   ========================================================== */

:root {
  --tabbar-h: 66px;
}

@media (max-width: 900px) {
  /* ---------- 顶部栏 ---------- */
  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 11px;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 11px 14px;
    padding-top: calc(11px + env(safe-area-inset-top));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .mb-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6d5efc, #ff5c8a);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
  }

  .mb-info {
    flex: 1;
    min-width: 0;
  }

  .mb-name {
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mb-sub {
    font-size: 11.5px;
    color: var(--muted);
  }

  .mobile-bar .icon-btn {
    width: 36px;
    height: 36px;
  }

  /* ---------- 侧边栏 → 底部标签栏 ---------- */
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -6px 24px -16px rgba(23, 23, 43, 0.35);
    z-index: 60;
    overflow: visible;
  }

  .side-head,
  .side-foot {
    display: none;
  }

  .nav {
    display: flex;
    flex: 1;
    overflow-x: auto;
    gap: 2px;
    padding: 7px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-label {
    display: none;
  }

  .nav a {
    flex: 1 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 66px;
    padding: 6px 8px;
    margin: 0;
    font-size: 10.5px;
    border-radius: 10px;
    white-space: nowrap;
  }

  .nav a svg {
    width: 19px;
    height: 19px;
  }

  .main {
    padding: 16px 14px calc(var(--tabbar-h) + 64px);
  }

  /* ---------- 页头 ---------- */
  .page-head {
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
  }

  .page-head h1 {
    font-size: 19px;
    letter-spacing: -0.3px;
  }

  .page-head .desc {
    font-size: 12.5px;
    line-height: 1.6;
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .btn {
    flex: 1;
  }

  /* ---------- 演出卡片：信息在上，操作在下 ---------- */
  .event-list {
    gap: 11px;
  }

  .event-card {
    padding: 14px;
    gap: 12px;
    align-items: flex-start;
    border-radius: 15px;
  }

  .event-date {
    width: 54px;
    padding: 7px 0;
    border-radius: 10px;
  }

  .event-date .d {
    font-size: 19px;
  }

  .event-date .m {
    font-size: 10.5px;
  }

  .event-main {
    min-width: 0;
  }

  .event-main .t {
    font-size: 14.5px;
    line-height: 1.45;
  }

  .event-meta {
    gap: 10px;
    font-size: 12px;
    margin-top: 5px;
  }

  .event-right {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 1px;
    padding-top: 11px;
    border-top: 1px dashed var(--border);
  }

  .event-right .ticket-count {
    text-align: left;
    min-width: auto;
  }

  .event-right .ticket-count .n {
    font-size: 17px;
  }

  .event-right .btn {
    min-height: 40px;
    padding: 0 16px;
  }

  /* ---------- 特典券录入：大号触控控件 ---------- */
  .entry-row {
    padding: 14px;
    gap: 10px;
  }

  .entry-row .info {
    flex: 1 1 100%;
    min-width: 0;
  }

  .entry-row .info .n {
    font-size: 14px;
  }

  .qty {
    width: 100%;
  }

  .qty button {
    width: 54px;
    height: 46px;
    font-size: 20px;
  }

  .qty input {
    flex: 1;
    width: auto;
    height: 46px;
    font-size: 17px;
  }

  /* 保存栏固定在标签栏上方 */
  .entry-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    z-index: 55;
    margin: 0;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 -6px 24px -18px rgba(23, 23, 43, 0.4);
  }

  .entry-actions .btn {
    min-height: 46px;
  }

  .entry-actions-main {
    flex: 1;
    gap: 8px;
  }

  .entry-actions-main .btn {
    flex: 1;
  }

  .entry-sum {
    font-size: 13px;
  }

  /* ---------- 团队信息 ---------- */
  .hero {
    padding: 20px 18px;
    margin-bottom: 14px;
  }

  .hero .name {
    font-size: 23px;
  }

  .hero .slogan {
    font-size: 13px;
  }

  .hero .tags {
    margin-top: 13px;
    gap: 6px;
  }

  .hero .tags span {
    font-size: 11.5px;
    padding: 3px 10px;
  }

  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 10px;
  }

  /* ---------- 卡片与栅格 ---------- */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }

  .card-pad {
    padding: 16px;
  }

  .card-head {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .stat {
    padding: 14px 15px;
  }

  .stat .v {
    font-size: 23px;
  }

  /* ---------- 图表 ---------- */
  .donut-wrap {
    flex-direction: column;
    gap: 16px;
  }

  .donut-box {
    width: 100%;
  }

  .legend {
    width: 100%;
    gap: 10px;
  }

  .legend-inline {
    gap: 8px 16px;
  }

  .seg button {
    padding: 6px 10px;
    min-height: 32px;
    font-size: 12px;
  }

  .rank-list {
    gap: 16px;
  }

  .mini-bar {
    height: 4px;
    min-width: 38px;
  }

  /* ---------- LOGO ---------- */
  .hero-head {
    gap: 14px;
  }

  .hero-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 24px;
  }

  .logo-up {
    gap: 13px;
    padding: 13px;
  }

  .logo-preview {
    width: 68px;
    height: 68px;
    border-radius: 15px;
    font-size: 26px;
  }

  /* ---------- 表格 ---------- */
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  table.tb {
    font-size: 13px;
  }

  table.tb th {
    padding: 10px 12px;
    font-size: 11.5px;
  }

  table.tb td {
    padding: 11px 12px;
  }

  /* ---------- 表单：16px 防 iOS 聚焦自动放大 ---------- */
  .input,
  .select,
  textarea.input {
    font-size: 16px;
    padding: 12px 13px;
  }

  .field label {
    font-size: 13px;
  }

  .field {
    margin-bottom: 14px;
  }

  .btn {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 38px;
  }

  .tabs {
    max-width: none !important;
    margin-bottom: 18px;
  }

  .tabs button {
    min-height: 42px;
    font-size: 13.5px;
  }

  /* ---------- 弹窗：底部抽屉式 ---------- */
  .modal-mask {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .modal-head {
    padding: 18px 20px 0;
  }

  .modal-body {
    padding: 18px 20px;
  }

  .modal-foot {
    padding: 0 20px 20px;
    gap: 10px;
  }

  .modal-foot .btn {
    flex: 1;
    min-height: 46px;
  }

  /* ---------- Toast 从底部弹出 ---------- */
  .toast-wrap {
    top: auto;
    bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom));
    left: 14px;
    right: 14px;
    align-items: stretch;
  }

  .toast {
    min-width: 0;
  }

  /* ---------- 登录页 ---------- */
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 26px 22px 24px;
    min-height: auto;
  }

  .auth-brand h1 {
    font-size: 21px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .auth-brand p.lead {
    font-size: 13px;
    line-height: 1.65;
  }

  .brand-points,
  .auth-foot {
    display: none;
  }

  .auth-panel {
    padding: 22px 20px 44px;
    align-items: flex-start;
  }

  .auth-card h2 {
    font-size: 21px;
  }

  .auth-card .sub {
    margin-bottom: 20px;
  }

  .demo-tip {
    font-size: 12px;
    line-height: 1.9;
  }

  .role-picker .role {
    padding: 12px;
  }
}

/* ---------- 小屏手机微调 ---------- */
@media (max-width: 380px) {
  .main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav a {
    min-width: 60px;
    font-size: 10px;
  }

  .event-meta {
    gap: 8px;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .qty button {
    width: 48px;
  }
}
