* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, Roboto, sans-serif; background: #f5f6fa; color: #222; }

.admin { display: flex; min-height: 100vh; }
.side { width: 230px; background: #fff; flex-shrink: 0; border-right: 1px solid #f0e2e7; }
.side .logo { padding: 20px 18px; font-size: 16px; font-weight: 700; color: #ff2e63; border-bottom: 1px solid #f5eef1; }
.nav-groups { display: flex; flex-direction: column; gap: 10px; padding: 12px 10px; }
.nav-home { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px; background: #fff5f8; color: #333; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav-home:hover { color: #ff2e63; }
.nav-home.active { background: #ff2e63; color: #fff; box-shadow: 0 2px 8px rgba(255,46,99,.28); }
.nav-home .ic { font-size: 16px; }
.nav-group { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); overflow: hidden; }
.nav-group.is-active { box-shadow: 0 0 0 2px rgba(255,46,99,.14); }
.nav-group__head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-size: 14px; font-weight: 700; color: #333; }
.nav-group.is-active .nav-group__title { color: #ff2e63; }
.nav-group__icon { font-size: 15px; }
.nav-group__title { flex: 1; }
.nav-group__body { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 10px 12px; }
.nav-group__body a { padding: 6px 12px; border-radius: 999px; color: #666; text-decoration: none; font-size: 13px; }
.nav-group__body a:hover { background: #fff0f5; color: #ff2e63; }
.nav-group__body a.active { background: #ff2e63; color: #fff; font-weight: 600; box-shadow: 0 2px 6px rgba(255,46,99,.25); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #f0e2e7; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.topbar .path { font-weight: 600; color: #333; }
.topbar .user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #666; }
.topbar .logout { color: #ff2e63; text-decoration: none; }
.content { padding: 22px; overflow: auto; }

.page { max-width: 1240px; }
.pg-title { font-size: 20px; margin: 0 0 6px; color: #222; }
.pg-sub { margin: 0 0 16px; color: #999; font-size: 13px; line-height: 1.6; }

/* 工具条 */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.inp { border: 1px solid #e3e6ec; border-radius: 8px; padding: 8px 12px; font-size: 13px; background: #fff; color: #333; min-width: 150px; }
.inp:focus { outline: none; border-color: #ff8fab; }
.inp-sm { min-width: 100px; }
.btn { border: 0; background: #ff2e63; color: #fff; padding: 9px 20px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn:hover { background: #e51e56; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: #ff2e63; border: 1px solid #ffc2d2; }
.btn-ghost:hover { background: #fff5f8; }

/* 表格 */
.grid { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); font-size: 13px; }
.grid th { background: #faf7f8; color: #888; font-weight: 600; text-align: left; padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid #f0e2e7; }
.grid td { padding: 12px 14px; border-bottom: 1px solid #f5f2f3; color: #444; vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tr:hover td { background: #fffafd; }
/* 可点击的表格单元格（如需求详情入口） */
.cell-link { border: 0; background: transparent; color: #444; cursor: pointer; font-size: inherit; padding: 0; text-align: left; }
.cell-link:hover { color: #ff2e63; }
.cell-link b { color: inherit; }
.cell-eye { color: #ff8fab; font-size: 12px; margin-left: 4px; opacity: .7; }
.cell-link:hover .cell-eye { opacity: 1; }
.cell-content { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: #aaa; }
.ops { white-space: nowrap; }
.btn-sm { border: 1px solid #e3e6ec; background: #fff; color: #555; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; margin-right: 6px; }
.btn-sm:hover { border-color: #ff8fab; color: #ff2e63; }
.btn-sm.ok { color: #047857; border-color: #a7f3d0; }
.btn-sm.ok:hover { background: #ecfdf5; }
.btn-sm.danger { color: #b91c1c; border-color: #fecaca; }
.btn-sm.danger:hover { background: #fef2f2; }
.btn-sm:disabled { opacity: .4; cursor: not-allowed; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 16px; font-size: 13px; color: #666; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 440px; max-width: 92vw; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.modal-h { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #ff2e63; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
/* ===== 需求详情弹层（美化版） ===== */
.dd-modal { background: #fff; border-radius: 16px; width: 620px; max-width: 94vw; max-height: 90vh; overflow: hidden auto; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.dd-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; background: linear-gradient(135deg,#ff6b95,#ff2e63); color: #fff; }
.dd-head-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.dd-head-text { flex: 1; min-width: 0; }
.dd-title { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.dd-subtitle { font-size: 12px; opacity: .85; margin-top: 4px; }
.dd-close { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; flex-shrink: 0; }
.dd-close:hover { background: rgba(255,255,255,.34); }

.dd-body { padding: 20px 24px 4px; }
.dd-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 12px; background: linear-gradient(135deg,#fff1f5,#fff7fa); border: 1px solid #ffe0e9; }
.dd-hero-label { font-size: 12px; color: #c25b7a; margin-bottom: 6px; }
.dd-hero-value { font-size: 22px; font-weight: 700; color: #222; }
.dd-hero-value span { font-size: 14px; font-weight: 500; color: #888; }
.dd-hero-price { text-align: right; flex-shrink: 0; padding-left: 18px; border-left: 1px solid #ffd9e3; }
.dd-hero-price b { display: block; font-size: 24px; color: #ff2e63; line-height: 1.1; }
.dd-hero-price small { font-size: 11px; color: #c25b7a; }

.dd-statusbar { display: flex; gap: 10px; margin: 14px 0 4px; }
.dd-status-item { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fafbfc; border: 1px solid #f0f1f3; border-radius: 10px; padding: 10px 8px; }
.dd-status-key { font-size: 12px; color: #999; }
.dd-match { font-size: 13px; color: #2563eb; }

.dd-section { margin-top: 18px; }
.dd-section-h { font-size: 13px; font-weight: 700; color: #333; padding-left: 10px; border-left: 3px solid #ff2e63; margin-bottom: 12px; }
.dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.dd-cell { display: flex; align-items: baseline; font-size: 13px; }
.dd-cell-full { grid-column: 1 / -1; }
.dd-k { width: 76px; flex-shrink: 0; color: #999; }
.dd-v { color: #333; word-break: break-all; }
.dd-req { background: #fafbfc; border: 1px solid #f0f1f3; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #444; line-height: 1.7; white-space: pre-wrap; min-height: 44px; }

.dd-foot { margin-top: 18px; padding: 16px 24px; background: #faf7f8; border-top: 1px solid #f0e2e7; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dd-foot .modal-f { margin-top: 0; }
.detail-ops { flex: 1; }
.detail-ops .dop-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.detail-ops .dop-row:last-child { margin-bottom: 0; }
.detail-ops .dop-label { width: 40px; color: #888; font-size: 13px; flex-shrink: 0; }
.detail-ops .dop-done { font-size: 13px; }
.detail-ops .dop-ok { color: #047857; }
.detail-ops .dop-no { color: #b91c1c; }

@media (max-width: 520px) {
  .dd-grid { grid-template-columns: 1fr; }
  .dd-foot { flex-direction: column; align-items: stretch; }
}
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.form-row label { width: 90px; text-align: right; color: #666; font-size: 13px; flex-shrink: 0; }
.form-row .inp { flex: 1; }
.form-row textarea.inp { min-height: 70px; resize: vertical; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); border-left: 4px solid #ff2e63; }
.stat-card .sc-val { font-size: 28px; font-weight: 700; color: #ff2e63; }
.stat-card .sc-label { font-size: 13px; color: #999; margin-top: 6px; }
.stat-card.green { border-left-color: #10b981; } .stat-card.green .sc-val { color: #059669; }
.stat-card.blue { border-left-color: #3b82f6; } .stat-card.blue .sc-val { color: #2563eb; }
.stat-card.orange { border-left-color: #f59e0b; } .stat-card.orange .sc-val { color: #d97706; }

.panel { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.panel-h { font-size: 15px; font-weight: 700; color: #333; margin-bottom: 16px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar-col .bar { width: 60%; max-width: 42px; background: linear-gradient(180deg, #ff7ba1, #ff2e63); border-radius: 6px 6px 0 0; min-height: 3px; }
.bar-col .bar.b2 { background: linear-gradient(180deg, #7dd3fc, #3b82f6); }
.bar-col .bl { font-size: 11px; color: #999; }
.bar-legend { display: flex; gap: 18px; font-size: 12px; color: #888; margin-top: 12px; justify-content: center; }
.bar-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ff5c86, #ff2e63, #f0145a); }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 20px; padding: 40px 34px; box-shadow: 0 20px 60px rgba(0,0,0,.2); text-align: center; }
.login-logo { font-size: 52px; margin-bottom: 8px; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; color: #222; }
.login-sub { color: #999; font-size: 13px; margin: 0 0 24px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .inp { width: 100%; min-width: 0; }
.btn-login { border: 0; background: #ff2e63; color: #fff; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 6px; }
.btn-login:hover { background: #e51e56; }
.login-err { background: #fef2f2; color: #b91c1c; padding: 10px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.login-tip { color: #bbb; font-size: 11px; margin-top: 18px; }

/* 实名认证材料（审核页） */
.modal { max-width: 720px; }
.auth-materials { margin-top: 16px; border-top: 1px solid #f0f0f0; padding-top: 16px; }
.am-title { font-size: 14px; font-weight: 700; color: #ff2e63; margin-bottom: 12px; }
.am-tip { font-size: 12px; color: #aaa; font-weight: 400; margin-left: 6px; }
.am-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.am-item { background: #fafafa; border-radius: 10px; padding: 10px; text-align: center; }
.am-label { font-size: 12px; color: #666; margin-bottom: 8px; }
.am-img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid #eee; }

/* ===== 家教老师资料弹层（美化版，复用 dd-* 体系） ===== */
.td-modal { background: #fff; border-radius: 16px; width: 680px; max-width: 94vw; max-height: 90vh; overflow: hidden auto; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.td-body { padding: 20px 24px 4px; }
.td-match { font-size: 13px; color: #059669; }
.td-price { font-size: 15px; color: #ff2e63; }
.td-materials { margin-top: 18px; }
.td-materials .am-item { background: #fafbfc; border: 1px solid #f0f1f3; }
.td-materials .am-img { height: 160px; background: #f5f6fa; }
.td-foot-tip { font-size: 12px; color: #c25b7a; }
@media (max-width: 520px) {
  .td-modal .am-grid { grid-template-columns: 1fr; }
  .td-foot-tip { display: none; }
}

/* 公众号 / 短信 配置页 */
.cfg-card { background: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.03); }
.cfg-card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f2eef1; }
.cfg-card-ico { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg,#ffe0ea,#ffd0de); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.cfg-card-h b { display: block; font-size: 15px; color: #333; }
.cfg-card-h small { display: block; color: #aaa; font-size: 12px; margin-top: 2px; }
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 24px; }
.cfg-field { display: flex; flex-direction: column; gap: 5px; }
.cfg-field label { font-size: 13px; color: #555; font-weight: 600; }
.cfg-field .inp { width: 100%; min-width: 0; }
.cfg-field small { font-size: 11px; color: #bbb; }
.cfg-actions { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.cfg-eye { font-size: 13px; color: #666; display: flex; align-items: center; gap: 5px; cursor: pointer; margin-right: auto; }
.cfg-ok-box { background: #ecfdf5; color: #047857; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.cfg-note { font-size: 12px; color: #c25b7a; background: #fff5f8; border-radius: 8px; padding: 10px 14px; line-height: 1.6; margin-top: 6px; }
.test-row { display: flex; gap: 10px; align-items: center; }
.test-row .inp { flex: 1; }
.test-tip { display: block; color: #999; font-size: 12px; margin-top: 10px; }
@media (max-width: 720px) { .cfg-grid { grid-template-columns: 1fr; } }

/* ===== 短信/公众号管理页通用状态类（全局，供各页面复用） ===== */
.badge-wait { color: #b26a00 !important; background: #fff4e0 !important; }
.badge-ok { color: #1d9e75 !important; background: #e1f5ee !important; }
.badge-no { color: #999 !important; background: #f0f0f0 !important; }
.badge-type-tutor { color: #2f6fd0 !important; background: #eef4ff !important; }
.badge-type-parent { color: #8b5cf6 !important; background: #f3edff !important; }
.green-text { color: #059669; font-weight: 600; }
code { background: #f5f5f7; color: #d6336c; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ===== 公众号弹层美化（wa-*）===== */
.wa-modal { background: #fff; border-radius: 16px; width: 660px; max-width: 94vw; max-height: 90vh; overflow: hidden auto; box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.wa-modal-wide { width: 760px; }
.wa-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px; background: linear-gradient(135deg,#ff6b95,#ff2e63); color: #fff; }
.wa-head-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.wa-head-text { flex: 1; min-width: 0; }
.wa-title { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.wa-subtitle { font-size: 12px; opacity: .85; margin-top: 4px; }
.wa-close { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; flex-shrink: 0; }
.wa-close:hover { background: rgba(255,255,255,.34); }
.wa-body { padding: 20px 24px 6px; }
.wa-section { margin-bottom: 20px; }
.wa-section-h { font-size: 13px; font-weight: 700; color: #333; padding-left: 10px; border-left: 3px solid #ff2e63; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.wa-sec-tip { font-size: 11px; font-weight: 400; color: #bbb; }
.wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.wa-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wa-field label { font-size: 12px; color: #888; text-align: left; width: auto; }
.wa-field .inp, .wa-full .inp { width: 100%; min-width: 0; }
.wa-field textarea.inp { min-height: 64px; resize: vertical; }
.wa-full { margin-top: 2px; }
.wa-eye { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #999; cursor: pointer; margin-top: 12px; }
.wa-menu-tip { background: #fff7ed; border: 1px solid #ffe2c2; color: #b26a00; border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-bottom: 14px; }
.wa-code { font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 1.6; width: 100%; min-width: 0; }
.wa-foot { margin-top: 6px; padding: 16px 24px; background: #faf7f8; border-top: 1px solid #f0e2e7; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wa-foot .modal-f { margin-top: 0; }
.wa-foot-tip { font-size: 12px; color: #c25b7a; }
@media (max-width: 560px) {
  .wa-grid { grid-template-columns: 1fr; }
  .wa-foot { flex-direction: column; align-items: stretch; }
}
