:root {
  --black: #171412;
  --panel: #221d19;
  --gold: #c9a45b;
  --gold-2: #f0d58a;
  --cream: #f7f1e3;
  --muted: #9a8870;
  --line: rgba(201, 164, 91, .28);
  --danger: #b74337;
  --ok: #2f7a56;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: #2b241d;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.topbar {
  background: var(--black);
  color: var(--cream);
  border-bottom: 3px solid var(--gold);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  font-weight: 800;
  font-size: 22px;
  color: var(--gold-2);
}
.home-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(240, 213, 138, .42);
  border-radius: 6px;
  color: #f7f1e3;
  font-weight: 800;
  font-size: 14px;
}
.links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}
.links a { color: #eee3cc; }
.hero {
  background: linear-gradient(135deg, #181310, #2a2119);
  color: var(--cream);
  padding: 64px 24px 56px;
}
.gross-hero {
  padding: 30px 24px 26px;
  background:
    linear-gradient(135deg, rgba(23, 20, 18, .96), rgba(48, 38, 27, .94)),
    linear-gradient(90deg, #171412, #3a2b1b);
}
.hero-inner, .container {
  max-width: 1180px;
  margin: 0 auto;
}
.gross-hero-inner {
  max-width: 1500px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 0;
}
.gross-hero h1 {
  font-size: clamp(30px, 3vw, 44px);
  margin-bottom: 8px;
}
.hero p {
  max-width: 760px;
  margin: 0;
  color: #eadbb8;
  font-size: 18px;
  line-height: 1.8;
}
.gross-hero p {
  max-width: 920px;
  font-size: 16px;
  line-height: 1.55;
}
.container { padding: 34px 24px 60px; }
.gross-container {
  max-width: 1540px;
  padding: 18px 18px 34px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card, .tool-panel, .report-box, .admin-panel {
  background: #fffaf0;
  border: 1px solid #eadfca;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(31, 24, 16, .08);
}
.card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
}
.card h2, .section-title {
  margin: 0;
  color: #2a2119;
}
.card p, .hint, .muted {
  color: #6f604d;
  line-height: 1.75;
}
.card p { flex: 1; margin: 0; }
.btn, button {
  border: 0;
  border-radius: 6px;
  background: var(--black);
  color: var(--gold-2);
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}
.btn.secondary, button.secondary {
  background: #eadfca;
  color: #2b241d;
}
.btn.danger { background: var(--danger); color: white; }
.tool-panel, .admin-panel { padding: 24px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; }
label { font-weight: 700; color: #3a3027; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d9c9aa;
  border-radius: 6px;
  background: #fffdf8;
  color: #2b241d;
  padding: 11px 12px;
  font-size: 15px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
.prompt-editor { min-height: 360px; }
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
}
.report-box {
  margin-top: 22px;
  padding: 24px;
  min-height: 180px;
  white-space: pre-wrap;
  line-height: 1.8;
}
.customer-report-box {
  margin-top: 16px;
  padding: 16px;
  white-space: normal;
}
.chat-panel {
  margin-top: 22px;
  background: #fffaf0;
  border: 1px solid #eadfca;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(31, 24, 16, .08);
  padding: 22px;
}
.promotion-container {
  max-width: 1280px;
  padding-top: 22px;
}
.promotion-workbench {
  margin-top: 0;
}
.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.chat-head .hint {
  margin: 6px 0 0;
}
.chat-box {
  height: 520px;
  overflow-y: auto;
  border: 1px solid #decda9;
  border-radius: 8px;
  background: #fffdf8;
  padding: 16px;
}
.chat-message {
  max-width: 88%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.chat-message.assistant {
  background: #f3ead6;
  border: 1px solid #dfc997;
  color: #2b241d;
}
.chat-message.user {
  margin-left: auto;
  background: #211914;
  color: #f0d58a;
}
.chat-message.loading {
  color: #7b5a19;
  background: #fff2b8;
}
.html-report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.html-report-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 6px;
  background: #211914;
  color: #f0d58a;
  font-weight: 800;
}
.html-report-actions a + a {
  background: #c9a45b;
  color: #211914;
}
.html-report-frame {
  width: 100%;
  height: 640px;
  border: 1px solid #decda9;
  border-radius: 8px;
  background: #fff;
}
.chat-message:has(.html-report-frame) {
  max-width: 100%;
  width: 100%;
}
.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
}
.chat-input-row textarea {
  min-height: 78px;
}
.upload-chat-zone {
  border: 2px dashed #c9a45b;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff6df, #fffaf0);
  padding: 26px 24px;
  margin-bottom: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.upload-chat-zone:hover,
.upload-chat-zone.dragging {
  border-color: #8b6424;
  background: #fff0bd;
  transform: translateY(-1px);
}
.upload-chat-zone.working {
  opacity: .72;
  pointer-events: none;
}
.upload-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #211914;
  color: #f0d58a;
  font-weight: 800;
}
.upload-title {
  font-size: 20px;
  font-weight: 800;
  color: #2b241d;
}
.upload-subtitle {
  margin-top: 8px;
  color: #6f604d;
  line-height: 1.6;
}
.plan-panel {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid #d6bf8f;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0, #fff6e4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 12px 24px rgba(52, 39, 21, .08);
}
.plan-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.plan-panel-head h3 {
  margin: 0;
  font-size: 20px;
  color: #241b14;
}
.plan-panel-head p {
  margin: 6px 0 0;
  color: #6f604d;
  line-height: 1.6;
}
.plan-table {
  display: grid;
  gap: 10px;
}
.plan-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #e3d2ad;
  border-radius: 8px;
  background: #fffdf8;
}
.plan-row b,
.plan-row span {
  display: block;
}
.plan-row b {
  color: #2b241d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-row span {
  margin-top: 4px;
  color: #7c6c56;
  font-size: 13px;
}
.plan-row select {
  min-height: 42px;
  font-weight: 800;
  border-color: #c9a45b;
  background: #fff8df;
}
.plan-row.locked {
  background: #f0e6d3;
  border-color: #d5c4a4;
}
.plan-lock {
  justify-self: end;
  padding: 8px 11px;
  border-radius: 6px;
  background: #251d16;
  color: #f0d58a;
  font-weight: 800;
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  background: #231c16;
  color: var(--cream);
  border-radius: 8px;
  padding: 16px;
}
.stat b {
  color: var(--gold-2);
  display: block;
  font-size: 26px;
  margin-top: 8px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tab {
  background: #eadfca;
  color: #2b241d;
}
.tab.active { background: var(--black); color: var(--gold-2); }
.hidden { display: none !important; }
.notice {
  border-left: 4px solid var(--gold);
  padding: 12px 14px;
  background: #fff6df;
  color: #5a4a37;
  margin: 16px 0;
}
.risk-list li { margin-bottom: 8px; }
.positive { color: var(--ok); font-weight: 700; }
.negative { color: var(--danger); font-weight: 700; }
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.gross-sheet {
  padding: 18px;
  border-color: #d7bd85;
  background: linear-gradient(180deg, #fffaf0 0%, #fff7e8 100%);
}
.gross-sheet .section-title {
  font-size: 24px;
  letter-spacing: 0;
}
.gross-sheet .hint {
  margin: 6px 0 0;
  line-height: 1.5;
}
.sheet-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid #c7a86d;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 16px 34px rgba(40, 30, 18, .11);
}
.sheet-wrap.wide {
  max-width: 100%;
}
.calc-sheet {
  width: 100%;
  border-collapse: collapse;
  min-width: 1480px;
  font-size: 14px;
}
.input-sheet {
  min-width: 620px;
}
.calc-sheet th,
.calc-sheet td {
  border: 1px solid #d8c397;
  padding: 9px 10px;
  text-align: center;
  white-space: nowrap;
}
.calc-sheet th {
  background: linear-gradient(180deg, #2c2118, #1a1410);
  color: var(--gold-2);
  font-weight: 800;
}
.calc-sheet .row-head {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 142px;
  text-align: left;
  background: linear-gradient(180deg, #2c2118, #1a1410);
  color: var(--gold-2);
  box-shadow: 8px 0 12px rgba(46, 34, 20, .12);
}
.calc-sheet .section-cell {
  background: #f0d58a;
  color: #2b241d;
  font-weight: 800;
}
.gross-master-table .input-band th,
.gross-master-table .scenario-head th {
  position: sticky;
  top: 0;
}
.gross-master-table .input-band td {
  background: #fff3bd;
  padding: 12px;
}
.gross-master-table .scenario-head th {
  background: linear-gradient(180deg, #3a2a1d, #1a1410);
}
.gross-master-table .scenario-head th.custom-discount-head {
  background: linear-gradient(180deg, #123b34, #08231f);
  color: #bff4df;
  box-shadow: inset 0 -3px 0 #34c38f;
}
.sheet-input-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
  align-items: center;
}
.sheet-input-grid label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #d2ae5f;
  border-radius: 6px;
  background: #fff7d4;
  color: #3a3027;
  font-size: 13px;
  line-height: 1;
}
.sheet-input-grid label.custom-discount-input {
  border-color: #2fa879;
  background: #e9fff5;
  box-shadow: inset 0 0 0 1px rgba(47, 168, 121, .22);
}
.sheet-input-grid label.custom-discount-input span {
  color: #126648;
}
.sheet-input-grid label span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #7b5a19;
  font-weight: 800;
}
.sheet-input-grid input {
  width: 78px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 4px;
  border-color: #be9948;
  background: #fffdf1;
  text-align: right;
  font-weight: 800;
}
.editable-cell {
  background: #fff0a8;
}
.editable-cell input {
  width: 92px;
  padding: 7px 8px;
  border-color: #c9a45b;
  background: #fff9d7;
  text-align: right;
  font-weight: 800;
}
.editable-cell span {
  margin-left: 4px;
  color: #6f604d;
}
.result-sheet td {
  background: #fffaf0;
  color: #32281f;
}
.result-sheet td.custom-discount-col {
  background: #ecfff7;
  color: #103f33;
  font-weight: 800;
}
.result-sheet .editable-cell {
  background: #fff2b8;
  color: #6b4a00;
  font-weight: 800;
}
.result-sheet .editable-cell.custom-discount-col {
  background: #d8f8e9;
  color: #0f5b42;
}
.result-sheet .risk {
  background: #f9d8d1;
  color: #8f2419;
  font-weight: 800;
}
.result-sheet .strong-risk {
  background: #c53a2f;
  color: #fff;
}
.result-sheet .warn {
  background: #ffe9a6;
  color: #765100;
  font-weight: 800;
}
.result-sheet .safe {
  background: #e9f5ed;
  color: #276749;
  font-weight: 800;
}
.result-sheet .focus {
  background: #f2dfad;
  color: #3b2a12;
  font-weight: 800;
}
.gross-master-table tr:hover td {
  background-image: linear-gradient(rgba(201,164,91,.08), rgba(201,164,91,.08));
}
.optimize-sheet {
  margin-top: 0;
}
.agent-hub-body {
  margin: 0;
  background: #f6f7f9;
  color: #111;
  min-height: 100vh;
}
.agent-hub {
  width: 100%;
  padding: 20px 28px 36px;
}
.agent-hub-grid {
  max-width: 1880px;
  margin: 0 auto;
}
.market-body {
  background: #f6f7f9;
  color: #151515;
  min-height: 100vh;
}
.market-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
.market-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e7e7e7;
  background: #fbfbfc;
  padding: 18px 10px 16px;
}
.market-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 22px;
}
.market-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #151515;
  color: #ff7614;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.market-brand b,
.market-user b {
  display: block;
  color: #111;
  font-size: 15px;
}
.market-brand span,
.market-user span {
  display: block;
  margin-top: 3px;
  color: #6d6d6d;
  font-size: 12px;
}
.market-menu {
  display: grid;
  gap: 5px;
}
.market-menu p {
  margin: 18px 10px 7px;
  color: #777;
  font-size: 13px;
}
.market-menu a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 700;
}
.market-menu a::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border: 2px solid #222;
  border-radius: 4px;
}
.market-menu a.active,
.market-menu a:hover {
  background: #f0f0f0;
}
.market-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 10px 4px;
}
.market-user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ff7614;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.market-main {
  padding: 24px;
  overflow: hidden;
}
.market-toolbar {
  display: grid;
  grid-template-columns: auto minmax(360px, 1fr) minmax(240px, 310px);
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.market-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.market-title-row h1 {
  margin: 0;
  color: #111;
  font-size: 28px;
  letter-spacing: 0;
  white-space: nowrap;
}
.market-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #9a9a9a;
  font-size: 26px;
  line-height: 1;
}
.market-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.market-tabs button {
  min-height: 36px;
  padding: 8px 18px;
  border-radius: 8px;
  background: #f1f1f2;
  color: #666;
  font-size: 14px;
  font-weight: 700;
}
.market-tabs button.active {
  background: #ff7614;
  color: #fff;
}
.market-search {
  position: relative;
  display: block;
}
.market-search span {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #9b9b9b;
  border-radius: 50%;
  transform: translateY(-50%);
}
.market-search span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #9b9b9b;
  transform: rotate(45deg);
}
.market-search input {
  height: 42px;
  padding-left: 46px;
  border: 0;
  border-radius: 24px;
  background: #f0f0f1;
  color: #222;
}
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 24px;
}
.agent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 388px;
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.09);
  transition: transform .18s ease, box-shadow .18s ease;
}
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0,0,0,.13);
}
.agent-cover {
  height: 142px;
  background:
    radial-gradient(circle at 45% 55%, rgba(255,255,255,.7) 0 9%, transparent 10%),
    radial-gradient(circle at 54% 42%, rgba(255,255,255,.34) 0 14%, transparent 15%),
    linear-gradient(135deg, #ffe5c8 0%, #ff7515 38%, #fbb71a 64%, #fff4d8 100%);
}
.agent-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tone-1 .agent-cover {
  background:
    radial-gradient(circle at 46% 54%, rgba(255,255,255,.62) 0 10%, transparent 11%),
    linear-gradient(135deg, #e8f5ff, #62c7f8 34%, #f4a8c8 68%, #fff5d2);
}
.tone-2 .agent-cover {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.58) 0 10%, transparent 11%),
    linear-gradient(135deg, #d5f4ee, #72c6c8 36%, #f7b7a8 69%, #f7dfb6);
}
.tone-3 .agent-cover {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 0 10%, transparent 11%),
    linear-gradient(135deg, #d6e5ff, #58a9ef 35%, #f2a2da 68%, #ffdfaf);
}
.tone-4 .agent-cover {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 0 10%, transparent 11%),
    linear-gradient(135deg, #e3f5cd, #9bcfb3 36%, #f1d282 70%, #fff2b8);
}
.tone-5 .agent-cover {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 0 10%, transparent 11%),
    linear-gradient(135deg, #ffc4cc, #f35b8c 35%, #9c4fe0 68%, #ffd7a2);
}
.agent-icon {
  position: absolute;
  top: 106px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #ff7614;
  color: #fff;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  overflow: hidden;
}
.agent-icon span {
  font-size: 34px;
  font-weight: 900;
}
.agent-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vip-ribbon {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 42px;
  padding: 5px 9px;
  border-bottom-left-radius: 14px;
  background: #ffd51b;
  color: #3f3100;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.agent-body {
  flex: 1;
  padding: 82px 34px 18px;
  text-align: center;
}
.agent-body h2 {
  margin: 0 0 14px;
  color: #0f0f0f;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}
.agent-body p {
  margin: 0;
  color: #777;
  font-size: 15px;
  line-height: 1.8;
}
.agent-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 18px 20px 20px;
  color: #989898;
  font-size: 13px;
}
.market-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 260px;
  border-radius: 16px;
  background: #fff;
  color: #888;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.agent-tool-body {
  min-height: 100vh;
  background: #f5f7fa;
  color: #171717;
}
.agent-detail-top {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid #e9edf3;
  background: #fff;
}
.agent-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.agent-back {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #1f2937;
  font-size: 28px;
  line-height: 1;
}
.agent-titlebar h1 {
  margin: 0;
  color: #161616;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.agent-top-actions {
  display: flex;
  gap: 8px;
}
.agent-tool-body button,
.agent-tool-body .btn {
  background: #ff7214;
  color: #fff;
  border: 1px solid #ff7214;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(255, 114, 20, .22);
}
.agent-tool-body button.secondary {
  background: #fff;
  color: #ff7214;
  border-color: #ff7214;
  box-shadow: none;
}
.agent-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  background: #fff !important;
  color: #ff7214 !important;
  border: 1px solid #ff7214 !important;
  box-shadow: none !important;
  font-size: 13px;
}
.agent-link-btn {
  text-decoration: none;
  font-weight: 700;
}
.agent-hub-top {
  position: sticky;
  top: 0;
  z-index: 20;
}
.agent-tool-layout {
  display: grid;
  grid-template-columns: 368px minmax(0, 1fr) 254px;
  gap: 12px;
  min-height: calc(100vh - 48px);
  padding: 20px 18px 18px;
}
.agent-config-panel,
.agent-canvas-panel,
.agent-info-panel > section,
.agent-gross-sheet {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, .04);
}
.agent-config-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 86px);
  overflow: hidden;
}
.agent-config-panel h2 {
  margin: 0;
  padding: 18px 16px;
  border-bottom: 1px solid #edf0f5;
  color: #191919;
  font-size: 15px;
}
.agent-field-block {
  padding: 16px;
}
.agent-field-block label {
  display: block;
  margin-bottom: 10px;
  color: #404040;
  font-size: 13px;
  font-weight: 800;
}
.agent-help-text {
  margin: 10px 0 0;
  color: #868b94;
  font-size: 12px;
  line-height: 1.75;
}
.agent-upload-zone {
  margin: 0;
  min-height: 90px;
  padding: 18px 14px;
  border: 1px dashed #d6dbe5;
  border-radius: 12px;
  background: #fbfcff;
  box-shadow: none;
}
.agent-upload-zone:hover,
.agent-upload-zone.dragging {
  border-color: #ff7214;
  background: #fff7f1;
  transform: none;
}
.agent-upload-zone .upload-mark {
  width: 32px;
  min-width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff0e7;
  color: #ff7214;
  font-size: 12px;
}
.agent-upload-zone .upload-title {
  font-size: 13px;
  color: #2b2b2b;
}
.agent-upload-zone .upload-subtitle {
  margin-top: 4px;
  color: #9a9fa8;
  font-size: 12px;
}
.agent-run-area {
  margin-top: auto;
  padding: 14px 16px 18px;
  border-top: 1px solid #edf0f5;
}
.agent-run-area button {
  width: 100%;
  min-height: 42px;
}
.agent-run-area span {
  display: block;
  margin-top: 8px;
  color: #a0a5ae;
  font-size: 11px;
  text-align: center;
}
.agent-canvas-panel {
  min-width: 0;
  min-height: calc(100vh - 86px);
  padding: 18px;
  overflow: hidden;
}
.agent-canvas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.agent-canvas-head h2 {
  margin: 0;
  color: #1d1d1f;
  font-size: 18px;
}
.agent-canvas-head p {
  margin: 6px 0 0;
  color: #8b9099;
  font-size: 13px;
}
.agent-chat-box {
  height: calc(100vh - 230px);
  min-height: 500px;
  border-color: #edf0f5;
  border-radius: 12px;
  background: #fff;
}
.agent-input-row textarea {
  min-height: 64px;
  border-color: #e2e6ee;
  border-radius: 10px;
  background: #fbfcff;
}
.agent-empty-message {
  max-width: 360px;
  margin: 170px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  text-align: center;
  box-shadow: none;
}
.agent-empty-message b,
.agent-empty-message em {
  display: block;
}
.agent-empty-message b {
  margin-top: 12px;
  font-size: 16px;
}
.agent-empty-message em {
  margin-top: 10px;
  color: #848a94;
  font-style: normal;
  line-height: 1.7;
}
.agent-tool-body .chat-message.agent-empty-message {
  background: transparent;
  border: 0;
  color: #222;
  box-shadow: none;
}
.agent-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff0e7;
  color: #ff7214;
  font-size: 30px;
}
.agent-info-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}
.agent-profile-card {
  overflow: hidden;
  text-align: center;
}
.agent-profile-cover {
  height: 118px;
  background:
    radial-gradient(circle at 50% 62%, rgba(255,255,255,.72) 0 10%, transparent 11%),
    linear-gradient(135deg, #ffe3bd 0%, #ff7214 38%, #ffcf45 68%, #fff3d0 100%);
}
.agent-profile-card.tone-1 .agent-profile-cover {
  background:
    radial-gradient(circle at 52% 60%, rgba(255,255,255,.68) 0 10%, transparent 11%),
    linear-gradient(135deg, #e6f5ff 0%, #67c7f7 34%, #f4a8ca 68%, #fff1cd 100%);
}
.agent-profile-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: -36px auto 14px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #ff7214;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
}
.agent-profile-card h2 {
  margin: 0 16px 10px;
  color: #101010;
  font-size: 20px;
}
.agent-profile-card p {
  min-height: 60px;
  margin: 0 18px 16px;
  color: #7a808b;
  font-size: 13px;
  line-height: 1.7;
}
.agent-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #edf0f5;
}
.agent-profile-stats span {
  padding: 15px 4px 16px;
  color: #999fa8;
  font-size: 11px;
}
.agent-profile-stats b {
  display: block;
  margin-bottom: 4px;
  color: #111;
  font-size: 14px;
}
.agent-guide-card {
  padding: 18px;
  background: #171a32 !important;
  color: #fff;
  border: 0 !important;
}
.agent-guide-card b,
.agent-guide-card span {
  display: block;
}
.agent-guide-card b {
  color: #fff;
  font-size: 15px;
}
.agent-guide-card span {
  margin-top: 8px;
  color: #cdd4ff;
  font-size: 12px;
  line-height: 1.65;
}
.agent-tool-body .plan-panel {
  margin: 0 16px 16px;
  background: #fffaf6;
  border-color: #ffd7bd;
}
.agent-tool-body .plan-row {
  grid-template-columns: minmax(0, 1fr);
}
.agent-report-box {
  min-height: calc(100vh - 166px);
  margin-top: 0;
  border-color: #edf0f5;
  border-radius: 12px;
  background: #fff;
  white-space: normal;
}
.agent-report-box .html-report-frame {
  height: calc(100vh - 260px);
  min-height: 560px;
  border-color: #edf0f5;
}
.agent-gross-layout {
  padding: 20px 18px 22px;
  background: #f5f7fa;
}
.agent-gross-sheet {
  max-width: 100%;
  padding: 18px;
}
.agent-gross-sheet .section-title {
  color: #161616;
}
.agent-gross-sheet .sheet-wrap {
  border-color: #e2e6ee;
  box-shadow: none;
}
.market-editor {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.market-edit-card {
  padding: 18px;
  border: 1px solid #e1d2b3;
  border-radius: 8px;
  background: #fffdf8;
}
.market-edit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.market-edit-head h3 {
  margin: 0;
  color: #251d16;
  font-size: 20px;
}
.market-edit-head span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #211914;
  color: #f0d58a;
  font-size: 13px;
  font-weight: 800;
}
.asset-file {
  padding: 8px;
  background: #fff8e8;
}
.asset-preview {
  width: 100%;
  max-width: 260px;
  height: 92px;
  object-fit: cover;
  border: 1px solid #decda9;
  border-radius: 8px;
  background: #f4ead8;
}
.asset-preview[src=""] {
  display: none;
}
.asset-preview.icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
}
footer {
  padding: 28px 24px;
  background: var(--black);
  color: #baa783;
  text-align: center;
}

@media (max-width: 1500px) {
  .market-grid { grid-template-columns: repeat(3, minmax(260px, 1fr)); }
  .market-toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 1120px) {
  .market-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 860px) {
  .grid, .form-grid, .form-grid.three, .stats { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; flex-direction: column; }
  .hero { padding-top: 42px; }
  .chat-head, .chat-input-row { grid-template-columns: 1fr; flex-direction: column; }
  .chat-message { max-width: 100%; }
  .gross-hero { padding-top: 26px; }
  .sheet-head { flex-direction: column; }
  .gross-container { padding: 12px 10px 28px; }
  .gross-sheet { padding: 12px; }
  .sheet-input-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .plan-panel-head {
    display: grid;
  }
  .plan-row {
    grid-template-columns: 1fr;
  }
  .plan-lock {
    justify-self: stretch;
    text-align: center;
  }
  .market-shell {
    grid-template-columns: 1fr;
  }
  .market-sidebar {
    position: static;
    height: auto;
  }
  .market-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market-menu p {
    grid-column: 1 / -1;
  }
  .market-toolbar {
    grid-template-columns: 1fr;
  }
  .market-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .market-tabs button {
    white-space: nowrap;
  }
  .market-grid {
    grid-template-columns: 1fr;
  }
  .agent-card {
    min-height: 360px;
  }
}
