:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e6ebf2;
  --panel: rgba(255, 255, 255, 0.94);
  --orange: #ff5a1f;
  --green: #23b38e;
  --blue: #178bff;
  font-family: "PingFang SC", "Microsoft YaHei", Inter, Arial, sans-serif;
  color: var(--ink);
  background: #f6f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.app-shell {
  min-height: 100vh;
  padding: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 90, 31, 0.13), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(35, 179, 142, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 40%, #eef3f8 100%);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
  gap: 0;
  padding: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 122, 0, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #fff7ee 48%, #ffffff 100%);
}

.login-story,
.login-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-story {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px clamp(28px, 5vw, 72px);
  overflow: hidden;
  color: #111827;
  background: transparent;
}

.login-hero-inner {
  width: min(100%, 920px);
  display: grid;
  gap: 20px;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ffe0c2;
  box-shadow: 0 18px 44px rgba(255, 105, 0, 0.14);
}

.login-brand-row div {
  display: grid;
  gap: 4px;
}

.login-brand-row strong {
  font-size: 20px;
}

.login-brand-row span {
  color: #ff5a1f;
  font-weight: 900;
}

.login-copy p,
.model-cloud span {
  color: #3f3f46;
}

.login-copy {
  max-width: 760px;
}

.login-copy > span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 90, 31, 0.2);
  color: #ffb096;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
  color: #111827;
}

.login-copy p {
  max-width: 620px;
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.75;
}

.login-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-feature-list div {
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid #ffe0c2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #232323;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.login-feature-list strong {
  display: block;
  margin-bottom: 4px;
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.login-feature-list span {
  color: #475467;
}

.login-section-label {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.model-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-cloud span {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(255, 106, 0, 0.22);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 106, 0, 0.07);
}

.login-box {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  border-left: 1px solid #ffe1c5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.login-form {
  width: 100%;
  max-width: 382px;
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid #f2d0b4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

.login-box-heading h2 {
  margin: 4px 0 0;
  font-size: 23px;
  letter-spacing: 0;
}

.login-box-heading p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.default-account,
.auth-domain-note {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff8f0;
  border-color: #ffe0c2;
  color: #475467;
  font-size: 12px;
}

.default-account b,
.default-account em,
.auth-domain-note b,
.auth-domain-note span {
  color: #111827;
  font-style: normal;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 5px;
  border: 0;
  border-radius: 8px;
  background: #fff3e8;
}

.auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7c4a22;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #fff;
  background: #ff6a00;
  box-shadow: none;
}

.auth-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #ffd7c4;
  border-radius: 8px;
  background: #fff7f2;
  color: #c2410c;
  line-height: 1.5;
  font-size: 13px;
  font-weight: 800;
}

.auth-register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #e5d4c6;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  outline: 0;
  padding: 10px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(255, 106, 0, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.1);
}

.auth-email-code > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.secondary-button.light {
  background: #111827;
  color: #fff;
}

.auth-submit {
  margin-top: 2px;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.055);
  position: sticky;
  top: 12px;
  z-index: 5;
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.brand-lockup img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.16);
}

.brand-lockup div {
  display: grid;
  gap: 3px;
}

.brand-lockup strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand-lockup span,
.panel-heading span,
.kpi-card p,
.kpi-card span,
.section-title p,
.message span,
.formula-grid p {
  color: #667085;
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar nav a,
.nav-tab {
  color: #344054;
  text-decoration: none;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.topbar nav a:hover,
.nav-tab:hover,
.nav-tab.active {
  background: #f2f4f7;
}

.nav-tab.active {
  color: var(--orange);
  font-weight: 800;
}

.icon-button,
.secondary-button,
.brand-input button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: #111827;
  background: #f5f7fa;
  border-radius: 8px;
}

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff7f2;
  color: #c2410c;
  border: 1px solid #ffd7c4;
  font-size: 13px;
  font-weight: 900;
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.agent-panel,
.dashboard,
.panel,
.model-section {
  min-width: 0;
  max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.055);
}

.agent-panel {
  padding: 14px;
  min-height: 760px;
  position: sticky;
  top: 102px;
  align-self: start;
}

.agent-hero {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.92)),
    radial-gradient(circle at 20% 10%, rgba(255, 90, 31, 0.26), transparent 34%);
  border: 1px solid rgba(17, 24, 39, 0.12);
  color: #fff;
}

.agent-hero h1,
.section-title h2,
.panel-heading h3,
.formula-grid h3 {
  margin: 0;
  letter-spacing: 0;
}

.agent-hero h1 {
  font-size: 24px;
  line-height: 1.12;
}

.agent-hero p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  font-size: 13px;
}

.engine-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 90, 31, 0.18);
  color: #ffb096;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.agent-hero img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.brand-input {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.task-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.task-form label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.task-form label.wide {
  grid-column: 1 / -1;
}

.task-form input,
.task-form select,
.task-form textarea {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  padding: 10px 11px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.task-form input:focus,
.task-form select:focus,
.task-form textarea:focus {
  border-color: rgba(255, 90, 31, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.1);
}

.task-form textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.5;
}

.task-form small {
  margin-top: -33px;
  margin-right: 10px;
  justify-self: end;
  color: #667085;
}

.primary-action {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #f04415);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(255, 90, 31, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255, 90, 31, 0.26);
}

.primary-action:disabled:hover {
  transform: none;
  box-shadow: 0 10px 22px rgba(255, 90, 31, 0.18);
}

.primary-action.small {
  grid-column: auto;
  min-height: 40px;
  padding: 0 14px;
}

.live-status {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
}

.live-status.ready {
  border-color: rgba(35, 179, 142, 0.26);
  background: #f4fffb;
}

.live-status.blocked {
  border-color: #ffd7c4;
  background: #fff7f2;
}

.live-status strong {
  color: #111827;
  font-size: 13px;
}

.live-status p {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
}

.status-strip span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #ffffff;
  color: #667085;
  font-size: 12px;
  border: 1px solid #edf1f7;
}

.brand-input > span {
  font-size: 13px;
  color: #344054;
  font-weight: 700;
}

.brand-input div {
  display: grid;
  grid-template-columns: 22px 1fr 118px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
}

.brand-input input {
  min-width: 0;
  height: 34px;
  border: 0;
  outline: 0;
  color: #111827;
}

.brand-input button {
  height: 38px;
  color: white;
  background: #ff5a1f;
  border-radius: 8px;
  font-weight: 700;
}

.chat-stream {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf1f7;
}

.assistant-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.messages {
  display: grid;
  gap: 10px;
}

.message {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.message span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.workflow-message {
  display: grid;
  gap: 8px;
}

.workflow-message p {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  color: #475467;
}

.workflow-message p b {
  color: var(--orange);
  font-size: 12px;
}

.workflow-message p + p b {
  color: #16a17e;
}

.workflow-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.workflow-metrics i {
  padding: 5px 7px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  color: #344054;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.typing {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 2px;
}

.dashboard {
  padding: 16px;
}

.adagent-chat-page {
  width: min(100%, 1220px);
  height: calc(100vh - 88px);
  min-height: 660px;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  margin: 12px auto 0;
}

.adagent-new-task-button {
  flex: 0 0 auto;
  min-width: 220px;
}

.adagent-chat-shell {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.07);
  overflow: hidden;
}

.adagent-chat-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f7;
  background:
    linear-gradient(180deg, #ffffff, #fbfcfe),
    radial-gradient(circle at 0% 0%, rgba(255, 90, 31, 0.08), transparent 22%);
}

.adagent-chat-header > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.adagent-chat-header img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
}

.adagent-chat-header span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.adagent-chat-header strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.2;
}

.adagent-chat-header em {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adagent-chat-header .adagent-new-task-button {
  box-shadow: 0 10px 22px rgba(255, 90, 31, 0.16);
}

.adagent-welcome {
  display: grid;
  gap: 10px;
}

.adagent-welcome p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.65;
}

.adagent-welcome div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
}

.adagent-welcome b {
  color: #111827;
  font-size: 12px;
}

.adagent-welcome span {
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}

.status-strip.compact {
  justify-content: flex-end;
}

.status-strip.compact span {
  padding: 5px 7px;
  font-size: 11px;
}

.adagent-chat-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  background: #f8fafc;
}

.adagent-node-rail {
  min-height: 0;
  display: grid;
  grid-template-rows: auto repeat(6, auto) minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  border-right: 1px solid #e6ebf2;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  overflow: auto;
}

.adagent-node-rail > div:first-child,
.adagent-rail-note {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
}

.adagent-node-rail > div:first-child strong,
.adagent-rail-note strong {
  color: #111827;
  font-size: 13px;
}

.adagent-node-rail > div:first-child span,
.adagent-rail-note span {
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}

.adagent-node-rail section {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
}

.adagent-node-rail section i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2f4f7;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.adagent-node-rail section b {
  overflow: hidden;
  color: #111827;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adagent-node-rail section span {
  color: #98a2b3;
  font-size: 10px;
  font-weight: 900;
}

.adagent-node-rail section.active {
  border-color: #ffd7c4;
  background: #fff8f3;
  box-shadow: inset 3px 0 0 #ff5a1f;
}

.adagent-node-rail section.active i {
  background: #ff5a1f;
  color: #ffffff;
}

.adagent-node-rail section.active span {
  color: #c2410c;
}

.adagent-node-rail section.done {
  border-color: rgba(35, 179, 142, 0.24);
  background: #f5fffb;
}

.adagent-node-rail section.done i {
  background: #23b38e;
  color: #ffffff;
}

.adagent-node-rail section.done span {
  color: #078567;
}

.adagent-rail-note {
  align-self: end;
  margin-top: 4px;
}

.adagent-chat-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.adagent-chat-scroll {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%),
    radial-gradient(circle at 100% 0%, rgba(255, 90, 31, 0.06), transparent 26%);
}

.adagent-chat-message {
  max-width: min(720px, 92%);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.adagent-chat-message.user {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 34px;
}

.adagent-chat-message.user .adagent-chat-avatar {
  grid-column: 2;
  grid-row: 1;
}

.adagent-chat-message.user .adagent-chat-bubble {
  grid-column: 1;
  grid-row: 1;
}

.adagent-chat-message.wide {
  max-width: 100%;
  width: 100%;
}

.adagent-chat-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ffe0c2;
  border-radius: 8px;
  background: #ffffff;
  color: #ff5a1f;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.adagent-chat-message.user .adagent-chat-avatar {
  border-color: transparent;
  background: linear-gradient(180deg, #ff6a2a, #ef4e17);
  color: #ffffff;
}

.adagent-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.adagent-chat-bubble {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid #dbe7ff;
  border-radius: 12px;
  border-top-left-radius: 5px;
  background: linear-gradient(180deg, #f8fbff, #f3f7ff);
  box-shadow: 0 10px 26px rgba(38, 54, 82, 0.045);
}

.adagent-chat-message.user .adagent-chat-bubble {
  border-color: #ffd7c4;
  border-top-left-radius: 12px;
  border-top-right-radius: 5px;
  background: linear-gradient(180deg, #fff9f5, #fff3ec);
}

.adagent-chat-bubble strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.35;
}

.adagent-chat-bubble p {
  margin: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
}

.adagent-chat-bubble span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.adagent-task-form-card {
  display: grid;
  gap: 11px;
}

.task-form-title {
  display: grid;
  gap: 3px;
}

.task-form-title strong {
  color: #111827;
  font-size: 13px;
}

.task-form-title span {
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}

.adagent-task-form-card form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.adagent-task-form-card.review-card form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adagent-task-form-card label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 11px;
  font-weight: 900;
}

.adagent-task-form-card label.wide {
  grid-column: 1 / -1;
}

.adagent-task-form-card input,
.adagent-task-form-card textarea {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  outline: 0;
  padding: 9px 10px;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
}

.adagent-task-form-card textarea {
  min-height: 76px;
  resize: vertical;
}

.adagent-task-form-card.review-card textarea {
  min-height: 58px;
}

.adagent-task-form-card input:focus,
.adagent-task-form-card textarea:focus {
  border-color: rgba(255, 90, 31, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.1);
}

.ai-suggestion-note {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}

.ai-suggestion-note b {
  color: #111827;
  font-size: 12px;
}

.adagent-chat-bubble.thinking,
.adagent-chat-bubble.result {
  border-color: #ffd7c4;
  background: #fffaf6;
}

.adagent-thinking-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.adagent-thinking-steps.live {
  grid-template-columns: 1fr;
}

.adagent-thinking-steps.compact {
  gap: 6px;
}

.adagent-thinking-steps i,
.adagent-result-strip span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
  font-style: normal;
}

.adagent-thinking-steps.live i {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 9px;
  row-gap: 3px;
}

.adagent-thinking-steps.live i.running {
  border-color: rgba(255, 90, 31, 0.42);
  background: linear-gradient(90deg, #fff7f2, #ffffff);
  box-shadow: inset 3px 0 0 #ff5a1f;
}

.adagent-thinking-steps.live i.done {
  border-color: #d9f4e8;
  background: #fbfffd;
}

.adagent-thinking-steps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #ff5a1f;
  color: #ffffff;
  font-size: 10px;
}

.adagent-thinking-steps span {
  color: #111827;
  font-size: 12px;
}

.adagent-thinking-steps em {
  grid-column: 2 / -1;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.adagent-thinking-steps small {
  justify-self: end;
  color: #98a2b3;
  font-size: 11px;
}

.adagent-thinking-steps i.running small {
  color: #ff5a1f;
  font-weight: 800;
}

.adagent-thinking-steps i.done small {
  color: #23b38e;
  font-weight: 800;
}

.adagent-result-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.adagent-result-strip span {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.adagent-chat-actions,
.adagent-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.adagent-message-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e6ebf2;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -10px 28px rgba(16, 24, 40, 0.055);
}

.adagent-message-composer .composerInputWrap {
  position: relative;
  min-width: 0;
}

.adagent-message-composer textarea {
  width: 100%;
  min-height: 58px;
  max-height: 130px;
  resize: vertical;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  outline: 0;
  padding: 13px 12px 12px 44px;
  color: #111827;
  background: #fbfcfe;
  font-size: 13px;
  line-height: 1.55;
}

.adagent-message-composer textarea:focus {
  border-color: rgba(255, 90, 31, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.1);
}

.adagent-message-composer .iconButton {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  min-height: 26px;
  border: 1px solid #ffd7c4;
  border-radius: 999px;
  background: #fff8f3;
  color: #ff5a1f;
  font-size: 18px;
  line-height: 1;
}

.adagent-message-composer .sendIcon {
  width: 40px;
  height: 40px;
  min-height: 40px;
  align-self: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6a2a, #ef4e17);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 9px 20px rgba(255, 90, 31, 0.22);
}

.adagent-message-composer .composerStatus {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adagent-quick-actions {
  grid-column: 1 / -1;
}

.adagent-quick-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #ffe0c2;
  border-radius: 8px;
  background: #fff8f3;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.project-data-page {
  align-items: start;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 21px;
  line-height: 1.18;
}

.section-title p {
  margin: 6px 0 0;
  font-size: 14px;
}

.secondary-button {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  min-height: 110px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.kpi-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.kpi-card.orange .kpi-icon {
  background: #fff3eb;
  color: var(--orange);
}

.kpi-card.teal .kpi-icon {
  background: #eafaf6;
  color: var(--green);
}

.kpi-card.blue .kpi-icon {
  background: #eef6ff;
  color: var(--blue);
}

.kpi-card.black .kpi-icon {
  background: var(--ink);
  color: #fff;
}

.kpi-card p {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.kpi-card span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.panel-grid,
.analytics-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
}

.ltv-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: stretch;
  margin-top: 12px;
}

.ltv-main {
  min-width: 0;
}

.ltv-panel h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.ltv-panel p {
  margin: 0;
  color: #667085;
  line-height: 1.5;
  font-size: 13px;
}

.ltv-edit-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ltv-edit-note span {
  padding: 3px 7px;
  border: 1px solid #e6ebf2;
  border-radius: 999px;
  background: #fff;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.ltv-panel label,
.ltv-manual-card label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.ltv-panel input {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 10px 12px;
}

.ltv-manual-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #fbfcff;
}

.ltv-manual-card p {
  margin: 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.funnel-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(138px, 1fr)) minmax(118px, .7fr);
  gap: 8px;
  margin-top: 10px;
}

.funnel-strip label,
.funnel-strip strong {
  position: relative;
  min-width: 0;
  overflow: hidden;
  min-height: 74px;
  padding: 8px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
}

.funnel-strip label {
  grid-template-columns: minmax(0, 1fr) 68px 14px;
  align-items: end;
  gap: 6px;
}

.funnel-strip label span {
  min-width: 0;
}

.funnel-strip label i {
  position: absolute;
  inset: auto 0 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6a2a, #23b38e);
  animation: meter-grow 720ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.funnel-strip b,
.funnel-strip em,
.funnel-strip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-strip b {
  color: #111827;
}

.funnel-strip em {
  margin-top: 3px;
  color: #667085;
  font-style: normal;
}

.funnel-strip input {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 7px;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
}

.funnel-strip small {
  align-self: center;
  color: #667085;
  font-weight: 900;
}

.funnel-strip strong {
  display: grid;
  place-items: center;
  align-content: center;
  color: #c2410c;
  background: #fff7f2;
}

.funnel-strip strong b {
  color: #c2410c;
}

.funnel-formula {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcff;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.funnel-formula b {
  grid-row: span 2;
  color: #111827;
  white-space: nowrap;
}

.funnel-formula span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ad-plan-workflow {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.workflow-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.workflow-head p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.workflow-progress {
  min-width: 92px;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.workflow-progress b {
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

.workflow-progress span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.workflow-progressbar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f7;
}

.workflow-progressbar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5a1f, #178bff);
  transition: width 0.28s ease;
}

.workflow-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
}

.workflow-rail {
  display: grid;
  gap: 7px;
  align-content: start;
}

.workflow-rail button {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fbfcfe;
  text-align: left;
  cursor: default;
}

.workflow-rail i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef2f7;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.workflow-rail span,
.workflow-rail em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-rail span {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
}

.workflow-rail em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.workflow-rail button.done i,
.workflow-rail button.running i {
  background: #fff3eb;
  color: #ff5a1f;
}

.workflow-rail button.done {
  border-color: rgba(35, 179, 142, 0.22);
  background: #f5fffb;
}

.workflow-rail button.done em {
  color: #16a17e;
}

.workflow-rail button.running {
  border-color: rgba(255, 90, 31, 0.32);
  background: #fff8f3;
  box-shadow: inset 3px 0 0 #ff5a1f;
}

.workflow-rail button.running em {
  color: #ff5a1f;
}

.workflow-dialogue {
  max-height: 430px;
  display: grid;
  gap: 9px;
  overflow: auto;
  padding-right: 4px;
}

.workflow-bubble {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #ffffff;
}

.workflow-bubble.running {
  border-color: #ffd7c4;
  background: #fffaf6;
}

.workflow-bubble.muted {
  opacity: 0.6;
}

.workflow-bubble header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.workflow-bubble header span,
.workflow-bubble header em {
  padding: 4px 6px;
  border-radius: 7px;
  background: #f8fafc;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.workflow-bubble header strong {
  color: #111827;
  font-size: 13px;
}

.workflow-bubble p {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  margin: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
}

.workflow-bubble p b {
  color: #ff5a1f;
  font-size: 11px;
}

.workflow-bubble p + p b {
  color: #16a17e;
}

.workflow-bubble div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workflow-bubble div i,
.calculation-trail article span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  color: #344054;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.calculation-trail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.calculation-trail article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}

.calculation-trail article strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.1;
}

.calculation-trail article b {
  color: #344054;
  font-size: 11px;
}

.calculation-trail article p {
  min-height: 32px;
  margin: 0;
  color: #667085;
  font-size: 10px;
  line-height: 1.45;
}

.embedded {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.panel {
  padding: 14px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-heading h3 {
  font-size: 15px;
}

.panel-heading span {
  font-size: 12px;
  white-space: nowrap;
}

.keyword-table {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.keyword-row {
  display: grid;
  grid-template-columns: 38px minmax(126px, 1fr) 88px 88px 88px 90px;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 12px;
}

.rank {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #ff5a1f;
  background: #fff3eb;
  border-radius: 8px;
  font-weight: 900;
}

.keyword-row b {
  color: #111827;
}

.analytics-band {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.chart-panel {
  min-height: 330px;
}

.bars {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(10, minmax(38px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 10px 4px 0;
}

.bar-item {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.bar-track {
  height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6f8fb, #eef3f9);
  overflow: hidden;
}

.bar-track i {
  width: 100%;
  height: var(--bar, 0%);
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #ff8a4c, #ff5a1f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transform: scaleY(0);
  transform-origin: bottom;
  animation: bar-rise 760ms cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--delay, 0ms);
  transition: filter .18s ease, transform .18s ease;
}

.bar-item span,
.bar-item b,
.chart-labels span {
  font-size: 11px;
}

.bar-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #344054;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-item .platform-logo {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.bar-item b {
  color: #111827;
}

.bar-item:hover .bar-track i {
  filter: saturate(1.12) brightness(1.03);
  transform: scaleY(1) translateY(-2px);
}

.compact-bars {
  height: 210px;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
}

.compact-bars .bar-track {
  height: 150px;
}

.line-chart {
  width: 100%;
  height: 235px;
  padding: 0;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 48px, #e8edf5 49px),
    linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #edf1f7;
}

.line-chart-wrap {
  position: relative;
}

.line-path {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: draw-line 980ms ease forwards;
}

.budget-line {
  animation-delay: 160ms;
}

.line-dot {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  animation: dot-pop 420ms ease forwards;
  animation-delay: 880ms;
}

.search-dot {
  fill: #178bff;
}

.budget-dot {
  fill: #23b38e;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
  color: #667085;
  text-align: center;
}

.donut {
  width: 172px;
  height: 172px;
  display: grid;
  place-items: center;
  margin: 12px auto 18px;
  border-radius: 50%;
  position: relative;
  animation: chart-pop 640ms ease both;
}

.donut::after {
  content: "";
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #edf1f7;
}

.donut span {
  position: relative;
  z-index: 1;
  font-weight: 900;
  color: #111827;
}

.legend-list {
  display: grid;
  gap: 9px;
}

.legend-list p {
  margin: 0;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  animation: fade-lift 520ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.legend-list i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-list b {
  color: #111827;
}

.model-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
}

.compact {
  margin-bottom: 12px;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.formula-grid article {
  min-height: 150px;
  padding: 16px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #ffffff;
}

.formula-grid svg {
  color: #ff5a1f;
  margin-bottom: 12px;
}

.formula-grid h3 {
  font-size: 17px;
}

.formula-grid p {
  margin: 9px 0 0;
  line-height: 1.65;
  font-size: 14px;
}

.page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel.full {
  grid-column: 1 / -1;
}

.keyword-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.keyword-cards article {
  min-height: 150px;
  padding: 13px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
}

.keyword-cards span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 7px;
  background: #fff3eb;
  color: #ff5a1f;
  font-size: 12px;
  font-weight: 900;
}

.keyword-cards strong {
  display: block;
  margin-top: 10px;
  font-size: 15px;
}

.keyword-cards p {
  margin: 8px 0;
  color: #111827;
  font-weight: 800;
}

.keyword-cards em {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  font-style: normal;
}

.platform-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #edf1f7;
}

.logo-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
}

.keyword-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: #f8fafc;
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: #475467;
  font-weight: 900;
  cursor: pointer;
  font-size: 12px;
}

.segmented button.active {
  background: #fff;
  color: #ff5a1f;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
}

.keyword-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.keyword-controls select {
  min-height: 32px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
  color: #111827;
  font-weight: 800;
  font-size: 12px;
}

.keyword-plan-summary,
.keyword-plan-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.keyword-plan-summary span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.keyword-plan-summary b {
  color: #111827;
}

.keyword-plan-actions button {
  min-height: 30px;
  border: 1px solid #ffd4c2;
  border-radius: 8px;
  background: #fff8f4;
  color: #e04b1a;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.data-table {
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.data-table > div {
  min-width: 980px;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.7fr 0.7fr 0.8fr 0.7fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.data-table.budget > div {
  min-width: 1480px;
  grid-template-columns: 1fr 0.58fr 0.9fr 0.42fr 0.55fr 0.52fr 0.52fr 0.58fr 0.68fr 1.55fr;
}

.data-table.budget small {
  display: block;
  margin-top: 4px;
  color: #667085;
  line-height: 1.45;
}

.data-table.competitor > div {
  min-width: 1180px;
  grid-template-columns: 1fr 1fr 0.9fr 0.6fr 0.6fr 0.6fr 0.6fr 1.4fr;
}

.data-table.social-index > div {
  min-width: 1180px;
  grid-template-columns: 1fr 1fr 0.72fr 0.62fr 0.72fr 0.48fr 1fr 1.65fr;
}

.data-table.keyword-performance > div {
  min-width: 1720px;
  grid-template-columns: 0.3fr 0.9fr 0.9fr 0.42fr 2.05fr 0.62fr 0.62fr 1.72fr 0.55fr 0.52fr 0.5fr;
}

.data-table.keyword-performance span > small {
  display: block;
  margin-top: 4px;
  color: #667085;
  line-height: 1.45;
}

.platform-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.social-split {
  display: grid;
  grid-template-columns: repeat(6, minmax(74px, 1fr));
  gap: 6px;
}

.social-split i {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 5px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  font-style: normal;
}

.social-split i.missing {
  opacity: 0.58;
}

.social-split em,
.social-split small {
  color: #667085;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-split b {
  color: #111827;
  font-size: 11px;
}

.social-split small {
  grid-column: 2 / -1;
  font-size: 10px;
}

.data-table.keyword-performance {
  gap: 4px;
}

.data-table.keyword-performance > div {
  min-width: 1720px;
  min-height: 92px;
  grid-template-columns: 0.3fr 0.9fr 0.9fr 0.36fr 1.58fr 0.55fr 0.58fr 1.46fr 0.5fr 0.52fr 0.48fr;
  gap: 6px;
  padding: 7px 8px;
}

.data-table.keyword-performance > div.selected {
  border-color: rgba(35, 179, 142, 0.34);
  background: #fbfffd;
}

.keyword-check {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

.keyword-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.keyword-check span {
  width: 18px;
  height: 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff;
}

.keyword-check input:checked + span {
  border-color: #23b38e;
  background: #23b38e;
}

.data-table.keyword-performance .thead {
  min-height: 34px;
  padding: 7px 10px;
}

.data-table.keyword-performance span > strong {
  font-size: 12px;
}

.data-table.keyword-performance .keyword-main,
.data-table.keyword-performance .question-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table.keyword-performance .keyword-main {
  color: #111827;
  font-size: 12px;
  line-height: 1.25;
}

.data-table.keyword-performance .question-cell {
  color: #667085;
  font-size: 11px;
}

.data-table.keyword-performance span > small {
  margin-top: 2px;
  font-size: 10px;
}

.data-table.keyword-performance .platform-logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.platform-split i {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 5px 6px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  font-style: normal;
}

.platform-split em {
  color: #667085;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-split b {
  margin-left: auto;
  color: #111827;
  font-size: 11px;
}

.data-table.keyword-performance .platform-split {
  gap: 4px;
}

.data-table.keyword-performance .platform-split i {
  padding: 4px 5px;
}

.data-table.keyword-performance .platform-split em {
  max-width: 58px;
}

.data-table.keyword-performance .social-split {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 4px;
}

.data-table.keyword-performance .social-split i {
  grid-template-columns: 16px minmax(56px, 1fr);
  grid-template-rows: 1fr;
  min-height: 28px;
  padding: 3px 5px;
}

.data-table.keyword-performance .social-split b {
  grid-column: 2;
  font-size: 10px;
  white-space: nowrap;
}

.data-table.keyword-performance .social-split small {
  display: none;
  grid-column: 4;
  font-size: 9px;
  line-height: 1.1;
}

.data-table.keyword-performance .social-split em {
  max-width: 48px;
  font-size: 10px;
}

.data-table.traffic-deduction > div {
  min-width: 1320px;
  grid-template-columns: 1fr 1fr 0.7fr 0.65fr 0.55fr 0.85fr 0.85fr 1fr 1.3fr;
}

.data-table .thead {
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.traffic-page {
  gap: 8px;
  height: auto;
  max-height: none;
  min-height: auto;
  align-items: stretch;
  overflow-y: visible;
  overflow-x: hidden;
  padding-right: 2px;
}

.traffic-page .project-context {
  padding: 6px 10px;
}

.traffic-page .panel {
  min-height: 0;
  padding: 9px 10px;
  background: #ffffff;
}

.traffic-page .keyword-pick-panel {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.traffic-page .panel-heading {
  align-items: center;
  margin-bottom: 7px;
}

.traffic-page .panel-heading h3 {
  font-size: 13px;
}

.traffic-page .panel-heading span {
  max-width: 62vw;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-page .traffic-summary-panel {
  padding-bottom: 7px;
}

.traffic-page .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 5px;
}

.traffic-page .kpi-card {
  min-height: 54px;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
}

.traffic-page .kpi-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 12px;
}

.traffic-page .kpi-card p {
  margin-bottom: 2px;
  font-size: 10px;
}

.traffic-page .kpi-card strong {
  font-size: 16px;
  line-height: 1.08;
}

.traffic-page .kpi-card span {
  margin-top: 1px;
  font-size: 10px;
}

.traffic-page .compact-formula {
  padding: 5px 7px;
}

.traffic-page .compact-formula p {
  font-size: 10px;
  line-height: 1.35;
}

.traffic-page .keyword-controls {
  gap: 6px;
  margin-bottom: 6px;
}

.traffic-page .segmented {
  padding: 3px;
}

.traffic-page .segmented button,
.traffic-page .keyword-plan-actions button {
  min-height: 26px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 11px;
}

.traffic-page .keyword-controls label,
.traffic-page .keyword-controls select,
.traffic-page .keyword-plan-summary span {
  min-height: 26px;
  font-size: 11px;
}

.traffic-page .keyword-plan-summary {
  gap: 5px;
}

.traffic-page .keyword-plan-summary span {
  padding: 0 7px;
}

.traffic-page .keyword-pick-panel .data-table.keyword-performance {
  height: auto;
  max-height: clamp(520px, 62dvh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  background: #ffffff;
  contain: paint;
}

.traffic-page .data-table {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.traffic-page .data-table > div {
  width: 100%;
  min-width: 0 !important;
}

.traffic-page .data-table > div > span,
.traffic-page .data-table > div > b,
.traffic-page .data-table > div > label,
.traffic-page .data-table > div > strong {
  min-width: 0;
}

.traffic-page .data-table > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-page .data-table.keyword-performance > div {
  width: 100%;
  min-width: 0 !important;
  min-height: 70px;
  grid-template-columns: 24px minmax(96px, 0.72fr) minmax(150px, 1fr) 58px minmax(268px, 1.34fr) 78px 88px minmax(268px, 1.34fr) 70px 70px 58px;
  padding: 5px 6px;
  gap: 4px;
  border-radius: 7px;
  overflow: visible;
}

.traffic-page .data-table.keyword-performance .thead {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 30px;
  padding: 6px;
  background: #111827;
}

.traffic-page .data-table.keyword-performance span > strong {
  font-size: 11px;
}

.traffic-page .data-table.keyword-performance .keyword-main {
  font-size: 10.5px;
  line-height: 1.25;
  white-space: normal;
}

.traffic-page .data-table.keyword-performance .question-cell {
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
}

.traffic-page .data-table.keyword-performance span > small,
.traffic-page .data-table.keyword-performance .platform-split em,
.traffic-page .data-table.keyword-performance .platform-split b {
  font-size: 9px;
}

.traffic-page .keyword-check {
  width: 22px;
  height: 22px;
}

.traffic-page .keyword-check span {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

.traffic-page .data-table.keyword-performance .platform-logo {
  width: 15px;
  height: 15px;
}

.traffic-page .data-table.keyword-performance .platform-split,
.traffic-page .data-table.keyword-performance .social-split {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 30px;
  gap: 4px;
  overflow: hidden;
}

.traffic-page .data-table.keyword-performance .platform-split i,
.traffic-page .data-table.keyword-performance .social-split i {
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 6px;
}

.traffic-page .data-table.keyword-performance .social-split i {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 6px;
}

.traffic-page .data-table.keyword-performance .social-split b {
  grid-column: 2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.traffic-page .data-table.keyword-performance .social-split small {
  display: none;
  grid-column: 4;
}

.traffic-page .data-table.keyword-performance .platform-split i {
  position: relative;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 6px;
}

.traffic-page .data-table.keyword-performance .social-split b,
.traffic-page .data-table.keyword-performance .platform-split b {
  justify-self: end;
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}

.traffic-page .data-table .with-tip,
.traffic-page .data-table.keyword-performance .platform-split i,
.traffic-page .data-table.keyword-performance .social-split i {
  position: relative;
  cursor: help;
}

.traffic-page .data-table.keyword-performance .platform-split i:hover,
.traffic-page .data-table.keyword-performance .social-split i:hover,
.traffic-page .data-table .with-tip:hover {
  z-index: 5;
  overflow: visible;
  border-color: rgba(255, 90, 31, 0.28);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.12);
}

.traffic-page .data-table.keyword-performance .platform-split i:hover::after,
.traffic-page .data-table.keyword-performance .social-split i:hover::after,
.traffic-page .data-table .with-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  z-index: 6;
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 300px;
  padding: 5px 7px;
  border: 1px solid #ffd7c4;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.16);
  white-space: normal;
  overflow-wrap: anywhere;
}

.traffic-page .data-table.keyword-performance .platform-split b,
.traffic-page .data-table.keyword-performance .platform-split em,
.traffic-page .data-table.keyword-performance .social-split b,
.traffic-page .data-table.keyword-performance .social-split em,
.traffic-page .data-table.keyword-performance .social-split small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-page .data-table.keyword-performance .social-split em,
.traffic-page .data-table.keyword-performance .platform-split em {
  max-width: none;
}

.traffic-page .traffic-scroll-panel .data-table {
  max-height: clamp(180px, 24dvh, 260px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  background: #ffffff;
  contain: paint;
}

.traffic-page .traffic-scroll-panel .data-table > div {
  width: 100%;
  min-width: 0 !important;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 10px;
}

.traffic-page .data-table.traffic-deduction > div {
  grid-template-columns: minmax(92px, 1fr) minmax(100px, 1fr) 74px 60px 54px 86px 86px minmax(112px, 1.1fr) minmax(120px, 1.2fr);
}

.traffic-page .data-table.social-index > div {
  grid-template-columns: minmax(82px, 0.9fr) minmax(96px, 1fr) 78px 58px 78px 48px minmax(100px, 1fr) minmax(132px, 1.3fr);
}

.traffic-page .traffic-scroll-panel .data-table .thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111827;
}

.traffic-page .chart-panel {
  min-height: 210px;
}

.traffic-page .bars {
  height: 158px;
  gap: 6px;
}

.traffic-page .compact-bars {
  height: 158px;
}

.traffic-page .compact-bars .bar-track {
  height: 104px;
}

.traffic-page .formula-block {
  padding: 8px;
}

.traffic-page .formula-block p {
  padding: 8px;
  font-size: 11px;
  line-height: 1.45;
}

.ai-matrix-panel {
  align-self: start;
}

.ai-benchmark-table .row-meter {
  grid-column: 1 / -1;
  width: 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6a2a, #178bff);
  animation: meter-grow 760ms ease forwards;
  animation-delay: var(--delay, 0ms);
}

.ai-benchmark-table strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-benchmark-table .platform-logo {
  width: 16px;
  height: 16px;
  border-radius: 5px;
}

@keyframes bar-rise {
  to {
    transform: scaleY(1);
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dot-pop {
  to {
    transform: scale(1);
  }
}

@keyframes chart-pop {
  from {
    opacity: 0;
    transform: scale(.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-lift {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes meter-grow {
  to {
    width: var(--bar, 100%);
  }
}

@media (max-width: 900px) {
  .traffic-page .data-table.keyword-performance > div {
    grid-template-columns: 22px minmax(74px, 1fr) minmax(82px, 1fr) 48px;
    align-items: start;
  }

  .traffic-page .data-table.keyword-performance .thead b:nth-child(n+5),
  .traffic-page .data-table.keyword-performance > div:not(.thead) > span:nth-child(n+5) {
    grid-column: 2 / -1;
  }

  .traffic-page .data-table.keyword-performance .social-split,
  .traffic-page .data-table.keyword-performance .platform-split {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .traffic-page .data-table.social-index > div,
  .traffic-page .data-table.traffic-deduction > div {
    grid-template-columns: minmax(86px, 1fr) minmax(96px, 1fr) minmax(72px, 0.8fr);
  }

  .traffic-page .data-table.social-index .thead b:nth-child(n+4),
  .traffic-page .data-table.social-index > div:not(.thead) > span:nth-child(n+4),
  .traffic-page .data-table.traffic-deduction .thead b:nth-child(n+4),
  .traffic-page .data-table.traffic-deduction > div:not(.thead) > span:nth-child(n+4) {
    grid-column: 1 / -1;
  }
}

.formula-block {
  display: grid;
  gap: 12px;
}

.formula-block p {
  margin: 0;
  padding: 13px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #edf1f7;
  color: #344054;
  line-height: 1.55;
}

.compact-table {
  display: grid;
  gap: 8px;
}

.compact-table div {
  display: grid;
  grid-template-columns: 0.9fr 60px 92px 110px;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 12px;
}

.ai-benchmark-table div {
  grid-template-columns: 0.9fr 54px 98px 98px 104px 120px;
  align-items: center;
}

.compact-table small {
  grid-column: 1 / -1;
  color: #667085;
  line-height: 1.45;
}

.compact-table span,
.compact-table em {
  color: #667085;
  font-style: normal;
}

.report-list {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  padding: 16px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
}

.report-card.clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.report-card.clickable:hover,
.report-card.selected {
  border-color: #ffb092;
  box-shadow: 0 14px 34px rgba(255, 90, 31, 0.12);
}

.report-card.clickable:hover {
  transform: translateY(-1px);
}

.report-card h3 {
  margin: 6px 0;
  font-size: 20px;
}

.report-card p {
  margin: 0;
  color: #475467;
  line-height: 1.6;
}

.report-card .report-date {
  margin: -2px 0 8px;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.report-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.report-meta-row i {
  padding: 4px 7px;
  border: 1px solid #e6ebf2;
  border-radius: 7px;
  background: #fff;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.report-meta-row i.ok {
  border-color: rgba(35, 179, 142, 0.24);
  background: #f4fffb;
  color: #15866b;
}

.report-meta-row i.warn {
  border-color: #ffd7c4;
  background: #fff7f2;
  color: #c2410c;
}

.report-card aside {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf1f7;
}

.report-card aside b {
  font-size: 20px;
}

.report-card aside span,
.report-card > div > span {
  color: #667085;
  font-size: 12px;
}

.report-open-button {
  margin-top: 8px;
  width: 100%;
}

.danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #ffd6cc;
  border-radius: 8px;
  background: #fff7f5;
  color: #c2410c;
  font-weight: 900;
  cursor: pointer;
}

.danger-button:hover {
  background: #fff0eb;
  border-color: #ffb8a6;
}

.report-delete-button {
  width: 100%;
}

.report-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.42);
  backdrop-filter: blur(8px);
}

.report-modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.26);
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f7;
  background: linear-gradient(135deg, #fff7f2, #ffffff 58%);
}

.report-modal-header span,
.report-modal-header p {
  color: #667085;
  font-size: 13px;
}

.report-modal-header h3 {
  margin: 5px 0 5px;
  font-size: 22px;
}

.report-modal-header p {
  margin: 0;
  font-weight: 800;
}

.report-modal-header .icon-button {
  flex: 0 0 auto;
  font-size: 24px;
}

.report-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.report-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #f6f8fb;
}

.report-modal .report-detail {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.report-modal .report-detail > .panel-heading {
  display: none;
}

.report-modal .mini-table {
  max-height: 420px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row i {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff3eb;
  color: #ff5a1f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.geo-word-groups {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.85fr;
  gap: 12px;
}

.geo-word-groups.summary {
  grid-template-columns: 1.1fr 0.95fr 0.95fr;
  align-items: stretch;
}

.geo-word-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
}

.geo-word-groups.summary .geo-word-group {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 250px;
}

.geo-word-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.geo-word-group header strong {
  font-size: 14px;
}

.geo-word-group header span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.geo-word-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.geo-word-stats b {
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf1f7;
  color: #344054;
  font-size: 12px;
}

.geo-word-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-word-group i {
  display: inline-grid;
  gap: 3px;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf1f7;
  color: #111827;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.geo-word-group i strong {
  font-size: 14px;
}

.geo-word-groups.summary .geo-word-group i {
  width: calc(50% - 4px);
  min-height: 72px;
}

.geo-word-groups.summary .geo-word-group.general i {
  width: calc(33.333% - 6px);
}

.geo-word-group i small {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.ai-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 5px;
  margin-top: 5px;
}

.ai-split b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 7px;
  background: #f8fafc;
  color: #111827;
}

.ai-split em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 10px;
}

.geo-word-group em {
  color: #98a2b3;
  font-style: normal;
  font-size: 12px;
}

.more-words {
  align-self: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #dbe3ee;
}

.geo-word-group.general header strong,
.geo-word-group.general i small {
  color: #178bff;
}

.geo-word-group.brand header strong,
.geo-word-group.brand i small {
  color: #23b38e;
}

.geo-word-group.rival header strong,
.geo-word-group.rival i small {
  color: #ff5a1f;
}

.geo-word-groups.compact {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.report-card .geo-word-groups.compact.summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.geo-word-groups.compact .geo-word-group {
  padding: 9px;
}

.geo-word-groups.compact .geo-word-group header {
  margin-bottom: 7px;
}

.geo-word-groups.compact .geo-word-group div {
  max-height: 72px;
  overflow: hidden;
}

.report-card .geo-word-groups.compact.summary .geo-word-stats {
  display: none;
}

.report-card .geo-word-groups.compact.summary .geo-word-group {
  min-height: 0;
}

.report-card .geo-word-groups.compact.summary .geo-word-group i {
  width: 100%;
  min-height: 0;
}

.geo-word-groups.compact .geo-word-group i {
  padding: 5px 7px;
  font-size: 11px;
}

.report-word-title {
  margin-top: 12px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.report-detail {
  display: grid;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-grid section {
  padding: 14px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcfe;
  min-width: 0;
}

.detail-grid h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.mini-table {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
}

.mini-table div {
  display: grid;
  grid-template-columns: 54px minmax(120px, 1fr) 110px 110px 110px;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.mini-table b {
  color: #ff5a1f;
}

.mini-table span {
  color: #475467;
}

.mini-table strong {
  color: #111827;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #ccd6e2;
  border-radius: 8px;
  color: #667085;
  background: #fbfcfe;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.page-grid > .full {
  grid-column: 1 / -1;
}

.project-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 11px;
  border: 1px solid #e6ebf2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.04);
}

.project-context div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-context strong {
  color: #111827;
  font-size: 13px;
}

.project-context span,
.project-context i {
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.project-context i {
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid #edf1f7;
  background: #fbfcfe;
}

.project-context.empty {
  border-style: dashed;
}

.page-grid > .panel.full:first-of-type {
  padding: 10px 12px;
}

.page-grid > .panel.full:first-of-type .panel-heading {
  margin-bottom: 8px;
}

.page-grid > .panel.full:first-of-type .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.page-grid > .panel.full:first-of-type .kpi-card {
  min-height: 70px;
  grid-template-columns: 30px 1fr;
  padding: 8px 10px;
}

.page-grid > .panel.full:first-of-type .kpi-icon {
  width: 30px;
  height: 30px;
}

.page-grid > .panel.full:first-of-type .kpi-card p {
  margin-bottom: 5px;
}

.page-grid > .panel.full:first-of-type .kpi-card strong {
  font-size: 18px;
}

.page-grid > .panel.full:first-of-type .kpi-card span {
  margin-top: 4px;
}

.compact-formula {
  gap: 0;
}

.compact-formula p {
  padding: 9px 10px;
  font-size: 11px;
}

.secondary-button.slim {
  height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

/* Inner-test refinement: compact, calmer dashboard typography. */
body {
  font-size: 14px;
}

.app-shell {
  padding: 12px;
}

.topbar {
  height: 58px;
  padding: 10px 14px;
}

.brand-lockup img {
  width: 38px;
  height: 38px;
}

.brand-lockup strong {
  font-size: 15px;
}

.brand-lockup span,
.user-pill,
.nav-tab {
  font-size: 12px;
}

.workspace {
  grid-template-columns: 368px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.agent-panel,
.dashboard,
.panel,
.model-section {
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.045);
}

.agent-panel,
.dashboard,
.panel {
  padding: 12px;
}

.agent-hero {
  grid-template-columns: 1fr 76px;
  padding: 13px;
}

.agent-hero h1 {
  font-size: 21px;
}

.agent-hero p {
  font-size: 12px;
}

.agent-hero img {
  width: 76px;
  height: 76px;
}

.task-form {
  gap: 9px;
}

.task-form label,
.ltv-panel label {
  font-size: 12px;
}

.task-form input,
.task-form select,
.task-form textarea,
.ltv-panel input {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 13px;
}

.task-form textarea {
  min-height: 76px;
}

.primary-action,
.secondary-button,
.danger-button {
  min-height: 36px;
  font-size: 13px;
}

.section-title h2 {
  font-size: 18px;
}

.section-title p {
  font-size: 12px;
}

.kpi-grid,
.summary-grid {
  gap: 10px;
}

.kpi-card {
  min-height: 92px;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 11px;
}

.kpi-icon {
  width: 36px;
  height: 36px;
}

.kpi-card p,
.kpi-card span,
.panel-heading span,
.message span,
.live-status p {
  font-size: 11px;
}

.kpi-card strong {
  font-size: 20px;
}

.panel-heading {
  margin-bottom: 10px;
}

.panel-heading h3,
.ltv-panel h3,
.detail-grid h4 {
  font-size: 14px;
}

.ltv-panel p,
.formula-block p,
.legend-list p {
  font-size: 12px;
}

.page-grid {
  gap: 12px;
  margin-top: 12px;
}

.page-grid > .panel.full:nth-of-type(2) {
  padding: 10px 12px;
}

.page-grid > .panel.full:nth-of-type(2) .panel-heading {
  margin-bottom: 8px;
}

.page-grid > .panel.full:nth-of-type(2) .panel-heading h3 {
  font-size: 14px;
}

.data-table {
  gap: 5px;
}

.data-table > div {
  padding: 8px 10px;
  gap: 8px;
  font-size: 11px;
}

.keyword-row {
  min-height: 46px;
  padding: 8px 10px;
}

.report-card {
  grid-template-columns: 1fr 218px;
  gap: 12px;
  padding: 13px;
}

.report-card h3 {
  font-size: 17px;
}

.report-card p {
  font-size: 12px;
}

.report-card .report-date {
  font-size: 12px;
}

.report-card aside b {
  font-size: 18px;
}

.report-modal-header {
  padding: 14px 16px;
}

.report-modal-header h3 {
  font-size: 18px;
}

.report-modal-body {
  padding: 14px;
}

.geo-word-group {
  padding: 10px;
}

.geo-word-groups.summary .geo-word-group {
  min-height: 218px;
}

.geo-word-group i strong {
  font-size: 12px;
}

.geo-word-group i,
.geo-word-stats b,
.mini-table div,
.compact-table div {
  font-size: 11px;
}

.mini-table div {
  padding: 8px;
}

.reference-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.reference-images img {
  width: 100%;
  max-height: 310px;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  border: 1px solid #e6ebf2;
}

@media (max-width: 1180px) {
  .workspace,
  .model-section {
    grid-template-columns: 1fr;
  }

  .adagent-chat-page {
    height: auto;
    min-height: calc(100vh - 88px);
  }

  .adagent-chat-workspace {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .adagent-result-strip,
  .adagent-thinking-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-task-form {
    grid-template-columns: 1fr 1fr;
  }

  .compact-task-form label.wide,
  .compact-task-form .primary-action {
    grid-column: 1 / -1;
  }

  .compact-task-form .primary-action {
    grid-row: auto;
    min-height: 40px;
  }

  .agent-panel {
    min-height: auto;
    position: static;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .login-story {
    min-height: auto;
    padding: 18px;
  }

  .login-box {
    min-height: auto;
    border-left: 0;
    padding: 10px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-feature-list,
  .auth-register-grid {
    grid-template-columns: 1fr;
  }

  .default-account,
  .auth-domain-note {
    grid-template-columns: 1fr;
  }

  .auth-full {
    grid-column: auto;
  }

  .app-shell {
    padding: 10px;
  }

  .topbar {
    height: auto;
    flex-wrap: wrap;
    position: static;
  }

  .topbar nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .top-actions {
    margin-left: auto;
  }

  .conversation-hero,
  .composer-title,
  .live-status.inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .adagent-chat-page {
    min-height: auto;
  }

  .adagent-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .adagent-chat-header .adagent-new-task-button {
    width: 100%;
  }

  .adagent-chat-header em {
    white-space: normal;
  }

  .adagent-chat-workspace {
    grid-template-columns: 1fr;
  }

  .adagent-node-rail {
    grid-template-rows: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #e6ebf2;
    max-height: none;
  }

  .adagent-node-rail > div:first-child,
  .adagent-rail-note {
    grid-column: 1 / -1;
  }

  .adagent-chat-scroll {
    max-height: none;
    min-height: 420px;
    padding: 14px;
  }

  .adagent-chat-message,
  .adagent-chat-message.user {
    max-width: 100%;
  }

  .adagent-result-strip,
  .adagent-thinking-steps {
    grid-template-columns: 1fr;
  }

  .live-status.inline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-status.inline p {
    justify-self: stretch;
    text-align: left;
  }

  .workflow-body {
    grid-template-columns: 1fr;
  }

  .workflow-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-pill {
    max-width: 120px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .agent-hero {
    grid-template-columns: 1fr;
  }

  .agent-hero img {
    width: 100%;
    height: 160px;
  }

  .kpi-grid,
  .summary-grid,
  .panel-grid,
  .analytics-band,
  .formula-grid,
  .page-grid,
  .embedded,
  .keyword-cards {
    grid-template-columns: 1fr;
  }

  .bars {
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    height: auto;
  }

  .keyword-row {
    grid-template-columns: 38px 1fr;
  }

  .keyword-row span:not(.rank),
  .keyword-row b {
    grid-column: 2;
  }

  .model-section {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-form {
    grid-template-columns: 1fr;
  }

  .compact-task-form,
  .workflow-rail,
  .calculation-trail {
    grid-template-columns: 1fr;
  }

  .report-card {
    grid-template-columns: 1fr;
  }

  .social-split {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .geo-word-groups {
    grid-template-columns: 1fr;
  }

  .geo-word-groups.summary {
    grid-template-columns: 1fr;
  }

  .report-card .geo-word-groups.compact.summary {
    grid-template-columns: 1fr;
  }

  .geo-word-groups.summary .geo-word-group,
  .geo-word-groups.summary .geo-word-group.general i,
  .geo-word-groups.summary .geo-word-group i {
    width: 100%;
  }

  .keyword-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    overflow-x: auto;
  }

  .platform-split,
  .ai-split {
    grid-template-columns: 1fr 1fr;
  }

  .workflow-body {
    grid-template-columns: 1fr;
  }

  .workflow-rail {
    grid-template-columns: 1fr 1fr;
  }

  .calculation-trail {
    grid-template-columns: 1fr 1fr;
  }

  .ltv-panel {
    grid-template-columns: 1fr;
  }

  .funnel-strip {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .mini-table div {
    grid-template-columns: 1fr;
  }

  .compact-table div {
    grid-template-columns: 1fr 1fr;
  }

  .secondary-button {
    width: 100%;
  }
}
