body.owner-shell-v1 [data-admin-console] {
  --admin-line: color-mix(in srgb, var(--cc-line, #96aaa4) 62%, transparent);
  --admin-risk: #c54b45;
  align-items: start;
}

body.owner-shell-v1 [data-admin-console] .panel {
  min-width: 0;
  overflow: hidden;
}

body.owner-shell-v1 [data-admin-console] .workbench-form,
body.owner-shell-v1 [data-admin-console] .ai-settings-stage {
  display: grid;
  gap: 12px;
}

body.owner-shell-v1 [data-admin-console] .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.owner-shell-v1 [data-admin-console] .form-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-picker {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--cc-surface, #f7faf8) 88%, transparent);
}

body.owner-shell-v1 [data-admin-console] .admin-duration-picker legend {
  padding: 0 6px;
  color: var(--cc-text-muted, #53645f);
  font-size: 13px;
  font-weight: 650;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options span {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 7px 8px;
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--cc-surface, #ffffff) 92%, transparent);
  color: var(--cc-text, #263731);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input:checked + span {
  border-color: color-mix(in srgb, #187451 72%, var(--admin-line));
  background: color-mix(in srgb, #187451 14%, var(--cc-surface, #ffffff));
  color: color-mix(in srgb, #0d5b3d 86%, var(--cc-text, #263731));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, #b58b2a 74%, transparent);
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, #187451 58%, transparent);
  outline-offset: 2px;
}

body.owner-shell-v1 [data-admin-console] .admin-custom-days {
  display: grid;
  grid-template-columns: minmax(100px, auto) minmax(0, 180px);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

body.owner-shell-v1 [data-admin-console] .admin-custom-days[hidden] {
  display: none;
}

body.owner-shell-v1 [data-admin-code-output] {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
}

body.owner-shell-v1 [data-admin-users-list],
body.owner-shell-v1 [data-admin-code-list] {
  max-height: min(52vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1 .admin-user-row,
body.owner-shell-v1 .admin-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--admin-line);
}

body.owner-shell-v1 .admin-user-row small,
body.owner-shell-v1 .admin-code-row small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

body.owner-shell-v1 .admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .mini-action.danger {
  border-color: color-mix(in srgb, var(--admin-risk) 62%, transparent);
  color: var(--admin-risk);
}

@media (max-width: 700px) {
  body.owner-shell-v1 [data-admin-console] .form-grid,
  body.owner-shell-v1 .admin-user-row,
  body.owner-shell-v1 .admin-code-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .admin-user-actions {
    justify-content: flex-start;
  }

  body.owner-shell-v1 [data-admin-console] .admin-duration-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 [data-admin-console] .admin-custom-days {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 [data-admin-users-list],
  body.owner-shell-v1 [data-admin-code-list] {
    max-height: 60vh;
    overscroll-behavior: auto;
  }
}
