:root {
  --gep-indigo: #4642b8;
  --gep-indigo-dark: #35319a;
  --gep-indigo-light: #efefff;
  --gep-teal: #13b8a6;
  --gep-teal-dark: #0a897d;
  --gep-teal-light: #e8f8f6;
  --gep-charcoal: #121826;
  --gep-sidebar: #101827;
  --gep-bg: #f5f7fa;
  --gep-card: #ffffff;
  --gep-border: #e4e8ef;
  --gep-text: #18202f;
  --gep-muted: #6d7789;
  --gep-success: #15966d;
  --gep-warning: #b56a12;
  --gep-danger: #d34854;
  --sidebar-width: 240px;
  --radius-lg: 16px;
  --radius-md: 11px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16,24,39,.025), 0 8px 24px rgba(16,24,39,.035);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--gep-bg); }
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--gep-text);
  background: var(--gep-bg);
  font: 14px/1.5 Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #c5cad5;
  background: var(--gep-sidebar);
}
.brand-header {
  display: grid;
  min-height: 86px;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 11px;
  padding: 18px 20px;
}
.brand-header img.logo-full { width: 38px; height: 38px; }
.brand-title-box { display: flex; flex-direction: column; }
.brand-title { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-subtitle { color: #778196; font-size: 10px; font-weight: 500; }
.nav-menu { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 18px 12px; }
.nav-item {
  display: grid;
  width: 100%;
  min-height: 47px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  cursor: pointer;
  text-align: left;
  color: #aab2c2;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); transform: translateX(2px); }
.nav-item.active { color: #fff; background: var(--gep-indigo); box-shadow: 0 7px 18px rgba(70,66,184,.28); }
.nav-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { min-width: 22px; padding: 1px 6px; color: #9ca5b7; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 10px; text-align: center; }
.nav-item.active .nav-badge { color: #fff; background: rgba(255,255,255,.18); }
.sidebar-footer { margin: 12px; padding: 14px; color: #858fa1; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.025); font-size: 11px; line-height: 1.55; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #20c993; box-shadow: 0 0 0 3px rgba(32,201,147,.12); }

.main-wrapper { min-width: 0; margin-left: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--gep-border);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-left img { display: none; }
.topbar-title { max-width: 700px; color: var(--gep-text); font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.pill-tag { display: inline-flex; min-height: 28px; align-items: center; padding: 4px 10px; color: var(--gep-indigo); border: 1px solid #e2e2fa; border-radius: 999px; background: #f8f8ff; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.pill-tag.teal { color: var(--gep-teal-dark); border-color: #d7f1ed; background: #f2fbfa; }
.content-area { max-width: 1760px; padding: 28px 30px 54px; }
.view-panel { display: none; }
.view-panel.active { display: block; animation: panel-in .28s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { position: relative; min-height: 148px; padding: 20px; overflow: hidden; border: 1px solid var(--gep-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); }
.stat-card::before { position: absolute; inset: 0 0 auto; height: 3px; content: ""; background: linear-gradient(90deg,var(--gep-indigo),#7773dc); }
.stat-card.teal::before { background: linear-gradient(90deg,var(--gep-teal),#51d2c5); }
.stat-label { max-width: 88%; color: var(--gep-muted); font-size: 12px; line-height: 1.45; }
.stat-value { margin-top: 17px; color: var(--gep-text); font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-meta { margin-top: 12px; color: #8a93a3; font-size: 10.5px; line-height: 1.45; }

.card { margin-bottom: 20px; padding: 0; border: 1px solid var(--gep-border); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-card); }
.card-header { display: flex; min-height: 65px; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #edf0f4; }
.card-header > div > p { max-width: 880px; }
.card-title { display: flex; align-items: center; color: var(--gep-text); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card > .form-group { margin-left: 20px; margin-right: 20px; }
.card > .card-header ~ .form-group:first-of-type { margin-top: 20px; }
.card > .card-header ~ button:last-child { margin: 0 20px 20px; }

.pipeline-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; padding: 18px; font-size: 12px; }
.pipeline-step { position: relative; min-height: 138px; padding: 17px; border: 1px solid #edf0f4; border-radius: 13px; background: #fafbfc; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.pipeline-step:hover { transform: translateY(-2px); border-color: #d9daf4; box-shadow: 0 8px 22px rgba(28,35,53,.06); }
.pipeline-step strong { display: flex; align-items: center; gap: 10px; color: var(--gep-text); font-size: 13px; }
.pipeline-step strong span { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; color: var(--gep-indigo); border-radius: 9px; background: var(--gep-indigo-light); font-size: 11px; font-weight: 700; }
.pipeline-step:nth-child(even) strong span { color: var(--gep-teal-dark); background: var(--gep-teal-light); }
.pipeline-step p { margin-top: 15px !important; color: var(--gep-muted) !important; line-height: 1.65 !important; }

.btn { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--gep-border); border-radius: var(--radius-sm); background: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,39,.04); transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.btn:hover { color: var(--gep-indigo); border-color: #c9c8ec; background: #fbfbff; box-shadow: 0 4px 12px rgba(16,24,39,.07); transform: translateY(-1px); }
.btn-primary { color: #fff; border-color: var(--gep-indigo); background: var(--gep-indigo); box-shadow: 0 6px 14px rgba(70,66,184,.18); }
.btn-primary:hover { color: #fff; border-color: var(--gep-indigo-dark); background: var(--gep-indigo-dark); }
.btn-teal { color: #fff; border-color: var(--gep-teal); background: var(--gep-teal); box-shadow: 0 6px 14px rgba(19,184,166,.16); }
.btn-teal:hover { color: #fff; border-color: var(--gep-teal-dark); background: var(--gep-teal-dark); }
.btn-outline { color: var(--gep-text); background: #fff; }
.btn-sm { min-height: 31px; padding: 5px 10px; font-size: 11px; }
.btn:focus-visible, .nav-item:focus-visible, .filter-tab:focus-visible { outline: 3px solid rgba(70,66,184,.2); outline-offset: 2px; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-tab { min-height: 34px; padding: 6px 12px; cursor: pointer; color: var(--gep-muted); border: 1px solid var(--gep-border); border-radius: 9px; background: #fff; font-size: 11px; font-weight: 600; }
.filter-tab:hover { color: var(--gep-indigo); border-color: #cac9ed; }
.filter-tab.active { color: #fff; border-color: var(--gep-indigo); background: var(--gep-indigo); box-shadow: 0 5px 12px rgba(70,66,184,.14); }

.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table.gep-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.gep-table th { padding: 12px 14px; text-align: left; color: #7a8495; border-bottom: 1px solid var(--gep-border); background: #fafbfc; font-size: 10.5px; font-weight: 650; white-space: nowrap; }
table.gep-table td { padding: 14px; vertical-align: middle; border-bottom: 1px solid #edf0f4; }
table.gep-table tbody tr:last-child td { border-bottom: 0; }
table.gep-table tr:hover td { background: #fafaff; }
table.gep-table .btn + .btn { margin-left: 5px; }

.plat-badge, .status-badge, .code-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 7px; font-size: 10.5px; font-weight: 600; }
.plat-badge { color: var(--gep-text); background: #f1f3f6; }
.plat-wechat_mp { color: #087e43; background: #e9f8f0; } .plat-xiaohongshu { color: #c22c42; background: #fff0f2; }
.plat-douyin { color: #202532; background: #eef0f3; } .plat-wechat_channels { color: #aa6114; background: #fff4e9; }
.plat-bilibili { color: #167b9b; background: #eaf8fc; } .plat-zhihu { color: #245dbd; background: #edf3ff; }
.plat-weibo { color: #c44918; background: #fff1ea; }
.status-badge { border-radius: 999px; }
.status-published, .status-running, .status-authorized { color: var(--gep-success); background: #eaf8f2; }
.status-queued, .status-stopped { color: #687285; background: #f0f2f5; } .status-failed { color: var(--gep-danger); background: #fff0f1; }
.code-chip { max-width: 100%; color: var(--gep-indigo-dark); border: 1px solid #e3e3f3; background: #f5f5fb; font-family: "SFMono-Regular",Consolas,monospace; font-weight: 500; }

.two-col { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.12fr); gap: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 7px; color: #303849; font-size: 11.5px; font-weight: 650; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 9px 11px; color: var(--gep-text); border: 1px solid #d9dee7; border-radius: var(--radius-sm); background: #fff; font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease; }
.form-input, .form-select { min-height: 39px; }
.form-textarea { min-height: 128px; line-height: 1.6; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #8b88d7; box-shadow: 0 0 0 3px rgba(70,66,184,.1); }
.account-selector-grid { display: grid; max-height: 280px; grid-template-columns: repeat(2,1fr); gap: 8px; overflow-y: auto; padding: 10px; border: 1px solid var(--gep-border); border-radius: var(--radius-md); background: #f8f9fb; }
.acc-check-item { display: flex; min-height: 42px; align-items: center; gap: 7px; padding: 7px 9px; cursor: pointer; border: 1px solid #e7eaf0; border-radius: 9px; background: #fff; font-size: 11px; transition: border-color .18s ease, background .18s ease; }
.acc-check-item:hover { border-color: #cfceef; background: #fbfbff; }
.acc-check-item input { accent-color: var(--gep-indigo); }
.preview-card { margin: 0 18px 13px; padding: 15px; border: 1px solid var(--gep-border); border-radius: 12px; background: #fafbfc; }
.preview-card-title { margin: 10px 0 6px; color: var(--gep-indigo); font-size: 14px; font-weight: 700; }
.preview-card-body { padding: 11px; color: var(--gep-text); border: 1px solid #e8ebf0; border-radius: 9px; background: #fff; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(12,18,29,.52); backdrop-filter: blur(3px); }
.modal-backdrop.open { display: flex; }
.modal-box { width: 680px; max-width: 100%; max-height: 88vh; overflow-y: auto; padding: 0 20px 20px; border: 1px solid rgba(255,255,255,.6); border-radius: 17px; background: #fff; box-shadow: 0 24px 70px rgba(10,18,31,.2); }
.modal-box .card-header { margin: 0 -20px 20px; }
.toast-bar { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: none; max-width: 440px; padding: 12px 16px; color: #fff; border-radius: 10px; background: var(--gep-sidebar); font-size: 12px; box-shadow: 0 12px 30px rgba(10,18,31,.2); }
code, pre { font-family: "SFMono-Regular",Consolas,monospace; }
a { color: var(--gep-indigo); text-underline-offset: 2px; }

@media (max-width:1180px) {
  .stats-grid, .pipeline-grid { grid-template-columns: repeat(2,1fr); }
  .topbar-right .pill-tag { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width:760px) {
  :root { --sidebar-width: 100%; }
  body { padding-bottom: 70px; }
  .sidebar { top: auto; width: 100%; height: 70px; padding: 4px; }
  .brand-header, .sidebar-footer { display: none; }
  .nav-menu { display: grid; grid-template-columns: repeat(7,minmax(62px,1fr)); gap: 3px; overflow-x: auto; padding: 0; }
  .nav-item { display: flex; min-width: 62px; min-height: 62px; flex-direction: column; justify-content: center; gap: 3px; padding: 4px; border-radius: 9px; text-align: center; font-size: 9.5px; }
  .nav-item:hover { transform: none; }
  .nav-item .nav-badge { display: none; }
  .nav-icon { width: 18px; height: 18px; }
  .main-wrapper { margin-left: 0; }
  .topbar { min-height: 64px; padding: 0 14px; }
  .topbar-title { font-size: 16px; }
  .topbar-right .btn { padding: 7px 9px; }
  .content-area { padding: 15px; }
  .stats-grid, .pipeline-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 132px; }
  .pipeline-grid { padding: 12px; }
  .pipeline-step { min-height: auto; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .card-header > div { width: 100%; }
  .account-selector-grid { grid-template-columns: 1fr; }
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; width: 100%; }
  .filter-tab { white-space: nowrap; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
