/* =========================================================================
   接单系统样式（加载顺序 mc-gui.css → commission.css）
   ========================================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 15px 40px; background: rgba(10, 10, 21, .8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(102, 126, 234, .15); line-height: 1.5;
}
.header-content { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-item-dropdown, .user-dropdown, .settings-menu { position: relative; }
.nav-item { display: flex; align-items: center; gap: 6px; }
.nav-item i { font-size: 10px; transition: transform .3s ease; color: #a5b4fc; }
.nav-item-dropdown:hover .nav-item i { transform: rotate(180deg); }
.nav-link { padding: 10px 20px; color: rgba(255,255,255,.8); text-decoration: none; font-weight: 500; transition: all .3s ease; border-radius: 8px; white-space: nowrap; }
.nav-link:hover { color: #667eea; background: rgba(102,126,234,.1); }
.nav-link.active { color: #a5b4fc; background: rgba(102,126,234,.15); }
.dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: 10px; background: rgba(15,23,42,.98); backdrop-filter: blur(20px); border: 1px solid rgba(102,126,234,.2); border-radius: 12px; padding: 8px; min-width: 220px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .3s ease; box-shadow: 0 20px 40px rgba(0,0,0,.5); z-index: 100; }
.nav-item-dropdown:hover .dropdown-menu, .user-dropdown:hover .dropdown-menu, .settings-menu:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 14px; color: rgba(226,232,240,.8); text-decoration: none; border-radius: 8px; transition: all .2s ease; font-size: 14px; }
.dropdown-menu a:hover { background: rgba(102,126,234,.15); color: #a5b4fc; }
.user-dropdown-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: rgba(102,126,234,.1); border: 1px solid rgba(102,126,234,.2); border-radius: 10px; text-decoration: none; color: #e0e7ff; transition: all .3s ease; }
.settings-menu > a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: rgba(102,126,234,.1); border: 1px solid rgba(102,126,234,.2); border-radius: 10px; color: #a5b4fc; text-decoration: none; }
.settings-menu .dropdown-menu, .user-dropdown .dropdown-menu { right: 0; left: auto; }
.header-right { display: flex; align-items: center; gap: 16px; }
.logo img { height: 38px; width: auto; }
#auth-buttons { display: flex; align-items: center; gap: 10px; }
.btn-login, .btn-register, .btn-secondary, .btn-primary { padding: 10px 22px; font-size: 14px; border-radius: 50px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; transition: all .3s ease; border: none; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; box-shadow: 0 4px 20px rgba(102,126,234,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(102,126,234,.5); }
.btn-secondary { background: rgba(102,126,234,.15); border: 1px solid rgba(102,126,234,.3); color: #a5b4fc; }

.footer { background: rgba(10,10,21,.7); border-top: 1px solid rgba(102,126,234,.15); padding: 60px 20px 40px; margin-top: 60px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 50px; margin-bottom: 40px; }
.footer-brand h3 { font-size: 22px; font-weight: 700; margin-bottom: 14px; color: #e0e7ff; }
.footer-brand p { color: #cbd5e1; line-height: 1.6; font-size: 14px; }
.footer-links h4 { font-size: 12px; font-weight: 700; margin-bottom: 16px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-size: 14px; transition: all .3s ease; }
.footer-links a:hover { color: #818cf8; }

/* ---------------------------------------------------------- 主体 */
body { background: #0b1120; color: #e2e8f0; font-family: system-ui,-apple-system,'Segoe UI','Microsoft YaHei',sans-serif; }
.cms-main { padding: 120px 20px 40px; max-width: 1240px; margin: 0 auto; position: relative; z-index: 1; }

.cms-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.cms-hero h1 { font-size: 28px; font-weight: 800; color: #e0e7ff; display: flex; align-items: center; gap: 10px; }
.cms-hero h1 i { color: #a5b4fc; }
.cms-hero p { color: #94a3b8; font-size: 14px; margin-top: 8px; max-width: 760px; line-height: 1.75; }
.cms-stat { display: flex; gap: 22px; }
.cms-stat div { text-align: center; }
.cms-stat strong { display: block; font-size: 22px; color: #a5b4fc; font-weight: 800; }
.cms-stat span { font-size: 12px; color: #94a3b8; }

.cms-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid rgba(102,126,234,.18); }
.cms-tab { padding: 11px 18px; font-size: 14px; color: #94a3b8; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; font-weight: 600; }
.cms-tab.on { color: #c7d2fe; border-bottom-color: #818cf8; }

.cms-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.cms-toolbar select, .cms-toolbar input {
  background: rgba(15,23,42,.9); border: 1px solid rgba(102,126,234,.25); color: #cbd5e1;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; outline: none; min-width: 130px;
}
.cms-toolbar input { min-width: 230px; flex: 1; max-width: 360px; }
.cms-toolbar select:focus, .cms-toolbar input:focus { border-color: rgba(102,126,234,.7); }
.cms-toolbar .cms-btn { margin-left: auto; }

.cms-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid rgba(102,126,234,.28); background: rgba(102,126,234,.14); color: #c7d2fe; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all .2s ease; white-space: nowrap; }
.cms-btn:hover { background: rgba(102,126,234,.25); color: #fff; border-color: rgba(102,126,234,.5); }
.cms-btn.primary { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); color: #fff; border: none; box-shadow: 0 4px 18px rgba(102,126,234,.35); }
.cms-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(102,126,234,.5); }
.cms-btn.ghost { background: transparent; color: #94a3b8; }
.cms-btn.ghost:hover { background: rgba(102,126,234,.12); color: #cbd5e1; }
.cms-btn.sm { padding: 7px 12px; font-size: 12.5px; }
.cms-btn.danger { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.12); color: #fca5a5; }
.cms-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.cms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.cms-card { background: rgba(15,23,42,.86); border: 1px solid rgba(102,126,234,.2); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: all .25s ease; }
.cms-card:hover { transform: translateY(-3px); border-color: rgba(102,126,234,.5); box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.cms-card-top { display: flex; align-items: center; gap: 12px; }
.cms-avatar { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#4f46e5,#7c3aed); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #e0e7ff; flex: 0 0 44px; overflow: hidden; }
.cms-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cms-name { font-size: 15.5px; font-weight: 800; color: #e0e7ff; line-height: 1.35; }
.cms-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.cms-sum { font-size: 13px; color: #94a3b8; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cms-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cms-tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(102,126,234,.14); border: 1px solid rgba(102,126,234,.22); color: #a5b4fc; }
.cms-tag.kind { background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.cms-price { font-size: 14px; font-weight: 800; color: #fcd34d; }
.cms-card-foot { margin-top: auto; display: flex; gap: 8px; padding-top: 6px; }
.cms-card-foot .cms-btn { flex: 1; justify-content: center; }

.cms-empty, .cms-skel { padding: 46px 20px; text-align: center; color: #64748b; font-size: 14px; border: 1px dashed rgba(102,126,234,.25); border-radius: 14px; grid-column: 1 / -1; }
.cms-pager { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }

/* ---------------------------------------------------------- 详情 / 表单 */
.cms-panel { background: rgba(15,23,42,.86); border: 1px solid rgba(102,126,234,.2); border-radius: 16px; padding: 22px; }
.cms-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cms-detail h1 { font-size: 24px; font-weight: 800; color: #e0e7ff; line-height: 1.4; margin-bottom: 8px; }
.cms-meta { color: #64748b; font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cms-body { color: #cbd5e1; font-size: 14px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; }
.cms-side h3 { font-size: 13px; color: #94a3b8; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.cms-kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed rgba(102,126,234,.14); font-size: 13.5px; }
.cms-kv span { color: #94a3b8; flex: 0 0 auto; }
.cms-kv b { color: #e2e8f0; font-weight: 600; text-align: right; word-break: break-all; }
.cms-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cms-actions .cms-btn { justify-content: center; padding: 12px 18px; font-size: 14px; }
.cms-note { margin-top: 14px; font-size: 12px; color: #64748b; line-height: 1.75; }
.cms-contact { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(2,6,23,.6); border: 1px dashed rgba(102,126,234,.3); color: #a5b4fc; font-size: 13px; word-break: break-all; }

.cms-form { display: flex; flex-direction: column; gap: 16px; }
.cms-field { display: flex; flex-direction: column; gap: 7px; }
.cms-field label { font-size: 13px; color: #94a3b8; font-weight: 600; }
.cms-field label .req { color: #f87171; }
.cms-field input, .cms-field textarea, .cms-field select {
  background: rgba(2,6,23,.72); border: 1px solid rgba(102,126,234,.25); color: #e2e8f0;
  border-radius: 10px; padding: 11px 14px; font-size: 14px; outline: none; font-family: inherit; width: 100%;
  transition: border-color .2s ease;
}
.cms-field input:focus, .cms-field textarea:focus, .cms-field select:focus { border-color: rgba(102,126,234,.7); }
.cms-field textarea { min-height: 130px; resize: vertical; line-height: 1.75; }
.cms-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cms-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cms-chip { padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(102,126,234,.25); background: rgba(15,23,42,.8); color: #94a3b8; font-size: 13px; cursor: pointer; user-select: none; transition: all .2s ease; }
.cms-chip.on { border-color: #818cf8; background: rgba(102,126,234,.28); color: #fff; }
.cms-fine { font-size: 12px; color: #64748b; line-height: 1.7; }
.cms-msg { font-size: 13px; padding: 10px 14px; border-radius: 10px; display: none; }
.cms-msg.ok { display: block; background: rgba(34,197,94,.14); color: #86efac; border: 1px solid rgba(34,197,94,.35); }
.cms-msg.err { display: block; background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.35); }

.cms-kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.cms-kind-opt { padding: 16px; border-radius: 12px; border: 1px solid rgba(102,126,234,.25); background: rgba(2,6,23,.5); cursor: pointer; transition: all .2s ease; }
.cms-kind-opt.on { border-color: #818cf8; background: rgba(102,126,234,.16); }
.cms-kind-opt b { display: block; color: #e0e7ff; font-size: 14.5px; margin-bottom: 4px; }
.cms-kind-opt span { font-size: 12.5px; color: #94a3b8; }

.cms-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; background: rgba(2,6,23,.55); border: 1px solid rgba(102,126,234,.16); font-size: 13.5px; }
.cms-badge { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.cms-badge.pending { background: rgba(234,179,8,.16); color: #fcd34d; }
.cms-badge.approved, .cms-badge.open { background: rgba(34,197,94,.16); color: #86efac; }
.cms-badge.in_progress { background: rgba(59,130,246,.16); color: #93c5fd; }
.cms-badge.done { background: rgba(148,163,184,.16); color: #cbd5e1; }
.cms-badge.rejected, .cms-badge.closed { background: rgba(239,68,68,.16); color: #fca5a5; }

/* 里程碑 */
.cms-milestones { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.cms-ms { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(2,6,23,.55); border: 1px solid rgba(102,126,234,.18); }
.cms-ms.done { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.cms-ms .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(102,126,234,.4); flex: 0 0 22px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #64748b; }
.cms-ms.done .dot { border-color: #22c55e; background: rgba(34,197,94,.18); color: #86efac; }
.cms-ms .info { flex: 1; min-width: 0; }
.cms-ms .info b { display: block; font-size: 13.5px; color: #e2e8f0; }
.cms-ms .info span { font-size: 12px; color: #64748b; }
.cms-ms .amt { color: #fcd34d; font-weight: 800; font-size: 13.5px; }

/* ---------------------------------------------------------- 指南 */
.cms-guide { max-width: 920px; margin: 0 auto; }
.cms-guide h1 { font-size: 27px; font-weight: 800; color: #e0e7ff; margin-bottom: 10px; }
.cms-guide .lead { color: #94a3b8; font-size: 14px; line-height: 1.8; margin-bottom: 26px; }
.cms-sec { margin-bottom: 30px; }
.cms-sec h2 { font-size: 18px; font-weight: 800; color: #c7d2fe; margin-bottom: 14px; padding-left: 12px; border-left: 3px solid #818cf8; }
.cms-sec h3 { font-size: 15px; font-weight: 700; color: #e0e7ff; margin: 16px 0 8px; }
.cms-sec p, .cms-sec li { color: #cbd5e1; font-size: 14px; line-height: 1.9; }
.cms-sec ul { padding-left: 20px; }
.cms-sec li { margin-bottom: 6px; }
.cms-sec a { color: #a5b4fc; }
.cms-tip { padding: 14px 16px; border-radius: 12px; background: rgba(234,179,8,.08); border: 1px solid rgba(234,179,8,.28); color: #fde68a; font-size: 13.5px; line-height: 1.8; margin: 14px 0; }
.cms-tip.danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.28); color: #fca5a5; }
.cms-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0; }
.cms-step { padding: 16px; border-radius: 12px; background: rgba(15,23,42,.86); border: 1px solid rgba(102,126,234,.2); }
.cms-step b { display: block; color: #a5b4fc; font-size: 13px; margin-bottom: 6px; }
.cms-step p { font-size: 13px; color: #94a3b8; line-height: 1.75; }

@media (max-width: 900px) {
  .cms-detail { grid-template-columns: 1fr; }
  .cms-row2 { grid-template-columns: 1fr; }
  .cms-main { padding: 108px 14px 30px; }
  .cms-hero { flex-direction: column; align-items: flex-start; }
  .cms-kind-switch { grid-template-columns: 1fr; }
}
