:root {
  --ink: #20201d;
  --muted: #62615b;
  --line: #dfded8;
  --surface: #ffffff;
  --wash: #f5f6f4;
  --accent: #16836f;
  --accent-2: #e0584f;
  --accent-3: #c28a12;
  --accent-4: #4f5bd5;
  --good: #13795b;
  --warn: #a16207;
  --danger: #c2413b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
}

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

.library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.library-row strong,
.library-row span,
.library-row em {
  display: block;
}

.library-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.library-row em {
  margin-top: 4px;
  color: #7c8795;
  font-size: 12px;
  font-style: normal;
}

.influencer-filter-tabs {
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.influencer-identity-tags {
  margin-bottom: 14px;
}

.influencer-profile-note {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.archive-card-actions {
  display: grid;
  gap: 6px;
  align-content: center;
}

@media (max-width: 760px) {
  .library-row {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  padding: 24px;
  color: #f8f6f1;
  background:
    linear-gradient(180deg, rgba(66, 184, 131, 0.16), rgba(224, 88, 79, 0.07)),
    var(--ink);
}

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

.brand img {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 19px;
}

.brand span {
  margin-top: 2px;
  color: rgba(248, 246, 241, 0.72);
  font-size: 13px;
}

.role-switch {
  display: grid;
  gap: 8px;
}

.submit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #f8f6f1;
  font-weight: 800;
  text-decoration: none;
}

.admin-lock-button {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  align-self: flex-end;
  justify-self: end;
  color: var(--ink);
  white-space: nowrap;
}

.toolbar .admin-lock-button {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
}

.role-button,
.secondary,
.ghost,
.primary,
.icon-button,
.danger-button,
.small-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.role-button {
  padding: 10px 12px;
  color: rgba(248, 246, 241, 0.76);
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
}

.role-button.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
}

.batch-selector,
.export-picker,
.side-actions {
  display: grid;
  gap: 10px;
}

.export-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.export-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  max-height: 108px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.export-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #f8f6f1;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 750;
}

.export-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-chip strong {
  font-size: 14px;
  line-height: 1;
}

.check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: rgba(248, 246, 241, 0.86);
  font-size: 12px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar label {
  color: rgba(248, 246, 241, 0.7);
}

select,
input,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
}

select,
input {
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.sidebar select {
  border-color: rgba(255, 255, 255, 0.16);
  color: #f8f6f1;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar option {
  color: var(--ink);
}

.secondary,
.ghost,
.primary,
.danger-button,
.small-button {
  padding: 0 14px;
  font-weight: 750;
}

.primary {
  color: #ffffff;
  background: var(--accent);
}

.secondary {
  color: var(--ink);
  background: #f8f6f1;
}

.ghost {
  color: inherit;
  border-color: currentColor;
  background: transparent;
}

.ghost.dark {
  color: var(--ink);
}

.danger-button {
  color: #ffffff;
  background: var(--danger);
}

.small-button {
  min-height: 34px;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.icon-button {
  width: 42px;
  min-width: 42px;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

button:hover {
  transform: translateY(-1px);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 560px;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  width: min(280px, 100%);
}

.select-box {
  width: 142px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  top: 24px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(19, 121, 91, 0.2);
  border-radius: 8px;
  color: #0b4b3b;
  background: #effaf5;
  box-shadow: 0 18px 38px rgba(32, 32, 29, 0.15);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card,
.panel,
.batch-card,
.risk-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(32, 32, 29, 0.05);
}

.kpi-card {
  min-height: 114px;
  padding: 16px;
}

.kpi-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.kpi-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.kpi-card em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 0.85fr) minmax(260px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.output-panel {
  margin-bottom: 14px;
}

.output-heading {
  align-items: flex-start;
}

.output-heading > div:first-child {
  display: grid;
  gap: 5px;
}

.period-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.period-switch .small-button.active {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.platform-distribution-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.output-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.output-stat {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.output-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.output-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1;
}

.output-stat.primary-stat {
  background: #ffffff;
}

.output-stat.primary-stat strong {
  color: var(--accent);
}

.panel {
  padding: 18px;
}

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

.panel-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.latest-item {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.latest-item:last-child {
  border-bottom: 0;
}

.latest-item::before {
  content: "";
  width: 7px;
  border-radius: 8px;
  background: var(--accent);
}

.latest-item:nth-child(2)::before {
  background: var(--accent-2);
}

.latest-item:nth-child(3)::before {
  background: var(--accent-3);
}

.latest-title {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.platform-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.platform-tag.muted {
  color: var(--muted);
  background: #f3f3f1;
}

.meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bar-chart,
.trend-chart {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 72px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-track,
.trend-track {
  overflow: hidden;
  height: 10px;
  border-radius: 8px;
  background: #ecebea;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.bar-row:nth-child(2n) .bar-fill {
  background: var(--accent-2);
}

.bar-row:nth-child(3n) .bar-fill {
  background: var(--accent-4);
}

.trend-row {
  display: grid;
  grid-template-columns: 58px 1fr 34px minmax(92px, auto);
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.trend-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.trend-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent-3);
}

.role-view {
  display: none;
  margin-bottom: 14px;
}

.role-view.active {
  display: block;
}

.boss-grid,
.pr-grid,
.blogger-grid,
.influencer-layout,
.influencer-analysis-grid {
  display: grid;
  gap: 14px;
}

.boss-grid {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.pr-grid,
.blogger-grid {
  grid-template-columns: minmax(340px, 0.75fr) minmax(360px, 1.25fr);
}

.influencer-layout {
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1.62fr);
  align-items: start;
}

.influencer-analysis-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.pr-grid.wide {
  grid-template-columns: repeat(2, minmax(340px, 1fr));
}

.span-two {
  grid-column: 1 / -1;
}

.content-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.content-split-card {
  position: relative;
  overflow: hidden;
}

.content-split-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.content-split-card.video::before {
  background: var(--accent-2);
}

.content-split-stats {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.content-split-stats strong {
  font-size: 34px;
  line-height: 1;
}

.content-split-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-type-list {
  display: grid;
  gap: 8px;
}

.content-type-list div:not(.empty) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.todo-grid,
.admin-home-grid,
.brand-preview-grid {
  display: grid;
  gap: 10px;
}

.todo-grid {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.todo-item,
.admin-home-card,
.brand-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.todo-item {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 12px;
}

.todo-item span,
.admin-home-card span,
.admin-home-card em,
.brand-preview-card span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.todo-item strong {
  font-size: 24px;
}

.admin-shell,
.admin-tab-content {
  display: grid;
  gap: 14px;
}

.admin-heading-panel {
  padding-bottom: 14px;
}

.admin-heading-panel [data-admin-lock-inline] {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-tabs .small-button.active,
.admin-home-card:hover {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.admin-home-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.admin-home-card {
  display: grid;
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
}

.admin-home-card strong {
  font-size: 30px;
  line-height: 1;
}

.admin-home-card:hover span,
.admin-home-card:hover em {
  color: rgba(255, 255, 255, 0.78);
}

.audit-work-table {
  min-width: 1180px;
}

.audit-actions {
  flex-wrap: wrap;
}

.audit-platform-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.audit-platform-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.75fr) minmax(180px, 1.4fr) 110px 120px 130px minmax(120px, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.audit-platform-row strong {
  align-self: center;
  overflow-wrap: anywhere;
}

.audit-platform-row label {
  min-width: 0;
}

.audit-platform-row a {
  align-self: center;
  white-space: nowrap;
}

.audit-work-editor {
  border-left: 5px solid var(--accent);
}

.export-admin-grid {
  display: grid;
  gap: 12px;
}

.export-chip-list.light {
  border-color: var(--line);
  background: #fbfbfa;
}

.export-chip.light {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.export-actions-row {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.export-actions-row.wide-actions {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.bulletin-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.bulletin-textarea {
  min-height: 220px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.brand-preview-grid {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin-bottom: 14px;
}

.brand-preview-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px;
}

.brand-preview-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.compact-actions {
  margin-top: 8px;
}

.archive-panel {
  margin-bottom: 14px;
}

.archive-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.archive-summary strong {
  font-size: 18px;
}

.archive-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.archive-month-list {
  display: grid;
  gap: 14px;
}

.archive-level-switch {
  min-width: fit-content;
}

.archive-month {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.archive-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.archive-month-header strong,
.archive-month-header span {
  display: block;
}

.archive-month-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.archive-month-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.archive-month-side span,
.archive-month-side em {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfbfa;
  font-style: normal;
}

.archive-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.archive-axis {
  position: relative;
  min-height: 100%;
}

.archive-axis::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: var(--line);
  transform: translateX(-50%);
}

.archive-lane {
  min-width: 0;
}

.archive-lane-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

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

.compact-archive-list {
  margin-top: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fbfbfa;
}

.archive-aggregate-list {
  display: grid;
  gap: 14px;
}

.archive-aggregate-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.archive-aggregate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.archive-aggregate-header.static-header {
  cursor: default;
}

.archive-aggregate-header strong,
.archive-aggregate-header span {
  display: block;
}

.archive-aggregate-header span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.archive-aggregate-meta,
.archive-aggregate-grid {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

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

.archive-aggregate-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.archive-aggregate-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.archive-year-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.archive-month-tile {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fbfbfa;
}

.archive-month-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.archive-card {
  --archive-color: #6b7280;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid var(--archive-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(32, 32, 29, 0.04);
}

.archive-card.type-weekly,
.archive-tag.type-weekly {
  --archive-color: #2563eb;
}

.archive-card.type-promo,
.archive-tag.type-promo {
  --archive-color: #d97706;
}

.archive-card.type-launch,
.archive-tag.type-launch {
  --archive-color: #15803d;
}

.archive-card.type-system,
.archive-tag.type-system {
  --archive-color: #7c3aed;
}

.archive-card.type-software,
.archive-tag.type-software {
  --archive-color: #0891b2;
}

.archive-card.type-other,
.archive-tag.type-other {
  --archive-color: #6b7280;
}

.archive-card-main {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.archive-card-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.archive-card-body {
  min-width: 0;
}

.archive-card-body h3 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.archive-tag-list,
.archive-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.archive-card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.archive-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--archive-color), #ffffff 70%);
  border-radius: 999px;
  color: var(--archive-color);
  background: color-mix(in srgb, var(--archive-color), #ffffff 91%);
  font-size: 12px;
  font-weight: 850;
}

.archive-tag.muted {
  color: var(--ink);
  border-color: var(--line);
  background: #fbfbfa;
}

.archive-toggle {
  align-self: start;
}

.archive-platform-list {
  display: grid;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.archive-platform-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.85fr) minmax(140px, 1.2fr) 86px auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.archive-platform-row a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-platform-row strong {
  text-align: right;
}

.inline-link {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.strong-link {
  color: var(--ink);
}

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

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

.compact-form-grid {
  gap: 10px;
}

.checkbox-label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  color: var(--ink);
  font-weight: 850;
}

.checkbox-label input {
  width: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.cooperation-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.cooperation-plan-list,
.fulfillment-list,
.influencer-list,
.influencer-timeline,
.influencer-batch-list {
  display: grid;
  gap: 10px;
}

.cooperation-plan-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.exchange-rule-hint {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(169, 107, 32, 0.22);
  border-radius: 8px;
  color: #7a4f14;
  background: #fff8e8;
  font-size: 12px;
}

.exchange-rule-hint[hidden] {
  display: none;
}

.cooperation-plan-head,
.fulfillment-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cooperation-plan-head strong {
  font-size: 14px;
}

.platform-section {
  margin-top: 16px;
}

.admin-platform-section {
  padding-top: 4px;
}

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

.platform-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.platform-preset-list .empty {
  width: 100%;
}

.platform-chip {
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

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

.platform-chip.custom-trigger {
  border-style: dashed;
}

.custom-platform-actions {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0;
}

.platform-data-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.platform-data-table {
  min-width: 720px;
}

.platform-data-table th,
.platform-data-table td {
  padding: 10px;
}

.platform-data-table th:first-child {
  width: 180px;
}

.platform-data-table th:nth-child(3) {
  width: 150px;
}

.platform-data-table th:last-child {
  width: 92px;
}

.platform-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.platform-empty-row td {
  padding: 0;
}

.table-field {
  display: block;
}

.platform-name-text {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.views-field input {
  min-width: 112px;
}

.platform-submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 22px rgba(32, 32, 29, 0.05);
}

.platform-submit-bar strong {
  color: var(--ink);
  font-size: 14px;
}

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

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

.platform-entry {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

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

.platform-entry-header strong {
  font-size: 14px;
}

.batch-list,
.risk-list,
.campaign-list {
  display: grid;
  gap: 10px;
}

.batch-card {
  padding: 14px;
}

.batch-card-header,
.risk-row,
.campaign-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plain-row,
.plain-item,
.card-title-button {
  border: 0;
  font: inherit;
}

.plain-row,
.card-title-button {
  width: 100%;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.plain-row {
  align-items: center;
}

.card-title-button {
  display: grid;
  gap: 5px;
  padding: 0;
}

.card-title-button span {
  color: var(--muted);
  font-size: 12px;
}

.batch-card strong,
.campaign-row strong {
  overflow-wrap: anywhere;
}

.batch-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.progress-line {
  overflow: hidden;
  height: 9px;
  margin: 12px 0 8px;
  border-radius: 8px;
  background: #ecebea;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.risk-row {
  padding: 12px;
  align-items: center;
}

.risk-row strong {
  display: block;
  margin-bottom: 3px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #ecebea;
}

.pill.good {
  color: var(--good);
  background: #e5f6ee;
}

.pill.warn {
  color: var(--warn);
  background: #fff5d8;
}

.pill.danger {
  color: var(--danger);
  background: #fdebea;
}

.pill.muted {
  color: var(--muted);
  background: #ecebea;
}

.influencer-summary-panel {
  margin-bottom: 14px;
}

.influencer-list-panel {
  position: sticky;
  top: 18px;
}

.influencer-list {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

.influencer-list-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
}

.influencer-list-item.active {
  border-color: rgba(22, 131, 111, 0.55);
  background: #edf8f4;
}

.influencer-list-item span,
.influencer-list-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.influencer-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.influencer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
}

.influencer-kpi {
  min-height: 74px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.influencer-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.influencer-kpi strong {
  display: block;
  margin-top: 9px;
  font-size: 19px;
}

.fulfillment-card {
  border: 1px solid var(--line);
  border-left: 5px solid #9ca3af;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.fulfillment-card.status-good {
  border-left-color: var(--good);
}

.fulfillment-card.status-warn {
  border-left-color: var(--warn);
}

.fulfillment-card.status-danger {
  border-left-color: var(--danger);
}

.fulfillment-card.status-muted {
  border-left-color: #9ca3af;
}

.fulfillment-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.fulfillment-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.batch-fulfillment {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.fulfillment-list.compact {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.campaign-row {
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.campaign-row:last-child {
  border-bottom: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1.55fr);
  align-items: start;
  gap: 14px;
}

.detail-layout > .panel {
  min-width: 0;
}

.batch-list.compact {
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.detail-scroll,
.drill-scroll {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

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

.drill-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.drill-column h3 {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.drill-item {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
}

.drill-item.active {
  border-color: rgba(22, 131, 111, 0.55);
  background: #edf8f4;
}

.drill-item span {
  color: var(--muted);
  font-size: 12px;
}

.platform-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: #ffffff;
}

.platform-link strong {
  color: var(--accent);
}

.submit-url-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.submit-url-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.submit-url-box code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-url-input {
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ffffff;
}

.settings-version {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.submit-body {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(22, 131, 111, 0.12), rgba(224, 88, 79, 0.09)),
    var(--wash);
}

.submit-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.submit-hero {
  margin-bottom: 18px;
}

.submit-hero img {
  border-radius: 8px;
}

.submit-hero h1 {
  max-width: none;
}

.submit-hero p:last-child {
  max-width: 620px;
  color: var(--muted);
}

.submit-panel {
  padding: 22px;
}

.table-panel {
  padding-bottom: 8px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.row-title {
  max-width: 330px;
  overflow-wrap: anywhere;
  font-weight: 800;
}

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

.status-select {
  min-width: 104px;
}

.work-row td {
  background: #ffffff;
}

.work-detail-row td {
  padding: 0 10px 12px;
  background: #fbfbfa;
}

.work-platform-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.work-platform-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(180px, 1.2fr) 92px auto;
  align-items: center;
  gap: 10px;
}

.work-platform-row a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-platform-row strong {
  text-align: right;
}

.empty {
  padding: 26px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.small-empty {
  padding: 12px;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .dashboard-grid,
  .boss-grid,
  .admin-home-grid,
  .brand-preview-grid,
  .archive-timeline,
  .archive-aggregate-grid,
  .archive-year-grid,
  .pr-grid,
  .blogger-grid,
  .influencer-layout,
  .influencer-analysis-grid,
  .fulfillment-list.compact,
  .detail-layout,
  .drill-columns,
  .content-split-grid,
  .output-stat-grid,
  .influencer-kpi-grid,
  .fulfillment-meta-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .detail-scroll,
  .drill-scroll {
    max-height: 460px;
  }

  .influencer-list-panel {
    position: static;
  }

  .influencer-list {
    max-height: 420px;
  }

  .archive-axis {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main {
    padding: 18px;
  }

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

  .toolbar {
    justify-content: stretch;
  }

  .output-heading,
  .period-switch {
    align-items: stretch;
    flex-direction: column;
  }

  .period-switch,
  .period-switch .small-button {
    width: 100%;
  }

  .search-box,
  .select-box {
    width: 100%;
  }

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

  .role-switch {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .role-button {
    text-align: center;
  }

  .admin-lock-button {
    min-height: 40px;
    width: auto;
    max-width: max-content;
    align-self: flex-end;
    justify-self: end;
  }

  .batch-card-footer,
  .submit-url-box,
  .platform-submit-bar {
    grid-template-columns: 1fr;
  }

  .platform-submit-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .platform-submit-bar .primary {
    width: 100%;
  }

  .work-platform-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .trend-row,
  .audit-platform-row,
  .todo-grid,
  .export-actions-row {
    grid-template-columns: 1fr;
  }

  .archive-month-header,
  .archive-month-side,
  .archive-aggregate-header,
  .archive-card-main {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-card-main,
  .archive-platform-row {
    grid-template-columns: 1fr;
  }

  .archive-platform-row strong {
    text-align: left;
  }

  .work-platform-row strong {
    text-align: left;
  }

  .detail-scroll,
  .drill-scroll {
    max-height: 360px;
  }
}
