:root {
  --orange: #ee4d2d;
  --orange-dark: #d83c1f;
  --admin-blue: #05004f;
  --admin-blue-light: #0b0666;
  --nav: #05004f;
  --nav-muted: #c4c4df;
  --bg: #ffffff;
  --surface: #ffffff;
  --line: #d9d9d9;
  --line-soft: #eeeeee;
  --text: #222222;
  --muted: #8c8c8c;
  --green: #0f9960;
  --green-bg: #eaf8f1;
  --blue: #0052d9;
  --blue-bg: #eef4ff;
  --yellow: #a96d00;
  --yellow-bg: #fff7df;
  --red: #cc3a2f;
  --red-bg: #fff0ee;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.sidebar {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #ffffff;
}

.brand {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.brand strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 20px;
  font-weight: 800;
}

.sidebar-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  padding: 0 6px 16px;
}

.sidebar-search input {
  height: 32px;
  border-radius: 0;
  border-color: #dcdcdc;
  padding: 0 6px;
}

.sidebar-search button {
  display: grid;
  place-items: center;
  height: 32px;
  border: 1px solid #dcdcdc;
  border-left: 0;
  background: #ffffff;
  color: #6b7280;
}

.side-nav {
  flex: 1;
  padding: 6px 0;
}

.nav-item,
.collapse-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nav-muted);
  font-size: 14px;
  text-align: left;
}

.nav-item.has-children::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-item:hover,
.nav-item.is-active {
  color: #ffffff;
  background: var(--admin-blue-light);
}

.nav-item.is-active {
  box-shadow: none;
}

.sub-nav {
  display: grid;
  gap: 1px;
  margin: 0 0 4px;
  padding: 2px 0 4px;
}

.sub-nav-item {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nav-muted);
  padding: 0 16px 0 48px;
  font-size: 13px;
  text-align: left;
}

.sub-nav-item:hover,
.sub-nav-item.is-active {
  color: #ffffff;
  background: rgba(0, 82, 217, 0.78);
}

.sub-nav-item.is-active {
  position: relative;
  font-weight: 700;
}

.sub-nav-item.is-active::before {
  content: none;
}

.collapse-button {
  margin: 8px;
  width: calc(100% - 16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace {
  min-width: 0;
}

.topbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.breadcrumb {
  color: var(--muted);
  font-size: 11px;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: 0;
}

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

.ghost-icon,
.user-chip {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
  color: #2b3340;
}

.ghost-icon {
  position: relative;
  width: 24px;
  justify-content: center;
  border: 0;
}

.ghost-icon.has-dot::after {
  content: "1";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f5222d;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
}

.user-chip {
  padding: 0 6px;
  border: 0;
  font-size: 12px;
}

.user-chip span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6a15a, #8b5cf6);
  color: #ffffff;
}

.top-select {
  width: 74px;
  height: 24px;
  border-radius: 0;
  color: #b8b8b8;
  font-size: 11px;
}

.env-badge {
  height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 5px;
  border: 1px solid #ffc069;
  background: #fff7e6;
  color: #d46b08;
  font-size: 11px;
}

.time-chip {
  min-width: 92px;
  height: 32px;
  display: grid;
  align-content: center;
  justify-items: end;
  padding: 0 8px;
  border-radius: 0 0 0 14px;
  background: #e6f0ff;
  color: #0052d9;
  font-size: 12px;
  line-height: 13px;
}

.time-chip small {
  color: #5b8ff9;
  font-size: 10px;
}

.page {
  position: relative;
  min-height: calc(100vh - 44px);
  padding: 0 0 40px;
  overflow: hidden;
}

.watermark {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: rgba(5, 0, 79, 0.045);
  font-size: 18px;
  font-weight: 700;
  transform: rotate(-16deg);
  pointer-events: none;
  white-space: nowrap;
}

.toolbar,
.content-grid {
  position: relative;
  z-index: 1;
}

#taskManagementView.is-hidden,
#taskManagementNewView.is-hidden,
#createIntegratedTaskPage.is-hidden,
.create-task-page.is-hidden,
.strategy-page.is-hidden,
.create-strategy-page.is-hidden,
.spp-row.is-hidden,
#integratedOneTimeRewardFields.is-hidden,
#integratedCycleRewardFields.is-hidden,
.integrated-checkin-row.is-hidden {
  display: none;
}

.toolbar,
.list-panel,
.detail-panel,
.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.toolbar {
  padding: 10px 28px 14px;
  display: grid;
  grid-template-columns: 150px minmax(180px, 1.15fr) 150px 150px minmax(180px, 1fr) auto;
  gap: 16px;
  align-items: end;
  border: 0;
  border-bottom: 14px solid #f2f4f7;
}

label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 11px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
}

select[multiple] {
  height: auto;
  min-height: 104px;
  padding: 6px 10px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 1px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.primary-button {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #ffffff;
  padding: 0 12px;
}

.primary-button:hover {
  background: #0046b8;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
}

.text-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.content-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.list-panel,
.detail-panel {
  min-width: 0;
}

.panel-heading,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 28px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-heading h2,
.detail-header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
}

.panel-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.panel-heading.compact {
  padding: 14px;
}

.panel-actions,
.drawer-header-actions,
.action-group,
.pagination-bar,
.confirm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-icon-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #4b5563;
}

.table-icon-button:hover {
  color: var(--blue);
  background: #f3f6fb;
}

.status-tabs {
  display: flex;
  align-items: flex-end;
  min-height: 44px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.status-tabs button {
  min-width: 94px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #ffffff;
  color: #444444;
  font-size: 13px;
}

.status-tabs button + button {
  border-left: 0;
}

.status-tabs button.is-active {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: inset 0 2px 0 var(--blue);
}

.flow-strip {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  color: #4b586a;
  font-size: 12px;
}

.flow-strip span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.flow-strip strong {
  font-weight: 800;
}

.flow-strip i {
  width: 18px;
  height: 1px;
  background: var(--line);
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line-soft);
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  height: 52px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #4b586a;
  background: #fafafa;
  font-size: 12px;
  font-weight: 500;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #f7faff;
}

.empty-row {
  cursor: default;
}

.muted {
  color: var(--muted);
}

.code {
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  color: #475467;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.type-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
}

.type-pill.browse {
  color: var(--blue);
  background: var(--blue-bg);
}

.type-pill.transaction {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.type-pill.check-in {
  color: #6941c6;
  background: #f4f0ff;
}

.status-badge.active {
  color: var(--green);
  background: var(--green-bg);
}

.status-badge.draft {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.status-badge.paused,
.status-badge.disabled {
  color: var(--red);
  background: var(--red-bg);
}

.action-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 500;
}

.action-link.danger {
  color: var(--red);
}

.pagination-bar {
  justify-content: space-between;
  padding: 14px 28px;
  color: var(--muted);
  font-size: 12px;
}

.admin-pagination {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-pagination button {
  min-width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #4b5563;
}

.admin-pagination button.is-current {
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #ffffff;
}

.admin-pagination select {
  width: 92px;
  height: 26px;
  padding: 0 8px;
}

.create-task-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 54px);
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
}

.strategy-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 54px);
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
}

.create-strategy-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 54px);
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
}

.strategy-workspace {
  margin-top: 0;
  border: 0;
  background: var(--surface);
}

.strategy-table {
  min-width: 1180px;
}

.integrated-task-table {
  min-width: 1320px;
}

.inherited-value {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  background: #fafafa;
  color: #666666;
  font-size: 13px;
}

.reward-product-value {
  border-color: #b8d1ff;
  background: #f3f7ff;
  color: #0052d9;
  font-weight: 600;
}

.create-header {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}

.create-header .text-button {
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}

.create-anchor-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 38px;
  min-height: 46px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
}

.create-anchor-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  color: #333333;
  font-size: 13px;
  text-decoration: none;
}

.create-anchor-nav a:hover,
.create-anchor-nav a.is-active {
  color: var(--blue);
}

.create-anchor-nav a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--blue);
}

.spp-form {
  width: 100%;
  margin: 0;
  padding: 0 24px 84px;
}

.create-form-section {
  scroll-margin-top: 56px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.82);
}

.create-section-title {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 500;
}

.create-section-body {
  padding: 10px 12px 30px;
}

.spp-row {
  display: grid;
  grid-template-columns: 330px minmax(320px, 780px);
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.spp-row.is-muted-row {
  opacity: 0.42;
}

.spp-row > label:first-child {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #333333;
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}

.spp-row > label.required:first-child::before {
  content: "*";
  color: #ff4d4f;
}

.spp-row input,
.spp-row select {
  height: 32px;
  font-size: 13px;
}

.spp-field-with-help {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spp-field-with-help p {
  margin: 0;
  color: #666666;
  font-size: 14px;
  line-height: 1.45;
}

.spp-input-with-suffix {
  display: flex;
  align-items: center;
  border: 1px solid #d9d9d9;
  background: #ffffff;
}

.spp-input-with-suffix:focus-within {
  border-color: #0052d9;
}

.spp-input-with-suffix input {
  flex: 1;
  min-width: 0;
  border: 0;
}

.spp-input-with-suffix input:focus {
  outline: 0;
}

.spp-input-with-suffix span {
  padding: 0 10px;
  color: #111111;
  font-size: 14px;
  white-space: nowrap;
}

.target-user-config {
  display: flex;
  align-items: center;
}

.reward-popup-settings {
  margin-top: 18px;
}

.compact-title {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  font-size: 16px;
}

.reward-popup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.radio-line {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.radio-line label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #666666;
  font-size: 14px;
}

.reward-popup-preview {
  width: 320px;
  overflow: hidden;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  text-align: center;
}

.coin-hero {
  position: relative;
  height: 132px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 196, 48, 0.34), transparent 17%),
    repeating-conic-gradient(from 7deg at 50% 62%, rgba(255, 198, 49, 0.45) 0deg 9deg, rgba(255, 255, 255, 0.72) 9deg 18deg),
    #fff7db;
}

.coin {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #f5b315;
  background: radial-gradient(circle at 35% 30%, #fff7aa 0, #ffd13d 34%, #f7a900 75%);
  color: #fff6c9;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(191, 128, 0, 0.18);
}

.coin-main {
  left: 128px;
  top: 42px;
  width: 70px;
  height: 70px;
  font-size: 38px;
}

.coin-small {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.coin-small.one {
  left: 54px;
  top: 76px;
}

.coin-small.two {
  right: 54px;
  top: 26px;
}

.coin-small.three {
  right: 88px;
  bottom: 16px;
}

.popup-copy {
  margin-top: 18px;
  color: #111111;
  font-size: 16px;
}

.reward-popup-preview strong {
  display: block;
  margin: 24px 0;
  color: #ee4d2d;
  font-size: 18px;
}

.reward-popup-preview button {
  width: calc(100% - 42px);
  height: 44px;
  margin: 0 21px 28px;
  border: 0;
  background: #ee4d2d;
  color: #ffffff;
  font-size: 14px;
}

.strategy-range-table,
.checkin-day-table {
  border: 1px solid #d9d9d9;
  background: #ffffff;
}

.strategy-range-row,
.checkin-day-row {
  display: grid;
  min-height: 36px;
}

.strategy-range-row {
  grid-template-columns: minmax(150px, 1fr) 140px 140px 110px;
}

.checkin-day-row {
  grid-template-columns: 90px minmax(180px, 1fr) 170px;
}

.integrated-checkin-row {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) 170px;
  min-height: 36px;
}

.strategy-range-row.is-hidden,
.checkin-day-row.is-hidden,
.reward-mode-grid label.is-hidden {
  display: none;
}

.strategy-range-row + .strategy-range-row,
.checkin-day-row + .checkin-day-row,
.integrated-checkin-row + .integrated-checkin-row {
  border-top: 1px solid #eeeeee;
}

.strategy-range-row span,
.strategy-range-row input,
.strategy-weight-field,
.checkin-day-row span,
.checkin-day-row select,
.checkin-day-row input,
.integrated-checkin-row span,
.integrated-checkin-row input {
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.strategy-range-row span,
.checkin-day-row span {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: #333333;
  font-size: 14px;
}

.integrated-checkin-row span {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: #333333;
  font-size: 13px;
}

.strategy-range-row input,
.checkin-day-row select,
.checkin-day-row input {
  height: 36px;
  border-left: 1px solid #eeeeee;
}

.integrated-checkin-row input {
  height: 36px;
  border-left: 1px solid #eeeeee;
}

.strategy-weight-field {
  display: flex;
  align-items: center;
  border-left: 1px solid #eeeeee;
}

.strategy-weight-field input {
  flex: 1;
  min-width: 0;
  border-left: 0;
}

.strategy-weight-field span {
  width: auto;
  padding: 0 10px 0 4px;
  color: #666666;
}

.strategy-range-head span,
.checkin-day-head span,
.integrated-checkin-row.checkin-day-head span {
  background: #fafafa;
  color: #666666;
  font-size: 12px;
  font-weight: 600;
}

.admin-multi-select {
  position: relative;
}

.multi-select-control {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px 28px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

.multi-select-control::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-right: 1px solid #8c8c8c;
  border-bottom: 1px solid #8c8c8c;
  transform: rotate(45deg);
}

.admin-multi-select.is-open .multi-select-control {
  border-color: #0052d9;
  box-shadow: 0 0 0 1px #0052d9;
}

.multi-placeholder {
  color: #bfbfbf;
}

.multi-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid #d9d9d9;
  background: #f5f5f5;
  color: #333333;
  font-size: 12px;
}

.multi-tag i {
  color: #8c8c8c;
  font-style: normal;
  cursor: pointer;
}

.multi-select-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  z-index: 8;
  display: none;
  padding: 4px 0;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.admin-multi-select.is-open .multi-select-dropdown {
  display: block;
}

.multi-select-dropdown button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #333333;
  padding: 0 10px;
  font-size: 13px;
  text-align: left;
}

.multi-select-dropdown button:hover,
.multi-select-dropdown button.is-selected {
  background: #f0f0f0;
}

.multi-select-dropdown button.is-selected::after {
  content: "Selected";
  margin-left: auto;
  color: var(--blue);
  font-size: 11px;
}

.frequency-config {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.is-disabled {
  color: #bfbfbf !important;
}

.create-actions {
  position: fixed;
  left: 236px;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  min-height: 58px;
  padding: 13px 28px;
  border-top: 1px solid var(--line);
  background: #f5f7fa;
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.05);
}

.create-task-page.view-mode .create-section-body input,
.create-task-page.view-mode .create-section-body select,
.create-task-page.view-mode .create-section-body button,
.task-drawer.view-mode .form-section input,
.task-drawer.view-mode .form-section select,
.task-drawer.view-mode .form-section button {
  pointer-events: none;
  background-color: #fafafa;
  color: #666666;
}

.create-task-page.view-mode .create-actions,
.task-drawer.view-mode .detail-actions {
  display: none;
}

body.drawer-open {
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(15, 23, 42, 0.34);
}

.drawer-backdrop.is-hidden,
.task-drawer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(620px, 100vw);
  height: 100vh;
  overflow: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: -10px 0 24px rgba(15, 23, 42, 0.12);
  transform: translateX(0);
  transition: opacity 160ms ease, transform 180ms ease;
}

.task-drawer.is-hidden {
  transform: translateX(100%);
}

.detail-header {
  align-items: center;
}

.detail-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.drawer-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfd;
}

.drawer-stepper span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.drawer-stepper .is-current {
  border-color: var(--blue);
  background: #f0f6ff;
  color: var(--blue);
}

.form-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.form-section.is-hidden {
  display: none;
}

.form-section-title {
  margin-bottom: 12px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
}

.field-grid {
  display: grid;
  gap: 12px;
}

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

.form-section label + label,
.form-section .field-grid + label,
.form-section label + .field-grid {
  margin-top: 12px;
}

.input-with-unit {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.input-with-unit input {
  height: 26px;
  border: 0;
  border-radius: 0;
}

.input-with-unit span {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.coverage-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
}

.coverage-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 0.55fr 0.8fr 0.8fr 0.8fr;
}

.coverage-row span {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #344054;
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.coverage-row span + span {
  border-left: 1px solid var(--line-soft);
}

.coverage-head span {
  background: #f8fafc;
  color: #4b586a;
  font-weight: 900;
}

#coverageRows .coverage-row:last-child span {
  border-bottom: 0;
}

.coverage-table + .text-button {
  margin-top: 10px;
}

.strategy-binding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 10px;
}

.strategy-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.strategy-meta span {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  background: #fafafa;
  color: #4b586a;
  font-size: 12px;
}

.reward-mode-grid {
  margin-bottom: 12px;
}

.random-config-card {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #c9dcff;
  border-radius: 0;
  background: #f8fbff;
}

.random-config-card.is-hidden {
  display: none;
}

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

.range-inputs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reward-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bcd6ff;
  border-radius: 0;
  background: #f0f6ff;
  color: #0052d9;
  font-size: 12px;
  font-weight: 800;
  line-height: 17px;
}

.trigger-summary {
  margin: 14px 16px 0;
  padding: 10px 12px;
  border: 1px solid #c9dcff;
  border-radius: 0;
  background: var(--blue-bg);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  line-height: 17px;
}

.check-list {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.check-list input {
  width: 14px;
  height: 14px;
}

.audit-box {
  display: grid;
  gap: 3px;
  margin: 14px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcfd;
}

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

.audit-box strong {
  color: #344054;
  font-size: 12px;
  line-height: 16px;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 20;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  border-radius: 0;
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.modal-backdrop.is-hidden {
  display: none;
}

.confirm-dialog {
  width: min(420px, 100%);
  padding: 18px;
}

.confirm-dialog h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.confirm-dialog p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 19px;
}

.confirm-actions {
  justify-content: flex-end;
}

@media (max-width: 1180px) {
  .admin-app {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand strong,
  .nav-item,
  .collapse-button {
    font-size: 0;
  }

  .sub-nav {
    display: none;
  }

  .brand {
    justify-content: center;
  }

  .nav-item,
  .collapse-button {
    justify-content: center;
    padding: 0;
  }

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

  .spp-form {
    width: 100%;
  }

  .create-actions {
    left: 76px;
  }

  .toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

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

  .sidebar {
    display: none;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .top-actions {
    align-self: center;
  }

  .page {
    padding: 0 0 40px;
  }

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

  .spp-form {
    width: 100%;
    padding-right: 14px;
    padding-left: 14px;
  }

  .create-actions {
    left: 0;
  }

  .create-anchor-nav {
    gap: 22px;
    overflow-x: auto;
  }

  .status-tabs {
    overflow-x: auto;
    padding: 0 14px;
  }

  .create-section-body {
    padding: 20px 16px 24px;
  }

  .spp-row,
  .frequency-config {
    grid-template-columns: 1fr;
  }

  .spp-row > label:first-child {
    justify-content: flex-start;
    text-align: left;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions,
  .pagination-bar div {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .flow-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 10px 16px;
  }

  .flow-strip i {
    display: none;
  }

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