:root {
  color-scheme: light;
  --bg: #eef2f1;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-muted: #eef2f0;
  --text: #17212b;
  --text-soft: #5d6b76;
  --text-muted: #8a969d;
  --border: #dce3df;
  --primary: #178b62;
  --primary-strong: #116b4c;
  --primary-soft: #e8f5ef;
  --amber: #c87913;
  --amber-soft: #fff3df;
  --coral: #c64f4f;
  --coral-soft: #fdecec;
  --blue: #3478c9;
  --blue-soft: #eaf2fc;
  --shadow: 0 18px 50px rgba(23, 43, 35, 0.12);
  --radius: 8px;
  --topbar-height: 64px;
  --nav-height: 64px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 所有频道统一放大字号 */
.page {
  font-size: 18px;
}

.page .profile-sub-header h3,
.page .profile-hero-info h3,
.page .summary-title h3,
.page .persona-summary-head h3,
.page .persona-ai-header h3 {
  font-size: 22px;
}

.page .profile-sub-header p,
.page .profile-hero-info p,
.page .summary-title p,
.page .persona-summary-head p,
.page .persona-ai-header p {
  font-size: 16px;
}

.page .field-label,
.page .detail-label {
  font-size: 15px;
}

.page .input,
.page .textarea,
.page .select,
.page .detail-value,
.page .persona-summary-item strong,
.page .persona-ai-bubble,
.page .knowledge-item-row-head strong,
.page .knowledge-candidate-head strong {
  font-size: 17px;
}

.page .primary-button,
.page .secondary-button,
.page .ghost-button.compact {
  font-size: 16px;
}

.page .persona-summary-item span,
.page .knowledge-item-row-head span,
.page .knowledge-candidate-head span,
.page .knowledge-item-row p,
.page .knowledge-candidate-item p {
  font-size: 15px;
}

.page .profile-grid-item strong {
  font-size: 18px;
}

.page .profile-grid-item > span:last-child {
  font-size: 15px;
}

.page .page-heading h2 {
  font-size: 22px;
}

.page .page-heading p {
  font-size: 16px;
}

.page .message-bubble {
  font-size: 16px;
}

.page .metric-value {
  font-size: 17px;
}

.page .metric-label {
  font-size: 15px;
}

.page .customer-name,
.page .topic-card h3,
.page .member-name {
  font-size: 17px;
}

.page .customer-sub,
.page .topic-card p,
.page .customer-amount,
.page .customer-next {
  font-size: 14px;
}

.customer-tags .tag {
  font-size: 13px;
  min-height: 28px;
}

.customer-name {
  font-size: 18px;
}

.customer-sub {
  font-size: 14px;
}

.customer-card-bottom {
  font-size: 14px;
}

.customer-amount small {
  font-size: 13px;
}

.customer-score-row {
  font-size: 13px;
}

.topbar-text strong {
  font-size: 18px;
}

.topbar-text span {
  font-size: 15px;
}

.topbar .plan-badge {
  font-size: 15px;
}

.topbar .avatar-small {
  font-size: 19px;
}

.notification-bell {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c64f4f;
  color: #ffffff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.notification-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.notification-item.read {
  opacity: 0.68;
}

.notification-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.notification-item-head strong {
  min-width: 0;
  font-size: 14px;
}

.notification-item-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.notification-item p {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.notification-item-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  margin: 8px 0;
  border-radius: var(--radius);
}

.notification-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.danger-text {
  color: #b3261e;
}

.team-brand-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
}

.team-brand-entry-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.team-brand-entry span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.team-brand-entry strong {
  font-size: 14px;
}

.team-brand-entry small {
  color: var(--text-muted);
  font-size: 11px;
}

.team-brand-file-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
}

.team-brand-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-notification-button {
  width: 100%;
  min-height: 46px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
}

.notice-preview {
  margin: 8px 0 12px;
}

.notice-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

.segment-button {
  font-size: 17px;
}

.topic-card-header h3,
.generated-header h3 {
  font-size: 18px;
}

.topic-card-header p,
.generated-header p {
  font-size: 14px;
}

.mini-tag {
  font-size: 13px;
}

.platform-chip {
  font-size: 15px;
}

.generated-body {
  font-size: 16px;
}

#page-team .summary-title h3 {
  font-size: 20px;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
}

.hidden {
  display: none !important;
}

button,
button *,
[role="button"],
[role="button"] *,
.nav-item,
.nav-item *,
.filter-chip,
.filter-chip *,
.segment-button,
.segment-button *,
.profile-grid-item,
.profile-grid-item *,
a[href],
a[href] * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 24px 24px;
  background:
    linear-gradient(180deg, rgba(232, 245, 239, 0.72), rgba(246, 248, 247, 0.96) 40%),
    var(--surface-soft);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 34px;
  text-align: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 139, 98, 0.24);
}

.brand-mark span {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.auth-brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
}

.auth-brand h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
  font-weight: 800;
}

.auth-brand p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 15px;
}

.auth-panel {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.auth-heading p {
  margin: 6px 0 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input,
.select {
  min-height: 46px;
  padding: 0 13px;
}

.select {
  height: 46px;
  font-size: 17px;
}

.textarea {
  min-height: 92px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.55;
}

#formProfileText {
  min-height: 132px;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
}

.code-button {
  min-height: 46px;
  white-space: nowrap;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 750;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.primary-button {
  width: 100%;
  margin-top: 4px;
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}

.secondary-button:hover {
  border-color: #b8c7be;
  background: var(--surface-soft);
}

.text-button {
  background: transparent;
  color: var(--primary-strong);
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--primary);
}

#demoBtn {
  width: 100%;
  margin-top: 4px;
}

.activation-panel {
  margin-top: 6px;
  padding-top: 20px;
}

.activation-divider {
  position: relative;
  margin-bottom: 18px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
}

.activation-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.activation-divider span {
  position: relative;
  display: inline-block;
  padding: 0 10px;
  background: var(--surface);
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-footer {
  margin: 20px 10px 0;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.main-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: var(--topbar-height);
  padding: 8px 16px;
  background: rgba(246, 248, 247, 0.96);
  border-bottom: 1px solid rgba(220, 227, 223, 0.88);
  backdrop-filter: blur(14px);
}

.topbar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 6px;
}

.topbar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(220, 227, 223, 0.78);
}

.topbar-greeting {
  min-width: 0;
  text-align: right;
}

.topbar-greeting strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.topbar-phone {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-brand .brand-mark {
  width: 32px;
  height: 32px;
  margin-bottom: 0;
}

.topbar-brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.topbar-brand strong {
  overflow: hidden;
  max-width: 52vw;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
}

.avatar-small {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.avatar-large {
  width: 54px;
  height: 54px;
  font-size: 22px;
}

.topbar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-text strong,
.topbar-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-text strong {
  font-size: 15px;
  line-height: 1.25;
}

.topbar-text span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.plan-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.plan-badge {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover {
  color: var(--text);
  border-color: #b8c7be;
}

.primary-icon-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.primary-icon-button:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: #ffffff;
}

.page-container {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

.page {
  display: none;
  padding: 12px 16px 18px;
}

.page.active {
  display: block;
  animation: pageIn 0.22s ease both;
}

.page#page-chat.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.page#page-chat .page-heading {
  flex: 0 0 auto;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 28px;
  margin-bottom: 10px;
}

.page-heading h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.page-heading p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.page#page-profile .page-heading {
  min-height: 28px;
  margin-bottom: 10px;
}

.page#page-profile .page-heading h2 {
  font-size: 17px;
  line-height: 1.15;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: var(--nav-height);
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.nav-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  width: calc(20% - 16px);
  height: calc(100% - 8px);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary-soft);
  pointer-events: none;
  transition: transform 0.24s ease, width 0.24s ease;
  z-index: 0;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 52px;
  padding: 6px 2px 5px;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.nav-item,
.nav-item * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
  display: block;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  line-height: 1;
}

.nav-item.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.nav-item.nav-ai {
  color: var(--primary);
}

.nav-item.nav-ai.active {
  background: var(--primary-strong);
  color: #ffffff;
}

.nav-item:active {
  opacity: 0.72;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 4px;
}

.message {
  display: flex;
  gap: 9px;
  max-width: 92%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.message.user .message-avatar {
  background: #e7edf8;
  color: var(--blue);
}

.message-bubble {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 4px 12px 12px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.message-bubble p {
  margin: 0 0 7px;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul,
.message-bubble ol {
  margin: 0 0 8px;
  padding-left: 20px;
}

.message-bubble li {
  margin: 3px 0;
}

.message-bubble .markdown-heading {
  margin: 8px 0 4px;
  font-size: 15px;
  line-height: 1.4;
}

.message-bubble blockquote {
  margin: 7px 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  color: var(--text-soft);
}

.message-bubble code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 12px;
}

.message-bubble .markdown-table-wrap {
  margin: 8px 0;
  overflow-x: auto;
}

.message-bubble .markdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.message-bubble .markdown-table th,
.message-bubble .markdown-table td {
  padding: 7px 8px;
  border: 1px solid var(--border);
  text-align: left;
}

.message-bubble .markdown-table th {
  background: var(--surface-soft);
  font-weight: 800;
}

.message-image-stack {
  position: relative;
  width: 82px;
  height: 56px;
  margin-bottom: 0;
}

.message-image-stack-item {
  position: absolute;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  transform: rotate(0deg);
}

.message-image-stack-item:nth-child(1) {
  left: 0;
  top: 3px;
  transform: rotate(-6deg);
}

.message-image-stack-item:nth-child(2) {
  left: 10px;
  top: 2px;
  transform: rotate(-2deg);
}

.message-image-stack-item:nth-child(3) {
  left: 20px;
  top: 3px;
  transform: rotate(2deg);
}

.message-image-stack-item:nth-child(4) {
  left: 30px;
  top: 4px;
  transform: rotate(6deg);
}

.message-image-stack-more {
  position: absolute;
  right: 0;
  bottom: 2px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.76);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.message.image-only .message-bubble {
  padding: 4px;
  line-height: 0;
  white-space: normal;
  font-size: 0;
}

.message.image-only .message-meta {
  margin-top: 2px;
  font-size: 10px;
}

.message-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin: 8px 0;
  border-radius: 8px;
}

.image-expired {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 12px;
  border-radius: 8px;
  background: #f1f4f2;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.message.user .message-bubble {
  border-radius: 12px 4px 12px 12px;
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.message-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.message.user .message-meta {
  color: rgba(255, 255, 255, 0.74);
  text-align: right;
}

.message-copy-btn {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  min-height: 32px;
  padding: 4px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.message-save-btn {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  min-height: 32px;
  padding: 4px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.message-save-btn:disabled {
  color: var(--text-muted);
  cursor: default;
}

.message-save-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.message-bubble.typing-bubble {
  display: flex;
  align-items: center;
  min-height: 22px;
  padding: 7px 11px;
  line-height: 1;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.composer {
  display: flex;
  gap: 9px;
  align-items: center;
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 8px;
  background: var(--bg);
}

.composer-attach {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted, #64707a);
  cursor: pointer;
}

.composer-attach svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-image-preview {
  margin-bottom: 7px;
  cursor: zoom-in;
}

.chat-image-preview img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 8px;
  background: #f6f7f8;
}

.chat-image-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chat-image-thumbs .chat-image-thumb {
  flex: 0 0 72px;
}

.chat-image-thumbs .chat-image-thumb img {
  width: 72px;
  height: 72px;
  max-height: none;
  object-fit: cover;
}

.chat-image-preview-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted, #64707a);
  text-align: center;
}

.chat-image-thumb {
  position: relative;
  display: inline-block;
}

.chat-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 48px 16px 24px;
  background: rgba(0, 0, 0, 0.82);
  overflow: hidden;
}

.image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 72px);
  object-fit: contain;
  border-radius: 8px;
  touch-action: none;
  user-select: none;
}

.image-lightbox-controls {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 501;
  display: flex;
  gap: 8px;
}

.image-lightbox-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.image-lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 501;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-prev {
  left: 12px;
}

.image-lightbox-next {
  right: 12px;
}

.profile-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.profile-qrcode-display {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.profile-qrcode-item {
  position: relative;
  width: min(72%, 220px);
}

.profile-qrcode-view {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.profile-qrcode-view img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
}

.profile-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-gallery-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.gallery-upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(23, 139, 98, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, #eaf6f1, #f6fbf9);
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 6px 16px rgba(23, 139, 98, 0.08);
}

.gallery-upload-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(23, 139, 98, 0.08);
}

.gallery-upload-button-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.gallery-upload-button-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-upload-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-upload-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-upload-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.gallery-upload-option:active {
  border-color: var(--primary);
  background: var(--surface-soft);
}

.gallery-upload-option-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.gallery-upload-option-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-upload-option-text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.gallery-upload-option-text strong {
  font-size: 14px;
  line-height: 1.2;
}

.gallery-upload-option-text small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.gallery-upload-option-arrow {
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

.profile-image-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.profile-image-view {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.profile-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.composer-input {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.composer-input.voice-recording,
.ai-drawer-input.voice-recording,
.customer-ai-input.voice-recording,
.persona-ai-input.voice-recording {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  animation: composer-recording-pulse 1.2s ease-in-out infinite;
}

.composer-input:disabled {
  cursor: wait;
  opacity: 0.58;
}

@keyframes composer-recording-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(23, 139, 98, 0.28);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(23, 139, 98, 0);
  }
}

.composer-input::-webkit-scrollbar {
  display: none;
}

.composer-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.send-button {
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
}

.send-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-button:hover {
  background: var(--primary-strong);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.migration-banner {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d8e3fb;
  border-radius: var(--radius);
  background: #edf4ff;
  color: #3d65a3;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.metric-item {
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.metric-label {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-bottom: 11px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.search-input {
  min-width: 0;
  height: 44px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.sort-button {
  min-height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-channel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.customer-channel-tab {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.customer-channel-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.customer-channel-view {
  display: none;
}

.customer-channel-view.active {
  display: block;
}

.customer-add-inline {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
}

.customer-add-inline-top {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  margin-top: 0;
  padding: 0 12px;
  font-size: 12px;
}

.customer-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  margin-top: 8px;
  overflow-y: auto;
}

.customer-picker-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
}

.customer-picker-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.customer-picker-item strong {
  color: var(--text);
  font-size: 14px;
}

.customer-picker-item span {
  color: var(--text-muted);
  font-size: 11px;
}

.customer-profile-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.profile-detail-table th,
.profile-detail-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.profile-detail-table th {
  width: 92px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.profile-follow-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profile-section-subtitle {
  margin: 0;
  font-size: 15px;
}

.customer-archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.customer-filter-inline {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.customer-task-sort-row {
  margin-bottom: 10px;
}

.customer-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.customer-task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-task-sort {
  display: flex;
  gap: 6px;
}

.customer-task-sort-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.customer-task-sort-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
}

.customer-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-ai-task-section {
  margin-top: 16px;
}

.customer-ai-task-section > .customer-task-section-title {
  margin-bottom: 10px;
}

.customer-ai-task-block {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.customer-ai-task-block strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 12px;
}

.customer-ai-task-block p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.customer-task-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px 13px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.customer-task-card strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.customer-task-customer-name {
  display: block;
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.customer-task-source {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef0f2;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.customer-task-source.ai {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.customer-task-status {
  display: inline-flex;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 750;
}

.customer-task-status.overdue {
  background: var(--coral-soft);
  color: var(--coral);
}

.customer-task-meta {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.repurchase-card {
  padding: 10px 12px;
}

.repurchase-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.repurchase-card-head .customer-task-status {
  flex: none;
}

.repurchase-card-customer {
  display: inline;
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.repurchase-card-product {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.repurchase-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.repurchase-card-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.repurchase-card-actions {
  margin-top: 8px;
}

.customer-task-complete {
  position: absolute;
  right: 52px;
  top: 10px;
  min-height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: #eef7f2;
  color: var(--primary-strong);
  font-size: 11px;
}

.customer-task-complete:disabled,
.customer-task-complete.disabled {
  background: #eef0f2;
  color: var(--text-muted);
}

.customer-task-delete {
  position: absolute;
  right: 10px;
  top: 10px;
  min-height: 28px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: #f2f4f4;
  color: var(--text-muted);
  font-size: 11px;
}

.customer-task-back {
  margin-bottom: 10px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.customer-task-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-task-detail-head {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.customer-task-detail-head h3 {
  margin: 8px 0 5px;
  font-size: 17px;
  line-height: 1.35;
}

.customer-task-detail-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.customer-task-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.customer-task-follow {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.customer-task-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
}

.customer-task-section-title span {
  color: var(--text-muted);
  font-size: 12px;
}

.danger-button {
  color: var(--coral);
}

.customer-card {
  position: relative;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.customer-card:active {
  border-color: #b8c7be;
}

.customer-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

.customer-temp-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.customer-temp-dot.success { background: var(--primary); }
.customer-temp-dot.amber { background: var(--amber); }
.customer-temp-dot.danger { background: var(--coral); }

.customer-card-main {
  flex: 1;
  min-width: 0;
}

.customer-card-main .customer-name {
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-touch {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.customer-overview {
  padding: 4px 2px;
}

.customer-overview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.customer-overview-meta strong {
  color: var(--text);
}

.customer-overview-diagnosis {
  margin: 12px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.customer-next-step-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  color: var(--text-soft);
  font-size: 13px;
}

.customer-overview-value {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.customer-overview-reminders {
  margin-top: 6px;
}

.customer-ai-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px 2px;
}

.customer-timeline {
  margin-bottom: 14px;
}

.customer-timeline-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 46px;
  margin-top: 8px;
}

.customer-timeline-bar-wrap {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.customer-timeline-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
  opacity: 0.72;
}

.customer-timeline-bar.active {
  opacity: 1;
}

.customer-timeline-day {
  margin-top: 3px;
  color: var(--primary-strong);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-45deg);
}

.customer-tags {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.customer-card-delete {
  min-height: 24px;
  margin-left: 4px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
}

.customer-delete-warning {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--coral-soft);
  color: var(--coral);
}

.customer-delete-warning strong {
  display: block;
  font-size: 15px;
}

.customer-delete-warning p {
  margin: 5px 0 0;
  font-size: 12px;
}

.customer-detail-delete-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.customer-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.customer-form-actions .primary-button,
.customer-form-actions .secondary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 0;
}

.customer-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.customer-sub {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
}

.tag-intent-high,
.tag-status-won {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.tag-intent-medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag-intent-watching,
.tag-intent-low {
  background: #eef0f2;
  color: var(--text-muted);
}

.tag-status-following,
.tag-status-initial {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag-status-watching {
  background: var(--coral-soft);
  color: var(--coral);
}

.customer-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
}

.customer-amount {
  color: var(--text);
  font-weight: 800;
}

.customer-amount small {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.customer-card.is-won .customer-name,
.customer-card.is-won .customer-actual {
  color: var(--coral);
}

.customer-card .customer-potential {
  color: var(--text);
}

.customer-amount-sep {
  color: var(--text-muted);
  margin: 0 3px;
}

.customer-next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.customer-next svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-score-row {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #e8eeeb;
}

.customer-segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page#page-customers.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.page#page-customers.active .page-heading,
.page#page-customers.active .customer-segment {
  flex: 0 0 auto;
}

.page#page-customers.active .customer-channel-view.active {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.acquisition-segment {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex-wrap: nowrap;
}

.acquisition-material-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.segment-button {
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 750;
}

.segment-button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(23, 43, 35, 0.1);
}

.stack-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acquisition-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acquisition-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-card,
.generated-card,
.acquisition-form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.topic-card {
  padding: 15px;
}

.topic-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.topic-card-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.topic-card-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.topic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.topic-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.acquisition-form-card {
  padding: 16px;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.platform-chip {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

.platform-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.generated-card {
  padding: 16px;
}

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

.generated-header h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.generated-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.generated-body {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.generated-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
}

.generated-actions .primary-button,
.generated-actions .secondary-button {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.summary-card,
.chart-card,
.list-card,
.panel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.brand-application-card {
  padding: 16px;
}

.brand-application-card .panel-card-title {
  margin-bottom: 14px;
}

.brand-application-card .panel-card-title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.brand-application-card .panel-card-title p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.brand-application-card .team-brand-entry {
  margin-bottom: 0;
}

.mentor-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.mentor-info strong {
  font-size: 17px;
  line-height: 1.3;
}

.mentor-info span {
  color: var(--text-soft);
  font-size: 14px;
}

.mentor-info .secondary-button {
  align-self: flex-start;
  margin-top: 4px;
}

.summary-card {
  padding: 16px;
}

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

.summary-title h3,
.section-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}

.summary-title p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.big-number {
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
}

.big-number small {
  margin-left: 3px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.progress-track {
  height: 9px;
  margin: 13px 0 9px;
  border-radius: 999px;
  background: #e9eeeb;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #48b68a);
}

.progress-fill.amber {
  background: linear-gradient(90deg, #dd9a35, #f1bc59);
}

.summary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-soft);
  font-size: 12px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.legend-dot.amber {
  background: #dd9a35;
}

.legend-dot.blue {
  background: var(--blue);
}

.chart-card {
  padding: 16px;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 150px;
  margin-top: 18px;
}

.chart-bars-dual {
  height: 170px;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.chart-col-dual {
  justify-content: flex-end;
}

.chart-bar-group {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 120px;
}

.chart-value {
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  min-height: 8px;
  border-radius: 6px 6px 2px 2px;
  background: var(--primary);
}

.chart-bars-dual .chart-bar {
  width: 14px;
  max-width: 16px;
  flex: 0 0 14px;
}

.chart-bar.actual {
  background: var(--primary);
}

.chart-bar.target {
  background: #dd9a35;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.chart-label {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.list-card {
  overflow: hidden;
}

.list-card-header {
  padding: 15px 16px 11px;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.button.team-member-card,
.team-member-card {
  width: 100%;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.team-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-person strong,
.team-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-person span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 15px;
}

.team-person strong {
  font-size: 18px;
}

.team-member-meta {
  white-space: nowrap !important;
}

.team-manage-card {
  padding: 16px;
}

.team-member-form {
  margin-bottom: 12px;
}

.team-member-form .redeem-input-row {
  margin: 0;
}

.team-relation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-relation-section {
  margin-top: 14px;
}

.team-relation-section h4 {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.team-relation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.team-relation-row:first-child {
  border-top: 0;
}

.team-relation-row strong,
.team-relation-row span {
  display: block;
}

.team-relation-row span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.team-relation-row .secondary-button {
  min-height: 36px;
  padding: 0 12px;
}

.team-action-group {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.team-number {
  text-align: right;
  font-size: 18px;
  font-weight: 800;
}

.team-number small {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 550;
}

.team-member-card-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.team-member-card-bottom p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.5;
  text-align: right;
}

.team-summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

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

.team-summary-item {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
}

.team-summary-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.team-summary-item span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.35;
}

.team-drilldown-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.team-drilldown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.team-drilldown-value {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.activity-score {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.activity-score.high {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.activity-score.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.activity-score.low {
  background: var(--coral-soft);
  color: var(--coral);
}

.member-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.member-diagnosis-card,
.member-advice-grid > div {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.member-diagnosis-card {
  margin-bottom: 10px;
}

.member-diagnosis-card strong,
.member-advice-grid strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.member-diagnosis-card p,
.member-advice-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.member-advice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.member-follow-section {
  margin-top: 8px;
}

.member-period-tabs {
  margin-bottom: 12px;
}

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.member-stat {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.member-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.member-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.member-radar-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.radar-chart {
  width: min(100%, 320px);
  height: auto;
}

.radar-grid {
  fill: none;
  stroke: #dfe5e1;
  stroke-width: 1;
}

.radar-axis {
  stroke: #dfe5e1;
  stroke-width: 1;
}

.radar-shape {
  fill: rgba(23, 139, 98, 0.18);
  stroke: var(--primary);
  stroke-width: 2;
}

.radar-dot {
  fill: var(--primary);
}

.radar-label {
  fill: var(--text-soft);
  font-size: 11px;
}

.locked-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  text-align: center;
}

.locked-card svg {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.locked-card strong {
  margin-bottom: 6px;
}

.locked-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.profile-performance-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
}

.profile-performance-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.profile-performance-card-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.profile-performance-card-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-card-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.profile-card-arrow svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-performance-card .summary-card,
.profile-performance-card .chart-card {
  border: 0;
  background: transparent;
}

.my-performance-split {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.performance-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.performance-block + .performance-block {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.team-performance-summary .progress-fill.amber {
  background: linear-gradient(90deg, #3478c9, #5a95d7);
}

.team-chart .chart-bar.actual {
  background: #3478c9;
}

.legend-dot.team-dot {
  background: #3478c9;
}

.profile-grid-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.profile-grid-item:active {
  border-color: #b8c7be;
}

.profile-grid-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.profile-grid-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-grid-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.profile-grid-item > span:last-child {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.profile-sub-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 2px 0 4px;
}

.profile-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 20px;
  line-height: 1.2;
}

.profile-breadcrumb span {
  white-space: nowrap;
}

.profile-breadcrumb-arrow {
  color: var(--text-muted);
}

.profile-breadcrumb strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.profile-back-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.profile-back-inline svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-title-arrow {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.2;
}

.profile-back-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 38px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.profile-back-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.profile-hero-info {
  min-width: 0;
}

.profile-hero-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.profile-hero-info p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.profile-form {
  padding: 16px;
}

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

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

.profile-form .primary-button {
  margin-top: 2px;
}

.completion-card {
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f3faf6, #ffffff);
}

.completion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.completion-head strong {
  font-size: 13px;
}

.completion-head span {
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: 850;
}

.completion-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5efe9;
}

.completion-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #4ec394);
}

.completion-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 11px;
}

.completion-hint {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.persona-card {
  overflow: hidden;
  padding: 0;
}

.persona-summary {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

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

.persona-summary-head h3 {
  margin: 0;
  font-size: 16px;
}

.persona-summary-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.persona-summary-head .plan-badge {
  flex: 0 0 auto;
}

.persona-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.persona-canvas {
  margin-top: 16px;
}

.persona-canvas h4 {
  margin: 0 0 9px;
  font-size: 13px;
  color: var(--text-soft);
}

.persona-summary-item {
  min-width: 0;
  padding: 11px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.persona-summary-item span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.persona-summary-item strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.persona-summary-value {
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.persona-summary-value .persona-empty {
  color: var(--text-muted);
}

.ip-story-list {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.ip-story-list li {
  margin: 4px 0;
}

.persona-summary-value.markdown-body p,
.persona-summary-value.markdown-body ul,
.persona-summary-value.markdown-body ol {
  margin: 0 0 6px;
}

.persona-summary-value.markdown-body p:last-child,
.persona-summary-value.markdown-body ul:last-child,
.persona-summary-value.markdown-body ol:last-child {
  margin-bottom: 0;
}

.persona-summary-value.markdown-body ul,
.persona-summary-value.markdown-body ol {
  padding-left: 18px;
}

.persona-summary-value.markdown-body li {
  margin: 2px 0;
}

.persona-summary-value.markdown-body blockquote {
  margin: 4px 0;
  padding-left: 10px;
  border-left: 2px solid var(--border);
  color: var(--text-soft);
}

.persona-summary-value.markdown-body code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 12px;
}

.persona-summary-value.markdown-body .markdown-heading {
  margin: 7px 0 4px;
  font-size: 13px;
}

.persona-summary-value.markdown-body .markdown-spacer {
  height: 5px;
}

.persona-ai-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.persona-ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 0;
}

.persona-ai-toggle {
  flex: 1;
  min-height: 36px;
  padding: 0 12px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.persona-ai-section.collapsed .persona-ai-toggle {
  min-height: 42px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
  text-align: center;
}

.persona-ai-section.collapsed .persona-ai-messages,
.persona-ai-section.collapsed .persona-ai-form {
  display: none;
}

.persona-ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.persona-ai-header h3 {
  margin: 0;
  font-size: 16px;
}

.persona-ai-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.persona-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  min-height: 150px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface-soft);
}

.persona-ai-message {
  display: flex;
  gap: 8px;
  max-width: 94%;
}

.persona-ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.persona-ai-role {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.persona-ai-message.user .persona-ai-role {
  background: #e7edf8;
  color: var(--blue);
}

.persona-ai-bubble {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 4px 11px 11px 11px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.persona-ai-message.user .persona-ai-bubble {
  border-radius: 11px 4px 11px 11px;
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.persona-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.persona-ai-input {
  min-height: 48px;
  max-height: 120px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.5;
}

.persona-ai-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.persona-ai-send {
  min-height: 48px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.persona-manual {
  padding: 0 16px 12px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.persona-manual summary {
  padding: 12px 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.knowledge-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.knowledge-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-candidates {
  margin: 0 16px 16px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.knowledge-candidates-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.knowledge-candidates-head h4 {
  margin: 0;
  font-size: 14px;
}

.knowledge-candidates-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.knowledge-candidates-batch {
  display: flex;
  gap: 6px;
}

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

.knowledge-candidate-item {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.knowledge-candidate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.knowledge-candidate-head strong {
  min-width: 0;
  font-size: 13px;
}

.knowledge-candidate-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.knowledge-candidate-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.knowledge-candidate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.knowledge-item-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.knowledge-item-row {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.knowledge-item-card {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: inherit;
  text-align: left;
}

.knowledge-item-card:active {
  opacity: 0.82;
}

.knowledge-detail-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.knowledge-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-detail-actions .secondary-button {
  width: 100%;
}

.knowledge-detail-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.knowledge-detail-content {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.knowledge-editor-content {
  min-height: 58vh;
  max-height: 72vh;
  resize: vertical;
}

.knowledge-item-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.knowledge-item-row-head strong {
  min-width: 0;
  font-size: 13px;
}

.knowledge-item-row-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.knowledge-item-row p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.knowledge-item-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

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

.knowledge-guide {
  margin: 0 16px 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.knowledge-guide strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 13px;
}

.knowledge-guide strong:first-child {
  margin-top: 0;
}

.knowledge-guide p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.knowledge-source-card {
  margin: 0 16px 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.knowledge-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.knowledge-source-head strong {
  font-size: 14px;
}

.knowledge-source-head span {
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
}

.knowledge-source-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 8px;
  align-items: center;
}

.brand-summary {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.brand-summary strong {
  display: block;
  font-size: 14px;
}

.brand-summary > span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.brand-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.brand-summary-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 11px;
}

.primary-button.compact {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding: 0 14px;
  font-size: 13px;
}

.knowledge-sheet-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.knowledge-list {
  display: grid;
  gap: 10px;
}

.knowledge-list-item {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.knowledge-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.knowledge-list-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.knowledge-list-head span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.knowledge-list-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.knowledge-list-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.ghost-button.compact {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
}

.ghost-button.compact.danger {
  color: #b3261e;
}

.knowledge-item {
  width: 100%;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.knowledge-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-strong);
}

.knowledge-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.knowledge-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.knowledge-item span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.package-card {
  padding: 16px;
}

.package-card .summary-title {
  margin-bottom: 14px;
}

.package-card .summary-title h3,
.token-balance-card .summary-title h3 {
  font-size: 15px;
  line-height: 1.3;
}

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

.package-stat {
  padding: 11px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.package-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.package-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.token-balance-card {
  margin-top: 12px;
  padding: 16px;
}

.token-balance-card .summary-title,
.token-daily-card .summary-title {
  margin-bottom: 12px;
}

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

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

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

.token-daily-card {
  margin-top: 12px;
  padding: 16px;
}

.token-daily-head {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.token-chart-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.token-chart-scroll::-webkit-scrollbar {
  height: 5px;
}

.token-chart-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--border);
}

.token-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-width: max-content;
  height: 190px;
  padding-top: 8px;
}

.token-chart-column {
  display: flex;
  flex: 0 0 43px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.token-chart-bar-area {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.token-chart-value {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.token-chart-bar {
  width: 22px;
  min-height: 4px;
  border-radius: 7px 7px 0 0;
  background: var(--primary);
}

.token-chart-day {
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 10px;
  white-space: nowrap;
}

.token-chart-seed {
  margin-top: 0;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.token-daily-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-daily-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 11px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.token-daily-row strong {
  font-size: 13px;
}

.token-daily-row span {
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}

.redeem-card {
  padding: 16px;
}

.redeem-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: #e8eeeb;
}

.redeem-tab {
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

.redeem-tab.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(23, 43, 35, 0.1);
}

.redeem-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 9px;
}

.redeem-input {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.redeem-hint {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.logout-button {
  color: var(--coral);
  padding: 5px 0;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 20, 0.46);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.18s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow: hidden;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 50px rgba(15, 23, 20, 0.18);
  animation: sheetUp 0.24s ease both;
}

.sheet.customer-detail-sheet {
  height: 92dvh;
}

.sheet.customer-detail-sheet .sheet-body {
  flex: 1;
  min-height: 0;
}

@keyframes sheetUp {
  from {
    transform: translate(-50%, 28px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid var(--border);
}

.sheet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-eyebrow {
  margin: 0 0 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.sheet-header h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.sheet-body {
  overflow-y: auto;
  padding: 16px 18px max(20px, env(safe-area-inset-bottom));
}

.ai-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(15, 23, 20, 0.36);
  backdrop-filter: blur(2px);
}

.ai-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  box-shadow: 0 -18px 50px rgba(15, 23, 20, 0.18);
  animation: sheetUp 0.24s ease both;
}

.ai-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.ai-drawer-eyebrow {
  margin: 0 0 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.ai-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.ai-drawer-messages {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 260px;
  max-height: calc(88dvh - 150px);
  overflow-y: auto;
  padding: 14px 16px;
}

.ai-drawer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 9px;
  align-items: end;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.ai-drawer-input {
  min-height: 46px;
  max-height: 120px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.5;
}

.ai-drawer-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.sheet-sticky-actions {
  position: sticky;
  top: -16px;
  z-index: 6;
  display: flex;
  gap: 8px;
  margin: -16px -18px 14px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.sheet-sticky-actions button {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.sheet-sticky-actions .primary-button {
  width: auto;
  margin-top: 0;
}

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

.detail-item {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.record-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-item-full {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.customer-profile-block {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.customer-profile-block p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customer-more {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.customer-more summary {
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.customer-more .detail-grid {
  margin-top: 10px;
}

.customer-detail-tabs {
  position: sticky;
  top: -16px;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: -4px -4px 14px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.customer-detail-tab {
  flex: 1;
  min-height: 36px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.customer-detail-tab.active {
  background: #ffffff;
  color: var(--primary-strong);
  box-shadow: 0 1px 3px rgba(15, 23, 20, 0.08);
}

.customer-profile-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.secondary-button.compact {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 0 14px;
  font-size: 13px;
}

.customer-detail-content {
  min-width: 0;
}

.customer-ai-panel {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: block;
  height: auto;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}

.acquisition-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.acquisition-quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  margin-left: 34px;
}

.acquisition-quick-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}

.acquisition-quick-chip:active {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.page#page-acquisition.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.acquisition-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#acquisitionViewContent {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#acquisitionViewContent > * {
  flex: 0 0 auto;
}

.material-tag-filter {
  min-height: 32px;
}

.customer-ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 0;
}

.customer-ai-panel.collapsed .customer-ai-head {
  padding: 0;
}

.customer-ai-toggle {
  flex: 1;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.ai-clear-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.customer-ai-panel.collapsed .customer-ai-toggle {
  min-height: 42px;
}

.customer-ai-panel.collapsed .customer-ai-messages {
  display: none;
}

.customer-ai-panel.collapsed .customer-ai-form {
  display: none;
}

.customer-ai-panel.collapsed .ai-clear-button {
  display: none;
}

.customer-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: none;
}

.customer-ai-messages::-webkit-scrollbar,
.customer-ai-input::-webkit-scrollbar {
  display: none;
}

.customer-ai-message {
  display: flex;
  gap: 8px;
  max-width: 94%;
}

.customer-ai-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.customer-ai-role {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.customer-ai-message.user .customer-ai-role {
  background: #e7edf8;
  color: var(--blue);
}

.customer-ai-bubble {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 4px 11px 11px 11px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.customer-ai-message.user .customer-ai-bubble {
  border-radius: 11px 4px 11px 11px;
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.report-image-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.report-image-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-soft);
}

.customer-ai-attach {
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-weight: 750;
}

.report-ai-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.report-ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.report-ai-input-row .customer-ai-attach {
  width: 44px;
  height: 48px;
  min-width: 44px;
}

.report-ai-input-row .customer-ai-input {
  flex: 1;
  min-width: 0;
}

.report-ai-input-row .customer-ai-send {
  width: 64px;
  min-width: 64px;
}

.report-ai-input-row .customer-ai-send {
  margin-left: auto;
}

.customer-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.customer-ai-panel.open #reportAiForm {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.customer-ai-input {
  min-height: 48px;
  max-height: 168px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
  scrollbar-width: none;
}

.customer-ai-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.customer-ai-send {
  min-height: 48px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.record-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.record-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 9px;
  align-items: end;
  margin-top: 4px;
}

.record-composer-input {
  min-height: 50px;
  max-height: 120px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  resize: none;
  line-height: 1.5;
}

.record-composer-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 139, 98, 0.13);
}

.record-send-button {
  min-height: 50px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
}

.record-ai-feedback {
  min-height: 20px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.transaction-item {
  position: relative;
  padding: 13px;
  padding-right: 54px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.transaction-item:hover {
  border-color: var(--primary-soft);
  background: var(--surface);
}

.transaction-item:active {
  transform: scale(0.995);
}

.transaction-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.transaction-head strong {
  color: var(--primary-strong);
  font-size: 16px;
}

.transaction-head span {
  flex: 1;
  min-width: 0;
  text-align: left;
  color: var(--text-soft);
  font-size: 13px;
}

.transaction-item p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.transaction-date {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.transaction-product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.transaction-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.transaction-product-fields {
  min-width: 0;
}

.transaction-product-fields .field {
  margin-bottom: 11px;
}

.transaction-product-fields .field:last-child {
  margin-bottom: 0;
}

.product-remove-button {
  align-self: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

.add-product-button {
  min-height: 42px;
  width: 100%;
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 750;
}

.record-delete-button {
  position: absolute;
  right: 10px;
  top: 10px;
  min-height: 24px;
  padding: 0 7px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #d43d3d;
  font-size: 10px;
  line-height: 24px;
}

.team-cockpit-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-ring {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color, var(--primary)) calc(var(--rate, 0) * 1%), rgba(14, 107, 79, 0.12) 0);
}

.team-ring.green { --ring-color: var(--primary); }
.team-ring.amber { --ring-color: var(--amber); }
.team-ring.coral { --ring-color: var(--coral); }

.team-ring-inner {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
}

.team-ring-inner strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.team-ring-inner strong small {
  font-size: 12px;
  color: var(--text-muted);
}

.team-ring-inner span {
  margin-top: -4px;
  color: var(--text-soft);
  font-size: 11px;
}

.team-cockpit-main {
  min-width: 0;
}

.team-cockpit-main p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.team-light-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-light-chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.team-light-chip.success { background: var(--primary-soft); color: var(--primary-strong); }
.team-light-chip.amber { background: var(--amber-soft); color: var(--amber); }
.team-light-chip.danger { background: var(--coral-soft); color: var(--coral); }

.team-todos-card,
.team-activity-card {
  margin-top: 14px;
}

.team-todos-card .list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-todos-card .list-card-header .section-title {
  margin: 0;
}

.team-todo-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.team-todo-row.urgent {
  background: var(--coral-soft);
}

.team-tasks-card {
  margin-top: 14px;
}

.team-tasks-card .list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-tasks-card .list-card-header .section-title {
  margin: 0;
}

.team-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  width: 100%;
  padding: 12px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.team-task-row.urgent {
  background: var(--coral-soft);
}

.team-task-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.team-task-main strong {
  font-size: 16px;
}

.team-task-main span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.team-task-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.team-task-advice {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.team-todo-type {
  color: var(--text-soft);
  font-size: 12px;
}

.team-todo-time {
  color: var(--text-muted);
  font-size: 12px;
}

.customer-today-card .team-todo-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
}

.customer-today-action-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.customer-today-action-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.customer-today-action-name {
  color: var(--text-muted);
  font-size: 12px;
}

.customer-today-action-content strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.customer-today-action-no-type {
  grid-template-columns: minmax(0, 1fr);
}

.customer-compact-row {
  padding-top: 9px !important;
  padding-bottom: 9px !important;
}

.customer-compact-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.customer-compact-main .customer-today-action-main {
  flex: 1;
  min-width: 0;
}

.customer-compact-main .customer-today-action-btns {
  flex: 0 0 auto;
  margin-top: 0;
}

.support-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-detail > p {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.support-detail > p strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.support-detail .profile-form {
  margin-top: 2px;
}

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

.goal-reference {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.goal-reference-item {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.goal-reference-item span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.goal-reference-item strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.datetime-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.datetime-confirm-row .input {
  flex: 1;
  min-width: 0;
}

.datetime-confirm-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
}

.customer-today-action-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.customer-today-action-btns button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
}

.team-activity-row {
  width: 100%;
  padding: 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.team-activity-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-activity-person strong {
  display: block;
  font-size: 16px;
}

.team-light-label {
  font-size: 12px;
  font-weight: 700;
}

.team-light-label.success { color: var(--primary-strong); }
.team-light-label.amber { color: var(--amber); }
.team-light-label.danger { color: var(--coral); }

.team-behavior-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.team-behavior-grid span {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.team-behavior-grid strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.team-network-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.team-network-entry span:first-child {
  color: var(--primary);
}

.team-network-entry strong {
  display: block;
  font-size: 15px;
}

.team-network-entry small {
  color: var(--text-muted);
  font-size: 12px;
}

.team-network-wrap {
  width: 100%;
}

.team-network-svg {
  width: 100%;
  height: auto;
  min-height: 320px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  touch-action: none;
}

.team-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow-x: auto;
}

.team-subtab {
  flex: 1 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font-size: 17px;
  white-space: nowrap;
}

.team-subtab.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

#page-team.active .team-subnav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-soft);
}

.team-network-card {
  margin-top: 0;
}

.team-network-card .list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-network-card .list-card-header .section-title {
  margin: 0;
}

#page-team.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#page-team.active #teamContent {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#page-team.active #teamContent > *:not(.team-network-card) {
  flex-shrink: 0;
}

.team-network-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.team-network-card .team-network-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
}

.team-network-card .team-network-svg {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.team-board-card {
  margin-top: 0;
}

.team-board-card .list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-board-card .list-card-header .section-title {
  margin: 0;
}

.team-activity-card {
  max-height: 340px;
  overflow-y: auto;
}

.team-board-section {
  padding: 12px 13px;
  border-top: 1px solid var(--border);
}

.team-board-section:first-of-type {
  border-top: 0;
}

.team-board-section h4 {
  margin: 0 0 9px;
  color: var(--text-soft);
  font-size: 13px;
}

.team-board-row {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.team-board-row:last-child {
  margin-bottom: 0;
}

.team-board-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-board-person strong {
  display: block;
  font-size: 15px;
}

.team-board-person > div:last-child {
  min-width: 0;
}

.team-board-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.team-board-person > div:last-child > span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.team-board-leader {
  margin-top: 3px;
  color: var(--primary-strong) !important;
  font-size: 12px !important;
}

.team-board-row .team-behavior-grid {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 9px;
}

.team-board-advice {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.team-board-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
}

.team-board-score strong {
  color: var(--primary-strong);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.customer-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.customer-metric-strip span {
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.customer-today-card {
  margin-top: 14px;
}

.customer-today-card .list-card-header,
.team-tasks-card .list-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.customer-today-card .list-card-header .section-title {
  margin: 0;
}

.customer-today-card .list-card-header > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.persona-foundation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 750;
}

.persona-foundation-card.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.persona-foundation-card.danger {
  background: var(--coral-soft);
  color: var(--coral);
}

.acquisition-today-card {
  margin-top: 14px;
}

.acquisition-topic-row,
.acquisition-pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--border);
}

.acquisition-topic-row > div,
.acquisition-pending-row > div:first-child {
  min-width: 0;
}

.acquisition-topic-row strong,
.acquisition-pending-row strong {
  display: block;
  font-size: 15px;
}

.acquisition-topic-row span,
.acquisition-pending-row span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.acquisition-pending-row.danger {
  background: var(--coral-soft);
}

.acquisition-pending-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.batch-card {
  padding: 0;
  border-color: #cfd9d4;
  box-shadow: 0 1px 3px rgba(23, 43, 35, 0.07);
}

.batch-card-head {
  padding: 0;
}

.batch-card-head strong {
  display: block;
  margin-bottom: 3px;
}

.batch-card-title-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.batch-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.batch-platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
}

.batch-platform-button {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 14px;
}

.batch-platform-button:active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.batch-card-items {
  padding: 4px 0;
}

.generation-source-material {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.generation-source-material span {
  color: var(--text-muted);
  font-size: 12px;
}

.generation-source-material p {
  margin: 6px 0 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.material-generate-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.material-platform-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 12px;
}

.material-platform-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.material-platform-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 13px;
}

.material-generate-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
}

.material-platform-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 750;
}

.acquisition-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acquisition-platform-select {
  width: 124px;
  min-height: 34px;
  font-size: 13px;
}

.acquisition-weekly-report {
  width: 100%;
  margin-top: 14px;
}

.acquisition-schedule-list {
  margin-top: 14px;
}

.acquisition-schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--border);
}

.acquisition-schedule-row strong {
  display: block;
  font-size: 15px;
}

.acquisition-schedule-row span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.weekly-report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.weekly-report-metrics span,
.weekly-report-platforms span {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.weekly-report-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.weekly-report-samples {
  margin-top: 12px;
}

.weekly-report-samples p {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.5;
}

.follow-item .record-delete-button {
  top: 0;
}

.record-delete-button:active {
  opacity: 0.7;
}

.reminder-item {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.reminder-item.overdue {
  border-color: #e1b2ad;
  background: #fff6f4;
}

.reminder-item.completed {
  opacity: 0.68;
}

.reminder-item.clickable {
  cursor: pointer;
}
.reminder-item.clickable:active {
  border-color: var(--primary);
}

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

.reminder-head strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.reminder-status {
  flex: 0 0 auto;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 750;
}

.reminder-item.overdue .reminder-status {
  color: #b3261e;
}

.reminder-time {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 12px;
}

.reminder-item .ghost-button.compact {
  margin-top: 10px;
}

.reminder-strip {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.reminder-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 13px;
}

.reminder-strip-head span {
  color: var(--text-muted);
  font-size: 11px;
}

.reminder-strip-list {
  display: grid;
  gap: 7px;
}

.reminder-strip-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 0;
  color: var(--text);
  text-align: left;
  font-size: 13px;
}

.reminder-strip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.reminder-strip-item.overdue .reminder-strip-dot {
  background: #b3261e;
}

.reminder-strip-item small {
  color: var(--text-muted);
  font-size: 11px;
}

.detail-value {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.timeline {
  margin-top: 16px;
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.timeline-title h4 {
  margin: 0;
  font-size: 15px;
}

.follow-list {
  display: flex;
  flex-direction: column;
}

.follow-item {
  position: relative;
  padding: 0 54px 16px 22px;
}

.follow-item.clickable {
  cursor: pointer;
}
.follow-item.clickable:active {
  opacity: 0.7;
}

.follow-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.follow-item:last-child::before {
  display: none;
}

.follow-item::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.follow-method {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.follow-content {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.follow-feedback {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.follow-date {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
}

.sheet-footer {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.sheet-footer .primary-button {
  flex: 1;
  width: auto;
  margin-top: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 70;
  max-width: min(88vw, 430px);
  padding: 10px 14px;
  transform: translateX(-50%) translateY(18px);
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.94);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 640px) {
  .app-shell {
    min-height: calc(100dvh - 40px);
    margin-top: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  body {
    padding: 0;
  }

  .auth-screen {
    min-height: calc(100dvh - 40px);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .sheet {
    bottom: 20px;
    border-radius: 12px;
    max-height: 88dvh;
  }
}

@media (max-width: 380px) {
  .metric-strip {
    gap: 6px;
  }

  .metric-item {
    padding: 10px 5px;
  }

  .metric-value {
    font-size: 15px;
  }

  .code-row {
    grid-template-columns: minmax(0, 1fr) 110px;
  }

  .redeem-input-row {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

}

.acquisition-image-preview {
  margin-top: 10px;
}

.acquisition-image-preview img,
.generated-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: #f6f7f8;
}

.generation-view-image {
  cursor: zoom-in;
}

.acquisition-notes,
.acquisition-history {
  margin-top: 18px;
}

.acquisition-notes h3,
.acquisition-history h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.acquisition-note-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.acquisition-note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acquisition-note-card {
  padding: 12px;
  border: 1px solid var(--border, #e6e8eb);
  border-radius: 8px;
  background: #fff;
}

.acquisition-note-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.acquisition-note-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acquisition-note-row time {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
}

.acquisition-note-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.acquisition-segment {
  margin-bottom: 0;
}

.acquisition-view-toolbar {
  display: flex;
  align-items: center;
  min-height: 36px;
  overflow-x: auto;
  scrollbar-width: none;
}

.acquisition-view-toolbar::-webkit-scrollbar {
  display: none;
}

.acquisition-view-toolbar-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.acquisition-view-toolbar .material-tag-filter {
  min-height: 0;
  margin-bottom: 0;
}

.material-composer {
  margin-bottom: 14px;
}

.material-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.material-image-item {
  position: relative;
  width: 84px;
  height: 84px;
}

.material-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.material-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.material-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.material-composer-actions .primary-button,
.material-composer-actions .secondary-button {
  flex: 1;
  width: auto;
  min-height: 46px;
  height: 46px;
  margin-top: 0;
}

.material-composer-actions .add-image-button {
  flex: 0 0 52px;
}

.add-image-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.add-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 46px;
  min-height: 46px;
  padding: 0;
}

.material-tag-editor {
  margin-top: 10px;
}

.material-tag-input-row {
  display: flex;
  gap: 8px;
}

.material-tag-input-row .input {
  flex: 1;
  min-width: 0;
}

.material-tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.material-tag-suggestion,
.material-tag-filter-chip,
.material-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.material-tag-suggestion.active,
.material-tag-filter-chip.active,
.material-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.material-tags-empty {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.material-tag-remove {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.material-tag-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.material-tag-filter::-webkit-scrollbar {
  display: none;
}

.material-tag-filter-chip {
  flex: 0 0 auto;
}

.acquisition-material-list,
.acquisition-project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acquisition-date-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acquisition-date-heading {
  margin: 8px 0 2px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.load-more-button {
  align-self: center;
  width: 100%;
  margin-top: 4px;
}

.acquisition-material-card,
.acquisition-project-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.acquisition-generating-placeholder {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-muted);
}

.acquisition-generating-placeholder strong {
  color: var(--text-muted);
  font-size: 15px;
}

.acquisition-generating-placeholder span {
  font-size: 12px;
}

.acquisition-material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.acquisition-material-card .acquisition-material-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

.acquisition-material-main {
  min-width: 0;
  flex: 1;
}

.acquisition-material-card .acquisition-material-main {
  flex: 1 1 100%;
}

.material-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acquisition-material-card .material-row-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
}

.material-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

.material-list-thumbnails {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.material-list-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-soft);
}

.material-list-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-list-thumb-more {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 12px;
}

.acquisition-material-row strong {
  display: block;
  margin-bottom: 3px;
}

.acquisition-material-row span {
  color: var(--text-muted);
  font-size: 12px;
}

.material-chevron {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 13px;
}

.acquisition-material-detail {
  padding: 0 12px 12px;
}

.acquisition-material-full,
.acquisition-material-detail p {
  white-space: pre-wrap;
  word-break: break-word;
}

.material-detail-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.material-detail-image-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.material-detail-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.material-image-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.material-image-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.material-detail-image-button {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
}

.material-detail-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-image-detail-info {
  flex: 1;
  min-width: 0;
}

.material-image-detail-info p {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.acquisition-edit-toggle {
  margin-top: 12px;
}

.acquisition-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.acquisition-edit-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 260px;
  overflow-y: auto;
}

.acquisition-edit-message {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.acquisition-edit-message.user {
  flex-direction: row-reverse;
}

.acquisition-edit-role {
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}

.acquisition-edit-bubble {
  max-width: 82%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.acquisition-edit-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.acquisition-edit-input {
  flex: 1;
  min-height: 38px;
  max-height: 120px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  resize: none;
}

.project-outputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 12px 12px;
}

.project-platform-tabs {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  margin: 0 12px 12px;
}

.project-platform-tabs .segment-button {
  flex: 1 0 auto;
  min-width: 74px;
}

.project-output {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.project-output-title {
  margin: 6px 0 3px;
  font-size: 15px;
  line-height: 1.4;
}

.project-output-cover-title,
.project-output-summary {
  margin: 3px 0 6px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.remote-image-hint {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.project-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.project-image-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.project-image-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.acquisition-note-card p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.note-derived {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #f7f8fa;
}

.note-derived strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.note-derived p {
  margin: 0;
  font-size: 14px;
  color: #555;
}
