/* Redeem-code creation, scoped to the existing owner workspace. */
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 22px;
  border: 1px solid var(--admin-soft-border, #dcd9ff);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 42%, var(--admin-soft, #f0efff) 180%);
  box-shadow: 0 10px 30px rgba(37, 53, 88, .055);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--admin-accent, #5642c9), var(--admin-accent-end, #285fba));
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 9px;
  color: #1f2e49;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation > h3::before {
  content: '';
  flex: 0 0 4px;
  width: 4px;
  height: 19px;
  border-radius: 4px;
  background: var(--admin-accent, #5642c9);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation > p.zv-muted {
  max-width: 1150px;
  margin: 0;
  color: #61728d;
  font-size: 13px;
  line-height: 1.7;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas: 'plan region purpose quantity' 'total total total action';
  gap: 16px;
  align-items: end;
  margin: 22px 0 0;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label:nth-child(1) { grid-area: plan; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label:nth-child(2) { grid-area: region; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > fieldset.cv-purpose { grid-area: purpose; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label:has(> input[type='number']) { grid-area: quantity; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > .cv-total { grid-area: total; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > button.zv-primary { grid-area: action; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: #43536e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label > select,
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label > input[type='number'] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #fff;
  color: #26354d;
  font: inherit;
  font-weight: 500;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > label > :is(select, input):focus-visible {
  border-color: var(--admin-accent, #5642c9);
  outline: 2px solid var(--admin-accent, #5642c9);
  outline-offset: 2px;
  box-shadow: none;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-purpose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-purpose > legend {
  margin: 0 0 8px;
  padding: 0;
  color: #43536e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-purpose > label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #fff;
  color: #43536e;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-purpose > label:has(input:checked) {
  border-color: var(--admin-accent, #5642c9);
  background: var(--admin-soft, #f0efff);
  color: var(--admin-accent, #5642c9);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-purpose input[type='radio'] {
  flex: 0 0 15px;
  width: 15px;
  min-width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--admin-accent, #5642c9);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--admin-soft-border, #dcd9ff);
  border-radius: 12px;
  background: var(--admin-soft, #f0efff);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-total > span { color: #53627b; font-size: 12px; font-weight: 600; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-total > strong {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--admin-accent, #5642c9);
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-total > small {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #53627b;
  font-size: 12px;
  line-height: 1.5;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > button.zv-primary {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, var(--admin-accent, #5642c9), var(--admin-accent-end, #285fba));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 53, 88, .14);
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > button.zv-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-cost-details {
  margin: 20px 0 0;
  padding: 15px 0 0;
  border-top: 1px solid #e6edf5;
}
.shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .cv-cost-details > summary {
  color: var(--admin-accent, #5642c9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
@media (max-width: 1100px) {
  .shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: 'plan region' 'purpose quantity' 'total total' 'action action';
  }
}
@media (max-width: 560px) {
  .shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation { padding: 22px 18px 18px; }
  .shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'plan' 'region' 'purpose' 'quantity' 'total' 'action';
  }
  .shell.admin-workspace.admin-workspace:has(.owner-ws-header) .console-v3 .cv-generation .zv-controls > button.zv-primary { min-height: 48px; }
}

/* Collapse only the settings contents; leave the profit reports in place. */
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .profit-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .profit-section-heading > .profit-badge { margin-left: auto; }
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .wuyou-profit-fold-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--admin-soft-border, #dcd9ff);
  border-radius: 9px;
  background: var(--admin-soft, #f0efff);
  color: var(--admin-accent, #5642c9);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .wuyou-profit-fold-toggle::after { content: '▾'; font-size: 12px; }
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .wuyou-profit-fold-toggle[aria-expanded='true']::after { content: '▴'; }
.shell.admin-workspace .daily-profit-page .automatic-profit-settings .wuyou-profit-fold-toggle:focus-visible { outline: 2px solid var(--admin-accent, #5642c9); outline-offset: 2px; }
.shell.admin-workspace .daily-profit-page .automatic-profit-settings.wuyou-profit-folded > :not(.profit-section-heading) { display: none !important; }
@media (max-width: 420px) {
  .shell.admin-workspace .daily-profit-page .automatic-profit-settings .profit-section-heading > .profit-badge { margin-left: 0; }
  .shell.admin-workspace .daily-profit-page .automatic-profit-settings .wuyou-profit-fold-toggle { margin-left: auto; }
}
