:root {
  --ink: #17211c;
  --muted: #68736d;
  --line: #e1e7e3;
  --surface: #ffffff;
  --canvas: #f4f7f5;
  --green: #147a52;
  --green-dark: #0d5f3e;
  --green-soft: #e7f4ed;
  --amber: #b66512;
  --amber-soft: #fff3df;
  --red: #c23e3e;
  --red-soft: #feecec;
  --blue: #3265bd;
  --blue-soft: #eaf1ff;
  --shadow: 0 10px 30px rgba(23, 33, 28, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 238px; color: #e9f3ed; background: #15271e; display: flex; flex-direction: column; }
.brand { height: 76px; padding: 16px 20px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { width: 40px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; background: #30a66e; color: #fff; font-size: 19px; font-weight: 800; }
.brand strong, .brand span, .sidebar-footer strong, .sidebar-footer span { display: block; }
.brand strong { font-size: 16px; }
.brand span, .sidebar-footer span { color: #aabbb1; font-size: 12px; }
nav { flex: 1; overflow: auto; padding: 18px 12px; }
.nav-label { padding: 11px 12px 7px; color: #789087; font-size: 11px; }
.nav-item { width: 100%; height: 42px; margin-bottom: 4px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 6px; color: #bfcfc6; background: transparent; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: #246b4b; color: #fff; font-weight: 700; }
.nav-icon { width: 20px; text-align: center; font-size: 16px; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 9px; color: #143124; background: #77d39f; font-size: 11px; text-align: center; }
.sidebar-footer { padding: 16px; display: grid; grid-template-columns: 36px 1fr 30px; gap: 10px; align-items: center; border-top: 1px solid rgba(255,255,255,.1); }
.avatar { width: 36px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: #153325; background: #b8e7cd; font-weight: 800; }
.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; height: 76px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.breadcrumb span { display: block; color: var(--muted); font-size: 11px; }
.breadcrumb b { font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { width: 34px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; color: inherit; background: transparent; font-size: 18px; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.notification-btn { position: relative; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.notification-btn i { position: absolute; top: -5px; right: -5px; min-width: 17px; padding: 1px 4px; border-radius: 9px; color: #fff; background: var(--red); font-size: 10px; font-style: normal; }
.role-switch { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
select, input, textarea { border: 1px solid #cfd8d3; border-radius: 6px; color: var(--ink); background: #fff; outline: 0; }
select:focus, input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,122,82,.1); }
.role-switch select { height: 36px; padding: 0 32px 0 11px; }
.content { max-width: 1480px; margin: auto; padding: 28px; }
.page-head { margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; }
.page-head p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { min-height: 38px; padding: 8px 15px; border: 1px solid #cfd8d3; border-radius: 6px; color: var(--ink); background: #fff; font-weight: 700; }
.btn:hover { border-color: #9eaaa4; background: #f9fbfa; }
.btn.primary { border-color: var(--green); color: #fff; background: var(--green); }
.btn.primary:hover { background: var(--green-dark); }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn.danger { color: var(--red); border-color: #f0bcbc; }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.stat-icon { width: 32px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; background: var(--green-soft); color: var(--green); font-weight: 800; }
.stat strong { display: block; margin: 10px 0 4px; font-size: 28px; line-height: 1.1; }
.trend { color: var(--green); font-size: 12px; }
.trend.warn { color: var(--amber); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.75fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel-head { min-height: 60px; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 16px; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 18px; }
.progress-list { display: grid; gap: 18px; }
.progress-row { display: grid; grid-template-columns: 80px 1fr 42px; gap: 12px; align-items: center; }
.bar { height: 8px; overflow: hidden; border-radius: 4px; background: #edf1ef; }
.bar i { height: 100%; display: block; border-radius: inherit; background: var(--green); }
.activity { margin: 0; padding: 0; list-style: none; }
.activity li { position: relative; padding: 0 0 20px 23px; color: var(--muted); }
.activity li:last-child { padding-bottom: 0; }
.activity li::before { content: ""; position: absolute; top: 5px; left: 2px; width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.activity li::after { content: ""; position: absolute; top: 17px; bottom: 2px; left: 5px; width: 1px; background: var(--line); }
.activity li:last-child::after { display: none; }
.activity b { display: block; margin-bottom: 2px; color: var(--ink); }
.activity time { font-size: 11px; }
.toolbar { padding: 14px 16px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 320px; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 35px; }
.search::before { content: "⌕"; position: absolute; top: 7px; left: 12px; color: var(--muted); font-size: 18px; }
.toolbar select { height: 38px; padding: 0 30px 0 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf0ee; text-align: left; }
th { color: var(--muted); background: #fbfcfb; font-size: 12px; font-weight: 700; }
tbody tr:hover { background: #fbfdfc; }
.work-cell { display: flex; gap: 11px; align-items: center; }
.thumb { width: 62px; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; border-radius: 5px; color: #fff; background: linear-gradient(135deg,#315847,#73a48e); font-size: 19px; }
.thumb.alt { background: linear-gradient(135deg,#b36637,#e1a264); }
.thumb.blue { background: linear-gradient(135deg,#315d83,#71a0bf); }
.work-cell strong, .work-cell span { display: block; }
.work-cell span { color: var(--muted); font-size: 12px; }
.tag { display: inline-flex; min-height: 24px; padding: 3px 8px; align-items: center; border-radius: 4px; color: var(--green); background: var(--green-soft); font-size: 12px; }
.tag.pending { color: var(--amber); background: var(--amber-soft); }
.tag.danger { color: var(--red); background: var(--red-soft); }
.tag.info { color: var(--blue); background: var(--blue-soft); }
.tag.muted { color: var(--muted); background: #eef1ef; }
.platforms { display: flex; gap: 5px; flex-wrap: wrap; }
.platform { width: 26px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; color: #fff; background: #293630; font-size: 11px; font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.task-card { padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.task-card:hover { border-color: #aebcb5; box-shadow: var(--shadow); }
.task-card.sold-out { opacity: .65; }
.task-card-top { display: flex; justify-content: space-between; gap: 10px; }
.task-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; cursor: pointer; }
.task-check input { width: 17px; height: 17px; accent-color: var(--green); }
.task-card h3 { margin: 13px 0 5px; font-size: 16px; }
.task-card p { min-height: 42px; margin: 0 0 14px; color: var(--muted); }
.task-meta { padding: 12px 0; display: grid; grid-template-columns: repeat(3,1fr); border-block: 1px solid var(--line); }
.task-meta span { color: var(--muted); font-size: 11px; }
.task-meta b { display: block; margin-top: 2px; font-size: 13px; }
.task-foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; }
.task-foot small { color: var(--muted); }
.empty { padding: 55px 20px; color: var(--muted); text-align: center; }
.empty b { display: block; margin-bottom: 5px; color: var(--ink); font-size: 16px; }
.modal-wrap { position: fixed; z-index: 60; inset: 0; display: none; place-items: center; padding: 20px; }
.modal-wrap.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,22,16,.55); }
.modal { position: relative; width: min(680px,100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 8px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.modal > header, .modal > footer { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; }
.modal > header { border-bottom: 1px solid var(--line); }
.modal > footer { justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.modal h2 { margin: 2px 0 0; font-size: 19px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; }
.modal-body { padding: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.detail-item span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.detail-item.wide { grid-column: 1/-1; }
.note { padding: 12px; border-left: 3px solid var(--green); color: #385246; background: #f0f7f3; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }
.field { display: grid; gap: 6px; }
.field.wide { grid-column: 1/-1; }
.field label { font-size: 12px; font-weight: 700; }
.field input, .field select { height: 40px; padding: 0 11px; }
.field textarea { min-height: 90px; padding: 10px 11px; resize: vertical; }
.upload-zone { min-height: 110px; padding: 20px; display: grid; place-items: center; border: 1px dashed #aab8b0; border-radius: 6px; color: var(--muted); background: #fafcfb; text-align: center; }
.upload-action { cursor: pointer; }
.upload-action:hover { border-color: var(--green); background: var(--green-soft); }
.upload-action strong, .upload-action span { display: block; }
.upload-action strong { color: var(--green); font-size: 15px; }
.upload-summary { margin-top: 8px; color: var(--muted); font-size: 12px; }
.file-list { max-height: 210px; overflow: auto; display: grid; gap: 7px; }
.file-row { padding: 8px 10px; display: grid; grid-template-columns: 24px 1fr 32px; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.file-row b, .file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row small { color: var(--muted); }
.toast { position: fixed; z-index: 90; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 16px; border-radius: 6px; color: #fff; background: #183b2b; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }
.menu-btn { display: none; }
.drawer-backdrop { display: none; }
@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .cards { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .drawer-backdrop.show { position: fixed; z-index: 25; inset: 0; display: block; background: rgba(9,20,14,.45); }
  .main { width: 100%; }
  .topbar { height: 64px; padding: 0 14px; }
  .menu-btn { display: inline-grid; place-items: center; }
  .breadcrumb { flex: 1; margin-left: 8px; }
  .role-switch span { display: none; }
  .role-switch select { width: 112px; }
  .content { padding: 18px 14px 30px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head h1 { font-size: 21px; }
  .stats-grid, .cards { grid-template-columns: 1fr; }
  .stat { padding: 16px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { max-width: none; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field.wide, .detail-item.wide { grid-column: auto; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 8px 8px 0 0; }
}
