.creator-console {
  display: grid;
  gap: 20px;
}

.creator-console-head,
.creator-range-toolbar,
.creator-metric-strip {
  border: 1px solid var(--border, #dfe7e3);
  background: var(--surface, #fff);
}

.creator-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 16px;
}

.creator-console-head h2,
.creator-console-head p { margin: 0; }
.creator-console-head h2 { margin-top: 5px; font-size: 24px; }
.creator-console-head p { margin-top: 6px; color: var(--text-2, #66736d); }

.creator-privacy-chip,
.creator-selected-conversation {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: #0b644b;
  background: #edf7f3;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.creator-privacy-chip svg { width: 16px; height: 16px; }

.creator-range-toolbar {
  display: grid;
  grid-template-columns: auto minmax(165px, .8fr) minmax(165px, .8fr) minmax(190px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: 14px;
}

.creator-range-toolbar label,
.creator-control-numbers label,
.creator-chat-audit-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text-2, #66736d);
  font-size: 12px;
  font-weight: 700;
}

.creator-range-toolbar input,
.creator-control-numbers input,
.creator-chat-audit-form input { width: 100%; min-width: 0; }

.creator-range-presets {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #f2f5f3;
}

.creator-range-presets button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #41504a;
}

.creator-range-presets button:hover { background: #fff; color: #087454; }

.creator-metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 14px;
}

.creator-metric-strip > div {
  display: grid;
  gap: 3px;
  padding: 16px;
  border-right: 1px solid var(--border, #dfe7e3);
}

.creator-metric-strip > div:last-child { border-right: 0; }
.creator-metric-strip strong { font-size: 21px; line-height: 1.15; }
.creator-metric-strip span { color: var(--text-2, #66736d); font-size: 12px; }
.creator-metric-strip .danger strong { color: #c43f38; }
.creator-metric-strip .warning strong { color: #a66308; }

.creator-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 16px;
  align-items: start;
}

.creator-console-grid .admin-wide-panel { grid-column: 1 / -1; }

.creator-control-form,
.creator-health-list,
.creator-conversation-list,
.creator-event-list { display: grid; gap: 10px; }

.creator-control-switch {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #dfe7e3);
}

.creator-control-switch input { width: 19px; height: 19px; margin-top: 2px; }
.creator-control-switch span { display: grid; gap: 3px; }
.creator-control-switch small { color: var(--text-2, #66736d); line-height: 1.45; }

.creator-control-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 8px;
}

.creator-control-numbers label > div { position: relative; }
.creator-control-numbers em {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--text-2, #66736d);
  font-style: normal;
  transform: translateY(-50%);
}

.creator-health-list { margin: 0; }
.creator-health-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  border-bottom: 1px solid var(--border, #dfe7e3);
}

.creator-health-list > div:last-child { border-bottom: 0; }
.creator-health-list dt { color: var(--text-2, #66736d); }
.creator-health-list dd { margin: 0; font-weight: 700; text-align: right; }

.creator-hourly-table {
  display: grid;
  max-height: 410px;
  overflow: auto;
  border-top: 1px solid var(--border, #dfe7e3);
}

.creator-hourly-row {
  display: grid;
  grid-template-columns: 92px minmax(100px, 1fr) repeat(4, 76px);
  gap: 10px;
  align-items: center;
  min-width: 650px;
  min-height: 42px;
  border-bottom: 1px solid var(--border, #dfe7e3);
  color: var(--text-2, #66736d);
  font-size: 12px;
}

.creator-hourly-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ef;
}

.creator-hourly-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #087454;
}

.creator-conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--border, #dfe7e3);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.creator-conversation-row:hover,
.creator-conversation-row.active { border-color: #74aa98; background: #f3faf7; }
.creator-conversation-row > span { display: grid; gap: 3px; min-width: 0; }
.creator-conversation-row strong,
.creator-conversation-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-conversation-row small { color: var(--text-2, #66736d); }
.creator-conversation-row svg { width: 18px; }

.creator-event-list { max-height: 520px; overflow: auto; }
.creator-event-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #dfe7e3);
}

.creator-event-row:last-child { border-bottom: 0; }
.creator-event-category { color: #087454; font-size: 12px; font-weight: 800; }
.creator-event-row p {
  margin: 4px 0 0;
  color: var(--text-2, #66736d);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.creator-event-row > span:last-child {
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--text-2, #66736d);
  font-size: 11px;
  text-align: right;
}

.creator-event-row.warning > span:last-child b { color: #b45309; }
.creator-chat-audit-panel { overflow: hidden; }
.creator-chat-audit-form {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(160px, .7fr) minmax(240px, 1.6fr) auto;
  gap: 10px;
  align-items: end;
}

.creator-audit-notice { margin: 12px 0 0; color: #8a4d08; font-size: 12px; }
.creator-audit-empty { padding: 28px 16px; color: var(--text-2, #66736d); text-align: center; }
.creator-chat-audit-result { margin-top: 18px; border-top: 1px solid var(--border, #dfe7e3); }
.creator-audit-result-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; }
.creator-audit-message-list { display: grid; gap: 8px; max-height: 540px; overflow: auto; padding-right: 4px; }
.creator-audit-hour {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 0 5px;
  color: var(--text-2, #66736d);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.creator-audit-message {
  padding: 11px 12px;
  border: 1px solid var(--border, #dfe7e3);
  border-radius: 10px;
  background: #fafcfb;
}

.creator-audit-message > div { display: flex; justify-content: space-between; gap: 12px; }
.creator-audit-message time { color: var(--text-2, #66736d); font-size: 11px; }
.creator-audit-message p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.creator-console-loading,
.creator-console-error { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; }

@media (max-width: 980px) {
  .creator-range-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-range-presets,
  .creator-range-search { grid-column: 1 / -1; }
  .creator-metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creator-metric-strip > div:nth-child(3) { border-right: 0; }
  .creator-metric-strip > div:nth-child(-n + 3) { border-bottom: 1px solid var(--border, #dfe7e3); }
}

@media (max-width: 720px) {
  .creator-console { gap: 14px; }
  .creator-console-head { display: grid; padding: 18px; }
  .creator-console-head h2 { font-size: 21px; }
  .creator-privacy-chip { justify-self: start; }
  .creator-range-toolbar,
  .creator-console-grid,
  .creator-chat-audit-form { grid-template-columns: minmax(0, 1fr); }
  .creator-range-toolbar > *,
  .creator-range-presets,
  .creator-range-search,
  .creator-console-grid .admin-wide-panel { grid-column: 1; }
  .creator-range-presets { width: 100%; }
  .creator-range-presets button { padding: 0 8px; }
  .creator-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creator-metric-strip > div,
  .creator-metric-strip > div:nth-child(3) {
    border-right: 1px solid var(--border, #dfe7e3);
    border-bottom: 1px solid var(--border, #dfe7e3);
  }
  .creator-metric-strip > div:nth-child(even) { border-right: 0; }
  .creator-metric-strip > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .creator-control-numbers { grid-template-columns: minmax(0, 1fr); }
  .creator-event-row { grid-template-columns: 58px minmax(0, 1fr); }
  .creator-event-row > span:last-child { grid-column: 2; justify-items: start; text-align: left; }
  .creator-selected-conversation { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
