:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18150f;
  background: #fbf6ec;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  min-height: 100vh;
  background: #fbf6ec;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  letter-spacing: 0;
}

.auth-shell,
.closed-shell {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  padding: 32px 20px;
}

.auth-shell {
  gap: clamp(34px, 6vh, 56px);
}

.closed-shell {
  background: #fbf6ec;
  gap: 24px;
}

.brand {
  display: block;
  width: min(66vw, 420px);
  height: auto;
}

.brand-compact {
  width: min(54vw, 330px);
}

.closed-brand {
  width: min(58vw, 380px);
}

.coming-soon {
  margin: 0;
  color: #665d51;
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-panel {
  width: min(92vw, 430px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #776d5e;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: 1rem;
}

.supporting {
  margin: 14px 0 28px;
  color: #70675b;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

.auth-form label,
.code-form label {
  color: #4b443a;
  font-size: 0.84rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 56px;
  border: 1px solid #d5c8b7;
  border-radius: 10px;
  outline: none;
  background: #fffdf8;
  color: #18150f;
  padding: 0 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: #1e1a14;
  box-shadow: 0 0 0 3px rgba(30, 26, 20, 0.1);
}

.primary-button,
.secondary-button,
.text-button,
.nav-button,
.revoke-button {
  border: 0;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  min-height: 58px;
  margin-top: 4px;
  border-radius: 10px;
  background: #191610;
  color: #fffaf0;
}

.primary-button:hover {
  background: #343027;
}

.primary-button:disabled,
.secondary-button:disabled,
.revoke-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-error {
  margin: 0;
  color: #a32828;
  font-size: 0.86rem;
}

.field-hint {
  margin: -4px 0 0;
  color: #7a7165;
  font-size: 0.75rem;
  line-height: 1.45;
}

.dashboard-body {
  background: #f8f2e7;
}

.admin-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ded4c5;
  background: #fffaf1;
  padding: 14px clamp(20px, 4vw, 56px);
}

.header-brand {
  display: block;
  width: 94px;
  height: auto;
}

.admin-account {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-right: 4px;
  color: #443d33;
  font-size: 0.9rem;
  font-weight: 700;
}

.text-button {
  background: transparent;
  color: #7a2d2d;
  padding: 8px 0;
}

.admin-layout {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: 210px minmax(0, 1fr);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid #ded4c5;
  background: #f1e8da;
  padding: 28px 18px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-category {
  margin: 0 0 4px;
  color: #8a8073;
  padding: 0 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  min-height: 44px;
  border-radius: 7px;
  background: transparent;
  color: #62594d;
  padding: 0 14px;
  text-align: left;
}

.nav-button:hover {
  background: #e7dccb;
}

.nav-button.active {
  background: #191610;
  color: #fffaf0;
}

.admin-main {
  width: min(980px, 100%);
  padding: clamp(48px, 7vw, 84px) clamp(24px, 6vw, 72px);
}

.tab-panel {
  animation: enter 180ms ease-out;
}

.campaign-placeholder {
  display: grid;
  min-height: 250px;
  align-content: center;
  justify-items: start;
  border-top: 1px solid #d9cebd;
  border-bottom: 1px solid #d9cebd;
  padding: 48px 0;
}

.placeholder-label {
  margin-bottom: 4px;
  color: #746a5d;
  font-size: 0.75rem;
  font-weight: 750;
}

.campaign-placeholder strong {
  font-size: 1.45rem;
}

.campaign-placeholder p {
  max-width: 440px;
  margin: 10px 0 0;
  color: #766d60;
  line-height: 1.6;
}

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

.dashboard-intro {
  margin-bottom: 42px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #d9cebd;
  border-bottom: 1px solid #d9cebd;
}

.metric-item {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 26px 24px 26px 0;
}

.metric-item + .metric-item {
  border-left: 1px solid #d9cebd;
  padding-left: 24px;
}

.metric-item span,
.metric-item small {
  color: #746a5d;
  font-size: 0.8rem;
}

.metric-item span {
  font-weight: 750;
}

.metric-item strong {
  font-size: 1.9rem;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 48px;
  margin-top: 52px;
}

.dashboard-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  min-height: 52px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #d9cebd;
  padding-bottom: 16px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

.live-label {
  flex: 0 0 auto;
  border: 1px solid #a9c6b8;
  border-radius: 999px;
  background: #e6f1eb;
  color: #176b48;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 800;
}

.activity-list > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e1d7c9;
  padding: 17px 4px;
}

.activity-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3e6ea6;
}

.activity-list div div {
  display: grid;
  gap: 4px;
}

.activity-list strong {
  font-size: 0.88rem;
}

.activity-list small {
  color: #7a7165;
  font-size: 0.75rem;
}

.service-list {
  margin: 0;
}

.service-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e1d7c9;
  padding: 17px 0;
}

.service-list dt,
.service-list dd {
  margin: 0;
  font-size: 0.82rem;
}

.service-list dt {
  font-weight: 700;
}

.service-list dd {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #176b48;
}

.service-list dd span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #23845c;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #d9cebd;
  border-bottom: 1px solid #d9cebd;
}

.status-item {
  display: grid;
  gap: 12px;
  padding: 26px 0;
}

.status-item + .status-item {
  border-left: 1px solid #d9cebd;
  padding-left: 32px;
}

.status-label {
  color: #746a5d;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-item strong {
  font-size: 1.65rem;
}

.state-open {
  color: #176b48;
}

.state-closed {
  color: #9a3030;
}

.settings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid #d9cebd;
  padding: 28px 0;
}

.settings-section:last-child {
  border-bottom: 1px solid #d9cebd;
}

.settings-section p {
  margin: 7px 0 0;
  color: #766d60;
  font-size: 0.9rem;
  line-height: 1.5;
}

.settings-stack {
  display: grid;
  align-items: stretch;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #40392f;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 750;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid #b8aa96;
  border-radius: 999px;
  background: #d8ccba;
  transition: background 160ms ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(37, 29, 18, 0.22);
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + .switch-track {
  border-color: #176b48;
  background: #217b57;
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(30, 26, 20, 0.18);
  outline-offset: 3px;
}

.code-form {
  display: grid;
  gap: 9px;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.secondary-button {
  min-width: 132px;
  border: 1px solid #bdae99;
  border-radius: 9px;
  background: #eadcc7;
  color: #29231c;
  padding: 0 18px;
}

.secondary-button:hover {
  background: #dfceb5;
}

.admin-list {
  display: grid;
}

.admin-row {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #e1d7c9;
  padding: 12px 0;
}

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

.admin-row div {
  display: grid;
  gap: 5px;
}

.admin-row strong {
  font-size: 0.94rem;
}

.admin-row span {
  color: #7a7165;
  font-size: 0.78rem;
}

.revoke-button {
  border-radius: 7px;
  background: #f1ded9;
  color: #8b2929;
  padding: 9px 13px;
}

.revoke-button:not(:disabled):hover {
  background: #e8cbc4;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 48px));
  border: 1px solid #285f48;
  border-radius: 8px;
  background: #e4f0e9;
  color: #184b36;
  padding: 13px 16px;
  box-shadow: 0 14px 36px rgba(36, 29, 20, 0.16);
  font-size: 0.88rem;
  font-weight: 700;
}

.toast.error {
  border-color: #9f4747;
  background: #f5e2de;
  color: #802929;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #17140f;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.dashboard-body {
  color-scheme: light;
  color: #171717;
  background: #f5f5f5;
  font-family: Inter, "Segoe UI Variable Text", Aptos, "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.admin-layout {
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
}

.admin-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 0;
  border-right: 0;
  background: #f5f5f5;
  padding: 0 12px 16px;
}

.sidebar-brand {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 4px;
  padding: 7px 4px 7px 8px;
}

.header-brand {
  width: 48px;
  border-radius: 0;
}

.sidebar-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #606060;
  cursor: pointer;
  padding: 0;
}

.sidebar-toggle:hover {
  background: #e9e9e9;
  color: #171717;
}

.sidebar-toggle-icon {
  position: relative;
  width: 20px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.sidebar-toggle-icon i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  border-left: 2px solid currentColor;
}

.nav-group {
  gap: 2px;
}

.nav-group + .nav-group {
  margin-top: 22px;
}

.nav-category {
  margin-bottom: 7px;
  color: #111111;
  padding-inline: 8px;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.nav-button {
  display: grid;
  min-height: 42px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: #303030;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0 8px;
  transition: background 140ms ease, color 140ms ease;
}

.nav-button:hover {
  background: #e9e9e9;
  color: #111111;
}

.nav-button.active {
  background: #171717;
  color: #ffffff;
  font-weight: 650;
}

.nav-icon-grid {
  display: grid;
  width: 15px;
  height: 15px;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  place-self: center;
}

.nav-icon-grid i {
  border: 1px solid currentColor;
  border-radius: 1px;
}

.campaign-logo {
  display: block;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: transparent;
  box-shadow: none;
  object-fit: cover;
}

.sidebar-footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e1e1e1;
  margin-top: auto;
  padding: 12px 8px 0;
}

.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #d1d1d1;
  border-radius: 50%;
  background: #ffffff;
  color: #222222;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-details {
  min-width: 0;
}

.user-details strong {
  display: block;
  overflow: hidden;
  color: #171717;
  font-size: 0.87rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-shell {
  min-width: 0;
  background: #f5f5f5;
}

.workspace-topbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: flex-end;
  background: #f5f5f5;
  padding: 8px 16px;
}

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

.topbar-action {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #ffffff;
  color: #555555;
  cursor: pointer;
}

.topbar-action:hover,
.topbar-action.active {
  border-color: #bfbfbf;
  background: #fafafa;
  color: #111111;
}

.topbar-action::after {
  position: absolute;
  z-index: 5;
  top: calc(100% + 9px);
  left: 50%;
  padding: 7px 10px;
  border: 1px solid #dedede;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  color: #171717;
  content: attr(data-tooltip);
  font-size: 0.76rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.topbar-action:hover::after,
.topbar-action:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.topbar-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.admin-main {
  width: auto;
  min-height: calc(100vh - 64px);
  margin: 0 10px 10px 0;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  background: #ffffff;
  padding: 18px 22px 28px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 3%);
}

.coming-soon-state {
  display: grid;
  min-height: calc(100vh - 235px);
  place-items: center;
  text-align: center;
}

.coming-soon-state.campaign-coming-soon {
  min-height: calc(100vh - 390px);
}

.coming-soon-title {
  margin: 0;
  color: #171717;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-body .eyebrow {
  color: #4275a8;
}

.metric-grid,
.section-heading,
.activity-list > div,
.service-list div,
.campaign-placeholder,
.preference-row {
  border-color: #dde4e8;
}

.metric-item + .metric-item {
  border-color: #dde4e8;
}

.metric-item span,
.metric-item small,
.activity-list small,
.placeholder-label {
  color: #718087;
}

.metric-item:nth-child(1) strong {
  color: #25754e;
}

.metric-item:nth-child(2) strong {
  color: #a66e16;
}

.metric-item:nth-child(3) strong {
  color: #b95343;
}

.live-label {
  border-color: #b7d6c5;
  background: #edf8f2;
  color: #26784f;
}

.activity-marker {
  background: #3480d3;
}

.activity-list > div:nth-child(2) .activity-marker {
  background: #d69a36;
}

.activity-list > div:nth-child(3) .activity-marker {
  background: #cf6e5e;
}

.activity-list > div:nth-child(4) .activity-marker {
  background: #45a06b;
}

.campaign-placeholder {
  min-height: 300px;
  border-left: 3px solid #4a8bd8;
  background: #f8fafb;
  padding: 56px 48px;
}

.campaign-placeholder p {
  color: #718087;
}

.campaign-workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.campaign-workspace-header h1 {
  margin-bottom: 0;
}

.campaign-state,
.progress-pill {
  border: 1px solid #b9ddc8;
  border-radius: 999px;
  background: #edf8f2;
  color: #26784f;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
}

.campaign-state.planning,
.progress-pill.planning {
  border-color: #ead6aa;
  background: #fff8e8;
  color: #916414;
}

.campaign-subnav {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 46px;
  align-items: flex-end;
  margin: 0 0 24px;
  border-bottom: 1px solid #e3e3e3;
}

.campaign-subnav::-webkit-scrollbar {
  display: none;
}

.campaign-subnav button {
  position: relative;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #626262;
  cursor: pointer;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 550;
  padding: 0 1px 14px;
}

.campaign-subnav button:hover {
  color: #171717;
}

.campaign-subnav button.active {
  color: #111111;
  font-weight: 700;
}

.campaign-subnav button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #111111;
  content: "";
}

.campaign-view {
  animation: panel-in 160ms ease-out;
}

.campaign-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #ffffff;
}

.campaign-summary-grid article {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 24px;
}

.campaign-summary-grid article + article {
  border-left: 1px solid #e5e5e5;
}

.campaign-summary-grid span,
.campaign-summary-grid small,
.creator-list small {
  color: #666666;
  font-size: 0.78rem;
}

.campaign-summary-grid strong {
  overflow: hidden;
  color: #171717;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-detail-block {
  display: flex;
  min-height: 170px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 22px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 30px;
}

.campaign-detail-block h2,
.message-placeholder h2 {
  margin: 5px 0 8px;
  font-size: 1.1rem;
}

.campaign-detail-block p:last-child,
.message-placeholder p {
  margin: 0;
  color: #666666;
  font-size: 0.87rem;
}

.analytics-placeholder {
  display: flex;
  height: 230px;
  align-items: flex-end;
  gap: clamp(12px, 3vw, 34px);
  margin-top: 22px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  padding: 32px;
}

.analytics-placeholder i {
  width: 100%;
  height: var(--bar);
  border-radius: 4px 4px 0 0;
  background: #79a8d5;
}

.analytics-placeholder.muted i {
  background: #9bb7c7;
}

.creator-list {
  overflow: hidden;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #ffffff;
}

.creator-list article {
  display: grid;
  min-height: 78px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  transition: background 140ms ease;
}

.creator-list article:hover {
  background: #fafafa;
}

.creator-list article + article {
  border-top: 1px solid #e5e5e5;
}

.creator-list article > div {
  display: grid;
  gap: 4px;
}

.creator-list article > .creator-earnings {
  justify-items: end;
  gap: 2px;
}

.creator-earnings strong {
  color: #171717;
  font-size: 0.95rem;
}

.creator-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dedede;
  background: #f5f5f5;
  color: #333333;
  font-size: 0.7rem;
  font-weight: 700;
  object-fit: cover;
}

.creator-avatar.coral { background: #f8e3de; color: #8c493d; }
.creator-avatar.gold { background: #f8edcf; color: #7f601a; }

.creator-list article.inactive-creator,
.chat-creator-button.inactive-creator {
  background: #fafafa;
}

.creator-status-badge {
  width: fit-content;
  border: 1px solid #dddddd;
  border-radius: 999px;
  background: #f5f5f5;
  color: #555555;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

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

.creator-stat-card {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 16px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  background: #ffffff;
  padding: 22px;
}

.creator-stat-card > span:last-child {
  display: grid;
  gap: 5px;
}

.creator-stat-card small {
  color: #626262;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.creator-stat-card strong {
  color: #171717;
  font-size: 1.5rem;
  line-height: 1.1;
}

.creator-stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #e2e2e2;
  border-radius: 9px;
  background: #f7f7f7;
  color: #333333;
}

.creator-stat-icon svg,
.creator-search svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.earnings-stat-card .creator-stat-icon {
  background: #f7f7f7;
  color: #333333;
}

.earnings-stat-card strong {
  color: #171717;
}

.creator-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.creator-search {
  display: flex;
  width: min(100%, 300px);
  height: 40px;
  align-items: center;
  gap: 9px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #fff;
  color: #666666;
  padding: 0 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.creator-search:focus-within {
  border-color: #8d8d8d;
  box-shadow: 0 0 0 3px rgb(0 0 0 / 7%);
}

.creator-search svg {
  width: 17px;
  flex: 0 0 17px;
}

.creator-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #171717;
  font: inherit;
  font-size: 0.84rem;
}

.creator-search input::placeholder {
  color: #777777;
}

.creator-empty {
  margin: 0;
  color: #666666;
  font-size: 0.85rem;
}

.creator-empty {
  margin: 0;
  padding: 32px 18px;
  text-align: center;
}

.creator-error {
  color: #9a3030;
}

.reroll-chat-layout {
  display: grid;
  height: min(680px, calc(100vh - 190px));
  min-height: 520px;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d8e2e7;
  border-radius: 10px;
  background: #fff;
}

.admin-main.messages-workspace-active {
  height: calc(100vh - 64px);
  min-height: 620px;
  overflow: hidden;
  padding: 18px 22px 22px;
}

.messages-workspace-active #reroll-panel {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.messages-workspace-active #reroll-panel .campaign-subnav {
  margin-bottom: 0;
}

.messages-workspace-active #reroll-panel [data-campaign-view="messages"] {
  min-height: 0;
}

.messages-workspace-active .reroll-chat-layout {
  height: 100%;
  min-height: 0;
  grid-template-columns: clamp(250px, 22vw, 310px) minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.chat-creator-sidebar {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid #e3e3e3;
  background: #ffffff;
}

.chat-sidebar-heading {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3e3e3;
  padding: 0 16px;
}

.chat-sidebar-heading strong {
  color: #171717;
  font-size: 0.9rem;
}

.chat-sidebar-heading span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #f1f1f1;
  color: #555555;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 7px;
}

.chat-creator-list {
  height: calc(100% - 58px);
  overflow-y: auto;
  padding: 6px;
}

.chat-message-list,
.chat-creator-list,
.creator-list,
.chat-composer textarea {
  scrollbar-color: #b8c0c4 #f4f6f7;
  scrollbar-width: thin;
}

.chat-message-list::-webkit-scrollbar,
.chat-creator-list::-webkit-scrollbar,
.creator-list::-webkit-scrollbar,
.chat-composer textarea::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.chat-message-list::-webkit-scrollbar-track,
.chat-creator-list::-webkit-scrollbar-track,
.creator-list::-webkit-scrollbar-track,
.chat-composer textarea::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f4f6f7;
}

.chat-message-list::-webkit-scrollbar-thumb,
.chat-creator-list::-webkit-scrollbar-thumb,
.creator-list::-webkit-scrollbar-thumb,
.chat-composer textarea::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 2px solid #f4f6f7;
  border-radius: 999px;
  background: #b8c0c4;
}

.chat-message-list::-webkit-scrollbar-thumb:hover,
.chat-creator-list::-webkit-scrollbar-thumb:hover,
.creator-list::-webkit-scrollbar-thumb:hover,
.chat-composer textarea::-webkit-scrollbar-thumb:hover {
  background: #969fa4;
}

.chat-creator-button {
  display: grid;
  width: 100%;
  min-height: 68px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #222222;
  cursor: pointer;
  font: inherit;
  padding: 10px 11px;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.chat-creator-button:hover {
  background: #f5f5f5;
}

.chat-creator-button.active {
  background: #eeeeee;
  box-shadow: inset 3px 0 #171717;
  color: #111111;
}

.chat-creator-summary {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.chat-creator-row-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chat-creator-row-heading strong,
.chat-creator-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-creator-row-heading strong {
  color: #171717;
  font-size: 0.83rem;
  font-weight: 650;
}

.chat-creator-row-heading time {
  flex: 0 0 auto;
  color: #777777;
  font-size: 0.65rem;
  font-weight: 500;
}

.chat-creator-preview,
.creator-chat-header small {
  color: #666666;
  font-size: 0.71rem;
  line-height: 1.35;
}

.chat-creator-summary .creator-status-badge {
  margin-top: 1px;
}

.chat-creator-avatar,
.chat-header-avatar,
.chat-message-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #dedede;
  background: #f4f4f4;
  color: #333333;
  font-size: 0.7rem;
  font-weight: 700;
  object-fit: cover;
}

.chat-creator-avatar {
  width: 40px;
  height: 40px;
}

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

.creator-chat-header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #dde4e8;
  padding: 0 18px;
}

.creator-chat-header > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.creator-chat-header strong,
.creator-chat-header small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-chat-header strong {
  color: #1c292f;
  font-size: 0.88rem;
}

.chat-message-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: #fbfcfd;
  padding: 22px;
}

.chat-empty {
  margin: auto;
  color: #7a878d;
  font-size: 0.84rem;
  text-align: center;
}

.chat-error-notice {
  align-self: center;
  margin: 0;
  border-radius: 7px;
  background: #fbecec;
  color: #9a3030;
  font-size: 0.75rem;
  padding: 8px 12px;
}

.chat-message-group {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.chat-message-group.admin-message {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 0.62rem;
}

.chat-message-content {
  display: grid;
  max-width: min(78%, 720px);
  gap: 5px;
}

.admin-message .chat-message-content {
  justify-items: end;
}

.chat-message-stack {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.admin-message .chat-message-stack {
  justify-items: end;
}

.chat-message-bubble {
  max-width: 100%;
  border: 1px solid #dbe4e8;
  border-radius: 5px 12px 12px 5px;
  background: #fff;
  padding: 10px 12px;
}

.chat-message-bubble:first-child {
  border-radius: 12px 12px 12px 5px;
}

.chat-message-bubble:last-child {
  border-radius: 5px 12px 12px 3px;
}

.chat-message-bubble:only-child {
  border-radius: 12px 12px 12px 3px;
}

.admin-message .chat-message-bubble {
  border-color: #c6e4d2;
  border-radius: 12px 5px 5px 12px;
  background: #edf8f2;
}

.admin-message .chat-message-bubble:first-child {
  border-radius: 12px 12px 5px;
}

.admin-message .chat-message-bubble:last-child {
  border-radius: 12px 5px 3px 12px;
}

.admin-message .chat-message-bubble:only-child {
  border-radius: 12px 12px 3px;
}

.chat-message-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 0 3px;
}

.admin-message .chat-message-meta {
  justify-content: flex-end;
}

.chat-message-meta strong {
  color: #263239;
  font-size: 0.76rem;
}

.chat-message-meta time,
.chat-delivery {
  color: #819096;
  font-size: 0.64rem;
}

.chat-message-bubble p {
  margin: 0;
  color: #28343a;
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

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

.chat-message-bubble p + .chat-message-attachments {
  margin-top: 9px;
}

.chat-image-attachment,
.chat-video-attachment {
  display: block;
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #f4f4f4;
}

.chat-image-attachment img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.chat-video-attachment {
  max-height: 360px;
}

.chat-file-attachment {
  display: grid;
  width: min(320px, 100%);
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fafafa;
  color: #222222;
  padding: 10px;
  text-decoration: none;
}

.chat-file-attachment:hover {
  border-color: #bdbdbd;
  background: #f4f4f4;
}

.chat-file-attachment > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: #eaeaea;
  font-size: 0.9rem;
}

.chat-file-attachment > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-file-attachment strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-attachment small {
  color: #6b6b6b;
  font-size: 0.66rem;
}

.chat-delivery {
  display: block;
  margin-top: 5px;
  text-align: right;
}

.chat-delivery.failed {
  color: #a13c3c;
}

.chat-composer {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 10px;
  border-top: 1px solid #dde4e8;
  background: #fff;
  padding: 12px 14px;
}

.chat-selected-files {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chat-selected-file {
  display: grid;
  min-width: 0;
  max-width: 230px;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #f7f7f7;
  color: #222222;
  padding: 7px 7px 7px 10px;
}

.chat-selected-file > span {
  overflow: hidden;
  font-size: 0.73rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-selected-file small {
  grid-column: 1;
  color: #6b6b6b;
  font-size: 0.62rem;
}

.chat-selected-file button {
  display: grid;
  width: 25px;
  height: 25px;
  grid-column: 2;
  grid-row: 1 / 3;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #e5e5e5;
  color: #333333;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 2px;
}

.chat-selected-file button:hover {
  background: #d9d9d9;
}

.chat-composer[aria-busy="true"] .chat-selected-file button {
  cursor: wait;
  opacity: 0.5;
  pointer-events: none;
}

.chat-composer textarea {
  min-height: 42px;
  max-height: 142px;
  overflow-y: hidden;
  resize: none;
  border: 1px solid #d3dee4;
  border-radius: 8px;
  outline: 0;
  color: #1c292f;
  font: inherit;
  font-size: 0.84rem;
  line-height: 20px;
  padding: 10px 12px;
}

.chat-composer textarea:focus {
  border-color: #7199b8;
  box-shadow: 0 0 0 3px rgb(70 126 167 / 12%);
}

.chat-send-button,
.chat-attachment-button {
  display: grid;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
}

.chat-send-button {
  width: 42px;
  background: #3480d3;
  color: #fff;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.chat-send-button:hover:not(:disabled) {
  background: #286db8;
  transform: translateY(-1px);
}

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

.chat-attachment-button {
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  background: #eef2f4;
  color: #748087;
  cursor: pointer;
}

.chat-attachment-button:hover:not(:disabled) {
  background: #e2e2e2;
  color: #333333;
}

.chat-send-button:disabled,
.chat-composer textarea:disabled,
.chat-attachment-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.messages-workspace-active .chat-sidebar-heading {
  height: 64px;
}

.messages-workspace-active .chat-creator-list {
  height: calc(100% - 64px);
  padding: 10px;
}

.messages-workspace-active .chat-message-list {
  gap: 18px;
  background: #fff;
  padding: clamp(20px, 2.5vw, 34px);
}

.messages-workspace-active .creator-chat-header {
  padding-inline: clamp(18px, 2vw, 28px);
}

.messages-workspace-active .chat-composer {
  padding: 14px clamp(16px, 2vw, 26px) 16px;
}

.message-placeholder {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  border: 1px dashed #ccd7dc;
  border-radius: 8px;
  text-align: center;
}

.message-placeholder > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #edf3f6;
  color: #53656f;
  font-weight: 700;
}

.message-placeholder button {
  margin-top: 20px;
  border: 0;
  border-radius: 6px;
  background: #20272b;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 10px 14px;
}

.preference-list {
  border-top: 1px solid #dde4e8;
}

.preference-row {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid #dde4e8;
  cursor: pointer;
}

.preference-row > div {
  display: grid;
  gap: 6px;
}

.preference-row strong {
  font-size: 0.9rem;
}

.preference-row > div span {
  color: #718087;
  font-size: 0.8rem;
}

.theme-swatch {
  width: 26px;
  height: 26px;
  border: 6px solid #edf2f4;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px #bac6cb;
}

.dashboard-body .switch input:checked + .switch-track {
  border-color: #347dcc;
  background: #438bd8;
}

.dashboard-body button:focus-visible {
  outline-color: #4a8bd8;
}

.nav-button:focus-visible {
  outline: 1px solid #6f9fd2;
  outline-offset: -2px;
}

.compact-dashboard .admin-main {
  padding-block: 36px;
}

.compact-dashboard .dashboard-intro {
  margin-bottom: 28px;
}

.compact-dashboard .metric-item {
  padding-block: 18px;
}

.compact-dashboard .dashboard-columns {
  margin-top: 34px;
}

.reduce-motion .tab-panel {
  animation: none;
}

@media (min-width: 721px) {
  .sidebar-collapsed .admin-layout {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .sidebar-collapsed .admin-nav {
    padding-inline: 8px;
  }

  .sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-inline: 0;
  }

  .sidebar-collapsed .header-brand,
  .sidebar-collapsed .nav-category,
  .sidebar-collapsed .nav-button > span:last-child,
  .sidebar-collapsed .user-details {
    display: none;
  }

  .sidebar-collapsed .nav-group + .nav-group {
    margin-top: 14px;
  }

  .sidebar-collapsed .nav-button {
    min-height: 46px;
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .sidebar-collapsed .campaign-logo {
    width: 28px;
    height: 28px;
    place-self: center;
  }

  .sidebar-collapsed .sidebar-footer {
    justify-content: center;
    padding-inline: 0;
  }
}

@media (max-width: 720px) {
  .creator-stats {
    grid-template-columns: 1fr;
  }

  .creator-search {
    width: 100%;
  }

  .reroll-chat-layout {
    height: min(720px, calc(100vh - 190px));
    min-height: 560px;
    grid-template-columns: 1fr;
    grid-template-rows: 154px minmax(0, 1fr);
  }

  .admin-main.messages-workspace-active {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 18px 12px 20px;
  }

  .messages-workspace-active #reroll-panel {
    height: auto;
  }

  .messages-workspace-active .reroll-chat-layout {
    height: min(720px, calc(100vh - 190px));
    min-height: 560px;
    grid-template-columns: 1fr;
    grid-template-rows: 154px minmax(0, 1fr);
  }

  .messages-workspace-active .chat-sidebar-heading {
    height: 46px;
  }

  .messages-workspace-active .chat-creator-list {
    height: calc(100% - 46px);
    padding: 8px;
  }

  .chat-creator-sidebar {
    border-right: 0;
    border-bottom: 1px solid #dde4e8;
  }

  .chat-sidebar-heading {
    height: 46px;
  }

  .chat-creator-list {
    display: flex;
    height: calc(100% - 46px);
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .chat-creator-button {
    width: 190px;
    flex: 0 0 190px;
  }

  .chat-message-list {
    padding: 16px 12px;
  }

  .chat-message-content {
    max-width: 82%;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .admin-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    align-self: start;
    border-right: 0;
    border-bottom: 0;
    padding: 0 12px 10px;
  }

  .sidebar-brand {
    grid-column: 1 / -1;
    min-height: 64px;
    margin: 0 0 10px;
    padding-inline: 4px;
  }

  .nav-group {
    display: contents;
  }

  .nav-category {
    display: none;
  }

  .nav-button {
    height: 44px;
    min-width: 0;
    grid-template-columns: 1fr;
    padding-inline: 10px;
    text-align: center;
  }

  .nav-button > :first-child {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .sidebar-collapsed .admin-nav {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .sidebar-collapsed .sidebar-brand {
    margin-bottom: 0;
  }

  .sidebar-collapsed .nav-button,
  .sidebar-collapsed .sidebar-footer {
    display: none;
  }

  .admin-main {
    min-height: calc(100vh - 205px);
    margin: 0 8px 8px;
    border-radius: 11px;
    padding: 28px 22px 64px;
  }

  .workspace-topbar {
    min-height: 54px;
    padding: 7px 12px;
  }

  .topbar-action {
    width: 36px;
    height: 36px;
  }

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

  .metric-grid,
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .metric-item + .metric-item {
    border-top: 1px solid #dde4e8;
    border-left: 0;
    padding-left: 0;
  }

  .dashboard-columns {
    gap: 42px;
  }

  .status-item + .status-item {
    border-top: 1px solid #d9cebd;
    border-left: 0;
    padding-left: 0;
  }

  .settings-section {
    align-items: flex-start;
  }

  .input-action {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    min-height: 50px;
  }

  .campaign-placeholder {
    min-height: 240px;
    padding: 40px 28px;
  }

  .coming-soon-state,
  .coming-soon-state.campaign-coming-soon {
    min-height: 360px;
  }

  .campaign-subnav {
    gap: 22px;
  }

  .campaign-summary-grid {
    grid-template-columns: 1fr;
  }

  .campaign-summary-grid article + article {
    border-top: 1px solid #dde4e8;
    border-left: 0;
  }

  .campaign-detail-block {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand {
    width: min(78vw, 360px);
  }

  .admin-header {
    padding-inline: 18px;
  }

  .admin-account {
    gap: 12px;
  }

  .settings-section {
    display: grid;
  }
}
