/* ============================================================
   78media local 平台 - 全站样式（黑金白品牌配色，本地资源）
   ============================================================ */
:root {
  --primary: #16181d;
  --primary-dark: #0a0c10;
  --primary-light: #2a2e37;
  --accent: #c79948;
  --accent-dark: #a97f34;
  --accent-light: #f8f0df;
  --gold: #c79948;
  --ink: #16181d;
  --ink-2: #5b5f6b;
  --ink-3: #9aa0ab;
  --bg: #faf8f4;
  --card: #ffffff;
  --line: #e8e4dc;
  --danger: #dc2626;
  --success: #059669;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

a { color: #8a6a24; text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }
ul { list-style: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------------- 官网头部 ---------------- */
.site-header {
  background: var(--primary-dark);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px; }
.brand .logo-img {
  width: 34px; height: 34px; border-radius: 9px;
  background: #fff; object-fit: contain;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: #d8d4cc; padding: 8px 14px; border-radius: 8px; font-size: 15px;
  transition: all .15s;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav a.active { color: #fff; background: rgba(255,255,255,0.14); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.lang-switch a { color: #d8d4cc; text-decoration: none; padding: 3px 8px; border-radius: 6px; font-weight: 600; transition: all .15s; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.on { color: #fff; background: rgba(255,255,255,0.14); }
.m-nav-lang { margin: 6px 16px 0; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.app-header .lang-switch a { color: #d6d2ca; }
.app-header .lang-switch a:hover { color: #fff; }
.app-header .lang-switch a.on { color: #fff; background: rgba(255,255,255,0.12); }
.app-header .header-right { gap: 10px; }

/* 汉堡按钮（仅手机显示） */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; padding: 10px 6px; margin-left: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: #fff; transition: all .2s;
}
/* 移动端下拉菜单 */
.m-nav { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 9px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #16181d; }
.btn-primary:hover { background: var(--accent-dark); color: #16181d; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.45); color: #fff; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-light); color: #fff; }
.btn-ghost { background: #f0ede6; color: var(--ink); }
.btn-ghost:hover { background: #e4e0d6; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- 官网页脚 ---------------- */
.site-footer { background: var(--primary-dark); color: #b8b4ac; padding: 46px 0 26px; margin-top: 60px; }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: #b8b4ac; display: block; margin-bottom: 8px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 10px; max-width: 300px; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 26px; padding-top: 18px; font-size: 13px; text-align: center; color: #8a857c; }

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff; padding: 92px 0 88px; text-align: center;
}
.hero h1 { font-size: 46px; font-weight: 800; line-height: 1.25; margin-bottom: 18px; letter-spacing: .5px; }
.hero h1 .hl { color: #e8c36a; }
.hero p { font-size: 18px; color: #cfcac2; max-width: 640px; margin: 0 auto 34px; }
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 46px; justify-content: center; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .stat b { font-size: 30px; color: #fff; display: block; }
.hero-stats .stat span { font-size: 14px; color: #b9b4ac; }

/* ---------------- 区块通用 ---------------- */
.section { padding: 68px 0; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 32px; font-weight: 800; color: var(--primary-dark); margin-bottom: 10px; }
.section-title p { color: var(--ink-2); max-width: 560px; margin: 0 auto; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 16px;
  background: var(--accent-light); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
}
.card h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 14.5px; }

/* ---------------- 套餐 ---------------- */
.package-card { position: relative; overflow: hidden; }
.package-card.featured { border-color: var(--accent); }
.package-card .tag {
  position: absolute; top: 14px; right: -34px; transform: rotate(45deg);
  background: var(--gold); color: #16181d; font-size: 12px; font-weight: 700;
  padding: 4px 40px; letter-spacing: .5px;
}
.package-card .price { font-size: 34px; font-weight: 800; color: var(--primary); margin: 10px 0 2px; }
.package-card .price small { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.package-card .desc { color: var(--ink-2); font-size: 14px; margin-bottom: 16px; min-height: 44px; }
.package-card ul { margin: 14px 0 20px; }
.package-card ul li { padding: 6px 0 6px 24px; position: relative; font-size: 14px; color: var(--ink); }
.package-card ul li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  color: var(--accent-dark); font-weight: 700;
}

/* ---------------- 套餐：平台分组（官网首页/服务页） ---------------- */
.platform-cards { grid-template-columns: repeat(3, 1fr); }
.platform-card { padding: 22px 22px 8px; }
.platform-card .platform-name {
  font-size: 17px; font-weight: 800; color: var(--primary-dark);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--accent-light);
}
.platform-card .tier { border-top: 1px dashed var(--line); padding: 14px 0 18px; }
.platform-card .tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.platform-card .tier-head b { font-size: 15px; color: var(--primary-dark); }
.platform-card .tier-price { font-size: 22px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.platform-card .tier-price small { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.platform-card .tier ul { margin: 8px 0 12px; }
.platform-card .tier ul li { padding: 4px 0 4px 20px; position: relative; font-size: 13.5px; color: var(--ink-2); }
.platform-card .tier ul li::before {
  content: "✓"; position: absolute; left: 0; top: 4px;
  color: var(--accent-dark); font-weight: 700;
}
.platform-card .tier-featured { background: var(--accent-light); border-radius: 10px; padding: 14px 14px 18px; }
.platform-card .btn-block { margin-top: 2px; }

/* ---------------- 套餐：平台分组（会员端） ---------------- */
.platform-group { margin-bottom: 34px; }
.platform-group-name {
  font-size: 20px; font-weight: 800; color: var(--primary-dark);
  margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--accent);
}

/* ---------------- 页面头部（内页） ---------------- */
.page-head { background: var(--primary); color: #fff; padding: 52px 0 46px; text-align: center; }
.page-head h1 { font-size: 32px; margin-bottom: 8px; }
.page-head p { color: #cfcac2; max-width: 620px; margin: 0 auto; }

/* ---------------- 表单 ---------------- */
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 34px; max-width: 440px; margin: 40px auto;
}
.form-card.wide { max-width: 640px; }
.form-card h2 { font-size: 22px; color: var(--primary-dark); margin-bottom: 6px; text-align: center; }
.form-card .sub { text-align: center; color: var(--ink-2); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(199,153,72,0.18);
}
.form-group .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.alert { padding: 12px 16px; border-radius: 9px; font-size: 14px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

/* ---------------- 表格 ---------------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { background: #f3efe7; color: var(--ink-2); text-align: left; font-weight: 600; padding: 12px 14px; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
tr:hover td { background: #fbf9f4; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-in_service { background: #dbeafe; color: #1d4ed8; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-admin { background: #ede9fe; color: #5b21b6; }
.badge-staff { background: #e0f2fe; color: #0369a1; }

/* ---------------- 应用布局（会员/后台） ---------------- */
.app-header {
  background: var(--primary-dark); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; height: 60px; position: sticky; top: 0; z-index: 40;
}
.app-header .brand { font-size: 17px; }
.app-header .user-box { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #d6d2ca; }
.app-header .user-box b { color: #fff; }
.app-header a { color: #d6d2ca; font-size: 14px; }
.app-header a:hover { color: #fff; }

.app-body { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 60px); }
.app-side {
  background: var(--primary); padding: 18px 12px; color: #cfcac2;
}
.app-side a {
  display: flex; align-items: center; gap: 10px; color: #cfcac2;
  padding: 11px 14px; border-radius: 9px; margin-bottom: 4px; font-size: 14.5px;
}
.app-side a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.app-side a.active { background: rgba(199,153,72,0.22); color: #fff; font-weight: 600; }
.app-side .side-sep { font-size: 12px; color: #8a857c; padding: 12px 14px 6px; text-transform: uppercase; letter-spacing: 1px; }
.app-main { padding: 26px 30px 60px; }

.page-title { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }
.page-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 22px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; background: #fff;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--accent); }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.stat-card .label { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.stat-card .value.accent { color: var(--accent-dark); }
.stat-card .value.gold { color: var(--gold); }

/* ---------------- 分页 ---------------- */
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; font-size: 14px; }
.pager button {
  padding: 6px 13px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 14px;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .info { color: var(--ink-2); }

/* ---------------- 详情页 ---------------- */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.detail-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.detail-box h3 { font-size: 16px; color: var(--primary-dark); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.detail-list .item .k { font-size: 12.5px; color: var(--ink-3); }
.detail-list .item .v { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.mt { margin-top: 18px; }

/* ---------------- 模态 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,12,16,0.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 460px;
  padding: 26px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow-y: auto;
}
.modal h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 16px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.deletion-banner { max-width: 960px; margin: 12px auto 0; }
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { white-space: nowrap; }

/* ---------------- 杂项 ---------------- */
.empty { text-align: center; color: var(--ink-3); padding: 44px 0; font-size: 14.5px; }
.muted { color: var(--ink-3); font-size: 13px; }
.amount { font-weight: 700; color: var(--primary); }
.text-right { text-align: right; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .cards, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-cards { grid-template-columns: repeat(2, 1fr); }
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: flex; overflow-x: auto; padding: 10px; gap: 4px; }
  .app-side a { white-space: nowrap; margin-bottom: 0; }
  .app-side .side-sep { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 600px) {
  .cards, .stat-grid, .form-row, .grid-2, .platform-cards, .cards-2 { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-header .header-right > .header-actions { display: none; }
  .header-right { gap: 8px; }
  .lang-switch a { padding: 3px 6px; }
  .nav-toggle { display: flex; }
  .m-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    background: var(--primary-dark); border-top: 1px solid rgba(255,255,255,0.12);
    padding: 6px 22px 18px; box-shadow: 0 12px 24px rgba(0,0,0,0.35);
  }
  .m-nav.open { display: block; }
  .m-nav > a {
    display: block; color: #d8d4cc; padding: 12px 4px; font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .m-nav > a.active { color: #fff; }
  .m-nav-auth { padding-top: 16px; }
  .m-nav-auth .header-actions .btn { flex: 1; }
  .detail-list { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section-title h2 { font-size: 25px; }
  .section-title { margin-bottom: 30px; }
  .hero { padding: 60px 0 56px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15.5px; }
  .hero-stats { gap: 26px; margin-top: 38px; }
  .hero-stats .stat b { font-size: 24px; }
  .site-footer .container { grid-template-columns: 1fr; gap: 26px; }
  .page-head { padding: 38px 0 34px; }
  .page-head h1 { font-size: 26px; }
  .app-header { padding: 0 14px; }
  .app-header .brand { font-size: 15px; gap: 6px; }
  .app-header .brand .logo-img { width: 28px; height: 28px; }
  .app-main { padding: 18px 14px 44px; }
  .toolbar .flex { flex-wrap: wrap; }
  .modal { padding: 20px; }
  .container { padding: 0 16px; }
}

/* 可排序表头 */
.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable:hover { color: #c9a227; }
.sortable::after { content: ' \2195'; opacity: .45; font-size: .85em; }
.sortable.sorted { color: #c9a227; }
.sortable.sorted::after { content: ' \25B2'; opacity: 1; }
.sortable.sorted[data-order="desc"]::after { content: ' \25BC'; opacity: 1; }
/* ============ 分销邀请码 ============ */
.invite-card { background: linear-gradient(135deg, #1b2028, #232a35); border: 1px solid rgba(199,153,72,.35); border-radius: 12px; padding: 16px 20px; margin: 14px 0 22px; }
.invite-label { color: #9aa0ab; font-size: 13px; letter-spacing: .5px; margin-bottom: 8px; }
.invite-code-row { display: flex; align-items: center; gap: 12px; }
.invite-code { font-size: 28px; font-weight: 700; letter-spacing: 6px; color: #c79948; font-family: Consolas, Menlo, monospace; }
.invite-hint { color: #9aa0ab; font-size: 13px; margin-top: 10px; }
.invite-chip { font-family: Consolas, Menlo, monospace; font-weight: 600; letter-spacing: 2px; color: #c79948; background: rgba(199,153,72,.12); border: 1px solid rgba(199,153,72,.3); border-radius: 6px; padding: 2px 8px; }
/* ============ 登录页：显示密码 ============ */
.pwd-toggle { display: flex; align-items: center; gap: 6px; margin: 10px 0 16px; font-size: 13px; color: #5b5f6b; cursor: pointer; user-select: none; }
.pwd-toggle input { width: 16px; height: 16px; accent-color: #c79948; cursor: pointer; }
/* ============ 客户列表：员工筛选 + 订单模态 ============ */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 14px; background: rgba(199,153,72,.08); border: 1px solid rgba(199,153,72,.3); border-radius: 10px; }
.filter-label { font-size: 14px; color: var(--primary-dark); font-weight: 600; }
.modal-lg { max-width: 760px; width: 94%; }

/* ============ 订单管理：按客户折叠分组 ============ */
.order-group { border: 1px solid rgba(10,12,16,.1); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.order-group-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; background: #faf8f2; flex-wrap: wrap; }
.order-group-head:hover { background: #f4efe2; }
.order-group-head .caret { color: var(--accent); font-size: 15px; width: 16px; flex: none; }
.order-group-head .og-company { font-size: 15px; font-weight: 700; color: var(--primary-dark); }
.order-group-head .og-meta { font-size: 13px; margin-left: auto; text-align: right; }
.order-group-body .table-wrap { border: none; box-shadow: none; margin: 0; border-radius: 0; }
.order-group-body table { margin: 0; }
.order-group-body thead th { background: #f5f1e6; }

.cust-row { cursor: pointer; }
.cust-row:hover { background: rgba(212,175,55,.06); }
